generated-configure.sh revision 993:65a66b8a998f
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
800BOOT_JDK_JVMARGS
801JAVAC_FLAGS
802BOOT_JDK_SOURCETARGET
803JARSIGNER
804NATIVE2ASCII
805JAR
806JAVAH
807JAVAC
808JAVA
809BOOT_JDK
810BOOT_TOOLSJAR
811BOOT_RTJAR
812JAVA_CHECK
813JAVAC_CHECK
814COOKED_BUILD_NUMBER
815JDK_VERSION
816COPYRIGHT_YEAR
817MACOSX_BUNDLE_ID_BASE
818MACOSX_BUNDLE_NAME_BASE
819COMPANY_NAME
820JDK_RC_PLATFORM_NAME
821PRODUCT_SUFFIX
822PRODUCT_NAME
823LAUNCHER_NAME
824MILESTONE
825JDK_BUILD_NUMBER
826JDK_UPDATE_VERSION
827JDK_MICRO_VERSION
828JDK_MINOR_VERSION
829JDK_MAJOR_VERSION
830USER_RELEASE_SUFFIX
831COMPRESS_JARS
832RMICONNECTOR_IIOP
833UNLIMITED_CRYPTO
834CACERTS_FILE
835TEST_IN_BUILD
836BUILD_HEADLESS
837SUPPORT_HEADFUL
838SUPPORT_HEADLESS
839BDEPS_FTP
840BDEPS_UNZIP
841OS_VERSION_MICRO
842OS_VERSION_MINOR
843OS_VERSION_MAJOR
844PKG_CONFIG
845CODESIGN
846XATTR
847DSYMUTIL
848IS_GNU_TIME
849TIME
850STAT
851HG
852READELF
853OTOOL
854LDD
855ZIP
856UNZIP
857FIND_DELETE
858MAKE
859CHECK_TOOLSDIR_MAKE
860CHECK_TOOLSDIR_GMAKE
861CHECK_MAKE
862CHECK_GMAKE
863PKGHANDLER
864OUTPUT_ROOT
865CONF_NAME
866SPEC
867BUILD_VARIANT_RELEASE
868DEBUG_CLASSFILES
869FASTDEBUG
870VARIANT
871DEBUG_LEVEL
872MACOSX_UNIVERSAL
873INCLUDE_SA
874JVM_VARIANT_CORE
875JVM_VARIANT_ZEROSHARK
876JVM_VARIANT_ZERO
877JVM_VARIANT_KERNEL
878JVM_VARIANT_MINIMAL1
879JVM_VARIANT_CLIENT
880JVM_VARIANT_SERVER
881JVM_VARIANTS
882JVM_INTERPRETER
883JDK_VARIANT
884SET_OPENJDK
885BUILD_LOG_WRAPPER
886BUILD_LOG_PREVIOUS
887BUILD_LOG
888SYS_ROOT
889TOPDIR
890PATH_SEP
891ZERO_ARCHDEF
892DEFINE_CROSS_COMPILE_ARCH
893LP64
894OPENJDK_TARGET_OS_EXPORT_DIR
895OPENJDK_TARGET_OS_API_DIR
896OPENJDK_TARGET_CPU_JLI_CFLAGS
897OPENJDK_TARGET_CPU_OSARCH
898OPENJDK_TARGET_CPU_ISADIR
899OPENJDK_TARGET_CPU_LIBDIR
900OPENJDK_TARGET_CPU_LEGACY_LIB
901OPENJDK_TARGET_CPU_LEGACY
902REQUIRED_OS_VERSION
903REQUIRED_OS_NAME
904COMPILE_TYPE
905OPENJDK_TARGET_CPU_ENDIAN
906OPENJDK_TARGET_CPU_BITS
907OPENJDK_TARGET_CPU_ARCH
908OPENJDK_TARGET_CPU
909OPENJDK_TARGET_OS_API
910OPENJDK_TARGET_OS
911OPENJDK_BUILD_CPU_ENDIAN
912OPENJDK_BUILD_CPU_BITS
913OPENJDK_BUILD_CPU_ARCH
914OPENJDK_BUILD_CPU
915OPENJDK_BUILD_OS_API
916OPENJDK_BUILD_OS
917OPENJDK_BUILD_AUTOCONF_NAME
918OPENJDK_TARGET_AUTOCONF_NAME
919target_os
920target_vendor
921target_cpu
922target
923host_os
924host_vendor
925host_cpu
926host
927build_os
928build_vendor
929build_cpu
930build
931SETFILE
932DF
933READLINK
934CYGPATH
935SED
936FGREP
937EGREP
938GREP
939AWK
940XARGS
941WHICH
942WC
943UNIQ
944UNAME
945TR
946TOUCH
947TEE
948TAR
949TAIL
950SORT
951SH
952RM
953PRINTF
954NAWK
955MV
956MKTEMP
957MKDIR
958LS
959LN
960HEAD
961FIND
962FILE
963EXPR
964ECHO
965DIRNAME
966DIFF
967DATE
968CUT
969CPIO
970CP
971COMM
972CMP
973CHMOD
974CAT
975BASH
976BASENAME
977DATE_WHEN_CONFIGURED
978CONFIGURE_COMMAND_LINE
979target_alias
980host_alias
981build_alias
982LIBS
983ECHO_T
984ECHO_N
985ECHO_C
986DEFS
987mandir
988localedir
989libdir
990psdir
991pdfdir
992dvidir
993htmldir
994infodir
995docdir
996oldincludedir
997includedir
998localstatedir
999sharedstatedir
1000sysconfdir
1001datadir
1002datarootdir
1003libexecdir
1004sbindir
1005bindir
1006program_transform_name
1007prefix
1008exec_prefix
1009PACKAGE_URL
1010PACKAGE_BUGREPORT
1011PACKAGE_STRING
1012PACKAGE_VERSION
1013PACKAGE_TARNAME
1014PACKAGE_NAME
1015PATH_SEPARATOR
1016SHELL'
1017ac_subst_files=''
1018ac_user_opts='
1019enable_option_checking
1020with_target_bits
1021with_sys_root
1022with_tools_dir
1023with_devkit
1024enable_openjdk_only
1025with_custom_make_dir
1026with_jdk_variant
1027with_jvm_interpreter
1028with_jvm_variants
1029enable_debug
1030with_debug_level
1031with_conf_name
1032with_builddeps_conf
1033with_builddeps_server
1034with_builddeps_dir
1035with_builddeps_group
1036enable_headful
1037enable_hotspot_test_in_build
1038with_cacerts_file
1039enable_unlimited_crypto
1040enable_rmiconnector_iiop
1041with_milestone
1042with_update_version
1043with_user_release_suffix
1044with_build_number
1045with_boot_jdk
1046with_boot_jdk_jvmargs
1047with_add_source_root
1048with_override_source_root
1049with_adds_and_overrides
1050with_override_langtools
1051with_override_corba
1052with_override_jaxp
1053with_override_jaxws
1054with_override_hotspot
1055with_override_nashorn
1056with_override_jdk
1057with_import_hotspot
1058with_toolchain_type
1059with_jtreg
1060with_extra_cflags
1061with_extra_cxxflags
1062with_extra_ldflags
1063enable_debug_symbols
1064enable_zip_debug_info
1065enable_macosx_runtime_support
1066with_x
1067with_cups
1068with_cups_include
1069with_freetype
1070with_freetype_include
1071with_freetype_lib
1072enable_freetype_bundling
1073with_alsa
1074with_alsa_include
1075with_alsa_lib
1076with_giflib
1077with_libpng
1078with_zlib
1079with_stdc__lib
1080with_msvcr_dll
1081with_dxsdk
1082with_dxsdk_lib
1083with_dxsdk_include
1084with_num_cores
1085with_memory_size
1086with_jobs
1087with_sjavac_server_java
1088enable_sjavac
1089enable_precompiled_headers
1090enable_ccache
1091with_ccache_dir
1092'
1093      ac_precious_vars='build_alias
1094host_alias
1095target_alias
1096BASENAME
1097BASH
1098CAT
1099CHMOD
1100CMP
1101COMM
1102CP
1103CPIO
1104CUT
1105DATE
1106DIFF
1107DIRNAME
1108ECHO
1109EXPR
1110FILE
1111FIND
1112HEAD
1113LN
1114LS
1115MKDIR
1116MKTEMP
1117MV
1118NAWK
1119PRINTF
1120RM
1121SH
1122SORT
1123TAIL
1124TAR
1125TEE
1126TOUCH
1127TR
1128UNAME
1129UNIQ
1130WC
1131WHICH
1132XARGS
1133AWK
1134GREP
1135EGREP
1136FGREP
1137SED
1138CYGPATH
1139READLINK
1140DF
1141SETFILE
1142UNZIP
1143ZIP
1144LDD
1145OTOOL
1146READELF
1147HG
1148STAT
1149TIME
1150DSYMUTIL
1151XATTR
1152CODESIGN
1153PKG_CONFIG
1154JAVA
1155JAVAC
1156JAVAH
1157JAR
1158NATIVE2ASCII
1159JARSIGNER
1160CC
1161CFLAGS
1162LDFLAGS
1163LIBS
1164CPPFLAGS
1165CXX
1166CXXFLAGS
1167CCC
1168CPP
1169CXXCPP
1170AS
1171AR
1172OBJC
1173OBJCFLAGS
1174LIPO
1175STRIP
1176NM
1177GNM
1178MCS
1179OBJCOPY
1180OBJDUMP
1181BUILD_CC
1182BUILD_CXX
1183BUILD_LD
1184JTREGEXE
1185XMKMF
1186FREETYPE_CFLAGS
1187FREETYPE_LIBS
1188ALSA_CFLAGS
1189ALSA_LIBS
1190PNG_CFLAGS
1191PNG_LIBS
1192LIBFFI_CFLAGS
1193LIBFFI_LIBS
1194CCACHE'
1195
1196
1197# Initialize some variables set by options.
1198ac_init_help=
1199ac_init_version=false
1200ac_unrecognized_opts=
1201ac_unrecognized_sep=
1202# The variables have the same names as the options, with
1203# dashes changed to underlines.
1204cache_file=/dev/null
1205exec_prefix=NONE
1206no_create=
1207no_recursion=
1208prefix=NONE
1209program_prefix=NONE
1210program_suffix=NONE
1211program_transform_name=s,x,x,
1212silent=
1213site=
1214srcdir=
1215verbose=
1216x_includes=NONE
1217x_libraries=NONE
1218
1219# Installation directory options.
1220# These are left unexpanded so users can "make install exec_prefix=/foo"
1221# and all the variables that are supposed to be based on exec_prefix
1222# by default will actually change.
1223# Use braces instead of parens because sh, perl, etc. also accept them.
1224# (The list follows the same order as the GNU Coding Standards.)
1225bindir='${exec_prefix}/bin'
1226sbindir='${exec_prefix}/sbin'
1227libexecdir='${exec_prefix}/libexec'
1228datarootdir='${prefix}/share'
1229datadir='${datarootdir}'
1230sysconfdir='${prefix}/etc'
1231sharedstatedir='${prefix}/com'
1232localstatedir='${prefix}/var'
1233includedir='${prefix}/include'
1234oldincludedir='/usr/include'
1235docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1236infodir='${datarootdir}/info'
1237htmldir='${docdir}'
1238dvidir='${docdir}'
1239pdfdir='${docdir}'
1240psdir='${docdir}'
1241libdir='${exec_prefix}/lib'
1242localedir='${datarootdir}/locale'
1243mandir='${datarootdir}/man'
1244
1245ac_prev=
1246ac_dashdash=
1247for ac_option
1248do
1249  # If the previous option needs an argument, assign it.
1250  if test -n "$ac_prev"; then
1251    eval $ac_prev=\$ac_option
1252    ac_prev=
1253    continue
1254  fi
1255
1256  case $ac_option in
1257  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1258  *=)   ac_optarg= ;;
1259  *)    ac_optarg=yes ;;
1260  esac
1261
1262  # Accept the important Cygnus configure options, so we can diagnose typos.
1263
1264  case $ac_dashdash$ac_option in
1265  --)
1266    ac_dashdash=yes ;;
1267
1268  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1269    ac_prev=bindir ;;
1270  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1271    bindir=$ac_optarg ;;
1272
1273  -build | --build | --buil | --bui | --bu)
1274    ac_prev=build_alias ;;
1275  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1276    build_alias=$ac_optarg ;;
1277
1278  -cache-file | --cache-file | --cache-fil | --cache-fi \
1279  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1280    ac_prev=cache_file ;;
1281  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1282  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1283    cache_file=$ac_optarg ;;
1284
1285  --config-cache | -C)
1286    cache_file=config.cache ;;
1287
1288  -datadir | --datadir | --datadi | --datad)
1289    ac_prev=datadir ;;
1290  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1291    datadir=$ac_optarg ;;
1292
1293  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1294  | --dataroo | --dataro | --datar)
1295    ac_prev=datarootdir ;;
1296  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1297  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1298    datarootdir=$ac_optarg ;;
1299
1300  -disable-* | --disable-*)
1301    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1302    # Reject names that are not valid shell variable names.
1303    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1304      as_fn_error $? "invalid feature name: $ac_useropt"
1305    ac_useropt_orig=$ac_useropt
1306    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1307    case $ac_user_opts in
1308      *"
1309"enable_$ac_useropt"
1310"*) ;;
1311      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1312	 ac_unrecognized_sep=', ';;
1313    esac
1314    eval enable_$ac_useropt=no ;;
1315
1316  -docdir | --docdir | --docdi | --doc | --do)
1317    ac_prev=docdir ;;
1318  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1319    docdir=$ac_optarg ;;
1320
1321  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1322    ac_prev=dvidir ;;
1323  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1324    dvidir=$ac_optarg ;;
1325
1326  -enable-* | --enable-*)
1327    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1328    # Reject names that are not valid shell variable names.
1329    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1330      as_fn_error $? "invalid feature name: $ac_useropt"
1331    ac_useropt_orig=$ac_useropt
1332    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1333    case $ac_user_opts in
1334      *"
1335"enable_$ac_useropt"
1336"*) ;;
1337      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1338	 ac_unrecognized_sep=', ';;
1339    esac
1340    eval enable_$ac_useropt=\$ac_optarg ;;
1341
1342  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1343  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1344  | --exec | --exe | --ex)
1345    ac_prev=exec_prefix ;;
1346  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1347  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1348  | --exec=* | --exe=* | --ex=*)
1349    exec_prefix=$ac_optarg ;;
1350
1351  -gas | --gas | --ga | --g)
1352    # Obsolete; use --with-gas.
1353    with_gas=yes ;;
1354
1355  -help | --help | --hel | --he | -h)
1356    ac_init_help=long ;;
1357  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1358    ac_init_help=recursive ;;
1359  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1360    ac_init_help=short ;;
1361
1362  -host | --host | --hos | --ho)
1363    ac_prev=host_alias ;;
1364  -host=* | --host=* | --hos=* | --ho=*)
1365    host_alias=$ac_optarg ;;
1366
1367  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1368    ac_prev=htmldir ;;
1369  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1370  | --ht=*)
1371    htmldir=$ac_optarg ;;
1372
1373  -includedir | --includedir | --includedi | --included | --include \
1374  | --includ | --inclu | --incl | --inc)
1375    ac_prev=includedir ;;
1376  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1377  | --includ=* | --inclu=* | --incl=* | --inc=*)
1378    includedir=$ac_optarg ;;
1379
1380  -infodir | --infodir | --infodi | --infod | --info | --inf)
1381    ac_prev=infodir ;;
1382  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1383    infodir=$ac_optarg ;;
1384
1385  -libdir | --libdir | --libdi | --libd)
1386    ac_prev=libdir ;;
1387  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1388    libdir=$ac_optarg ;;
1389
1390  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1391  | --libexe | --libex | --libe)
1392    ac_prev=libexecdir ;;
1393  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1394  | --libexe=* | --libex=* | --libe=*)
1395    libexecdir=$ac_optarg ;;
1396
1397  -localedir | --localedir | --localedi | --localed | --locale)
1398    ac_prev=localedir ;;
1399  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1400    localedir=$ac_optarg ;;
1401
1402  -localstatedir | --localstatedir | --localstatedi | --localstated \
1403  | --localstate | --localstat | --localsta | --localst | --locals)
1404    ac_prev=localstatedir ;;
1405  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1406  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1407    localstatedir=$ac_optarg ;;
1408
1409  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1410    ac_prev=mandir ;;
1411  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1412    mandir=$ac_optarg ;;
1413
1414  -nfp | --nfp | --nf)
1415    # Obsolete; use --without-fp.
1416    with_fp=no ;;
1417
1418  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1419  | --no-cr | --no-c | -n)
1420    no_create=yes ;;
1421
1422  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1423  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1424    no_recursion=yes ;;
1425
1426  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1427  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1428  | --oldin | --oldi | --old | --ol | --o)
1429    ac_prev=oldincludedir ;;
1430  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1431  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1432  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1433    oldincludedir=$ac_optarg ;;
1434
1435  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1436    ac_prev=prefix ;;
1437  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1438    prefix=$ac_optarg ;;
1439
1440  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1441  | --program-pre | --program-pr | --program-p)
1442    ac_prev=program_prefix ;;
1443  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1444  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1445    program_prefix=$ac_optarg ;;
1446
1447  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1448  | --program-suf | --program-su | --program-s)
1449    ac_prev=program_suffix ;;
1450  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1451  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1452    program_suffix=$ac_optarg ;;
1453
1454  -program-transform-name | --program-transform-name \
1455  | --program-transform-nam | --program-transform-na \
1456  | --program-transform-n | --program-transform- \
1457  | --program-transform | --program-transfor \
1458  | --program-transfo | --program-transf \
1459  | --program-trans | --program-tran \
1460  | --progr-tra | --program-tr | --program-t)
1461    ac_prev=program_transform_name ;;
1462  -program-transform-name=* | --program-transform-name=* \
1463  | --program-transform-nam=* | --program-transform-na=* \
1464  | --program-transform-n=* | --program-transform-=* \
1465  | --program-transform=* | --program-transfor=* \
1466  | --program-transfo=* | --program-transf=* \
1467  | --program-trans=* | --program-tran=* \
1468  | --progr-tra=* | --program-tr=* | --program-t=*)
1469    program_transform_name=$ac_optarg ;;
1470
1471  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1472    ac_prev=pdfdir ;;
1473  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1474    pdfdir=$ac_optarg ;;
1475
1476  -psdir | --psdir | --psdi | --psd | --ps)
1477    ac_prev=psdir ;;
1478  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1479    psdir=$ac_optarg ;;
1480
1481  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1482  | -silent | --silent | --silen | --sile | --sil)
1483    silent=yes ;;
1484
1485  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1486    ac_prev=sbindir ;;
1487  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1488  | --sbi=* | --sb=*)
1489    sbindir=$ac_optarg ;;
1490
1491  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1492  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1493  | --sharedst | --shareds | --shared | --share | --shar \
1494  | --sha | --sh)
1495    ac_prev=sharedstatedir ;;
1496  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1497  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1498  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1499  | --sha=* | --sh=*)
1500    sharedstatedir=$ac_optarg ;;
1501
1502  -site | --site | --sit)
1503    ac_prev=site ;;
1504  -site=* | --site=* | --sit=*)
1505    site=$ac_optarg ;;
1506
1507  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1508    ac_prev=srcdir ;;
1509  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1510    srcdir=$ac_optarg ;;
1511
1512  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1513  | --syscon | --sysco | --sysc | --sys | --sy)
1514    ac_prev=sysconfdir ;;
1515  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1516  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1517    sysconfdir=$ac_optarg ;;
1518
1519  -target | --target | --targe | --targ | --tar | --ta | --t)
1520    ac_prev=target_alias ;;
1521  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1522    target_alias=$ac_optarg ;;
1523
1524  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1525    verbose=yes ;;
1526
1527  -version | --version | --versio | --versi | --vers | -V)
1528    ac_init_version=: ;;
1529
1530  -with-* | --with-*)
1531    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1532    # Reject names that are not valid shell variable names.
1533    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1534      as_fn_error $? "invalid package name: $ac_useropt"
1535    ac_useropt_orig=$ac_useropt
1536    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1537    case $ac_user_opts in
1538      *"
1539"with_$ac_useropt"
1540"*) ;;
1541      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1542	 ac_unrecognized_sep=', ';;
1543    esac
1544    eval with_$ac_useropt=\$ac_optarg ;;
1545
1546  -without-* | --without-*)
1547    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1548    # Reject names that are not valid shell variable names.
1549    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1550      as_fn_error $? "invalid package name: $ac_useropt"
1551    ac_useropt_orig=$ac_useropt
1552    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1553    case $ac_user_opts in
1554      *"
1555"with_$ac_useropt"
1556"*) ;;
1557      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1558	 ac_unrecognized_sep=', ';;
1559    esac
1560    eval with_$ac_useropt=no ;;
1561
1562  --x)
1563    # Obsolete; use --with-x.
1564    with_x=yes ;;
1565
1566  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1567  | --x-incl | --x-inc | --x-in | --x-i)
1568    ac_prev=x_includes ;;
1569  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1570  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1571    x_includes=$ac_optarg ;;
1572
1573  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1574  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1575    ac_prev=x_libraries ;;
1576  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1577  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1578    x_libraries=$ac_optarg ;;
1579
1580  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1581Try \`$0 --help' for more information"
1582    ;;
1583
1584  *=*)
1585    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1586    # Reject names that are not valid shell variable names.
1587    case $ac_envvar in #(
1588      '' | [0-9]* | *[!_$as_cr_alnum]* )
1589      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1590    esac
1591    eval $ac_envvar=\$ac_optarg
1592    export $ac_envvar ;;
1593
1594  *)
1595    # FIXME: should be removed in autoconf 3.0.
1596    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1597    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1598      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1599    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1600    ;;
1601
1602  esac
1603done
1604
1605if test -n "$ac_prev"; then
1606  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1607  as_fn_error $? "missing argument to $ac_option"
1608fi
1609
1610if test -n "$ac_unrecognized_opts"; then
1611  case $enable_option_checking in
1612    no) ;;
1613    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1614    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1615  esac
1616fi
1617
1618# Check all directory arguments for consistency.
1619for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1620		datadir sysconfdir sharedstatedir localstatedir includedir \
1621		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1622		libdir localedir mandir
1623do
1624  eval ac_val=\$$ac_var
1625  # Remove trailing slashes.
1626  case $ac_val in
1627    */ )
1628      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1629      eval $ac_var=\$ac_val;;
1630  esac
1631  # Be sure to have absolute directory names.
1632  case $ac_val in
1633    [\\/$]* | ?:[\\/]* )  continue;;
1634    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1635  esac
1636  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1637done
1638
1639# There might be people who depend on the old broken behavior: `$host'
1640# used to hold the argument of --host etc.
1641# FIXME: To remove some day.
1642build=$build_alias
1643host=$host_alias
1644target=$target_alias
1645
1646# FIXME: To remove some day.
1647if test "x$host_alias" != x; then
1648  if test "x$build_alias" = x; then
1649    cross_compiling=maybe
1650  elif test "x$build_alias" != "x$host_alias"; then
1651    cross_compiling=yes
1652  fi
1653fi
1654
1655ac_tool_prefix=
1656test -n "$host_alias" && ac_tool_prefix=$host_alias-
1657
1658test "$silent" = yes && exec 6>/dev/null
1659
1660
1661ac_pwd=`pwd` && test -n "$ac_pwd" &&
1662ac_ls_di=`ls -di .` &&
1663ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1664  as_fn_error $? "working directory cannot be determined"
1665test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1666  as_fn_error $? "pwd does not report name of working directory"
1667
1668
1669# Find the source files, if location was not specified.
1670if test -z "$srcdir"; then
1671  ac_srcdir_defaulted=yes
1672  # Try the directory containing this script, then the parent directory.
1673  ac_confdir=`$as_dirname -- "$as_myself" ||
1674$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1675	 X"$as_myself" : 'X\(//\)[^/]' \| \
1676	 X"$as_myself" : 'X\(//\)$' \| \
1677	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1678$as_echo X"$as_myself" |
1679    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1680	    s//\1/
1681	    q
1682	  }
1683	  /^X\(\/\/\)[^/].*/{
1684	    s//\1/
1685	    q
1686	  }
1687	  /^X\(\/\/\)$/{
1688	    s//\1/
1689	    q
1690	  }
1691	  /^X\(\/\).*/{
1692	    s//\1/
1693	    q
1694	  }
1695	  s/.*/./; q'`
1696  srcdir=$ac_confdir
1697  if test ! -r "$srcdir/$ac_unique_file"; then
1698    srcdir=..
1699  fi
1700else
1701  ac_srcdir_defaulted=no
1702fi
1703if test ! -r "$srcdir/$ac_unique_file"; then
1704  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1705  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1706fi
1707ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1708ac_abs_confdir=`(
1709	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1710	pwd)`
1711# When building in place, set srcdir=.
1712if test "$ac_abs_confdir" = "$ac_pwd"; then
1713  srcdir=.
1714fi
1715# Remove unnecessary trailing slashes from srcdir.
1716# Double slashes in file names in object file debugging info
1717# mess up M-x gdb in Emacs.
1718case $srcdir in
1719*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1720esac
1721for ac_var in $ac_precious_vars; do
1722  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1723  eval ac_env_${ac_var}_value=\$${ac_var}
1724  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1725  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1726done
1727
1728#
1729# Report the --help message.
1730#
1731if test "$ac_init_help" = "long"; then
1732  # Omit some internal or obsolete options to make the list less imposing.
1733  # This message is too long to be a string in the A/UX 3.1 sh.
1734  cat <<_ACEOF
1735\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1736
1737Usage: $0 [OPTION]... [VAR=VALUE]...
1738
1739To assign environment variables (e.g., CC, CFLAGS...), specify them as
1740VAR=VALUE.  See below for descriptions of some of the useful variables.
1741
1742Defaults for the options are specified in brackets.
1743
1744Configuration:
1745  -h, --help              display this help and exit
1746      --help=short        display options specific to this package
1747      --help=recursive    display the short help of all the included packages
1748  -V, --version           display version information and exit
1749  -q, --quiet, --silent   do not print \`checking ...' messages
1750      --cache-file=FILE   cache test results in FILE [disabled]
1751  -C, --config-cache      alias for \`--cache-file=config.cache'
1752  -n, --no-create         do not create output files
1753      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1754
1755Installation directories:
1756  --prefix=PREFIX         install architecture-independent files in PREFIX
1757                          [$ac_default_prefix]
1758  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1759                          [PREFIX]
1760
1761By default, \`make install' will install all the files in
1762\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1763an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1764for instance \`--prefix=\$HOME'.
1765
1766For better control, use the options below.
1767
1768Fine tuning of the installation directories:
1769  --bindir=DIR            user executables [EPREFIX/bin]
1770  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1771  --libexecdir=DIR        program executables [EPREFIX/libexec]
1772  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1773  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1774  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1775  --libdir=DIR            object code libraries [EPREFIX/lib]
1776  --includedir=DIR        C header files [PREFIX/include]
1777  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1778  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1779  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1780  --infodir=DIR           info documentation [DATAROOTDIR/info]
1781  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1782  --mandir=DIR            man documentation [DATAROOTDIR/man]
1783  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1784  --htmldir=DIR           html documentation [DOCDIR]
1785  --dvidir=DIR            dvi documentation [DOCDIR]
1786  --pdfdir=DIR            pdf documentation [DOCDIR]
1787  --psdir=DIR             ps documentation [DOCDIR]
1788_ACEOF
1789
1790  cat <<\_ACEOF
1791
1792X features:
1793  --x-includes=DIR    X include files are in DIR
1794  --x-libraries=DIR   X library files are in DIR
1795
1796System types:
1797  --build=BUILD     configure for building on BUILD [guessed]
1798  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1799  --target=TARGET   configure for building compilers for TARGET [HOST]
1800_ACEOF
1801fi
1802
1803if test -n "$ac_init_help"; then
1804  case $ac_init_help in
1805     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1806   esac
1807  cat <<\_ACEOF
1808
1809Optional Features:
1810  --disable-option-checking  ignore unrecognized --enable/--with options
1811  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1812  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1813  --enable-openjdk-only   suppress building custom source even if present
1814                          [disabled]
1815  --enable-debug          set the debug level to fastdebug (shorthand for
1816                          --with-debug-level=fastdebug) [disabled]
1817  --disable-headful       disable building headful support (graphical UI
1818                          support) [enabled]
1819  --enable-hotspot-test-in-build
1820                          run the Queens test after Hotspot build [disabled]
1821  --enable-unlimited-crypto
1822                          Enable unlimited crypto policy [disabled]
1823  --enable-rmiconnector-iiop
1824                          enable the JMX RMIConnector iiop transport
1825                          [disabled]
1826  --disable-debug-symbols disable generation of debug symbols [enabled]
1827  --disable-zip-debug-info
1828                          disable zipping of debug-info files [enabled]
1829  --enable-macosx-runtime-support
1830                          Deprecated. Option is kept for backwards
1831                          compatibility and is ignored
1832  --disable-freetype-bundling
1833                          disable bundling of the freetype library with the
1834                          build result [enabled on Windows or when using
1835                          --with-freetype, disabled otherwise]
1836  --enable-sjavac         use sjavac to do fast incremental compiles
1837                          [disabled]
1838  --disable-precompiled-headers
1839                          disable using precompiled headers when compiling C++
1840                          [enabled]
1841  --enable-ccache         enable using ccache to speed up recompilations
1842                          [disabled]
1843
1844Optional Packages:
1845  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1846  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1847  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1848                          support it), e.g. --with-target-bits=32 [guessed]
1849  --with-sys-root         pass this sys-root to the compilers and tools (for
1850                          cross-compiling)
1851  --with-tools-dir        search this directory for compilers and tools (for
1852                          cross-compiling)
1853  --with-devkit           use this directory as base for tools-dir and
1854                          sys-root (for cross-compiling)
1855  --with-custom-make-dir  Deprecated. Option is kept for backwards
1856                          compatibility and is ignored
1857  --with-jdk-variant      JDK variant to build (normal) [normal]
1858  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1859  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1860                          client, minimal1, kernel, zero, zeroshark, core)
1861                          [server]
1862  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1863                          [release]
1864  --with-conf-name        use this as the name of the configuration [generated
1865                          from important configuration options]
1866  --with-builddeps-conf   use this configuration file for the builddeps
1867  --with-builddeps-server download and use build dependencies from this server
1868                          url
1869  --with-builddeps-dir    store downloaded build dependencies here
1870                          [/localhome/builddeps]
1871  --with-builddeps-group  chgrp the downloaded build dependencies to this
1872                          group
1873  --with-cacerts-file     specify alternative cacerts file
1874  --with-milestone        Set milestone value for build [internal]
1875  --with-update-version   Set update version value for build [b00]
1876  --with-user-release-suffix
1877                          Add a custom string to the version string if build
1878                          number is not set.[username_builddateb00]
1879  --with-build-number     Set build number value for build [b00]
1880  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1881  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1882                          invocations of boot JDK, overriding the default
1883                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1884                          -enableassertions"
1885  --with-add-source-root  for each and every source directory, look in this
1886                          additional source root for the same directory; if it
1887                          exists and have files in it, include it in the build
1888  --with-override-source-root
1889                          for each and every source directory, look in this
1890                          override source root for the same directory; if it
1891                          exists, use that directory instead and ignore the
1892                          directory in the original source root
1893  --with-adds-and-overrides
1894                          use the subdirs 'adds' and 'overrides' in the
1895                          specified directory as add-source-root and
1896                          override-source-root
1897  --with-override-langtools
1898                          use this langtools dir for the build
1899  --with-override-corba   use this corba dir for the build
1900  --with-override-jaxp    use this jaxp dir for the build
1901  --with-override-jaxws   use this jaxws dir for the build
1902  --with-override-hotspot use this hotspot dir for the build
1903  --with-override-nashorn use this nashorn dir for the build
1904  --with-override-jdk     use this jdk dir for the build
1905  --with-import-hotspot   import hotspot binaries from this jdk image or
1906                          hotspot build dist dir instead of building from
1907                          source
1908  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1909                          to show possible values [platform dependent]
1910  --with-jtreg            Regression Test Harness [probed]
1911  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1912  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1913  --with-extra-ldflags    extra flags to be used when linking jdk
1914  --with-x                use the X Window System
1915  --with-cups             specify prefix directory for the cups package
1916                          (expecting the headers under PATH/include)
1917  --with-cups-include     specify directory for the cups include files
1918  --with-freetype         specify prefix directory for the freetype package
1919                          (expecting the libraries under PATH/lib and the
1920                          headers under PATH/include)
1921  --with-freetype-include specify directory for the freetype include files
1922  --with-freetype-lib     specify directory for the freetype library
1923  --with-alsa             specify prefix directory for the alsa package
1924                          (expecting the libraries under PATH/lib and the
1925                          headers under PATH/include)
1926  --with-alsa-include     specify directory for the alsa include files
1927  --with-alsa-lib         specify directory for the alsa library
1928  --with-giflib           use giflib from build system or OpenJDK source
1929                          (system, bundled) [bundled]
1930  --with-libpng           use libpng from build system or OpenJDK source
1931                          (system, bundled) [bundled]
1932  --with-zlib             use zlib from build system or OpenJDK source
1933                          (system, bundled) [bundled]
1934  --with-stdc++lib=<static>,<dynamic>,<default>
1935                          force linking of the C++ runtime on Linux to either
1936                          static or dynamic, default is static with dynamic as
1937                          fallback
1938  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1939                          only) [probed]
1940  --with-dxsdk            Deprecated. Option is kept for backwards
1941                          compatibility and is ignored
1942  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1943                          compatibility and is ignored
1944  --with-dxsdk-include    Deprecated. Option is kept for backwards
1945                          compatibility and is ignored
1946  --with-num-cores        number of cores in the build system, e.g.
1947                          --with-num-cores=8 [probed]
1948  --with-memory-size      memory (in MB) available in the build system, e.g.
1949                          --with-memory-size=1024 [probed]
1950  --with-jobs             number of parallel jobs to let make run [calculated
1951                          based on cores and memory]
1952  --with-sjavac-server-java
1953                          use this java binary for running the sjavac
1954                          background server [Boot JDK java]
1955  --with-ccache-dir       where to store ccache files [~/.ccache]
1956
1957Some influential environment variables:
1958  BASENAME    Override default value for BASENAME
1959  BASH        Override default value for BASH
1960  CAT         Override default value for CAT
1961  CHMOD       Override default value for CHMOD
1962  CMP         Override default value for CMP
1963  COMM        Override default value for COMM
1964  CP          Override default value for CP
1965  CPIO        Override default value for CPIO
1966  CUT         Override default value for CUT
1967  DATE        Override default value for DATE
1968  DIFF        Override default value for DIFF
1969  DIRNAME     Override default value for DIRNAME
1970  ECHO        Override default value for ECHO
1971  EXPR        Override default value for EXPR
1972  FILE        Override default value for FILE
1973  FIND        Override default value for FIND
1974  HEAD        Override default value for HEAD
1975  LN          Override default value for LN
1976  LS          Override default value for LS
1977  MKDIR       Override default value for MKDIR
1978  MKTEMP      Override default value for MKTEMP
1979  MV          Override default value for MV
1980  NAWK        Override default value for NAWK
1981  PRINTF      Override default value for PRINTF
1982  RM          Override default value for RM
1983  SH          Override default value for SH
1984  SORT        Override default value for SORT
1985  TAIL        Override default value for TAIL
1986  TAR         Override default value for TAR
1987  TEE         Override default value for TEE
1988  TOUCH       Override default value for TOUCH
1989  TR          Override default value for TR
1990  UNAME       Override default value for UNAME
1991  UNIQ        Override default value for UNIQ
1992  WC          Override default value for WC
1993  WHICH       Override default value for WHICH
1994  XARGS       Override default value for XARGS
1995  AWK         Override default value for AWK
1996  GREP        Override default value for GREP
1997  EGREP       Override default value for EGREP
1998  FGREP       Override default value for FGREP
1999  SED         Override default value for SED
2000  CYGPATH     Override default value for CYGPATH
2001  READLINK    Override default value for READLINK
2002  DF          Override default value for DF
2003  SETFILE     Override default value for SETFILE
2004  UNZIP       Override default value for UNZIP
2005  ZIP         Override default value for ZIP
2006  LDD         Override default value for LDD
2007  OTOOL       Override default value for OTOOL
2008  READELF     Override default value for READELF
2009  HG          Override default value for HG
2010  STAT        Override default value for STAT
2011  TIME        Override default value for TIME
2012  DSYMUTIL    Override default value for DSYMUTIL
2013  XATTR       Override default value for XATTR
2014  CODESIGN    Override default value for CODESIGN
2015  PKG_CONFIG  path to pkg-config utility
2016  JAVA        Override default value for JAVA
2017  JAVAC       Override default value for JAVAC
2018  JAVAH       Override default value for JAVAH
2019  JAR         Override default value for JAR
2020  NATIVE2ASCII
2021              Override default value for NATIVE2ASCII
2022  JARSIGNER   Override default value for JARSIGNER
2023  CC          C compiler command
2024  CFLAGS      C compiler flags
2025  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2026              nonstandard directory <lib dir>
2027  LIBS        libraries to pass to the linker, e.g. -l<library>
2028  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2029              you have headers in a nonstandard directory <include dir>
2030  CXX         C++ compiler command
2031  CXXFLAGS    C++ compiler flags
2032  CPP         C preprocessor
2033  CXXCPP      C++ preprocessor
2034  AS          Override default value for AS
2035  AR          Override default value for AR
2036  OBJC        Objective C compiler command
2037  OBJCFLAGS   Objective C compiler flags
2038  LIPO        Override default value for LIPO
2039  STRIP       Override default value for STRIP
2040  NM          Override default value for NM
2041  GNM         Override default value for GNM
2042  MCS         Override default value for MCS
2043  OBJCOPY     Override default value for OBJCOPY
2044  OBJDUMP     Override default value for OBJDUMP
2045  BUILD_CC    Override default value for BUILD_CC
2046  BUILD_CXX   Override default value for BUILD_CXX
2047  BUILD_LD    Override default value for BUILD_LD
2048  JTREGEXE    Override default value for JTREGEXE
2049  XMKMF       Path to xmkmf, Makefile generator for X Window System
2050  FREETYPE_CFLAGS
2051              C compiler flags for FREETYPE, overriding pkg-config
2052  FREETYPE_LIBS
2053              linker flags for FREETYPE, overriding pkg-config
2054  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2055  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2056  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2057  PNG_LIBS    linker flags for PNG, overriding pkg-config
2058  LIBFFI_CFLAGS
2059              C compiler flags for LIBFFI, overriding pkg-config
2060  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2061  CCACHE      Override default value for CCACHE
2062
2063Use these variables to override the choices made by `configure' or to help
2064it to find libraries and programs with nonstandard names/locations.
2065
2066Report bugs to <build-dev@openjdk.java.net>.
2067OpenJDK home page: <http://openjdk.java.net>.
2068_ACEOF
2069ac_status=$?
2070fi
2071
2072if test "$ac_init_help" = "recursive"; then
2073  # If there are subdirs, report their specific --help.
2074  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2075    test -d "$ac_dir" ||
2076      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2077      continue
2078    ac_builddir=.
2079
2080case "$ac_dir" in
2081.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2082*)
2083  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2084  # A ".." for each directory in $ac_dir_suffix.
2085  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2086  case $ac_top_builddir_sub in
2087  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2088  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2089  esac ;;
2090esac
2091ac_abs_top_builddir=$ac_pwd
2092ac_abs_builddir=$ac_pwd$ac_dir_suffix
2093# for backward compatibility:
2094ac_top_builddir=$ac_top_build_prefix
2095
2096case $srcdir in
2097  .)  # We are building in place.
2098    ac_srcdir=.
2099    ac_top_srcdir=$ac_top_builddir_sub
2100    ac_abs_top_srcdir=$ac_pwd ;;
2101  [\\/]* | ?:[\\/]* )  # Absolute name.
2102    ac_srcdir=$srcdir$ac_dir_suffix;
2103    ac_top_srcdir=$srcdir
2104    ac_abs_top_srcdir=$srcdir ;;
2105  *) # Relative name.
2106    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2107    ac_top_srcdir=$ac_top_build_prefix$srcdir
2108    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2109esac
2110ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2111
2112    cd "$ac_dir" || { ac_status=$?; continue; }
2113    # Check for guested configure.
2114    if test -f "$ac_srcdir/configure.gnu"; then
2115      echo &&
2116      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2117    elif test -f "$ac_srcdir/configure"; then
2118      echo &&
2119      $SHELL "$ac_srcdir/configure" --help=recursive
2120    else
2121      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2122    fi || ac_status=$?
2123    cd "$ac_pwd" || { ac_status=$?; break; }
2124  done
2125fi
2126
2127test -n "$ac_init_help" && exit $ac_status
2128if $ac_init_version; then
2129  cat <<\_ACEOF
2130OpenJDK configure jdk9
2131generated by GNU Autoconf 2.69
2132
2133Copyright (C) 2012 Free Software Foundation, Inc.
2134This configure script is free software; the Free Software Foundation
2135gives unlimited permission to copy, distribute and modify it.
2136_ACEOF
2137  exit
2138fi
2139
2140## ------------------------ ##
2141## Autoconf initialization. ##
2142## ------------------------ ##
2143
2144# ac_fn_c_try_compile LINENO
2145# --------------------------
2146# Try to compile conftest.$ac_ext, and return whether this succeeded.
2147ac_fn_c_try_compile ()
2148{
2149  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2150  rm -f conftest.$ac_objext
2151  if { { ac_try="$ac_compile"
2152case "(($ac_try" in
2153  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2154  *) ac_try_echo=$ac_try;;
2155esac
2156eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2157$as_echo "$ac_try_echo"; } >&5
2158  (eval "$ac_compile") 2>conftest.err
2159  ac_status=$?
2160  if test -s conftest.err; then
2161    grep -v '^ *+' conftest.err >conftest.er1
2162    cat conftest.er1 >&5
2163    mv -f conftest.er1 conftest.err
2164  fi
2165  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2166  test $ac_status = 0; } && {
2167	 test -z "$ac_c_werror_flag" ||
2168	 test ! -s conftest.err
2169       } && test -s conftest.$ac_objext; then :
2170  ac_retval=0
2171else
2172  $as_echo "$as_me: failed program was:" >&5
2173sed 's/^/| /' conftest.$ac_ext >&5
2174
2175	ac_retval=1
2176fi
2177  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2178  as_fn_set_status $ac_retval
2179
2180} # ac_fn_c_try_compile
2181
2182# ac_fn_cxx_try_compile LINENO
2183# ----------------------------
2184# Try to compile conftest.$ac_ext, and return whether this succeeded.
2185ac_fn_cxx_try_compile ()
2186{
2187  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2188  rm -f conftest.$ac_objext
2189  if { { ac_try="$ac_compile"
2190case "(($ac_try" in
2191  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2192  *) ac_try_echo=$ac_try;;
2193esac
2194eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2195$as_echo "$ac_try_echo"; } >&5
2196  (eval "$ac_compile") 2>conftest.err
2197  ac_status=$?
2198  if test -s conftest.err; then
2199    grep -v '^ *+' conftest.err >conftest.er1
2200    cat conftest.er1 >&5
2201    mv -f conftest.er1 conftest.err
2202  fi
2203  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2204  test $ac_status = 0; } && {
2205	 test -z "$ac_cxx_werror_flag" ||
2206	 test ! -s conftest.err
2207       } && test -s conftest.$ac_objext; then :
2208  ac_retval=0
2209else
2210  $as_echo "$as_me: failed program was:" >&5
2211sed 's/^/| /' conftest.$ac_ext >&5
2212
2213	ac_retval=1
2214fi
2215  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2216  as_fn_set_status $ac_retval
2217
2218} # ac_fn_cxx_try_compile
2219
2220# ac_fn_c_try_cpp LINENO
2221# ----------------------
2222# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2223ac_fn_c_try_cpp ()
2224{
2225  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2226  if { { ac_try="$ac_cpp conftest.$ac_ext"
2227case "(($ac_try" in
2228  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2229  *) ac_try_echo=$ac_try;;
2230esac
2231eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2232$as_echo "$ac_try_echo"; } >&5
2233  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2234  ac_status=$?
2235  if test -s conftest.err; then
2236    grep -v '^ *+' conftest.err >conftest.er1
2237    cat conftest.er1 >&5
2238    mv -f conftest.er1 conftest.err
2239  fi
2240  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2241  test $ac_status = 0; } > conftest.i && {
2242	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2243	 test ! -s conftest.err
2244       }; then :
2245  ac_retval=0
2246else
2247  $as_echo "$as_me: failed program was:" >&5
2248sed 's/^/| /' conftest.$ac_ext >&5
2249
2250    ac_retval=1
2251fi
2252  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2253  as_fn_set_status $ac_retval
2254
2255} # ac_fn_c_try_cpp
2256
2257# ac_fn_cxx_try_cpp LINENO
2258# ------------------------
2259# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2260ac_fn_cxx_try_cpp ()
2261{
2262  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2263  if { { ac_try="$ac_cpp conftest.$ac_ext"
2264case "(($ac_try" in
2265  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2266  *) ac_try_echo=$ac_try;;
2267esac
2268eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2269$as_echo "$ac_try_echo"; } >&5
2270  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2271  ac_status=$?
2272  if test -s conftest.err; then
2273    grep -v '^ *+' conftest.err >conftest.er1
2274    cat conftest.er1 >&5
2275    mv -f conftest.er1 conftest.err
2276  fi
2277  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2278  test $ac_status = 0; } > conftest.i && {
2279	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2280	 test ! -s conftest.err
2281       }; then :
2282  ac_retval=0
2283else
2284  $as_echo "$as_me: failed program was:" >&5
2285sed 's/^/| /' conftest.$ac_ext >&5
2286
2287    ac_retval=1
2288fi
2289  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2290  as_fn_set_status $ac_retval
2291
2292} # ac_fn_cxx_try_cpp
2293
2294# ac_fn_objc_try_compile LINENO
2295# -----------------------------
2296# Try to compile conftest.$ac_ext, and return whether this succeeded.
2297ac_fn_objc_try_compile ()
2298{
2299  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2300  rm -f conftest.$ac_objext
2301  if { { ac_try="$ac_compile"
2302case "(($ac_try" in
2303  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2304  *) ac_try_echo=$ac_try;;
2305esac
2306eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2307$as_echo "$ac_try_echo"; } >&5
2308  (eval "$ac_compile") 2>conftest.err
2309  ac_status=$?
2310  if test -s conftest.err; then
2311    grep -v '^ *+' conftest.err >conftest.er1
2312    cat conftest.er1 >&5
2313    mv -f conftest.er1 conftest.err
2314  fi
2315  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2316  test $ac_status = 0; } && {
2317	 test -z "$ac_objc_werror_flag" ||
2318	 test ! -s conftest.err
2319       } && test -s conftest.$ac_objext; then :
2320  ac_retval=0
2321else
2322  $as_echo "$as_me: failed program was:" >&5
2323sed 's/^/| /' conftest.$ac_ext >&5
2324
2325	ac_retval=1
2326fi
2327  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2328  as_fn_set_status $ac_retval
2329
2330} # ac_fn_objc_try_compile
2331
2332# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2333# ---------------------------------------------------------
2334# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2335# the include files in INCLUDES and setting the cache variable VAR
2336# accordingly.
2337ac_fn_cxx_check_header_mongrel ()
2338{
2339  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2340  if eval \${$3+:} false; then :
2341  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2342$as_echo_n "checking for $2... " >&6; }
2343if eval \${$3+:} false; then :
2344  $as_echo_n "(cached) " >&6
2345fi
2346eval ac_res=\$$3
2347	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2348$as_echo "$ac_res" >&6; }
2349else
2350  # Is the header compilable?
2351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2352$as_echo_n "checking $2 usability... " >&6; }
2353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2354/* end confdefs.h.  */
2355$4
2356#include <$2>
2357_ACEOF
2358if ac_fn_cxx_try_compile "$LINENO"; then :
2359  ac_header_compiler=yes
2360else
2361  ac_header_compiler=no
2362fi
2363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2365$as_echo "$ac_header_compiler" >&6; }
2366
2367# Is the header present?
2368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2369$as_echo_n "checking $2 presence... " >&6; }
2370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2371/* end confdefs.h.  */
2372#include <$2>
2373_ACEOF
2374if ac_fn_cxx_try_cpp "$LINENO"; then :
2375  ac_header_preproc=yes
2376else
2377  ac_header_preproc=no
2378fi
2379rm -f conftest.err conftest.i conftest.$ac_ext
2380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2381$as_echo "$ac_header_preproc" >&6; }
2382
2383# So?  What about this header?
2384case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2385  yes:no: )
2386    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2387$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2388    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2389$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2390    ;;
2391  no:yes:* )
2392    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2393$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2394    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2395$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2396    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2397$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2398    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2399$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2400    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2401$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2402( $as_echo "## ----------------------------------------- ##
2403## Report this to build-dev@openjdk.java.net ##
2404## ----------------------------------------- ##"
2405     ) | sed "s/^/$as_me: WARNING:     /" >&2
2406    ;;
2407esac
2408  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2409$as_echo_n "checking for $2... " >&6; }
2410if eval \${$3+:} false; then :
2411  $as_echo_n "(cached) " >&6
2412else
2413  eval "$3=\$ac_header_compiler"
2414fi
2415eval ac_res=\$$3
2416	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2417$as_echo "$ac_res" >&6; }
2418fi
2419  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2420
2421} # ac_fn_cxx_check_header_mongrel
2422
2423# ac_fn_cxx_try_run LINENO
2424# ------------------------
2425# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2426# that executables *can* be run.
2427ac_fn_cxx_try_run ()
2428{
2429  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2430  if { { ac_try="$ac_link"
2431case "(($ac_try" in
2432  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2433  *) ac_try_echo=$ac_try;;
2434esac
2435eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2436$as_echo "$ac_try_echo"; } >&5
2437  (eval "$ac_link") 2>&5
2438  ac_status=$?
2439  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2440  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2441  { { case "(($ac_try" in
2442  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2443  *) ac_try_echo=$ac_try;;
2444esac
2445eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2446$as_echo "$ac_try_echo"; } >&5
2447  (eval "$ac_try") 2>&5
2448  ac_status=$?
2449  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2450  test $ac_status = 0; }; }; then :
2451  ac_retval=0
2452else
2453  $as_echo "$as_me: program exited with status $ac_status" >&5
2454       $as_echo "$as_me: failed program was:" >&5
2455sed 's/^/| /' conftest.$ac_ext >&5
2456
2457       ac_retval=$ac_status
2458fi
2459  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2460  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2461  as_fn_set_status $ac_retval
2462
2463} # ac_fn_cxx_try_run
2464
2465# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2466# ---------------------------------------------------------
2467# Tests whether HEADER exists and can be compiled using the include files in
2468# INCLUDES, setting the cache variable VAR accordingly.
2469ac_fn_cxx_check_header_compile ()
2470{
2471  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2472  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2473$as_echo_n "checking for $2... " >&6; }
2474if eval \${$3+:} false; then :
2475  $as_echo_n "(cached) " >&6
2476else
2477  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2478/* end confdefs.h.  */
2479$4
2480#include <$2>
2481_ACEOF
2482if ac_fn_cxx_try_compile "$LINENO"; then :
2483  eval "$3=yes"
2484else
2485  eval "$3=no"
2486fi
2487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2488fi
2489eval ac_res=\$$3
2490	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2491$as_echo "$ac_res" >&6; }
2492  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2493
2494} # ac_fn_cxx_check_header_compile
2495
2496# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2497# ----------------------------------------------
2498# Tries to find the compile-time value of EXPR in a program that includes
2499# INCLUDES, setting VAR accordingly. Returns whether the value could be
2500# computed
2501ac_fn_cxx_compute_int ()
2502{
2503  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2504  if test "$cross_compiling" = yes; then
2505    # Depending upon the size, compute the lo and hi bounds.
2506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2507/* end confdefs.h.  */
2508$4
2509int
2510main ()
2511{
2512static int test_array [1 - 2 * !(($2) >= 0)];
2513test_array [0] = 0;
2514return test_array [0];
2515
2516  ;
2517  return 0;
2518}
2519_ACEOF
2520if ac_fn_cxx_try_compile "$LINENO"; then :
2521  ac_lo=0 ac_mid=0
2522  while :; do
2523    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2524/* end confdefs.h.  */
2525$4
2526int
2527main ()
2528{
2529static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2530test_array [0] = 0;
2531return test_array [0];
2532
2533  ;
2534  return 0;
2535}
2536_ACEOF
2537if ac_fn_cxx_try_compile "$LINENO"; then :
2538  ac_hi=$ac_mid; break
2539else
2540  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2541			if test $ac_lo -le $ac_mid; then
2542			  ac_lo= ac_hi=
2543			  break
2544			fi
2545			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2546fi
2547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2548  done
2549else
2550  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2551/* end confdefs.h.  */
2552$4
2553int
2554main ()
2555{
2556static int test_array [1 - 2 * !(($2) < 0)];
2557test_array [0] = 0;
2558return test_array [0];
2559
2560  ;
2561  return 0;
2562}
2563_ACEOF
2564if ac_fn_cxx_try_compile "$LINENO"; then :
2565  ac_hi=-1 ac_mid=-1
2566  while :; do
2567    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2568/* end confdefs.h.  */
2569$4
2570int
2571main ()
2572{
2573static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2574test_array [0] = 0;
2575return test_array [0];
2576
2577  ;
2578  return 0;
2579}
2580_ACEOF
2581if ac_fn_cxx_try_compile "$LINENO"; then :
2582  ac_lo=$ac_mid; break
2583else
2584  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2585			if test $ac_mid -le $ac_hi; then
2586			  ac_lo= ac_hi=
2587			  break
2588			fi
2589			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2590fi
2591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2592  done
2593else
2594  ac_lo= ac_hi=
2595fi
2596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2597fi
2598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2599# Binary search between lo and hi bounds.
2600while test "x$ac_lo" != "x$ac_hi"; do
2601  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2602  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2603/* end confdefs.h.  */
2604$4
2605int
2606main ()
2607{
2608static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2609test_array [0] = 0;
2610return test_array [0];
2611
2612  ;
2613  return 0;
2614}
2615_ACEOF
2616if ac_fn_cxx_try_compile "$LINENO"; then :
2617  ac_hi=$ac_mid
2618else
2619  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2620fi
2621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2622done
2623case $ac_lo in #((
2624?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2625'') ac_retval=1 ;;
2626esac
2627  else
2628    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2629/* end confdefs.h.  */
2630$4
2631static long int longval () { return $2; }
2632static unsigned long int ulongval () { return $2; }
2633#include <stdio.h>
2634#include <stdlib.h>
2635int
2636main ()
2637{
2638
2639  FILE *f = fopen ("conftest.val", "w");
2640  if (! f)
2641    return 1;
2642  if (($2) < 0)
2643    {
2644      long int i = longval ();
2645      if (i != ($2))
2646	return 1;
2647      fprintf (f, "%ld", i);
2648    }
2649  else
2650    {
2651      unsigned long int i = ulongval ();
2652      if (i != ($2))
2653	return 1;
2654      fprintf (f, "%lu", i);
2655    }
2656  /* Do not output a trailing newline, as this causes \r\n confusion
2657     on some platforms.  */
2658  return ferror (f) || fclose (f) != 0;
2659
2660  ;
2661  return 0;
2662}
2663_ACEOF
2664if ac_fn_cxx_try_run "$LINENO"; then :
2665  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2666else
2667  ac_retval=1
2668fi
2669rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2670  conftest.$ac_objext conftest.beam conftest.$ac_ext
2671rm -f conftest.val
2672
2673  fi
2674  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2675  as_fn_set_status $ac_retval
2676
2677} # ac_fn_cxx_compute_int
2678
2679# ac_fn_cxx_try_link LINENO
2680# -------------------------
2681# Try to link conftest.$ac_ext, and return whether this succeeded.
2682ac_fn_cxx_try_link ()
2683{
2684  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2685  rm -f conftest.$ac_objext conftest$ac_exeext
2686  if { { ac_try="$ac_link"
2687case "(($ac_try" in
2688  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2689  *) ac_try_echo=$ac_try;;
2690esac
2691eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2692$as_echo "$ac_try_echo"; } >&5
2693  (eval "$ac_link") 2>conftest.err
2694  ac_status=$?
2695  if test -s conftest.err; then
2696    grep -v '^ *+' conftest.err >conftest.er1
2697    cat conftest.er1 >&5
2698    mv -f conftest.er1 conftest.err
2699  fi
2700  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2701  test $ac_status = 0; } && {
2702	 test -z "$ac_cxx_werror_flag" ||
2703	 test ! -s conftest.err
2704       } && test -s conftest$ac_exeext && {
2705	 test "$cross_compiling" = yes ||
2706	 test -x conftest$ac_exeext
2707       }; then :
2708  ac_retval=0
2709else
2710  $as_echo "$as_me: failed program was:" >&5
2711sed 's/^/| /' conftest.$ac_ext >&5
2712
2713	ac_retval=1
2714fi
2715  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2716  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2717  # interfere with the next link command; also delete a directory that is
2718  # left behind by Apple's compiler.  We do this before executing the actions.
2719  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2720  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2721  as_fn_set_status $ac_retval
2722
2723} # ac_fn_cxx_try_link
2724
2725# ac_fn_cxx_check_func LINENO FUNC VAR
2726# ------------------------------------
2727# Tests whether FUNC exists, setting the cache variable VAR accordingly
2728ac_fn_cxx_check_func ()
2729{
2730  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2731  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2732$as_echo_n "checking for $2... " >&6; }
2733if eval \${$3+:} false; then :
2734  $as_echo_n "(cached) " >&6
2735else
2736  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2737/* end confdefs.h.  */
2738/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2739   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2740#define $2 innocuous_$2
2741
2742/* System header to define __stub macros and hopefully few prototypes,
2743    which can conflict with char $2 (); below.
2744    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2745    <limits.h> exists even on freestanding compilers.  */
2746
2747#ifdef __STDC__
2748# include <limits.h>
2749#else
2750# include <assert.h>
2751#endif
2752
2753#undef $2
2754
2755/* Override any GCC internal prototype to avoid an error.
2756   Use char because int might match the return type of a GCC
2757   builtin and then its argument prototype would still apply.  */
2758#ifdef __cplusplus
2759extern "C"
2760#endif
2761char $2 ();
2762/* The GNU C library defines this for functions which it implements
2763    to always fail with ENOSYS.  Some functions are actually named
2764    something starting with __ and the normal name is an alias.  */
2765#if defined __stub_$2 || defined __stub___$2
2766choke me
2767#endif
2768
2769int
2770main ()
2771{
2772return $2 ();
2773  ;
2774  return 0;
2775}
2776_ACEOF
2777if ac_fn_cxx_try_link "$LINENO"; then :
2778  eval "$3=yes"
2779else
2780  eval "$3=no"
2781fi
2782rm -f core conftest.err conftest.$ac_objext \
2783    conftest$ac_exeext conftest.$ac_ext
2784fi
2785eval ac_res=\$$3
2786	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2787$as_echo "$ac_res" >&6; }
2788  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2789
2790} # ac_fn_cxx_check_func
2791
2792# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2793# -------------------------------------------------------
2794# Tests whether HEADER exists and can be compiled using the include files in
2795# INCLUDES, setting the cache variable VAR accordingly.
2796ac_fn_c_check_header_compile ()
2797{
2798  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2799  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2800$as_echo_n "checking for $2... " >&6; }
2801if eval \${$3+:} false; then :
2802  $as_echo_n "(cached) " >&6
2803else
2804  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2805/* end confdefs.h.  */
2806$4
2807#include <$2>
2808_ACEOF
2809if ac_fn_c_try_compile "$LINENO"; then :
2810  eval "$3=yes"
2811else
2812  eval "$3=no"
2813fi
2814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2815fi
2816eval ac_res=\$$3
2817	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2818$as_echo "$ac_res" >&6; }
2819  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2820
2821} # ac_fn_c_check_header_compile
2822cat >config.log <<_ACEOF
2823This file contains any messages produced by compilers while
2824running configure, to aid debugging if configure makes a mistake.
2825
2826It was created by OpenJDK $as_me jdk9, which was
2827generated by GNU Autoconf 2.69.  Invocation command line was
2828
2829  $ $0 $@
2830
2831_ACEOF
2832exec 5>>config.log
2833{
2834cat <<_ASUNAME
2835## --------- ##
2836## Platform. ##
2837## --------- ##
2838
2839hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2840uname -m = `(uname -m) 2>/dev/null || echo unknown`
2841uname -r = `(uname -r) 2>/dev/null || echo unknown`
2842uname -s = `(uname -s) 2>/dev/null || echo unknown`
2843uname -v = `(uname -v) 2>/dev/null || echo unknown`
2844
2845/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2846/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2847
2848/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2849/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2850/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2851/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2852/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2853/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2854/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2855
2856_ASUNAME
2857
2858as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2859for as_dir in $PATH
2860do
2861  IFS=$as_save_IFS
2862  test -z "$as_dir" && as_dir=.
2863    $as_echo "PATH: $as_dir"
2864  done
2865IFS=$as_save_IFS
2866
2867} >&5
2868
2869cat >&5 <<_ACEOF
2870
2871
2872## ----------- ##
2873## Core tests. ##
2874## ----------- ##
2875
2876_ACEOF
2877
2878
2879# Keep a trace of the command line.
2880# Strip out --no-create and --no-recursion so they do not pile up.
2881# Strip out --silent because we don't want to record it for future runs.
2882# Also quote any args containing shell meta-characters.
2883# Make two passes to allow for proper duplicate-argument suppression.
2884ac_configure_args=
2885ac_configure_args0=
2886ac_configure_args1=
2887ac_must_keep_next=false
2888for ac_pass in 1 2
2889do
2890  for ac_arg
2891  do
2892    case $ac_arg in
2893    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2894    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2895    | -silent | --silent | --silen | --sile | --sil)
2896      continue ;;
2897    *\'*)
2898      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2899    esac
2900    case $ac_pass in
2901    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2902    2)
2903      as_fn_append ac_configure_args1 " '$ac_arg'"
2904      if test $ac_must_keep_next = true; then
2905	ac_must_keep_next=false # Got value, back to normal.
2906      else
2907	case $ac_arg in
2908	  *=* | --config-cache | -C | -disable-* | --disable-* \
2909	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2910	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2911	  | -with-* | --with-* | -without-* | --without-* | --x)
2912	    case "$ac_configure_args0 " in
2913	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2914	    esac
2915	    ;;
2916	  -* ) ac_must_keep_next=true ;;
2917	esac
2918      fi
2919      as_fn_append ac_configure_args " '$ac_arg'"
2920      ;;
2921    esac
2922  done
2923done
2924{ ac_configure_args0=; unset ac_configure_args0;}
2925{ ac_configure_args1=; unset ac_configure_args1;}
2926
2927# When interrupted or exit'd, cleanup temporary files, and complete
2928# config.log.  We remove comments because anyway the quotes in there
2929# would cause problems or look ugly.
2930# WARNING: Use '\'' to represent an apostrophe within the trap.
2931# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2932trap 'exit_status=$?
2933  # Save into config.log some information that might help in debugging.
2934  {
2935    echo
2936
2937    $as_echo "## ---------------- ##
2938## Cache variables. ##
2939## ---------------- ##"
2940    echo
2941    # The following way of writing the cache mishandles newlines in values,
2942(
2943  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2944    eval ac_val=\$$ac_var
2945    case $ac_val in #(
2946    *${as_nl}*)
2947      case $ac_var in #(
2948      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2949$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2950      esac
2951      case $ac_var in #(
2952      _ | IFS | as_nl) ;; #(
2953      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2954      *) { eval $ac_var=; unset $ac_var;} ;;
2955      esac ;;
2956    esac
2957  done
2958  (set) 2>&1 |
2959    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2960    *${as_nl}ac_space=\ *)
2961      sed -n \
2962	"s/'\''/'\''\\\\'\'''\''/g;
2963	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2964      ;; #(
2965    *)
2966      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2967      ;;
2968    esac |
2969    sort
2970)
2971    echo
2972
2973    $as_echo "## ----------------- ##
2974## Output variables. ##
2975## ----------------- ##"
2976    echo
2977    for ac_var in $ac_subst_vars
2978    do
2979      eval ac_val=\$$ac_var
2980      case $ac_val in
2981      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2982      esac
2983      $as_echo "$ac_var='\''$ac_val'\''"
2984    done | sort
2985    echo
2986
2987    if test -n "$ac_subst_files"; then
2988      $as_echo "## ------------------- ##
2989## File substitutions. ##
2990## ------------------- ##"
2991      echo
2992      for ac_var in $ac_subst_files
2993      do
2994	eval ac_val=\$$ac_var
2995	case $ac_val in
2996	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2997	esac
2998	$as_echo "$ac_var='\''$ac_val'\''"
2999      done | sort
3000      echo
3001    fi
3002
3003    if test -s confdefs.h; then
3004      $as_echo "## ----------- ##
3005## confdefs.h. ##
3006## ----------- ##"
3007      echo
3008      cat confdefs.h
3009      echo
3010    fi
3011    test "$ac_signal" != 0 &&
3012      $as_echo "$as_me: caught signal $ac_signal"
3013    $as_echo "$as_me: exit $exit_status"
3014  } >&5
3015  rm -f core *.core core.conftest.* &&
3016    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3017    exit $exit_status
3018' 0
3019for ac_signal in 1 2 13 15; do
3020  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3021done
3022ac_signal=0
3023
3024# confdefs.h avoids OS command line length limits that DEFS can exceed.
3025rm -f -r conftest* confdefs.h
3026
3027$as_echo "/* confdefs.h */" > confdefs.h
3028
3029# Predefined preprocessor variables.
3030
3031cat >>confdefs.h <<_ACEOF
3032#define PACKAGE_NAME "$PACKAGE_NAME"
3033_ACEOF
3034
3035cat >>confdefs.h <<_ACEOF
3036#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3037_ACEOF
3038
3039cat >>confdefs.h <<_ACEOF
3040#define PACKAGE_VERSION "$PACKAGE_VERSION"
3041_ACEOF
3042
3043cat >>confdefs.h <<_ACEOF
3044#define PACKAGE_STRING "$PACKAGE_STRING"
3045_ACEOF
3046
3047cat >>confdefs.h <<_ACEOF
3048#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3049_ACEOF
3050
3051cat >>confdefs.h <<_ACEOF
3052#define PACKAGE_URL "$PACKAGE_URL"
3053_ACEOF
3054
3055
3056# Let the site file select an alternate cache file if it wants to.
3057# Prefer an explicitly selected file to automatically selected ones.
3058ac_site_file1=NONE
3059ac_site_file2=NONE
3060if test -n "$CONFIG_SITE"; then
3061  # We do not want a PATH search for config.site.
3062  case $CONFIG_SITE in #((
3063    -*)  ac_site_file1=./$CONFIG_SITE;;
3064    */*) ac_site_file1=$CONFIG_SITE;;
3065    *)   ac_site_file1=./$CONFIG_SITE;;
3066  esac
3067elif test "x$prefix" != xNONE; then
3068  ac_site_file1=$prefix/share/config.site
3069  ac_site_file2=$prefix/etc/config.site
3070else
3071  ac_site_file1=$ac_default_prefix/share/config.site
3072  ac_site_file2=$ac_default_prefix/etc/config.site
3073fi
3074for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3075do
3076  test "x$ac_site_file" = xNONE && continue
3077  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3078    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3079$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3080    sed 's/^/| /' "$ac_site_file" >&5
3081    . "$ac_site_file" \
3082      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3083$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3084as_fn_error $? "failed to load site script $ac_site_file
3085See \`config.log' for more details" "$LINENO" 5; }
3086  fi
3087done
3088
3089if test -r "$cache_file"; then
3090  # Some versions of bash will fail to source /dev/null (special files
3091  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3092  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3093    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3094$as_echo "$as_me: loading cache $cache_file" >&6;}
3095    case $cache_file in
3096      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3097      *)                      . "./$cache_file";;
3098    esac
3099  fi
3100else
3101  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3102$as_echo "$as_me: creating cache $cache_file" >&6;}
3103  >$cache_file
3104fi
3105
3106# Check that the precious variables saved in the cache have kept the same
3107# value.
3108ac_cache_corrupted=false
3109for ac_var in $ac_precious_vars; do
3110  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3111  eval ac_new_set=\$ac_env_${ac_var}_set
3112  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3113  eval ac_new_val=\$ac_env_${ac_var}_value
3114  case $ac_old_set,$ac_new_set in
3115    set,)
3116      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3117$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3118      ac_cache_corrupted=: ;;
3119    ,set)
3120      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3121$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3122      ac_cache_corrupted=: ;;
3123    ,);;
3124    *)
3125      if test "x$ac_old_val" != "x$ac_new_val"; then
3126	# differences in whitespace do not lead to failure.
3127	ac_old_val_w=`echo x $ac_old_val`
3128	ac_new_val_w=`echo x $ac_new_val`
3129	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3130	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3131$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3132	  ac_cache_corrupted=:
3133	else
3134	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3135$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3136	  eval $ac_var=\$ac_old_val
3137	fi
3138	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3139$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3140	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3141$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3142      fi;;
3143  esac
3144  # Pass precious variables to config.status.
3145  if test "$ac_new_set" = set; then
3146    case $ac_new_val in
3147    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3148    *) ac_arg=$ac_var=$ac_new_val ;;
3149    esac
3150    case " $ac_configure_args " in
3151      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3152      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3153    esac
3154  fi
3155done
3156if $ac_cache_corrupted; then
3157  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3158$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3159  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3160$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3161  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3162fi
3163## -------------------- ##
3164## Main body of script. ##
3165## -------------------- ##
3166
3167ac_ext=c
3168ac_cpp='$CPP $CPPFLAGS'
3169ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3170ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3171ac_compiler_gnu=$ac_cv_c_compiler_gnu
3172
3173
3174
3175ac_aux_dir=
3176for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3177  if test -f "$ac_dir/install-sh"; then
3178    ac_aux_dir=$ac_dir
3179    ac_install_sh="$ac_aux_dir/install-sh -c"
3180    break
3181  elif test -f "$ac_dir/install.sh"; then
3182    ac_aux_dir=$ac_dir
3183    ac_install_sh="$ac_aux_dir/install.sh -c"
3184    break
3185  elif test -f "$ac_dir/shtool"; then
3186    ac_aux_dir=$ac_dir
3187    ac_install_sh="$ac_aux_dir/shtool install -c"
3188    break
3189  fi
3190done
3191if test -z "$ac_aux_dir"; then
3192  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
3193fi
3194
3195# These three variables are undocumented and unsupported,
3196# and are intended to be withdrawn in a future Autoconf release.
3197# They can cause serious problems if a builder's source tree is in a directory
3198# whose full name contains unusual characters.
3199ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3200ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3201ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3202
3203
3204# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3205
3206#
3207# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3208# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3209#
3210# This code is free software; you can redistribute it and/or modify it
3211# under the terms of the GNU General Public License version 2 only, as
3212# published by the Free Software Foundation.  Oracle designates this
3213# particular file as subject to the "Classpath" exception as provided
3214# by Oracle in the LICENSE file that accompanied this code.
3215#
3216# This code is distributed in the hope that it will be useful, but WITHOUT
3217# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3218# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3219# version 2 for more details (a copy is included in the LICENSE file that
3220# accompanied this code).
3221#
3222# You should have received a copy of the GNU General Public License version
3223# 2 along with this work; if not, write to the Free Software Foundation,
3224# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3225#
3226# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3227# or visit www.oracle.com if you need additional information or have any
3228# questions.
3229#
3230
3231#
3232# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3233#
3234# This program is free software; you can redistribute it and/or modify
3235# it under the terms of the GNU General Public License as published by
3236# the Free Software Foundation; either version 2 of the License, or
3237# (at your option) any later version.
3238#
3239# This program is distributed in the hope that it will be useful, but
3240# WITHOUT ANY WARRANTY; without even the implied warranty of
3241# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3242# General Public License for more details.
3243#
3244# You should have received a copy of the GNU General Public License
3245# along with this program; if not, write to the Free Software
3246# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3247#
3248# As a special exception to the GNU General Public License, if you
3249# distribute this file as part of a program that contains a
3250# configuration script generated by Autoconf, you may include it under
3251# the same distribution terms that you use for the rest of that program.
3252
3253# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3254# ----------------------------------
3255# PKG_PROG_PKG_CONFIG
3256
3257# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3258#
3259# Check to see whether a particular set of modules exists.  Similar
3260# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3261#
3262#
3263# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3264# this or PKG_CHECK_MODULES is called, or make sure to call
3265# PKG_CHECK_EXISTS manually
3266# --------------------------------------------------------------
3267
3268
3269
3270# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3271# ---------------------------------------------
3272# _PKG_CONFIG
3273
3274# _PKG_SHORT_ERRORS_SUPPORTED
3275# -----------------------------
3276# _PKG_SHORT_ERRORS_SUPPORTED
3277
3278
3279# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3280# [ACTION-IF-NOT-FOUND])
3281#
3282#
3283# Note that if there is a possibility the first call to
3284# PKG_CHECK_MODULES might not happen, you should be sure to include an
3285# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3286#
3287#
3288# --------------------------------------------------------------
3289# PKG_CHECK_MODULES
3290
3291
3292# Include these first...
3293#
3294# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3295# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3296#
3297# This code is free software; you can redistribute it and/or modify it
3298# under the terms of the GNU General Public License version 2 only, as
3299# published by the Free Software Foundation.  Oracle designates this
3300# particular file as subject to the "Classpath" exception as provided
3301# by Oracle in the LICENSE file that accompanied this code.
3302#
3303# This code is distributed in the hope that it will be useful, but WITHOUT
3304# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3305# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3306# version 2 for more details (a copy is included in the LICENSE file that
3307# accompanied this code).
3308#
3309# You should have received a copy of the GNU General Public License version
3310# 2 along with this work; if not, write to the Free Software Foundation,
3311# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3312#
3313# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3314# or visit www.oracle.com if you need additional information or have any
3315# questions.
3316#
3317
3318# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3319# If so, then append $1 to $2 \
3320# Also set JVM_ARG_OK to true/false depending on outcome.
3321
3322
3323# Appends a string to a path variable, only adding the : when needed.
3324
3325
3326# This will make sure the given variable points to a full and proper
3327# path. This means:
3328# 1) There will be no spaces in the path. On posix platforms,
3329#    spaces in the path will result in an error. On Windows,
3330#    the path will be rewritten using short-style to be space-free.
3331# 2) The path will be absolute, and it will be in unix-style (on
3332#     cygwin).
3333# $1: The name of the variable to fix
3334
3335
3336# This will make sure the given variable points to a executable
3337# with a full and proper path. This means:
3338# 1) There will be no spaces in the path. On posix platforms,
3339#    spaces in the path will result in an error. On Windows,
3340#    the path will be rewritten using short-style to be space-free.
3341# 2) The path will be absolute, and it will be in unix-style (on
3342#     cygwin).
3343# Any arguments given to the executable is preserved.
3344# If the input variable does not have a directory specification, then
3345# it need to be in the PATH.
3346# $1: The name of the variable to fix
3347
3348
3349
3350
3351# Register a --with argument but mark it as deprecated
3352# $1: The name of the with argument to deprecate, not including --with-
3353
3354
3355# Register a --enable argument but mark it as deprecated
3356# $1: The name of the with argument to deprecate, not including --enable-
3357# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3358
3359
3360
3361
3362# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3363# $1: variable to check
3364
3365
3366# Check that there are no unprocessed overridden variables left.
3367# If so, they are an incorrect argument and we will exit with an error.
3368
3369
3370# Setup a tool for the given variable. If correctly specified by the user,
3371# use that value, otherwise search for the tool using the supplied code snippet.
3372# $1: variable to set
3373# $2: code snippet to call to look for the tool
3374
3375
3376# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3377# $1: variable to set
3378# $2: executable name (or list of names) to look for
3379
3380
3381# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3382# $1: variable to set
3383# $2: executable name (or list of names) to look for
3384
3385
3386# Like BASIC_PATH_PROGS but fails if no tool was found.
3387# $1: variable to set
3388# $2: executable name (or list of names) to look for
3389
3390
3391# Like BASIC_SETUP_TOOL but fails if no tool was found.
3392# $1: variable to set
3393# $2: autoconf macro to call to look for the special tool
3394
3395
3396# Setup the most fundamental tools that relies on not much else to set up,
3397# but is used by much of the early bootstrap code.
3398
3399
3400# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3401
3402
3403
3404
3405
3406
3407
3408#%%% Simple tools %%%
3409
3410# Check if we have found a usable version of make
3411# $1: the path to a potential make binary (or empty)
3412# $2: the description on how we found this
3413
3414
3415# Goes looking for a usable version of GNU make.
3416
3417
3418
3419
3420
3421
3422# Check if build directory is on local disk. If not possible to determine,
3423# we prefer to claim it's local.
3424# Argument 1: directory to test
3425# Argument 2: what to do if it is on local disk
3426# Argument 3: what to do otherwise (remote disk or failure)
3427
3428
3429# Check that source files have basic read permissions set. This might
3430# not be the case in cygwin in certain conditions.
3431
3432
3433
3434
3435#
3436# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3437# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3438#
3439# This code is free software; you can redistribute it and/or modify it
3440# under the terms of the GNU General Public License version 2 only, as
3441# published by the Free Software Foundation.  Oracle designates this
3442# particular file as subject to the "Classpath" exception as provided
3443# by Oracle in the LICENSE file that accompanied this code.
3444#
3445# This code is distributed in the hope that it will be useful, but WITHOUT
3446# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3447# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3448# version 2 for more details (a copy is included in the LICENSE file that
3449# accompanied this code).
3450#
3451# You should have received a copy of the GNU General Public License version
3452# 2 along with this work; if not, write to the Free Software Foundation,
3453# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3454#
3455# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3456# or visit www.oracle.com if you need additional information or have any
3457# questions.
3458#
3459
3460
3461
3462
3463
3464# Helper function which possibly converts a path using DOS-style short mode.
3465# If so, the updated path is stored in $new_path.
3466# $1: The path to check
3467
3468
3469# Helper function which possibly converts a path using DOS-style short mode.
3470# If so, the updated path is stored in $new_path.
3471# $1: The path to check
3472
3473
3474# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3475# and could probably be heavily simplified. However, all changes in this
3476# area tend to need lot of testing in different scenarios, and in lack of
3477# proper unit testing, cleaning this up has not been deemed worth the effort
3478# at the moment.
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3489
3490
3491
3492
3493#
3494# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3495# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3496#
3497# This code is free software; you can redistribute it and/or modify it
3498# under the terms of the GNU General Public License version 2 only, as
3499# published by the Free Software Foundation.  Oracle designates this
3500# particular file as subject to the "Classpath" exception as provided
3501# by Oracle in the LICENSE file that accompanied this code.
3502#
3503# This code is distributed in the hope that it will be useful, but WITHOUT
3504# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3505# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3506# version 2 for more details (a copy is included in the LICENSE file that
3507# accompanied this code).
3508#
3509# You should have received a copy of the GNU General Public License version
3510# 2 along with this work; if not, write to the Free Software Foundation,
3511# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3512#
3513# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3514# or visit www.oracle.com if you need additional information or have any
3515# questions.
3516#
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528# ... then the rest
3529#
3530# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3531# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3532#
3533# This code is free software; you can redistribute it and/or modify it
3534# under the terms of the GNU General Public License version 2 only, as
3535# published by the Free Software Foundation.  Oracle designates this
3536# particular file as subject to the "Classpath" exception as provided
3537# by Oracle in the LICENSE file that accompanied this code.
3538#
3539# This code is distributed in the hope that it will be useful, but WITHOUT
3540# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3541# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3542# version 2 for more details (a copy is included in the LICENSE file that
3543# accompanied this code).
3544#
3545# You should have received a copy of the GNU General Public License version
3546# 2 along with this work; if not, write to the Free Software Foundation,
3547# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3548#
3549# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3550# or visit www.oracle.com if you need additional information or have any
3551# questions.
3552#
3553
3554########################################################################
3555# This file handles detection of the Boot JDK. The Boot JDK detection
3556# process has been developed as a response to solve a complex real-world
3557# problem. Initially, it was simple, but it has grown as platform after
3558# platform, idiosyncracy after idiosyncracy has been supported.
3559#
3560# The basic idea is this:
3561# 1) You need an acceptable *) JDK to use as a Boot JDK
3562# 2) There are several ways to locate a JDK, that are mostly platform
3563#    dependent **)
3564# 3) You can have multiple JDKs installed
3565# 4) If possible, configure should try to dig out an acceptable JDK
3566#    automatically, without having to resort to command-line options
3567#
3568# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3569#     javac) and not a JRE, etc.
3570#
3571# **) On Windows we typically use a well-known path.
3572#     On MacOSX we typically use the tool java_home.
3573#     On Linux we typically find javac in the $PATH, and then follow a
3574#     chain of symlinks that often ends up in a real JDK.
3575#
3576# This leads to the code where we check in different ways to locate a
3577# JDK, and if one is found, check if it is acceptable. If not, we print
3578# our reasons for rejecting it (useful when debugging non-working
3579# configure situations) and continue checking the next one.
3580########################################################################
3581
3582# Execute the check given as argument, and verify the result
3583# If the Boot JDK was previously found, do nothing
3584# $1 A command line (typically autoconf macro) to execute
3585
3586
3587# Test: Is bootjdk explicitely set by command line arguments?
3588
3589
3590# Test: Is bootjdk available from builddeps?
3591
3592
3593# Test: Is $JAVA_HOME set?
3594
3595
3596# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3597
3598
3599# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3600# $1: Argument to the java_home binary (optional)
3601
3602
3603# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3604
3605
3606# Look for a jdk in the given path. If there are multiple, try to select the newest.
3607# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3608# $1 = Path to directory containing jdk installations.
3609# $2 = String to append to the found JDK directory to get the proper JDK home
3610
3611
3612# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3613# environmental variable as base for where to look.
3614# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3615
3616
3617# Test: Is there a JDK installed in default, well-known locations?
3618
3619
3620# Check that a command-line tool in the Boot JDK is correct
3621# $1 = name of variable to assign
3622# $2 = name of binary
3623
3624
3625###############################################################################
3626#
3627# We need a Boot JDK to bootstrap the build.
3628#
3629
3630
3631
3632
3633
3634#
3635# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3636# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3637#
3638# This code is free software; you can redistribute it and/or modify it
3639# under the terms of the GNU General Public License version 2 only, as
3640# published by the Free Software Foundation.  Oracle designates this
3641# particular file as subject to the "Classpath" exception as provided
3642# by Oracle in the LICENSE file that accompanied this code.
3643#
3644# This code is distributed in the hope that it will be useful, but WITHOUT
3645# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3646# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3647# version 2 for more details (a copy is included in the LICENSE file that
3648# accompanied this code).
3649#
3650# You should have received a copy of the GNU General Public License version
3651# 2 along with this work; if not, write to the Free Software Foundation,
3652# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3653#
3654# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3655# or visit www.oracle.com if you need additional information or have any
3656# questions.
3657#
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678#
3679# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3680# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3681#
3682# This code is free software; you can redistribute it and/or modify it
3683# under the terms of the GNU General Public License version 2 only, as
3684# published by the Free Software Foundation.  Oracle designates this
3685# particular file as subject to the "Classpath" exception as provided
3686# by Oracle in the LICENSE file that accompanied this code.
3687#
3688# This code is distributed in the hope that it will be useful, but WITHOUT
3689# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3690# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3691# version 2 for more details (a copy is included in the LICENSE file that
3692# accompanied this code).
3693#
3694# You should have received a copy of the GNU General Public License version
3695# 2 along with this work; if not, write to the Free Software Foundation,
3696# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3697#
3698# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3699# or visit www.oracle.com if you need additional information or have any
3700# questions.
3701#
3702
3703
3704
3705
3706
3707# Documentation on common flags used for solstudio in HIGHEST.
3708#
3709# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3710#          done with care, there are some assumptions below that need to
3711#          be understood about the use of pointers, and IEEE behavior.
3712#
3713# -fns: Use non-standard floating point mode (not IEEE 754)
3714# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3715# -fsingle: Use single precision floating point with 'float'
3716# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3717#   (Source with excessing pointer casting and data access with mixed
3718#    pointer types are not recommended)
3719# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3720#   (If you expect perfect errno behavior, do not use this)
3721# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3722# -xrestrict: Pointer parameters to functions do not overlap
3723#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3724#    If you pass in multiple pointers to the same data, do not use this)
3725# -xlibmil: Inline some library routines
3726#   (If you expect perfect errno behavior, do not use this)
3727# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3728#   (If you expect perfect errno behavior, do not use this)
3729#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3730
3731    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3732    # Bug?
3733    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3734    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3735    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3736    #fi
3737
3738
3739
3740
3741
3742
3743# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3744#                                   [RUN-IF-FALSE])
3745# ------------------------------------------------------------
3746# Check that the c and c++ compilers support an argument
3747
3748
3749
3750
3751#
3752# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3753# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3754#
3755# This code is free software; you can redistribute it and/or modify it
3756# under the terms of the GNU General Public License version 2 only, as
3757# published by the Free Software Foundation.  Oracle designates this
3758# particular file as subject to the "Classpath" exception as provided
3759# by Oracle in the LICENSE file that accompanied this code.
3760#
3761# This code is distributed in the hope that it will be useful, but WITHOUT
3762# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3763# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3764# version 2 for more details (a copy is included in the LICENSE file that
3765# accompanied this code).
3766#
3767# You should have received a copy of the GNU General Public License version
3768# 2 along with this work; if not, write to the Free Software Foundation,
3769# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3770#
3771# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3772# or visit www.oracle.com if you need additional information or have any
3773# questions.
3774#
3775
3776
3777
3778
3779
3780cygwin_help() {
3781  case $1 in
3782    unzip)
3783      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3784      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3785      ;;
3786    zip)
3787      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3788      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3789      ;;
3790    make)
3791      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3792      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3793      ;;
3794    freetype)
3795      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3796        HELP_MSG="To install freetype, run:
3797wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3798chmod +x /tmp/freetype-setup.exe
3799/tmp/freetype-setup.exe
3800Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3801After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3802      else
3803        HELP_MSG="You need to build a 64-bit version of freetype.
3804This is not readily available.
3805You can find source code and build instructions on
3806http://www.freetype.org/
3807If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3808      fi
3809      ;;
3810  esac
3811}
3812
3813msys_help() {
3814  PKGHANDLER_COMMAND=""
3815}
3816
3817apt_help() {
3818  case $1 in
3819    devkit)
3820      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3821    openjdk)
3822      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3823    alsa)
3824      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3825    cups)
3826      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3827    freetype)
3828      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3829    pulse)
3830      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3831    x11)
3832      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3833    ccache)
3834      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3835  esac
3836}
3837
3838yum_help() {
3839  case $1 in
3840    devkit)
3841      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3842    openjdk)
3843      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3844    alsa)
3845      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3846    cups)
3847      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3848    freetype)
3849      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3850    pulse)
3851      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3852    x11)
3853      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3854    ccache)
3855      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3856  esac
3857}
3858
3859port_help() {
3860  PKGHANDLER_COMMAND=""
3861}
3862
3863pkgutil_help() {
3864  PKGHANDLER_COMMAND=""
3865}
3866
3867pkgadd_help() {
3868  PKGHANDLER_COMMAND=""
3869}
3870
3871# This function will check if we're called from the "configure" wrapper while
3872# printing --help. If so, we will print out additional information that can
3873# only be extracted within the autoconf script, and then exit. This must be
3874# called at the very beginning in configure.ac.
3875
3876
3877
3878
3879#
3880# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3881# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3882#
3883# This code is free software; you can redistribute it and/or modify it
3884# under the terms of the GNU General Public License version 2 only, as
3885# published by the Free Software Foundation.  Oracle designates this
3886# particular file as subject to the "Classpath" exception as provided
3887# by Oracle in the LICENSE file that accompanied this code.
3888#
3889# This code is distributed in the hope that it will be useful, but WITHOUT
3890# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3891# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3892# version 2 for more details (a copy is included in the LICENSE file that
3893# accompanied this code).
3894#
3895# You should have received a copy of the GNU General Public License version
3896# 2 along with this work; if not, write to the Free Software Foundation,
3897# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3898#
3899# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3900# or visit www.oracle.com if you need additional information or have any
3901# questions.
3902#
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913###############################################################################
3914#
3915# Should we build only OpenJDK even if closed sources are present?
3916#
3917
3918
3919
3920
3921###############################################################################
3922#
3923# Setup version numbers
3924#
3925
3926
3927
3928
3929
3930
3931#
3932# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3933# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3934#
3935# This code is free software; you can redistribute it and/or modify it
3936# under the terms of the GNU General Public License version 2 only, as
3937# published by the Free Software Foundation.  Oracle designates this
3938# particular file as subject to the "Classpath" exception as provided
3939# by Oracle in the LICENSE file that accompanied this code.
3940#
3941# This code is distributed in the hope that it will be useful, but WITHOUT
3942# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3943# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3944# version 2 for more details (a copy is included in the LICENSE file that
3945# accompanied this code).
3946#
3947# You should have received a copy of the GNU General Public License version
3948# 2 along with this work; if not, write to the Free Software Foundation,
3949# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3950#
3951# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3952# or visit www.oracle.com if you need additional information or have any
3953# questions.
3954#
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974#
3975# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3976# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3977#
3978# This code is free software; you can redistribute it and/or modify it
3979# under the terms of the GNU General Public License version 2 only, as
3980# published by the Free Software Foundation.  Oracle designates this
3981# particular file as subject to the "Classpath" exception as provided
3982# by Oracle in the LICENSE file that accompanied this code.
3983#
3984# This code is distributed in the hope that it will be useful, but WITHOUT
3985# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3986# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3987# version 2 for more details (a copy is included in the LICENSE file that
3988# accompanied this code).
3989#
3990# You should have received a copy of the GNU General Public License version
3991# 2 along with this work; if not, write to the Free Software Foundation,
3992# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3993#
3994# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3995# or visit www.oracle.com if you need additional information or have any
3996# questions.
3997#
3998
3999# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4000# Converts autoconf style CPU name to OpenJDK style, into
4001# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4002
4003
4004# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4005# Converts autoconf style OS name to OpenJDK style, into
4006# VAR_OS and VAR_OS_API.
4007
4008
4009# Expects $host_os $host_cpu $build_os and $build_cpu
4010# and $with_target_bits to have been setup!
4011#
4012# Translate the standard triplet(quadruplet) definition
4013# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4014# OPENJDK_BUILD_OS, etc.
4015
4016
4017# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4018# accordingly. Must be done after setting up build and target system, but before
4019# doing anything else with these values.
4020
4021
4022# Setup the legacy variables, for controlling the old makefiles.
4023#
4024
4025
4026
4027
4028#%%% Build and target systems %%%
4029
4030
4031
4032
4033# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4034# Add -mX to various FLAGS variables.
4035
4036
4037
4038
4039
4040
4041#
4042# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4043# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4044#
4045# This code is free software; you can redistribute it and/or modify it
4046# under the terms of the GNU General Public License version 2 only, as
4047# published by the Free Software Foundation.  Oracle designates this
4048# particular file as subject to the "Classpath" exception as provided
4049# by Oracle in the LICENSE file that accompanied this code.
4050#
4051# This code is distributed in the hope that it will be useful, but WITHOUT
4052# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4053# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4054# version 2 for more details (a copy is included in the LICENSE file that
4055# accompanied this code).
4056#
4057# You should have received a copy of the GNU General Public License version
4058# 2 along with this work; if not, write to the Free Software Foundation,
4059# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4060#
4061# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4062# or visit www.oracle.com if you need additional information or have any
4063# questions.
4064#
4065
4066
4067
4068
4069
4070
4071
4072
4073#
4074# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4075# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4076#
4077# This code is free software; you can redistribute it and/or modify it
4078# under the terms of the GNU General Public License version 2 only, as
4079# published by the Free Software Foundation.  Oracle designates this
4080# particular file as subject to the "Classpath" exception as provided
4081# by Oracle in the LICENSE file that accompanied this code.
4082#
4083# This code is distributed in the hope that it will be useful, but WITHOUT
4084# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4085# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4086# version 2 for more details (a copy is included in the LICENSE file that
4087# accompanied this code).
4088#
4089# You should have received a copy of the GNU General Public License version
4090# 2 along with this work; if not, write to the Free Software Foundation,
4091# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4092#
4093# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4094# or visit www.oracle.com if you need additional information or have any
4095# questions.
4096#
4097
4098########################################################################
4099# This file is responsible for detecting, verifying and setting up the
4100# toolchain, i.e. the compiler, linker and related utilities. It will setup
4101# proper paths to the binaries, but it will not setup any flags.
4102#
4103# The binaries used is determined by the toolchain type, which is the family of
4104# compilers and related tools that are used.
4105########################################################################
4106
4107
4108# All valid toolchains, regardless of platform (used by help.m4)
4109VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4110
4111# These toolchains are valid on different platforms
4112VALID_TOOLCHAINS_linux="gcc clang"
4113VALID_TOOLCHAINS_solaris="solstudio"
4114VALID_TOOLCHAINS_macosx="gcc clang"
4115VALID_TOOLCHAINS_aix="xlc"
4116VALID_TOOLCHAINS_windows="microsoft"
4117
4118# Toolchain descriptions
4119TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4120TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4121TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4122TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4123TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4124
4125# Setup a number of variables describing how native output files are
4126# named on this platform/toolchain.
4127
4128
4129# Determine which toolchain type to use, and make sure it is valid for this
4130# platform. Setup various information about the selected toolchain.
4131
4132
4133# Before we start detecting the toolchain executables, we might need some
4134# special setup, e.g. additional paths etc.
4135
4136
4137# Restore path, etc
4138
4139
4140# Check if a compiler is of the toolchain type we expect, and save the version
4141# information from it. If the compiler does not match the expected type,
4142# this function will abort using AC_MSG_ERROR. If it matches, the version will
4143# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4144# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4145#
4146# $1 = compiler to test (CC or CXX)
4147# $2 = human readable name of compiler (C or C++)
4148
4149
4150# Try to locate the given C or C++ compiler in the path, or otherwise.
4151#
4152# $1 = compiler to test (CC or CXX)
4153# $2 = human readable name of compiler (C or C++)
4154# $3 = list of compiler names to search for
4155
4156
4157# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4158# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4159# archiver (AR). Verify that the compilers are correct according to the
4160# toolchain type.
4161
4162
4163# Setup additional tools that is considered a part of the toolchain, but not the
4164# core part. Many of these are highly platform-specific and do not exist,
4165# and/or are not needed on all platforms.
4166
4167
4168# Setup the build tools (i.e, the compiler and linker used to build programs
4169# that should be run on the build platform, not the target platform, as a build
4170# helper). Since the non-cross-compile case uses the normal, target compilers
4171# for this, we can only do this after these have been setup.
4172
4173
4174# Setup legacy variables that are still needed as alternative ways to refer to
4175# parts of the toolchain.
4176
4177
4178# Do some additional checks on the detected tools.
4179
4180
4181# Setup the JTReg Regression Test Harness.
4182
4183
4184#
4185# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4186# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4187#
4188# This code is free software; you can redistribute it and/or modify it
4189# under the terms of the GNU General Public License version 2 only, as
4190# published by the Free Software Foundation.  Oracle designates this
4191# particular file as subject to the "Classpath" exception as provided
4192# by Oracle in the LICENSE file that accompanied this code.
4193#
4194# This code is distributed in the hope that it will be useful, but WITHOUT
4195# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4196# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4197# version 2 for more details (a copy is included in the LICENSE file that
4198# accompanied this code).
4199#
4200# You should have received a copy of the GNU General Public License version
4201# 2 along with this work; if not, write to the Free Software Foundation,
4202# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4203#
4204# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4205# or visit www.oracle.com if you need additional information or have any
4206# questions.
4207#
4208
4209
4210
4211
4212
4213
4214
4215# Check if the VS env variables were setup prior to running configure.
4216# If not, then find vcvarsall.bat and run it automatically, and integrate
4217# the set env variables into the spec file.
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228# This line needs to be here, verbatim, after all includes and the dummy hook
4229# definitions. It is replaced with custom functionality when building
4230# custom sources.
4231#CUSTOM_AUTOCONF_INCLUDE
4232
4233# Do not change or remove the following line, it is needed for consistency checks:
4234DATE_WHEN_GENERATED=1394150589
4235
4236###############################################################################
4237#
4238# Initialization / Boot-strapping
4239#
4240# The bootstrapping process needs to solve the "chicken or the egg" problem,
4241# thus it jumps back and forth, each time gaining something needed later on.
4242#
4243###############################################################################
4244
4245# If we are requested to print additional help, do that and then exit.
4246# This must be the very first call.
4247
4248  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4249    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4250    $PRINTF "Which are valid to use depends on the build platform.\n"
4251    for toolchain in $VALID_TOOLCHAINS_all; do
4252      # Use indirect variable referencing
4253      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4254      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4255      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4256    done
4257
4258    # And now exit directly
4259    exit 0
4260  fi
4261
4262
4263# Basic initialization that must happen first of all in the normal process.
4264
4265  # Save the original command line. This is passed to us by the wrapper configure script.
4266
4267  DATE_WHEN_CONFIGURED=`LANG=C date`
4268
4269  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4270$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4271  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4272$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4273
4274
4275  # Start with tools that do not need have cross compilation support
4276  # and can be expected to be found in the default PATH. These tools are
4277  # used by configure. Nor are these tools expected to be found in the
4278  # devkit from the builddeps server either, since they are
4279  # needed to download the devkit.
4280
4281  # First are all the simple required tools.
4282
4283
4284
4285  # Publish this variable in the help.
4286
4287
4288  if test "x$BASENAME" = x; then
4289    # The variable is not set by user, try to locate tool using the code snippet
4290    for ac_prog in basename
4291do
4292  # Extract the first word of "$ac_prog", so it can be a program name with args.
4293set dummy $ac_prog; ac_word=$2
4294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4295$as_echo_n "checking for $ac_word... " >&6; }
4296if ${ac_cv_path_BASENAME+:} false; then :
4297  $as_echo_n "(cached) " >&6
4298else
4299  case $BASENAME in
4300  [\\/]* | ?:[\\/]*)
4301  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4302  ;;
4303  *)
4304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4305for as_dir in $PATH
4306do
4307  IFS=$as_save_IFS
4308  test -z "$as_dir" && as_dir=.
4309    for ac_exec_ext in '' $ac_executable_extensions; do
4310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4311    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4313    break 2
4314  fi
4315done
4316  done
4317IFS=$as_save_IFS
4318
4319  ;;
4320esac
4321fi
4322BASENAME=$ac_cv_path_BASENAME
4323if test -n "$BASENAME"; then
4324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4325$as_echo "$BASENAME" >&6; }
4326else
4327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4328$as_echo "no" >&6; }
4329fi
4330
4331
4332  test -n "$BASENAME" && break
4333done
4334
4335  else
4336    # The variable is set, but is it from the command line or the environment?
4337
4338    # Try to remove the string !BASENAME! from our list.
4339    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4340    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4341      # If it failed, the variable was not from the command line. Ignore it,
4342      # but warn the user (except for BASH, which is always set by the calling BASH).
4343      if test "xBASENAME" != xBASH; then
4344        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4345$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4346      fi
4347      # Try to locate tool using the code snippet
4348      for ac_prog in basename
4349do
4350  # Extract the first word of "$ac_prog", so it can be a program name with args.
4351set dummy $ac_prog; ac_word=$2
4352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4353$as_echo_n "checking for $ac_word... " >&6; }
4354if ${ac_cv_path_BASENAME+:} false; then :
4355  $as_echo_n "(cached) " >&6
4356else
4357  case $BASENAME in
4358  [\\/]* | ?:[\\/]*)
4359  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4360  ;;
4361  *)
4362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4363for as_dir in $PATH
4364do
4365  IFS=$as_save_IFS
4366  test -z "$as_dir" && as_dir=.
4367    for ac_exec_ext in '' $ac_executable_extensions; do
4368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4369    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4371    break 2
4372  fi
4373done
4374  done
4375IFS=$as_save_IFS
4376
4377  ;;
4378esac
4379fi
4380BASENAME=$ac_cv_path_BASENAME
4381if test -n "$BASENAME"; then
4382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4383$as_echo "$BASENAME" >&6; }
4384else
4385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4386$as_echo "no" >&6; }
4387fi
4388
4389
4390  test -n "$BASENAME" && break
4391done
4392
4393    else
4394      # If it succeeded, then it was overridden by the user. We will use it
4395      # for the tool.
4396
4397      # First remove it from the list of overridden variables, so we can test
4398      # for unknown variables in the end.
4399      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4400
4401      # Check if the provided tool contains a complete path.
4402      tool_specified="$BASENAME"
4403      tool_basename="${tool_specified##*/}"
4404      if test "x$tool_basename" = "x$tool_specified"; then
4405        # A command without a complete path is provided, search $PATH.
4406        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4407$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4408        # Extract the first word of "$tool_basename", so it can be a program name with args.
4409set dummy $tool_basename; ac_word=$2
4410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4411$as_echo_n "checking for $ac_word... " >&6; }
4412if ${ac_cv_path_BASENAME+:} false; then :
4413  $as_echo_n "(cached) " >&6
4414else
4415  case $BASENAME in
4416  [\\/]* | ?:[\\/]*)
4417  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4418  ;;
4419  *)
4420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4421for as_dir in $PATH
4422do
4423  IFS=$as_save_IFS
4424  test -z "$as_dir" && as_dir=.
4425    for ac_exec_ext in '' $ac_executable_extensions; do
4426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4427    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4429    break 2
4430  fi
4431done
4432  done
4433IFS=$as_save_IFS
4434
4435  ;;
4436esac
4437fi
4438BASENAME=$ac_cv_path_BASENAME
4439if test -n "$BASENAME"; then
4440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4441$as_echo "$BASENAME" >&6; }
4442else
4443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4444$as_echo "no" >&6; }
4445fi
4446
4447
4448        if test "x$BASENAME" = x; then
4449          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4450        fi
4451      else
4452        # Otherwise we believe it is a complete path. Use it as it is.
4453        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4454$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4455        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4456$as_echo_n "checking for BASENAME... " >&6; }
4457        if test ! -x "$tool_specified"; then
4458          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4459$as_echo "not found" >&6; }
4460          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4461        fi
4462        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4463$as_echo "$tool_specified" >&6; }
4464      fi
4465    fi
4466  fi
4467
4468
4469
4470  if test "x$BASENAME" = x; then
4471    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4472  fi
4473
4474
4475
4476
4477
4478  # Publish this variable in the help.
4479
4480
4481  if test "x$BASH" = x; then
4482    # The variable is not set by user, try to locate tool using the code snippet
4483    for ac_prog in bash
4484do
4485  # Extract the first word of "$ac_prog", so it can be a program name with args.
4486set dummy $ac_prog; ac_word=$2
4487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4488$as_echo_n "checking for $ac_word... " >&6; }
4489if ${ac_cv_path_BASH+:} false; then :
4490  $as_echo_n "(cached) " >&6
4491else
4492  case $BASH in
4493  [\\/]* | ?:[\\/]*)
4494  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4495  ;;
4496  *)
4497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4498for as_dir in $PATH
4499do
4500  IFS=$as_save_IFS
4501  test -z "$as_dir" && as_dir=.
4502    for ac_exec_ext in '' $ac_executable_extensions; do
4503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4504    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4506    break 2
4507  fi
4508done
4509  done
4510IFS=$as_save_IFS
4511
4512  ;;
4513esac
4514fi
4515BASH=$ac_cv_path_BASH
4516if test -n "$BASH"; then
4517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4518$as_echo "$BASH" >&6; }
4519else
4520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4521$as_echo "no" >&6; }
4522fi
4523
4524
4525  test -n "$BASH" && break
4526done
4527
4528  else
4529    # The variable is set, but is it from the command line or the environment?
4530
4531    # Try to remove the string !BASH! from our list.
4532    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4533    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4534      # If it failed, the variable was not from the command line. Ignore it,
4535      # but warn the user (except for BASH, which is always set by the calling BASH).
4536      if test "xBASH" != xBASH; then
4537        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4538$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4539      fi
4540      # Try to locate tool using the code snippet
4541      for ac_prog in bash
4542do
4543  # Extract the first word of "$ac_prog", so it can be a program name with args.
4544set dummy $ac_prog; ac_word=$2
4545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4546$as_echo_n "checking for $ac_word... " >&6; }
4547if ${ac_cv_path_BASH+:} false; then :
4548  $as_echo_n "(cached) " >&6
4549else
4550  case $BASH in
4551  [\\/]* | ?:[\\/]*)
4552  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4553  ;;
4554  *)
4555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4556for as_dir in $PATH
4557do
4558  IFS=$as_save_IFS
4559  test -z "$as_dir" && as_dir=.
4560    for ac_exec_ext in '' $ac_executable_extensions; do
4561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4562    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4564    break 2
4565  fi
4566done
4567  done
4568IFS=$as_save_IFS
4569
4570  ;;
4571esac
4572fi
4573BASH=$ac_cv_path_BASH
4574if test -n "$BASH"; then
4575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4576$as_echo "$BASH" >&6; }
4577else
4578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4579$as_echo "no" >&6; }
4580fi
4581
4582
4583  test -n "$BASH" && break
4584done
4585
4586    else
4587      # If it succeeded, then it was overridden by the user. We will use it
4588      # for the tool.
4589
4590      # First remove it from the list of overridden variables, so we can test
4591      # for unknown variables in the end.
4592      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4593
4594      # Check if the provided tool contains a complete path.
4595      tool_specified="$BASH"
4596      tool_basename="${tool_specified##*/}"
4597      if test "x$tool_basename" = "x$tool_specified"; then
4598        # A command without a complete path is provided, search $PATH.
4599        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4600$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4601        # Extract the first word of "$tool_basename", so it can be a program name with args.
4602set dummy $tool_basename; ac_word=$2
4603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4604$as_echo_n "checking for $ac_word... " >&6; }
4605if ${ac_cv_path_BASH+:} false; then :
4606  $as_echo_n "(cached) " >&6
4607else
4608  case $BASH in
4609  [\\/]* | ?:[\\/]*)
4610  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4611  ;;
4612  *)
4613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4614for as_dir in $PATH
4615do
4616  IFS=$as_save_IFS
4617  test -z "$as_dir" && as_dir=.
4618    for ac_exec_ext in '' $ac_executable_extensions; do
4619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4620    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4622    break 2
4623  fi
4624done
4625  done
4626IFS=$as_save_IFS
4627
4628  ;;
4629esac
4630fi
4631BASH=$ac_cv_path_BASH
4632if test -n "$BASH"; then
4633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4634$as_echo "$BASH" >&6; }
4635else
4636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4637$as_echo "no" >&6; }
4638fi
4639
4640
4641        if test "x$BASH" = x; then
4642          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4643        fi
4644      else
4645        # Otherwise we believe it is a complete path. Use it as it is.
4646        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4647$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4648        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4649$as_echo_n "checking for BASH... " >&6; }
4650        if test ! -x "$tool_specified"; then
4651          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4652$as_echo "not found" >&6; }
4653          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4654        fi
4655        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4656$as_echo "$tool_specified" >&6; }
4657      fi
4658    fi
4659  fi
4660
4661
4662
4663  if test "x$BASH" = x; then
4664    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4665  fi
4666
4667
4668
4669
4670
4671  # Publish this variable in the help.
4672
4673
4674  if test "x$CAT" = x; then
4675    # The variable is not set by user, try to locate tool using the code snippet
4676    for ac_prog in cat
4677do
4678  # Extract the first word of "$ac_prog", so it can be a program name with args.
4679set dummy $ac_prog; ac_word=$2
4680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4681$as_echo_n "checking for $ac_word... " >&6; }
4682if ${ac_cv_path_CAT+:} false; then :
4683  $as_echo_n "(cached) " >&6
4684else
4685  case $CAT in
4686  [\\/]* | ?:[\\/]*)
4687  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4688  ;;
4689  *)
4690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4691for as_dir in $PATH
4692do
4693  IFS=$as_save_IFS
4694  test -z "$as_dir" && as_dir=.
4695    for ac_exec_ext in '' $ac_executable_extensions; do
4696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4697    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4699    break 2
4700  fi
4701done
4702  done
4703IFS=$as_save_IFS
4704
4705  ;;
4706esac
4707fi
4708CAT=$ac_cv_path_CAT
4709if test -n "$CAT"; then
4710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4711$as_echo "$CAT" >&6; }
4712else
4713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4714$as_echo "no" >&6; }
4715fi
4716
4717
4718  test -n "$CAT" && break
4719done
4720
4721  else
4722    # The variable is set, but is it from the command line or the environment?
4723
4724    # Try to remove the string !CAT! from our list.
4725    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4726    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4727      # If it failed, the variable was not from the command line. Ignore it,
4728      # but warn the user (except for BASH, which is always set by the calling BASH).
4729      if test "xCAT" != xBASH; then
4730        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4731$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4732      fi
4733      # Try to locate tool using the code snippet
4734      for ac_prog in cat
4735do
4736  # Extract the first word of "$ac_prog", so it can be a program name with args.
4737set dummy $ac_prog; ac_word=$2
4738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4739$as_echo_n "checking for $ac_word... " >&6; }
4740if ${ac_cv_path_CAT+:} false; then :
4741  $as_echo_n "(cached) " >&6
4742else
4743  case $CAT in
4744  [\\/]* | ?:[\\/]*)
4745  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4746  ;;
4747  *)
4748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4749for as_dir in $PATH
4750do
4751  IFS=$as_save_IFS
4752  test -z "$as_dir" && as_dir=.
4753    for ac_exec_ext in '' $ac_executable_extensions; do
4754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4755    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4757    break 2
4758  fi
4759done
4760  done
4761IFS=$as_save_IFS
4762
4763  ;;
4764esac
4765fi
4766CAT=$ac_cv_path_CAT
4767if test -n "$CAT"; then
4768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4769$as_echo "$CAT" >&6; }
4770else
4771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4772$as_echo "no" >&6; }
4773fi
4774
4775
4776  test -n "$CAT" && break
4777done
4778
4779    else
4780      # If it succeeded, then it was overridden by the user. We will use it
4781      # for the tool.
4782
4783      # First remove it from the list of overridden variables, so we can test
4784      # for unknown variables in the end.
4785      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4786
4787      # Check if the provided tool contains a complete path.
4788      tool_specified="$CAT"
4789      tool_basename="${tool_specified##*/}"
4790      if test "x$tool_basename" = "x$tool_specified"; then
4791        # A command without a complete path is provided, search $PATH.
4792        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4793$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4794        # Extract the first word of "$tool_basename", so it can be a program name with args.
4795set dummy $tool_basename; ac_word=$2
4796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4797$as_echo_n "checking for $ac_word... " >&6; }
4798if ${ac_cv_path_CAT+:} false; then :
4799  $as_echo_n "(cached) " >&6
4800else
4801  case $CAT in
4802  [\\/]* | ?:[\\/]*)
4803  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4804  ;;
4805  *)
4806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4807for as_dir in $PATH
4808do
4809  IFS=$as_save_IFS
4810  test -z "$as_dir" && as_dir=.
4811    for ac_exec_ext in '' $ac_executable_extensions; do
4812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4813    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4815    break 2
4816  fi
4817done
4818  done
4819IFS=$as_save_IFS
4820
4821  ;;
4822esac
4823fi
4824CAT=$ac_cv_path_CAT
4825if test -n "$CAT"; then
4826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4827$as_echo "$CAT" >&6; }
4828else
4829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4830$as_echo "no" >&6; }
4831fi
4832
4833
4834        if test "x$CAT" = x; then
4835          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4836        fi
4837      else
4838        # Otherwise we believe it is a complete path. Use it as it is.
4839        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4840$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4841        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4842$as_echo_n "checking for CAT... " >&6; }
4843        if test ! -x "$tool_specified"; then
4844          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4845$as_echo "not found" >&6; }
4846          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4847        fi
4848        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4849$as_echo "$tool_specified" >&6; }
4850      fi
4851    fi
4852  fi
4853
4854
4855
4856  if test "x$CAT" = x; then
4857    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4858  fi
4859
4860
4861
4862
4863
4864  # Publish this variable in the help.
4865
4866
4867  if test "x$CHMOD" = x; then
4868    # The variable is not set by user, try to locate tool using the code snippet
4869    for ac_prog in chmod
4870do
4871  # Extract the first word of "$ac_prog", so it can be a program name with args.
4872set dummy $ac_prog; ac_word=$2
4873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4874$as_echo_n "checking for $ac_word... " >&6; }
4875if ${ac_cv_path_CHMOD+:} false; then :
4876  $as_echo_n "(cached) " >&6
4877else
4878  case $CHMOD in
4879  [\\/]* | ?:[\\/]*)
4880  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4881  ;;
4882  *)
4883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4884for as_dir in $PATH
4885do
4886  IFS=$as_save_IFS
4887  test -z "$as_dir" && as_dir=.
4888    for ac_exec_ext in '' $ac_executable_extensions; do
4889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4890    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4892    break 2
4893  fi
4894done
4895  done
4896IFS=$as_save_IFS
4897
4898  ;;
4899esac
4900fi
4901CHMOD=$ac_cv_path_CHMOD
4902if test -n "$CHMOD"; then
4903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4904$as_echo "$CHMOD" >&6; }
4905else
4906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4907$as_echo "no" >&6; }
4908fi
4909
4910
4911  test -n "$CHMOD" && break
4912done
4913
4914  else
4915    # The variable is set, but is it from the command line or the environment?
4916
4917    # Try to remove the string !CHMOD! from our list.
4918    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
4919    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4920      # If it failed, the variable was not from the command line. Ignore it,
4921      # but warn the user (except for BASH, which is always set by the calling BASH).
4922      if test "xCHMOD" != xBASH; then
4923        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
4924$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
4925      fi
4926      # Try to locate tool using the code snippet
4927      for ac_prog in chmod
4928do
4929  # Extract the first word of "$ac_prog", so it can be a program name with args.
4930set dummy $ac_prog; ac_word=$2
4931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4932$as_echo_n "checking for $ac_word... " >&6; }
4933if ${ac_cv_path_CHMOD+:} false; then :
4934  $as_echo_n "(cached) " >&6
4935else
4936  case $CHMOD in
4937  [\\/]* | ?:[\\/]*)
4938  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4939  ;;
4940  *)
4941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4942for as_dir in $PATH
4943do
4944  IFS=$as_save_IFS
4945  test -z "$as_dir" && as_dir=.
4946    for ac_exec_ext in '' $ac_executable_extensions; do
4947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4948    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4950    break 2
4951  fi
4952done
4953  done
4954IFS=$as_save_IFS
4955
4956  ;;
4957esac
4958fi
4959CHMOD=$ac_cv_path_CHMOD
4960if test -n "$CHMOD"; then
4961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4962$as_echo "$CHMOD" >&6; }
4963else
4964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4965$as_echo "no" >&6; }
4966fi
4967
4968
4969  test -n "$CHMOD" && break
4970done
4971
4972    else
4973      # If it succeeded, then it was overridden by the user. We will use it
4974      # for the tool.
4975
4976      # First remove it from the list of overridden variables, so we can test
4977      # for unknown variables in the end.
4978      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4979
4980      # Check if the provided tool contains a complete path.
4981      tool_specified="$CHMOD"
4982      tool_basename="${tool_specified##*/}"
4983      if test "x$tool_basename" = "x$tool_specified"; then
4984        # A command without a complete path is provided, search $PATH.
4985        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
4986$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
4987        # Extract the first word of "$tool_basename", so it can be a program name with args.
4988set dummy $tool_basename; ac_word=$2
4989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4990$as_echo_n "checking for $ac_word... " >&6; }
4991if ${ac_cv_path_CHMOD+:} false; then :
4992  $as_echo_n "(cached) " >&6
4993else
4994  case $CHMOD in
4995  [\\/]* | ?:[\\/]*)
4996  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4997  ;;
4998  *)
4999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5000for as_dir in $PATH
5001do
5002  IFS=$as_save_IFS
5003  test -z "$as_dir" && as_dir=.
5004    for ac_exec_ext in '' $ac_executable_extensions; do
5005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5006    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5008    break 2
5009  fi
5010done
5011  done
5012IFS=$as_save_IFS
5013
5014  ;;
5015esac
5016fi
5017CHMOD=$ac_cv_path_CHMOD
5018if test -n "$CHMOD"; then
5019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5020$as_echo "$CHMOD" >&6; }
5021else
5022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5023$as_echo "no" >&6; }
5024fi
5025
5026
5027        if test "x$CHMOD" = x; then
5028          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5029        fi
5030      else
5031        # Otherwise we believe it is a complete path. Use it as it is.
5032        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5033$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5034        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5035$as_echo_n "checking for CHMOD... " >&6; }
5036        if test ! -x "$tool_specified"; then
5037          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5038$as_echo "not found" >&6; }
5039          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5040        fi
5041        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5042$as_echo "$tool_specified" >&6; }
5043      fi
5044    fi
5045  fi
5046
5047
5048
5049  if test "x$CHMOD" = x; then
5050    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5051  fi
5052
5053
5054
5055
5056
5057  # Publish this variable in the help.
5058
5059
5060  if test "x$CMP" = x; then
5061    # The variable is not set by user, try to locate tool using the code snippet
5062    for ac_prog in cmp
5063do
5064  # Extract the first word of "$ac_prog", so it can be a program name with args.
5065set dummy $ac_prog; ac_word=$2
5066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5067$as_echo_n "checking for $ac_word... " >&6; }
5068if ${ac_cv_path_CMP+:} false; then :
5069  $as_echo_n "(cached) " >&6
5070else
5071  case $CMP in
5072  [\\/]* | ?:[\\/]*)
5073  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5074  ;;
5075  *)
5076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5077for as_dir in $PATH
5078do
5079  IFS=$as_save_IFS
5080  test -z "$as_dir" && as_dir=.
5081    for ac_exec_ext in '' $ac_executable_extensions; do
5082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5083    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5085    break 2
5086  fi
5087done
5088  done
5089IFS=$as_save_IFS
5090
5091  ;;
5092esac
5093fi
5094CMP=$ac_cv_path_CMP
5095if test -n "$CMP"; then
5096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5097$as_echo "$CMP" >&6; }
5098else
5099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5100$as_echo "no" >&6; }
5101fi
5102
5103
5104  test -n "$CMP" && break
5105done
5106
5107  else
5108    # The variable is set, but is it from the command line or the environment?
5109
5110    # Try to remove the string !CMP! from our list.
5111    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5112    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5113      # If it failed, the variable was not from the command line. Ignore it,
5114      # but warn the user (except for BASH, which is always set by the calling BASH).
5115      if test "xCMP" != xBASH; then
5116        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5117$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5118      fi
5119      # Try to locate tool using the code snippet
5120      for ac_prog in cmp
5121do
5122  # Extract the first word of "$ac_prog", so it can be a program name with args.
5123set dummy $ac_prog; ac_word=$2
5124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5125$as_echo_n "checking for $ac_word... " >&6; }
5126if ${ac_cv_path_CMP+:} false; then :
5127  $as_echo_n "(cached) " >&6
5128else
5129  case $CMP in
5130  [\\/]* | ?:[\\/]*)
5131  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5132  ;;
5133  *)
5134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5135for as_dir in $PATH
5136do
5137  IFS=$as_save_IFS
5138  test -z "$as_dir" && as_dir=.
5139    for ac_exec_ext in '' $ac_executable_extensions; do
5140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5141    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5143    break 2
5144  fi
5145done
5146  done
5147IFS=$as_save_IFS
5148
5149  ;;
5150esac
5151fi
5152CMP=$ac_cv_path_CMP
5153if test -n "$CMP"; then
5154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5155$as_echo "$CMP" >&6; }
5156else
5157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5158$as_echo "no" >&6; }
5159fi
5160
5161
5162  test -n "$CMP" && break
5163done
5164
5165    else
5166      # If it succeeded, then it was overridden by the user. We will use it
5167      # for the tool.
5168
5169      # First remove it from the list of overridden variables, so we can test
5170      # for unknown variables in the end.
5171      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5172
5173      # Check if the provided tool contains a complete path.
5174      tool_specified="$CMP"
5175      tool_basename="${tool_specified##*/}"
5176      if test "x$tool_basename" = "x$tool_specified"; then
5177        # A command without a complete path is provided, search $PATH.
5178        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5179$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5180        # Extract the first word of "$tool_basename", so it can be a program name with args.
5181set dummy $tool_basename; ac_word=$2
5182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5183$as_echo_n "checking for $ac_word... " >&6; }
5184if ${ac_cv_path_CMP+:} false; then :
5185  $as_echo_n "(cached) " >&6
5186else
5187  case $CMP in
5188  [\\/]* | ?:[\\/]*)
5189  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5190  ;;
5191  *)
5192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5193for as_dir in $PATH
5194do
5195  IFS=$as_save_IFS
5196  test -z "$as_dir" && as_dir=.
5197    for ac_exec_ext in '' $ac_executable_extensions; do
5198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5199    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5201    break 2
5202  fi
5203done
5204  done
5205IFS=$as_save_IFS
5206
5207  ;;
5208esac
5209fi
5210CMP=$ac_cv_path_CMP
5211if test -n "$CMP"; then
5212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5213$as_echo "$CMP" >&6; }
5214else
5215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5216$as_echo "no" >&6; }
5217fi
5218
5219
5220        if test "x$CMP" = x; then
5221          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5222        fi
5223      else
5224        # Otherwise we believe it is a complete path. Use it as it is.
5225        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5226$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5227        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5228$as_echo_n "checking for CMP... " >&6; }
5229        if test ! -x "$tool_specified"; then
5230          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5231$as_echo "not found" >&6; }
5232          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5233        fi
5234        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5235$as_echo "$tool_specified" >&6; }
5236      fi
5237    fi
5238  fi
5239
5240
5241
5242  if test "x$CMP" = x; then
5243    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5244  fi
5245
5246
5247
5248
5249
5250  # Publish this variable in the help.
5251
5252
5253  if test "x$COMM" = x; then
5254    # The variable is not set by user, try to locate tool using the code snippet
5255    for ac_prog in comm
5256do
5257  # Extract the first word of "$ac_prog", so it can be a program name with args.
5258set dummy $ac_prog; ac_word=$2
5259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5260$as_echo_n "checking for $ac_word... " >&6; }
5261if ${ac_cv_path_COMM+:} false; then :
5262  $as_echo_n "(cached) " >&6
5263else
5264  case $COMM in
5265  [\\/]* | ?:[\\/]*)
5266  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5267  ;;
5268  *)
5269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5270for as_dir in $PATH
5271do
5272  IFS=$as_save_IFS
5273  test -z "$as_dir" && as_dir=.
5274    for ac_exec_ext in '' $ac_executable_extensions; do
5275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5276    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5278    break 2
5279  fi
5280done
5281  done
5282IFS=$as_save_IFS
5283
5284  ;;
5285esac
5286fi
5287COMM=$ac_cv_path_COMM
5288if test -n "$COMM"; then
5289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5290$as_echo "$COMM" >&6; }
5291else
5292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5293$as_echo "no" >&6; }
5294fi
5295
5296
5297  test -n "$COMM" && break
5298done
5299
5300  else
5301    # The variable is set, but is it from the command line or the environment?
5302
5303    # Try to remove the string !COMM! from our list.
5304    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5305    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5306      # If it failed, the variable was not from the command line. Ignore it,
5307      # but warn the user (except for BASH, which is always set by the calling BASH).
5308      if test "xCOMM" != xBASH; then
5309        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5310$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5311      fi
5312      # Try to locate tool using the code snippet
5313      for ac_prog in comm
5314do
5315  # Extract the first word of "$ac_prog", so it can be a program name with args.
5316set dummy $ac_prog; ac_word=$2
5317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5318$as_echo_n "checking for $ac_word... " >&6; }
5319if ${ac_cv_path_COMM+:} false; then :
5320  $as_echo_n "(cached) " >&6
5321else
5322  case $COMM in
5323  [\\/]* | ?:[\\/]*)
5324  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5325  ;;
5326  *)
5327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5328for as_dir in $PATH
5329do
5330  IFS=$as_save_IFS
5331  test -z "$as_dir" && as_dir=.
5332    for ac_exec_ext in '' $ac_executable_extensions; do
5333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5334    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5336    break 2
5337  fi
5338done
5339  done
5340IFS=$as_save_IFS
5341
5342  ;;
5343esac
5344fi
5345COMM=$ac_cv_path_COMM
5346if test -n "$COMM"; then
5347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5348$as_echo "$COMM" >&6; }
5349else
5350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5351$as_echo "no" >&6; }
5352fi
5353
5354
5355  test -n "$COMM" && break
5356done
5357
5358    else
5359      # If it succeeded, then it was overridden by the user. We will use it
5360      # for the tool.
5361
5362      # First remove it from the list of overridden variables, so we can test
5363      # for unknown variables in the end.
5364      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5365
5366      # Check if the provided tool contains a complete path.
5367      tool_specified="$COMM"
5368      tool_basename="${tool_specified##*/}"
5369      if test "x$tool_basename" = "x$tool_specified"; then
5370        # A command without a complete path is provided, search $PATH.
5371        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5372$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5373        # Extract the first word of "$tool_basename", so it can be a program name with args.
5374set dummy $tool_basename; ac_word=$2
5375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5376$as_echo_n "checking for $ac_word... " >&6; }
5377if ${ac_cv_path_COMM+:} false; then :
5378  $as_echo_n "(cached) " >&6
5379else
5380  case $COMM in
5381  [\\/]* | ?:[\\/]*)
5382  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5383  ;;
5384  *)
5385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5386for as_dir in $PATH
5387do
5388  IFS=$as_save_IFS
5389  test -z "$as_dir" && as_dir=.
5390    for ac_exec_ext in '' $ac_executable_extensions; do
5391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5392    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5394    break 2
5395  fi
5396done
5397  done
5398IFS=$as_save_IFS
5399
5400  ;;
5401esac
5402fi
5403COMM=$ac_cv_path_COMM
5404if test -n "$COMM"; then
5405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5406$as_echo "$COMM" >&6; }
5407else
5408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5409$as_echo "no" >&6; }
5410fi
5411
5412
5413        if test "x$COMM" = x; then
5414          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5415        fi
5416      else
5417        # Otherwise we believe it is a complete path. Use it as it is.
5418        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5419$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5420        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5421$as_echo_n "checking for COMM... " >&6; }
5422        if test ! -x "$tool_specified"; then
5423          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5424$as_echo "not found" >&6; }
5425          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5426        fi
5427        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5428$as_echo "$tool_specified" >&6; }
5429      fi
5430    fi
5431  fi
5432
5433
5434
5435  if test "x$COMM" = x; then
5436    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5437  fi
5438
5439
5440
5441
5442
5443  # Publish this variable in the help.
5444
5445
5446  if test "x$CP" = x; then
5447    # The variable is not set by user, try to locate tool using the code snippet
5448    for ac_prog in cp
5449do
5450  # Extract the first word of "$ac_prog", so it can be a program name with args.
5451set dummy $ac_prog; ac_word=$2
5452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5453$as_echo_n "checking for $ac_word... " >&6; }
5454if ${ac_cv_path_CP+:} false; then :
5455  $as_echo_n "(cached) " >&6
5456else
5457  case $CP in
5458  [\\/]* | ?:[\\/]*)
5459  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5460  ;;
5461  *)
5462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5463for as_dir in $PATH
5464do
5465  IFS=$as_save_IFS
5466  test -z "$as_dir" && as_dir=.
5467    for ac_exec_ext in '' $ac_executable_extensions; do
5468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5469    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5471    break 2
5472  fi
5473done
5474  done
5475IFS=$as_save_IFS
5476
5477  ;;
5478esac
5479fi
5480CP=$ac_cv_path_CP
5481if test -n "$CP"; then
5482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5483$as_echo "$CP" >&6; }
5484else
5485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5486$as_echo "no" >&6; }
5487fi
5488
5489
5490  test -n "$CP" && break
5491done
5492
5493  else
5494    # The variable is set, but is it from the command line or the environment?
5495
5496    # Try to remove the string !CP! from our list.
5497    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5498    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5499      # If it failed, the variable was not from the command line. Ignore it,
5500      # but warn the user (except for BASH, which is always set by the calling BASH).
5501      if test "xCP" != xBASH; then
5502        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5503$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5504      fi
5505      # Try to locate tool using the code snippet
5506      for ac_prog in cp
5507do
5508  # Extract the first word of "$ac_prog", so it can be a program name with args.
5509set dummy $ac_prog; ac_word=$2
5510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5511$as_echo_n "checking for $ac_word... " >&6; }
5512if ${ac_cv_path_CP+:} false; then :
5513  $as_echo_n "(cached) " >&6
5514else
5515  case $CP in
5516  [\\/]* | ?:[\\/]*)
5517  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5518  ;;
5519  *)
5520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5521for as_dir in $PATH
5522do
5523  IFS=$as_save_IFS
5524  test -z "$as_dir" && as_dir=.
5525    for ac_exec_ext in '' $ac_executable_extensions; do
5526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5527    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5529    break 2
5530  fi
5531done
5532  done
5533IFS=$as_save_IFS
5534
5535  ;;
5536esac
5537fi
5538CP=$ac_cv_path_CP
5539if test -n "$CP"; then
5540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5541$as_echo "$CP" >&6; }
5542else
5543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5544$as_echo "no" >&6; }
5545fi
5546
5547
5548  test -n "$CP" && break
5549done
5550
5551    else
5552      # If it succeeded, then it was overridden by the user. We will use it
5553      # for the tool.
5554
5555      # First remove it from the list of overridden variables, so we can test
5556      # for unknown variables in the end.
5557      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5558
5559      # Check if the provided tool contains a complete path.
5560      tool_specified="$CP"
5561      tool_basename="${tool_specified##*/}"
5562      if test "x$tool_basename" = "x$tool_specified"; then
5563        # A command without a complete path is provided, search $PATH.
5564        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5565$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5566        # Extract the first word of "$tool_basename", so it can be a program name with args.
5567set dummy $tool_basename; ac_word=$2
5568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5569$as_echo_n "checking for $ac_word... " >&6; }
5570if ${ac_cv_path_CP+:} false; then :
5571  $as_echo_n "(cached) " >&6
5572else
5573  case $CP in
5574  [\\/]* | ?:[\\/]*)
5575  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5576  ;;
5577  *)
5578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5579for as_dir in $PATH
5580do
5581  IFS=$as_save_IFS
5582  test -z "$as_dir" && as_dir=.
5583    for ac_exec_ext in '' $ac_executable_extensions; do
5584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5585    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5587    break 2
5588  fi
5589done
5590  done
5591IFS=$as_save_IFS
5592
5593  ;;
5594esac
5595fi
5596CP=$ac_cv_path_CP
5597if test -n "$CP"; then
5598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5599$as_echo "$CP" >&6; }
5600else
5601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5602$as_echo "no" >&6; }
5603fi
5604
5605
5606        if test "x$CP" = x; then
5607          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5608        fi
5609      else
5610        # Otherwise we believe it is a complete path. Use it as it is.
5611        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5612$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5613        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5614$as_echo_n "checking for CP... " >&6; }
5615        if test ! -x "$tool_specified"; then
5616          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5617$as_echo "not found" >&6; }
5618          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5619        fi
5620        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5621$as_echo "$tool_specified" >&6; }
5622      fi
5623    fi
5624  fi
5625
5626
5627
5628  if test "x$CP" = x; then
5629    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5630  fi
5631
5632
5633
5634
5635
5636  # Publish this variable in the help.
5637
5638
5639  if test "x$CPIO" = x; then
5640    # The variable is not set by user, try to locate tool using the code snippet
5641    for ac_prog in cpio
5642do
5643  # Extract the first word of "$ac_prog", so it can be a program name with args.
5644set dummy $ac_prog; ac_word=$2
5645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5646$as_echo_n "checking for $ac_word... " >&6; }
5647if ${ac_cv_path_CPIO+:} false; then :
5648  $as_echo_n "(cached) " >&6
5649else
5650  case $CPIO in
5651  [\\/]* | ?:[\\/]*)
5652  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5653  ;;
5654  *)
5655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5656for as_dir in $PATH
5657do
5658  IFS=$as_save_IFS
5659  test -z "$as_dir" && as_dir=.
5660    for ac_exec_ext in '' $ac_executable_extensions; do
5661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5662    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5664    break 2
5665  fi
5666done
5667  done
5668IFS=$as_save_IFS
5669
5670  ;;
5671esac
5672fi
5673CPIO=$ac_cv_path_CPIO
5674if test -n "$CPIO"; then
5675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5676$as_echo "$CPIO" >&6; }
5677else
5678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5679$as_echo "no" >&6; }
5680fi
5681
5682
5683  test -n "$CPIO" && break
5684done
5685
5686  else
5687    # The variable is set, but is it from the command line or the environment?
5688
5689    # Try to remove the string !CPIO! from our list.
5690    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
5691    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5692      # If it failed, the variable was not from the command line. Ignore it,
5693      # but warn the user (except for BASH, which is always set by the calling BASH).
5694      if test "xCPIO" != xBASH; then
5695        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
5696$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
5697      fi
5698      # Try to locate tool using the code snippet
5699      for ac_prog in cpio
5700do
5701  # Extract the first word of "$ac_prog", so it can be a program name with args.
5702set dummy $ac_prog; ac_word=$2
5703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5704$as_echo_n "checking for $ac_word... " >&6; }
5705if ${ac_cv_path_CPIO+:} false; then :
5706  $as_echo_n "(cached) " >&6
5707else
5708  case $CPIO in
5709  [\\/]* | ?:[\\/]*)
5710  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5711  ;;
5712  *)
5713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5714for as_dir in $PATH
5715do
5716  IFS=$as_save_IFS
5717  test -z "$as_dir" && as_dir=.
5718    for ac_exec_ext in '' $ac_executable_extensions; do
5719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5720    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5722    break 2
5723  fi
5724done
5725  done
5726IFS=$as_save_IFS
5727
5728  ;;
5729esac
5730fi
5731CPIO=$ac_cv_path_CPIO
5732if test -n "$CPIO"; then
5733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5734$as_echo "$CPIO" >&6; }
5735else
5736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5737$as_echo "no" >&6; }
5738fi
5739
5740
5741  test -n "$CPIO" && break
5742done
5743
5744    else
5745      # If it succeeded, then it was overridden by the user. We will use it
5746      # for the tool.
5747
5748      # First remove it from the list of overridden variables, so we can test
5749      # for unknown variables in the end.
5750      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5751
5752      # Check if the provided tool contains a complete path.
5753      tool_specified="$CPIO"
5754      tool_basename="${tool_specified##*/}"
5755      if test "x$tool_basename" = "x$tool_specified"; then
5756        # A command without a complete path is provided, search $PATH.
5757        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
5758$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
5759        # Extract the first word of "$tool_basename", so it can be a program name with args.
5760set dummy $tool_basename; ac_word=$2
5761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5762$as_echo_n "checking for $ac_word... " >&6; }
5763if ${ac_cv_path_CPIO+:} false; then :
5764  $as_echo_n "(cached) " >&6
5765else
5766  case $CPIO in
5767  [\\/]* | ?:[\\/]*)
5768  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5769  ;;
5770  *)
5771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5772for as_dir in $PATH
5773do
5774  IFS=$as_save_IFS
5775  test -z "$as_dir" && as_dir=.
5776    for ac_exec_ext in '' $ac_executable_extensions; do
5777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5778    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5780    break 2
5781  fi
5782done
5783  done
5784IFS=$as_save_IFS
5785
5786  ;;
5787esac
5788fi
5789CPIO=$ac_cv_path_CPIO
5790if test -n "$CPIO"; then
5791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5792$as_echo "$CPIO" >&6; }
5793else
5794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5795$as_echo "no" >&6; }
5796fi
5797
5798
5799        if test "x$CPIO" = x; then
5800          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5801        fi
5802      else
5803        # Otherwise we believe it is a complete path. Use it as it is.
5804        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
5805$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
5806        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
5807$as_echo_n "checking for CPIO... " >&6; }
5808        if test ! -x "$tool_specified"; then
5809          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5810$as_echo "not found" >&6; }
5811          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
5812        fi
5813        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5814$as_echo "$tool_specified" >&6; }
5815      fi
5816    fi
5817  fi
5818
5819
5820
5821  if test "x$CPIO" = x; then
5822    as_fn_error $? "Could not find required tool for CPIO" "$LINENO" 5
5823  fi
5824
5825
5826
5827
5828
5829  # Publish this variable in the help.
5830
5831
5832  if test "x$CUT" = x; then
5833    # The variable is not set by user, try to locate tool using the code snippet
5834    for ac_prog in cut
5835do
5836  # Extract the first word of "$ac_prog", so it can be a program name with args.
5837set dummy $ac_prog; ac_word=$2
5838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5839$as_echo_n "checking for $ac_word... " >&6; }
5840if ${ac_cv_path_CUT+:} false; then :
5841  $as_echo_n "(cached) " >&6
5842else
5843  case $CUT in
5844  [\\/]* | ?:[\\/]*)
5845  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5846  ;;
5847  *)
5848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5849for as_dir in $PATH
5850do
5851  IFS=$as_save_IFS
5852  test -z "$as_dir" && as_dir=.
5853    for ac_exec_ext in '' $ac_executable_extensions; do
5854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5855    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5857    break 2
5858  fi
5859done
5860  done
5861IFS=$as_save_IFS
5862
5863  ;;
5864esac
5865fi
5866CUT=$ac_cv_path_CUT
5867if test -n "$CUT"; then
5868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5869$as_echo "$CUT" >&6; }
5870else
5871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5872$as_echo "no" >&6; }
5873fi
5874
5875
5876  test -n "$CUT" && break
5877done
5878
5879  else
5880    # The variable is set, but is it from the command line or the environment?
5881
5882    # Try to remove the string !CUT! from our list.
5883    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5884    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5885      # If it failed, the variable was not from the command line. Ignore it,
5886      # but warn the user (except for BASH, which is always set by the calling BASH).
5887      if test "xCUT" != xBASH; then
5888        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5889$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5890      fi
5891      # Try to locate tool using the code snippet
5892      for ac_prog in cut
5893do
5894  # Extract the first word of "$ac_prog", so it can be a program name with args.
5895set dummy $ac_prog; ac_word=$2
5896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5897$as_echo_n "checking for $ac_word... " >&6; }
5898if ${ac_cv_path_CUT+:} false; then :
5899  $as_echo_n "(cached) " >&6
5900else
5901  case $CUT in
5902  [\\/]* | ?:[\\/]*)
5903  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5904  ;;
5905  *)
5906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5907for as_dir in $PATH
5908do
5909  IFS=$as_save_IFS
5910  test -z "$as_dir" && as_dir=.
5911    for ac_exec_ext in '' $ac_executable_extensions; do
5912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5913    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5915    break 2
5916  fi
5917done
5918  done
5919IFS=$as_save_IFS
5920
5921  ;;
5922esac
5923fi
5924CUT=$ac_cv_path_CUT
5925if test -n "$CUT"; then
5926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5927$as_echo "$CUT" >&6; }
5928else
5929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5930$as_echo "no" >&6; }
5931fi
5932
5933
5934  test -n "$CUT" && break
5935done
5936
5937    else
5938      # If it succeeded, then it was overridden by the user. We will use it
5939      # for the tool.
5940
5941      # First remove it from the list of overridden variables, so we can test
5942      # for unknown variables in the end.
5943      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5944
5945      # Check if the provided tool contains a complete path.
5946      tool_specified="$CUT"
5947      tool_basename="${tool_specified##*/}"
5948      if test "x$tool_basename" = "x$tool_specified"; then
5949        # A command without a complete path is provided, search $PATH.
5950        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5951$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5952        # Extract the first word of "$tool_basename", so it can be a program name with args.
5953set dummy $tool_basename; ac_word=$2
5954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5955$as_echo_n "checking for $ac_word... " >&6; }
5956if ${ac_cv_path_CUT+:} false; then :
5957  $as_echo_n "(cached) " >&6
5958else
5959  case $CUT in
5960  [\\/]* | ?:[\\/]*)
5961  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5962  ;;
5963  *)
5964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5965for as_dir in $PATH
5966do
5967  IFS=$as_save_IFS
5968  test -z "$as_dir" && as_dir=.
5969    for ac_exec_ext in '' $ac_executable_extensions; do
5970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5971    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5973    break 2
5974  fi
5975done
5976  done
5977IFS=$as_save_IFS
5978
5979  ;;
5980esac
5981fi
5982CUT=$ac_cv_path_CUT
5983if test -n "$CUT"; then
5984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5985$as_echo "$CUT" >&6; }
5986else
5987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5988$as_echo "no" >&6; }
5989fi
5990
5991
5992        if test "x$CUT" = x; then
5993          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5994        fi
5995      else
5996        # Otherwise we believe it is a complete path. Use it as it is.
5997        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5998$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5999        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6000$as_echo_n "checking for CUT... " >&6; }
6001        if test ! -x "$tool_specified"; then
6002          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6003$as_echo "not found" >&6; }
6004          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6005        fi
6006        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6007$as_echo "$tool_specified" >&6; }
6008      fi
6009    fi
6010  fi
6011
6012
6013
6014  if test "x$CUT" = x; then
6015    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6016  fi
6017
6018
6019
6020
6021
6022  # Publish this variable in the help.
6023
6024
6025  if test "x$DATE" = x; then
6026    # The variable is not set by user, try to locate tool using the code snippet
6027    for ac_prog in date
6028do
6029  # Extract the first word of "$ac_prog", so it can be a program name with args.
6030set dummy $ac_prog; ac_word=$2
6031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6032$as_echo_n "checking for $ac_word... " >&6; }
6033if ${ac_cv_path_DATE+:} false; then :
6034  $as_echo_n "(cached) " >&6
6035else
6036  case $DATE in
6037  [\\/]* | ?:[\\/]*)
6038  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6039  ;;
6040  *)
6041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6042for as_dir in $PATH
6043do
6044  IFS=$as_save_IFS
6045  test -z "$as_dir" && as_dir=.
6046    for ac_exec_ext in '' $ac_executable_extensions; do
6047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6048    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6050    break 2
6051  fi
6052done
6053  done
6054IFS=$as_save_IFS
6055
6056  ;;
6057esac
6058fi
6059DATE=$ac_cv_path_DATE
6060if test -n "$DATE"; then
6061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6062$as_echo "$DATE" >&6; }
6063else
6064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6065$as_echo "no" >&6; }
6066fi
6067
6068
6069  test -n "$DATE" && break
6070done
6071
6072  else
6073    # The variable is set, but is it from the command line or the environment?
6074
6075    # Try to remove the string !DATE! from our list.
6076    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6077    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6078      # If it failed, the variable was not from the command line. Ignore it,
6079      # but warn the user (except for BASH, which is always set by the calling BASH).
6080      if test "xDATE" != xBASH; then
6081        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6082$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6083      fi
6084      # Try to locate tool using the code snippet
6085      for ac_prog in date
6086do
6087  # Extract the first word of "$ac_prog", so it can be a program name with args.
6088set dummy $ac_prog; ac_word=$2
6089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6090$as_echo_n "checking for $ac_word... " >&6; }
6091if ${ac_cv_path_DATE+:} false; then :
6092  $as_echo_n "(cached) " >&6
6093else
6094  case $DATE in
6095  [\\/]* | ?:[\\/]*)
6096  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6097  ;;
6098  *)
6099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6100for as_dir in $PATH
6101do
6102  IFS=$as_save_IFS
6103  test -z "$as_dir" && as_dir=.
6104    for ac_exec_ext in '' $ac_executable_extensions; do
6105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6106    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6108    break 2
6109  fi
6110done
6111  done
6112IFS=$as_save_IFS
6113
6114  ;;
6115esac
6116fi
6117DATE=$ac_cv_path_DATE
6118if test -n "$DATE"; then
6119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6120$as_echo "$DATE" >&6; }
6121else
6122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6123$as_echo "no" >&6; }
6124fi
6125
6126
6127  test -n "$DATE" && break
6128done
6129
6130    else
6131      # If it succeeded, then it was overridden by the user. We will use it
6132      # for the tool.
6133
6134      # First remove it from the list of overridden variables, so we can test
6135      # for unknown variables in the end.
6136      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6137
6138      # Check if the provided tool contains a complete path.
6139      tool_specified="$DATE"
6140      tool_basename="${tool_specified##*/}"
6141      if test "x$tool_basename" = "x$tool_specified"; then
6142        # A command without a complete path is provided, search $PATH.
6143        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6144$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6145        # Extract the first word of "$tool_basename", so it can be a program name with args.
6146set dummy $tool_basename; ac_word=$2
6147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6148$as_echo_n "checking for $ac_word... " >&6; }
6149if ${ac_cv_path_DATE+:} false; then :
6150  $as_echo_n "(cached) " >&6
6151else
6152  case $DATE in
6153  [\\/]* | ?:[\\/]*)
6154  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6155  ;;
6156  *)
6157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6158for as_dir in $PATH
6159do
6160  IFS=$as_save_IFS
6161  test -z "$as_dir" && as_dir=.
6162    for ac_exec_ext in '' $ac_executable_extensions; do
6163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6164    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6166    break 2
6167  fi
6168done
6169  done
6170IFS=$as_save_IFS
6171
6172  ;;
6173esac
6174fi
6175DATE=$ac_cv_path_DATE
6176if test -n "$DATE"; then
6177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6178$as_echo "$DATE" >&6; }
6179else
6180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6181$as_echo "no" >&6; }
6182fi
6183
6184
6185        if test "x$DATE" = x; then
6186          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6187        fi
6188      else
6189        # Otherwise we believe it is a complete path. Use it as it is.
6190        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6191$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6192        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6193$as_echo_n "checking for DATE... " >&6; }
6194        if test ! -x "$tool_specified"; then
6195          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6196$as_echo "not found" >&6; }
6197          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6198        fi
6199        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6200$as_echo "$tool_specified" >&6; }
6201      fi
6202    fi
6203  fi
6204
6205
6206
6207  if test "x$DATE" = x; then
6208    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6209  fi
6210
6211
6212
6213
6214
6215  # Publish this variable in the help.
6216
6217
6218  if test "x$DIFF" = x; then
6219    # The variable is not set by user, try to locate tool using the code snippet
6220    for ac_prog in gdiff diff
6221do
6222  # Extract the first word of "$ac_prog", so it can be a program name with args.
6223set dummy $ac_prog; ac_word=$2
6224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6225$as_echo_n "checking for $ac_word... " >&6; }
6226if ${ac_cv_path_DIFF+:} false; then :
6227  $as_echo_n "(cached) " >&6
6228else
6229  case $DIFF in
6230  [\\/]* | ?:[\\/]*)
6231  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6232  ;;
6233  *)
6234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6235for as_dir in $PATH
6236do
6237  IFS=$as_save_IFS
6238  test -z "$as_dir" && as_dir=.
6239    for ac_exec_ext in '' $ac_executable_extensions; do
6240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6241    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6243    break 2
6244  fi
6245done
6246  done
6247IFS=$as_save_IFS
6248
6249  ;;
6250esac
6251fi
6252DIFF=$ac_cv_path_DIFF
6253if test -n "$DIFF"; then
6254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6255$as_echo "$DIFF" >&6; }
6256else
6257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6258$as_echo "no" >&6; }
6259fi
6260
6261
6262  test -n "$DIFF" && break
6263done
6264
6265  else
6266    # The variable is set, but is it from the command line or the environment?
6267
6268    # Try to remove the string !DIFF! from our list.
6269    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6270    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6271      # If it failed, the variable was not from the command line. Ignore it,
6272      # but warn the user (except for BASH, which is always set by the calling BASH).
6273      if test "xDIFF" != xBASH; then
6274        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6275$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6276      fi
6277      # Try to locate tool using the code snippet
6278      for ac_prog in gdiff diff
6279do
6280  # Extract the first word of "$ac_prog", so it can be a program name with args.
6281set dummy $ac_prog; ac_word=$2
6282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6283$as_echo_n "checking for $ac_word... " >&6; }
6284if ${ac_cv_path_DIFF+:} false; then :
6285  $as_echo_n "(cached) " >&6
6286else
6287  case $DIFF in
6288  [\\/]* | ?:[\\/]*)
6289  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6290  ;;
6291  *)
6292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6293for as_dir in $PATH
6294do
6295  IFS=$as_save_IFS
6296  test -z "$as_dir" && as_dir=.
6297    for ac_exec_ext in '' $ac_executable_extensions; do
6298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6299    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6301    break 2
6302  fi
6303done
6304  done
6305IFS=$as_save_IFS
6306
6307  ;;
6308esac
6309fi
6310DIFF=$ac_cv_path_DIFF
6311if test -n "$DIFF"; then
6312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6313$as_echo "$DIFF" >&6; }
6314else
6315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6316$as_echo "no" >&6; }
6317fi
6318
6319
6320  test -n "$DIFF" && break
6321done
6322
6323    else
6324      # If it succeeded, then it was overridden by the user. We will use it
6325      # for the tool.
6326
6327      # First remove it from the list of overridden variables, so we can test
6328      # for unknown variables in the end.
6329      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6330
6331      # Check if the provided tool contains a complete path.
6332      tool_specified="$DIFF"
6333      tool_basename="${tool_specified##*/}"
6334      if test "x$tool_basename" = "x$tool_specified"; then
6335        # A command without a complete path is provided, search $PATH.
6336        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6337$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6338        # Extract the first word of "$tool_basename", so it can be a program name with args.
6339set dummy $tool_basename; ac_word=$2
6340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6341$as_echo_n "checking for $ac_word... " >&6; }
6342if ${ac_cv_path_DIFF+:} false; then :
6343  $as_echo_n "(cached) " >&6
6344else
6345  case $DIFF in
6346  [\\/]* | ?:[\\/]*)
6347  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6348  ;;
6349  *)
6350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6351for as_dir in $PATH
6352do
6353  IFS=$as_save_IFS
6354  test -z "$as_dir" && as_dir=.
6355    for ac_exec_ext in '' $ac_executable_extensions; do
6356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6357    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6359    break 2
6360  fi
6361done
6362  done
6363IFS=$as_save_IFS
6364
6365  ;;
6366esac
6367fi
6368DIFF=$ac_cv_path_DIFF
6369if test -n "$DIFF"; then
6370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6371$as_echo "$DIFF" >&6; }
6372else
6373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6374$as_echo "no" >&6; }
6375fi
6376
6377
6378        if test "x$DIFF" = x; then
6379          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6380        fi
6381      else
6382        # Otherwise we believe it is a complete path. Use it as it is.
6383        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6384$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6385        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6386$as_echo_n "checking for DIFF... " >&6; }
6387        if test ! -x "$tool_specified"; then
6388          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6389$as_echo "not found" >&6; }
6390          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6391        fi
6392        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6393$as_echo "$tool_specified" >&6; }
6394      fi
6395    fi
6396  fi
6397
6398
6399
6400  if test "x$DIFF" = x; then
6401    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6402  fi
6403
6404
6405
6406
6407
6408  # Publish this variable in the help.
6409
6410
6411  if test "x$DIRNAME" = x; then
6412    # The variable is not set by user, try to locate tool using the code snippet
6413    for ac_prog in dirname
6414do
6415  # Extract the first word of "$ac_prog", so it can be a program name with args.
6416set dummy $ac_prog; ac_word=$2
6417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6418$as_echo_n "checking for $ac_word... " >&6; }
6419if ${ac_cv_path_DIRNAME+:} false; then :
6420  $as_echo_n "(cached) " >&6
6421else
6422  case $DIRNAME in
6423  [\\/]* | ?:[\\/]*)
6424  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6425  ;;
6426  *)
6427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6428for as_dir in $PATH
6429do
6430  IFS=$as_save_IFS
6431  test -z "$as_dir" && as_dir=.
6432    for ac_exec_ext in '' $ac_executable_extensions; do
6433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6434    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6436    break 2
6437  fi
6438done
6439  done
6440IFS=$as_save_IFS
6441
6442  ;;
6443esac
6444fi
6445DIRNAME=$ac_cv_path_DIRNAME
6446if test -n "$DIRNAME"; then
6447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6448$as_echo "$DIRNAME" >&6; }
6449else
6450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6451$as_echo "no" >&6; }
6452fi
6453
6454
6455  test -n "$DIRNAME" && break
6456done
6457
6458  else
6459    # The variable is set, but is it from the command line or the environment?
6460
6461    # Try to remove the string !DIRNAME! from our list.
6462    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6463    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6464      # If it failed, the variable was not from the command line. Ignore it,
6465      # but warn the user (except for BASH, which is always set by the calling BASH).
6466      if test "xDIRNAME" != xBASH; then
6467        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6468$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6469      fi
6470      # Try to locate tool using the code snippet
6471      for ac_prog in dirname
6472do
6473  # Extract the first word of "$ac_prog", so it can be a program name with args.
6474set dummy $ac_prog; ac_word=$2
6475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6476$as_echo_n "checking for $ac_word... " >&6; }
6477if ${ac_cv_path_DIRNAME+:} false; then :
6478  $as_echo_n "(cached) " >&6
6479else
6480  case $DIRNAME in
6481  [\\/]* | ?:[\\/]*)
6482  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6483  ;;
6484  *)
6485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6486for as_dir in $PATH
6487do
6488  IFS=$as_save_IFS
6489  test -z "$as_dir" && as_dir=.
6490    for ac_exec_ext in '' $ac_executable_extensions; do
6491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6492    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6494    break 2
6495  fi
6496done
6497  done
6498IFS=$as_save_IFS
6499
6500  ;;
6501esac
6502fi
6503DIRNAME=$ac_cv_path_DIRNAME
6504if test -n "$DIRNAME"; then
6505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6506$as_echo "$DIRNAME" >&6; }
6507else
6508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6509$as_echo "no" >&6; }
6510fi
6511
6512
6513  test -n "$DIRNAME" && break
6514done
6515
6516    else
6517      # If it succeeded, then it was overridden by the user. We will use it
6518      # for the tool.
6519
6520      # First remove it from the list of overridden variables, so we can test
6521      # for unknown variables in the end.
6522      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6523
6524      # Check if the provided tool contains a complete path.
6525      tool_specified="$DIRNAME"
6526      tool_basename="${tool_specified##*/}"
6527      if test "x$tool_basename" = "x$tool_specified"; then
6528        # A command without a complete path is provided, search $PATH.
6529        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6530$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6531        # Extract the first word of "$tool_basename", so it can be a program name with args.
6532set dummy $tool_basename; ac_word=$2
6533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6534$as_echo_n "checking for $ac_word... " >&6; }
6535if ${ac_cv_path_DIRNAME+:} false; then :
6536  $as_echo_n "(cached) " >&6
6537else
6538  case $DIRNAME in
6539  [\\/]* | ?:[\\/]*)
6540  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6541  ;;
6542  *)
6543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6544for as_dir in $PATH
6545do
6546  IFS=$as_save_IFS
6547  test -z "$as_dir" && as_dir=.
6548    for ac_exec_ext in '' $ac_executable_extensions; do
6549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6550    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6552    break 2
6553  fi
6554done
6555  done
6556IFS=$as_save_IFS
6557
6558  ;;
6559esac
6560fi
6561DIRNAME=$ac_cv_path_DIRNAME
6562if test -n "$DIRNAME"; then
6563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6564$as_echo "$DIRNAME" >&6; }
6565else
6566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6567$as_echo "no" >&6; }
6568fi
6569
6570
6571        if test "x$DIRNAME" = x; then
6572          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6573        fi
6574      else
6575        # Otherwise we believe it is a complete path. Use it as it is.
6576        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6577$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6578        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6579$as_echo_n "checking for DIRNAME... " >&6; }
6580        if test ! -x "$tool_specified"; then
6581          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6582$as_echo "not found" >&6; }
6583          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6584        fi
6585        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6586$as_echo "$tool_specified" >&6; }
6587      fi
6588    fi
6589  fi
6590
6591
6592
6593  if test "x$DIRNAME" = x; then
6594    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6595  fi
6596
6597
6598
6599
6600
6601  # Publish this variable in the help.
6602
6603
6604  if test "x$ECHO" = x; then
6605    # The variable is not set by user, try to locate tool using the code snippet
6606    for ac_prog in echo
6607do
6608  # Extract the first word of "$ac_prog", so it can be a program name with args.
6609set dummy $ac_prog; ac_word=$2
6610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6611$as_echo_n "checking for $ac_word... " >&6; }
6612if ${ac_cv_path_ECHO+:} false; then :
6613  $as_echo_n "(cached) " >&6
6614else
6615  case $ECHO in
6616  [\\/]* | ?:[\\/]*)
6617  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6618  ;;
6619  *)
6620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6621for as_dir in $PATH
6622do
6623  IFS=$as_save_IFS
6624  test -z "$as_dir" && as_dir=.
6625    for ac_exec_ext in '' $ac_executable_extensions; do
6626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6627    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6629    break 2
6630  fi
6631done
6632  done
6633IFS=$as_save_IFS
6634
6635  ;;
6636esac
6637fi
6638ECHO=$ac_cv_path_ECHO
6639if test -n "$ECHO"; then
6640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6641$as_echo "$ECHO" >&6; }
6642else
6643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6644$as_echo "no" >&6; }
6645fi
6646
6647
6648  test -n "$ECHO" && break
6649done
6650
6651  else
6652    # The variable is set, but is it from the command line or the environment?
6653
6654    # Try to remove the string !ECHO! from our list.
6655    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6656    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6657      # If it failed, the variable was not from the command line. Ignore it,
6658      # but warn the user (except for BASH, which is always set by the calling BASH).
6659      if test "xECHO" != xBASH; then
6660        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6661$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6662      fi
6663      # Try to locate tool using the code snippet
6664      for ac_prog in echo
6665do
6666  # Extract the first word of "$ac_prog", so it can be a program name with args.
6667set dummy $ac_prog; ac_word=$2
6668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6669$as_echo_n "checking for $ac_word... " >&6; }
6670if ${ac_cv_path_ECHO+:} false; then :
6671  $as_echo_n "(cached) " >&6
6672else
6673  case $ECHO in
6674  [\\/]* | ?:[\\/]*)
6675  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6676  ;;
6677  *)
6678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6679for as_dir in $PATH
6680do
6681  IFS=$as_save_IFS
6682  test -z "$as_dir" && as_dir=.
6683    for ac_exec_ext in '' $ac_executable_extensions; do
6684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6685    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6687    break 2
6688  fi
6689done
6690  done
6691IFS=$as_save_IFS
6692
6693  ;;
6694esac
6695fi
6696ECHO=$ac_cv_path_ECHO
6697if test -n "$ECHO"; then
6698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6699$as_echo "$ECHO" >&6; }
6700else
6701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6702$as_echo "no" >&6; }
6703fi
6704
6705
6706  test -n "$ECHO" && break
6707done
6708
6709    else
6710      # If it succeeded, then it was overridden by the user. We will use it
6711      # for the tool.
6712
6713      # First remove it from the list of overridden variables, so we can test
6714      # for unknown variables in the end.
6715      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6716
6717      # Check if the provided tool contains a complete path.
6718      tool_specified="$ECHO"
6719      tool_basename="${tool_specified##*/}"
6720      if test "x$tool_basename" = "x$tool_specified"; then
6721        # A command without a complete path is provided, search $PATH.
6722        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6723$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6724        # Extract the first word of "$tool_basename", so it can be a program name with args.
6725set dummy $tool_basename; ac_word=$2
6726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6727$as_echo_n "checking for $ac_word... " >&6; }
6728if ${ac_cv_path_ECHO+:} false; then :
6729  $as_echo_n "(cached) " >&6
6730else
6731  case $ECHO in
6732  [\\/]* | ?:[\\/]*)
6733  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6734  ;;
6735  *)
6736  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6737for as_dir in $PATH
6738do
6739  IFS=$as_save_IFS
6740  test -z "$as_dir" && as_dir=.
6741    for ac_exec_ext in '' $ac_executable_extensions; do
6742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6743    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6745    break 2
6746  fi
6747done
6748  done
6749IFS=$as_save_IFS
6750
6751  ;;
6752esac
6753fi
6754ECHO=$ac_cv_path_ECHO
6755if test -n "$ECHO"; then
6756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6757$as_echo "$ECHO" >&6; }
6758else
6759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6760$as_echo "no" >&6; }
6761fi
6762
6763
6764        if test "x$ECHO" = x; then
6765          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6766        fi
6767      else
6768        # Otherwise we believe it is a complete path. Use it as it is.
6769        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6770$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6771        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6772$as_echo_n "checking for ECHO... " >&6; }
6773        if test ! -x "$tool_specified"; then
6774          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6775$as_echo "not found" >&6; }
6776          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6777        fi
6778        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6779$as_echo "$tool_specified" >&6; }
6780      fi
6781    fi
6782  fi
6783
6784
6785
6786  if test "x$ECHO" = x; then
6787    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6788  fi
6789
6790
6791
6792
6793
6794  # Publish this variable in the help.
6795
6796
6797  if test "x$EXPR" = x; then
6798    # The variable is not set by user, try to locate tool using the code snippet
6799    for ac_prog in expr
6800do
6801  # Extract the first word of "$ac_prog", so it can be a program name with args.
6802set dummy $ac_prog; ac_word=$2
6803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6804$as_echo_n "checking for $ac_word... " >&6; }
6805if ${ac_cv_path_EXPR+:} false; then :
6806  $as_echo_n "(cached) " >&6
6807else
6808  case $EXPR in
6809  [\\/]* | ?:[\\/]*)
6810  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6811  ;;
6812  *)
6813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6814for as_dir in $PATH
6815do
6816  IFS=$as_save_IFS
6817  test -z "$as_dir" && as_dir=.
6818    for ac_exec_ext in '' $ac_executable_extensions; do
6819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6820    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6822    break 2
6823  fi
6824done
6825  done
6826IFS=$as_save_IFS
6827
6828  ;;
6829esac
6830fi
6831EXPR=$ac_cv_path_EXPR
6832if test -n "$EXPR"; then
6833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6834$as_echo "$EXPR" >&6; }
6835else
6836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6837$as_echo "no" >&6; }
6838fi
6839
6840
6841  test -n "$EXPR" && break
6842done
6843
6844  else
6845    # The variable is set, but is it from the command line or the environment?
6846
6847    # Try to remove the string !EXPR! from our list.
6848    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6849    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6850      # If it failed, the variable was not from the command line. Ignore it,
6851      # but warn the user (except for BASH, which is always set by the calling BASH).
6852      if test "xEXPR" != xBASH; then
6853        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6854$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6855      fi
6856      # Try to locate tool using the code snippet
6857      for ac_prog in expr
6858do
6859  # Extract the first word of "$ac_prog", so it can be a program name with args.
6860set dummy $ac_prog; ac_word=$2
6861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6862$as_echo_n "checking for $ac_word... " >&6; }
6863if ${ac_cv_path_EXPR+:} false; then :
6864  $as_echo_n "(cached) " >&6
6865else
6866  case $EXPR in
6867  [\\/]* | ?:[\\/]*)
6868  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6869  ;;
6870  *)
6871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6872for as_dir in $PATH
6873do
6874  IFS=$as_save_IFS
6875  test -z "$as_dir" && as_dir=.
6876    for ac_exec_ext in '' $ac_executable_extensions; do
6877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6878    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6880    break 2
6881  fi
6882done
6883  done
6884IFS=$as_save_IFS
6885
6886  ;;
6887esac
6888fi
6889EXPR=$ac_cv_path_EXPR
6890if test -n "$EXPR"; then
6891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6892$as_echo "$EXPR" >&6; }
6893else
6894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6895$as_echo "no" >&6; }
6896fi
6897
6898
6899  test -n "$EXPR" && break
6900done
6901
6902    else
6903      # If it succeeded, then it was overridden by the user. We will use it
6904      # for the tool.
6905
6906      # First remove it from the list of overridden variables, so we can test
6907      # for unknown variables in the end.
6908      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6909
6910      # Check if the provided tool contains a complete path.
6911      tool_specified="$EXPR"
6912      tool_basename="${tool_specified##*/}"
6913      if test "x$tool_basename" = "x$tool_specified"; then
6914        # A command without a complete path is provided, search $PATH.
6915        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6916$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6917        # Extract the first word of "$tool_basename", so it can be a program name with args.
6918set dummy $tool_basename; ac_word=$2
6919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6920$as_echo_n "checking for $ac_word... " >&6; }
6921if ${ac_cv_path_EXPR+:} false; then :
6922  $as_echo_n "(cached) " >&6
6923else
6924  case $EXPR in
6925  [\\/]* | ?:[\\/]*)
6926  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6927  ;;
6928  *)
6929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6930for as_dir in $PATH
6931do
6932  IFS=$as_save_IFS
6933  test -z "$as_dir" && as_dir=.
6934    for ac_exec_ext in '' $ac_executable_extensions; do
6935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6936    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6938    break 2
6939  fi
6940done
6941  done
6942IFS=$as_save_IFS
6943
6944  ;;
6945esac
6946fi
6947EXPR=$ac_cv_path_EXPR
6948if test -n "$EXPR"; then
6949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6950$as_echo "$EXPR" >&6; }
6951else
6952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6953$as_echo "no" >&6; }
6954fi
6955
6956
6957        if test "x$EXPR" = x; then
6958          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6959        fi
6960      else
6961        # Otherwise we believe it is a complete path. Use it as it is.
6962        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6963$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6964        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6965$as_echo_n "checking for EXPR... " >&6; }
6966        if test ! -x "$tool_specified"; then
6967          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6968$as_echo "not found" >&6; }
6969          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6970        fi
6971        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6972$as_echo "$tool_specified" >&6; }
6973      fi
6974    fi
6975  fi
6976
6977
6978
6979  if test "x$EXPR" = x; then
6980    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6981  fi
6982
6983
6984
6985
6986
6987  # Publish this variable in the help.
6988
6989
6990  if test "x$FILE" = x; then
6991    # The variable is not set by user, try to locate tool using the code snippet
6992    for ac_prog in file
6993do
6994  # Extract the first word of "$ac_prog", so it can be a program name with args.
6995set dummy $ac_prog; ac_word=$2
6996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6997$as_echo_n "checking for $ac_word... " >&6; }
6998if ${ac_cv_path_FILE+:} false; then :
6999  $as_echo_n "(cached) " >&6
7000else
7001  case $FILE in
7002  [\\/]* | ?:[\\/]*)
7003  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7004  ;;
7005  *)
7006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7007for as_dir in $PATH
7008do
7009  IFS=$as_save_IFS
7010  test -z "$as_dir" && as_dir=.
7011    for ac_exec_ext in '' $ac_executable_extensions; do
7012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7013    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7015    break 2
7016  fi
7017done
7018  done
7019IFS=$as_save_IFS
7020
7021  ;;
7022esac
7023fi
7024FILE=$ac_cv_path_FILE
7025if test -n "$FILE"; then
7026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7027$as_echo "$FILE" >&6; }
7028else
7029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7030$as_echo "no" >&6; }
7031fi
7032
7033
7034  test -n "$FILE" && break
7035done
7036
7037  else
7038    # The variable is set, but is it from the command line or the environment?
7039
7040    # Try to remove the string !FILE! from our list.
7041    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7042    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7043      # If it failed, the variable was not from the command line. Ignore it,
7044      # but warn the user (except for BASH, which is always set by the calling BASH).
7045      if test "xFILE" != xBASH; then
7046        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7047$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7048      fi
7049      # Try to locate tool using the code snippet
7050      for ac_prog in file
7051do
7052  # Extract the first word of "$ac_prog", so it can be a program name with args.
7053set dummy $ac_prog; ac_word=$2
7054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7055$as_echo_n "checking for $ac_word... " >&6; }
7056if ${ac_cv_path_FILE+:} false; then :
7057  $as_echo_n "(cached) " >&6
7058else
7059  case $FILE in
7060  [\\/]* | ?:[\\/]*)
7061  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7062  ;;
7063  *)
7064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7065for as_dir in $PATH
7066do
7067  IFS=$as_save_IFS
7068  test -z "$as_dir" && as_dir=.
7069    for ac_exec_ext in '' $ac_executable_extensions; do
7070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7071    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7073    break 2
7074  fi
7075done
7076  done
7077IFS=$as_save_IFS
7078
7079  ;;
7080esac
7081fi
7082FILE=$ac_cv_path_FILE
7083if test -n "$FILE"; then
7084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7085$as_echo "$FILE" >&6; }
7086else
7087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7088$as_echo "no" >&6; }
7089fi
7090
7091
7092  test -n "$FILE" && break
7093done
7094
7095    else
7096      # If it succeeded, then it was overridden by the user. We will use it
7097      # for the tool.
7098
7099      # First remove it from the list of overridden variables, so we can test
7100      # for unknown variables in the end.
7101      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7102
7103      # Check if the provided tool contains a complete path.
7104      tool_specified="$FILE"
7105      tool_basename="${tool_specified##*/}"
7106      if test "x$tool_basename" = "x$tool_specified"; then
7107        # A command without a complete path is provided, search $PATH.
7108        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7109$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7110        # Extract the first word of "$tool_basename", so it can be a program name with args.
7111set dummy $tool_basename; ac_word=$2
7112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7113$as_echo_n "checking for $ac_word... " >&6; }
7114if ${ac_cv_path_FILE+:} false; then :
7115  $as_echo_n "(cached) " >&6
7116else
7117  case $FILE in
7118  [\\/]* | ?:[\\/]*)
7119  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7120  ;;
7121  *)
7122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7123for as_dir in $PATH
7124do
7125  IFS=$as_save_IFS
7126  test -z "$as_dir" && as_dir=.
7127    for ac_exec_ext in '' $ac_executable_extensions; do
7128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7129    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7131    break 2
7132  fi
7133done
7134  done
7135IFS=$as_save_IFS
7136
7137  ;;
7138esac
7139fi
7140FILE=$ac_cv_path_FILE
7141if test -n "$FILE"; then
7142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7143$as_echo "$FILE" >&6; }
7144else
7145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7146$as_echo "no" >&6; }
7147fi
7148
7149
7150        if test "x$FILE" = x; then
7151          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7152        fi
7153      else
7154        # Otherwise we believe it is a complete path. Use it as it is.
7155        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7156$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7157        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7158$as_echo_n "checking for FILE... " >&6; }
7159        if test ! -x "$tool_specified"; then
7160          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7161$as_echo "not found" >&6; }
7162          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7163        fi
7164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7165$as_echo "$tool_specified" >&6; }
7166      fi
7167    fi
7168  fi
7169
7170
7171
7172  if test "x$FILE" = x; then
7173    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7174  fi
7175
7176
7177
7178
7179
7180  # Publish this variable in the help.
7181
7182
7183  if test "x$FIND" = x; then
7184    # The variable is not set by user, try to locate tool using the code snippet
7185    for ac_prog in find
7186do
7187  # Extract the first word of "$ac_prog", so it can be a program name with args.
7188set dummy $ac_prog; ac_word=$2
7189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7190$as_echo_n "checking for $ac_word... " >&6; }
7191if ${ac_cv_path_FIND+:} false; then :
7192  $as_echo_n "(cached) " >&6
7193else
7194  case $FIND in
7195  [\\/]* | ?:[\\/]*)
7196  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7197  ;;
7198  *)
7199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7200for as_dir in $PATH
7201do
7202  IFS=$as_save_IFS
7203  test -z "$as_dir" && as_dir=.
7204    for ac_exec_ext in '' $ac_executable_extensions; do
7205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7206    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7208    break 2
7209  fi
7210done
7211  done
7212IFS=$as_save_IFS
7213
7214  ;;
7215esac
7216fi
7217FIND=$ac_cv_path_FIND
7218if test -n "$FIND"; then
7219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7220$as_echo "$FIND" >&6; }
7221else
7222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7223$as_echo "no" >&6; }
7224fi
7225
7226
7227  test -n "$FIND" && break
7228done
7229
7230  else
7231    # The variable is set, but is it from the command line or the environment?
7232
7233    # Try to remove the string !FIND! from our list.
7234    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7235    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7236      # If it failed, the variable was not from the command line. Ignore it,
7237      # but warn the user (except for BASH, which is always set by the calling BASH).
7238      if test "xFIND" != xBASH; then
7239        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7240$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7241      fi
7242      # Try to locate tool using the code snippet
7243      for ac_prog in find
7244do
7245  # Extract the first word of "$ac_prog", so it can be a program name with args.
7246set dummy $ac_prog; ac_word=$2
7247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7248$as_echo_n "checking for $ac_word... " >&6; }
7249if ${ac_cv_path_FIND+:} false; then :
7250  $as_echo_n "(cached) " >&6
7251else
7252  case $FIND in
7253  [\\/]* | ?:[\\/]*)
7254  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7255  ;;
7256  *)
7257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7258for as_dir in $PATH
7259do
7260  IFS=$as_save_IFS
7261  test -z "$as_dir" && as_dir=.
7262    for ac_exec_ext in '' $ac_executable_extensions; do
7263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7264    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7266    break 2
7267  fi
7268done
7269  done
7270IFS=$as_save_IFS
7271
7272  ;;
7273esac
7274fi
7275FIND=$ac_cv_path_FIND
7276if test -n "$FIND"; then
7277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7278$as_echo "$FIND" >&6; }
7279else
7280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7281$as_echo "no" >&6; }
7282fi
7283
7284
7285  test -n "$FIND" && break
7286done
7287
7288    else
7289      # If it succeeded, then it was overridden by the user. We will use it
7290      # for the tool.
7291
7292      # First remove it from the list of overridden variables, so we can test
7293      # for unknown variables in the end.
7294      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7295
7296      # Check if the provided tool contains a complete path.
7297      tool_specified="$FIND"
7298      tool_basename="${tool_specified##*/}"
7299      if test "x$tool_basename" = "x$tool_specified"; then
7300        # A command without a complete path is provided, search $PATH.
7301        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7302$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7303        # Extract the first word of "$tool_basename", so it can be a program name with args.
7304set dummy $tool_basename; ac_word=$2
7305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7306$as_echo_n "checking for $ac_word... " >&6; }
7307if ${ac_cv_path_FIND+:} false; then :
7308  $as_echo_n "(cached) " >&6
7309else
7310  case $FIND in
7311  [\\/]* | ?:[\\/]*)
7312  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7313  ;;
7314  *)
7315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7316for as_dir in $PATH
7317do
7318  IFS=$as_save_IFS
7319  test -z "$as_dir" && as_dir=.
7320    for ac_exec_ext in '' $ac_executable_extensions; do
7321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7322    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7324    break 2
7325  fi
7326done
7327  done
7328IFS=$as_save_IFS
7329
7330  ;;
7331esac
7332fi
7333FIND=$ac_cv_path_FIND
7334if test -n "$FIND"; then
7335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7336$as_echo "$FIND" >&6; }
7337else
7338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7339$as_echo "no" >&6; }
7340fi
7341
7342
7343        if test "x$FIND" = x; then
7344          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7345        fi
7346      else
7347        # Otherwise we believe it is a complete path. Use it as it is.
7348        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7349$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7350        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7351$as_echo_n "checking for FIND... " >&6; }
7352        if test ! -x "$tool_specified"; then
7353          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7354$as_echo "not found" >&6; }
7355          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7356        fi
7357        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7358$as_echo "$tool_specified" >&6; }
7359      fi
7360    fi
7361  fi
7362
7363
7364
7365  if test "x$FIND" = x; then
7366    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7367  fi
7368
7369
7370
7371
7372
7373  # Publish this variable in the help.
7374
7375
7376  if test "x$HEAD" = x; then
7377    # The variable is not set by user, try to locate tool using the code snippet
7378    for ac_prog in head
7379do
7380  # Extract the first word of "$ac_prog", so it can be a program name with args.
7381set dummy $ac_prog; ac_word=$2
7382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7383$as_echo_n "checking for $ac_word... " >&6; }
7384if ${ac_cv_path_HEAD+:} false; then :
7385  $as_echo_n "(cached) " >&6
7386else
7387  case $HEAD in
7388  [\\/]* | ?:[\\/]*)
7389  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7390  ;;
7391  *)
7392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7393for as_dir in $PATH
7394do
7395  IFS=$as_save_IFS
7396  test -z "$as_dir" && as_dir=.
7397    for ac_exec_ext in '' $ac_executable_extensions; do
7398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7399    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7401    break 2
7402  fi
7403done
7404  done
7405IFS=$as_save_IFS
7406
7407  ;;
7408esac
7409fi
7410HEAD=$ac_cv_path_HEAD
7411if test -n "$HEAD"; then
7412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7413$as_echo "$HEAD" >&6; }
7414else
7415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7416$as_echo "no" >&6; }
7417fi
7418
7419
7420  test -n "$HEAD" && break
7421done
7422
7423  else
7424    # The variable is set, but is it from the command line or the environment?
7425
7426    # Try to remove the string !HEAD! from our list.
7427    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7428    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7429      # If it failed, the variable was not from the command line. Ignore it,
7430      # but warn the user (except for BASH, which is always set by the calling BASH).
7431      if test "xHEAD" != xBASH; then
7432        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7433$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7434      fi
7435      # Try to locate tool using the code snippet
7436      for ac_prog in head
7437do
7438  # Extract the first word of "$ac_prog", so it can be a program name with args.
7439set dummy $ac_prog; ac_word=$2
7440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7441$as_echo_n "checking for $ac_word... " >&6; }
7442if ${ac_cv_path_HEAD+:} false; then :
7443  $as_echo_n "(cached) " >&6
7444else
7445  case $HEAD in
7446  [\\/]* | ?:[\\/]*)
7447  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7448  ;;
7449  *)
7450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7451for as_dir in $PATH
7452do
7453  IFS=$as_save_IFS
7454  test -z "$as_dir" && as_dir=.
7455    for ac_exec_ext in '' $ac_executable_extensions; do
7456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7457    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7459    break 2
7460  fi
7461done
7462  done
7463IFS=$as_save_IFS
7464
7465  ;;
7466esac
7467fi
7468HEAD=$ac_cv_path_HEAD
7469if test -n "$HEAD"; then
7470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7471$as_echo "$HEAD" >&6; }
7472else
7473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7474$as_echo "no" >&6; }
7475fi
7476
7477
7478  test -n "$HEAD" && break
7479done
7480
7481    else
7482      # If it succeeded, then it was overridden by the user. We will use it
7483      # for the tool.
7484
7485      # First remove it from the list of overridden variables, so we can test
7486      # for unknown variables in the end.
7487      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7488
7489      # Check if the provided tool contains a complete path.
7490      tool_specified="$HEAD"
7491      tool_basename="${tool_specified##*/}"
7492      if test "x$tool_basename" = "x$tool_specified"; then
7493        # A command without a complete path is provided, search $PATH.
7494        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7495$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7496        # Extract the first word of "$tool_basename", so it can be a program name with args.
7497set dummy $tool_basename; ac_word=$2
7498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7499$as_echo_n "checking for $ac_word... " >&6; }
7500if ${ac_cv_path_HEAD+:} false; then :
7501  $as_echo_n "(cached) " >&6
7502else
7503  case $HEAD in
7504  [\\/]* | ?:[\\/]*)
7505  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7506  ;;
7507  *)
7508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7509for as_dir in $PATH
7510do
7511  IFS=$as_save_IFS
7512  test -z "$as_dir" && as_dir=.
7513    for ac_exec_ext in '' $ac_executable_extensions; do
7514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7515    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7517    break 2
7518  fi
7519done
7520  done
7521IFS=$as_save_IFS
7522
7523  ;;
7524esac
7525fi
7526HEAD=$ac_cv_path_HEAD
7527if test -n "$HEAD"; then
7528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7529$as_echo "$HEAD" >&6; }
7530else
7531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7532$as_echo "no" >&6; }
7533fi
7534
7535
7536        if test "x$HEAD" = x; then
7537          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7538        fi
7539      else
7540        # Otherwise we believe it is a complete path. Use it as it is.
7541        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7542$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7543        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7544$as_echo_n "checking for HEAD... " >&6; }
7545        if test ! -x "$tool_specified"; then
7546          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7547$as_echo "not found" >&6; }
7548          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7549        fi
7550        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7551$as_echo "$tool_specified" >&6; }
7552      fi
7553    fi
7554  fi
7555
7556
7557
7558  if test "x$HEAD" = x; then
7559    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7560  fi
7561
7562
7563
7564
7565
7566  # Publish this variable in the help.
7567
7568
7569  if test "x$LN" = x; then
7570    # The variable is not set by user, try to locate tool using the code snippet
7571    for ac_prog in ln
7572do
7573  # Extract the first word of "$ac_prog", so it can be a program name with args.
7574set dummy $ac_prog; ac_word=$2
7575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7576$as_echo_n "checking for $ac_word... " >&6; }
7577if ${ac_cv_path_LN+:} false; then :
7578  $as_echo_n "(cached) " >&6
7579else
7580  case $LN in
7581  [\\/]* | ?:[\\/]*)
7582  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7583  ;;
7584  *)
7585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7586for as_dir in $PATH
7587do
7588  IFS=$as_save_IFS
7589  test -z "$as_dir" && as_dir=.
7590    for ac_exec_ext in '' $ac_executable_extensions; do
7591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7592    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7594    break 2
7595  fi
7596done
7597  done
7598IFS=$as_save_IFS
7599
7600  ;;
7601esac
7602fi
7603LN=$ac_cv_path_LN
7604if test -n "$LN"; then
7605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7606$as_echo "$LN" >&6; }
7607else
7608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7609$as_echo "no" >&6; }
7610fi
7611
7612
7613  test -n "$LN" && break
7614done
7615
7616  else
7617    # The variable is set, but is it from the command line or the environment?
7618
7619    # Try to remove the string !LN! from our list.
7620    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7621    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7622      # If it failed, the variable was not from the command line. Ignore it,
7623      # but warn the user (except for BASH, which is always set by the calling BASH).
7624      if test "xLN" != xBASH; then
7625        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7626$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7627      fi
7628      # Try to locate tool using the code snippet
7629      for ac_prog in ln
7630do
7631  # Extract the first word of "$ac_prog", so it can be a program name with args.
7632set dummy $ac_prog; ac_word=$2
7633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7634$as_echo_n "checking for $ac_word... " >&6; }
7635if ${ac_cv_path_LN+:} false; then :
7636  $as_echo_n "(cached) " >&6
7637else
7638  case $LN in
7639  [\\/]* | ?:[\\/]*)
7640  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7641  ;;
7642  *)
7643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7644for as_dir in $PATH
7645do
7646  IFS=$as_save_IFS
7647  test -z "$as_dir" && as_dir=.
7648    for ac_exec_ext in '' $ac_executable_extensions; do
7649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7650    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7652    break 2
7653  fi
7654done
7655  done
7656IFS=$as_save_IFS
7657
7658  ;;
7659esac
7660fi
7661LN=$ac_cv_path_LN
7662if test -n "$LN"; then
7663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7664$as_echo "$LN" >&6; }
7665else
7666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7667$as_echo "no" >&6; }
7668fi
7669
7670
7671  test -n "$LN" && break
7672done
7673
7674    else
7675      # If it succeeded, then it was overridden by the user. We will use it
7676      # for the tool.
7677
7678      # First remove it from the list of overridden variables, so we can test
7679      # for unknown variables in the end.
7680      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7681
7682      # Check if the provided tool contains a complete path.
7683      tool_specified="$LN"
7684      tool_basename="${tool_specified##*/}"
7685      if test "x$tool_basename" = "x$tool_specified"; then
7686        # A command without a complete path is provided, search $PATH.
7687        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7688$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7689        # Extract the first word of "$tool_basename", so it can be a program name with args.
7690set dummy $tool_basename; ac_word=$2
7691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7692$as_echo_n "checking for $ac_word... " >&6; }
7693if ${ac_cv_path_LN+:} false; then :
7694  $as_echo_n "(cached) " >&6
7695else
7696  case $LN in
7697  [\\/]* | ?:[\\/]*)
7698  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7699  ;;
7700  *)
7701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7702for as_dir in $PATH
7703do
7704  IFS=$as_save_IFS
7705  test -z "$as_dir" && as_dir=.
7706    for ac_exec_ext in '' $ac_executable_extensions; do
7707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7708    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7710    break 2
7711  fi
7712done
7713  done
7714IFS=$as_save_IFS
7715
7716  ;;
7717esac
7718fi
7719LN=$ac_cv_path_LN
7720if test -n "$LN"; then
7721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7722$as_echo "$LN" >&6; }
7723else
7724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7725$as_echo "no" >&6; }
7726fi
7727
7728
7729        if test "x$LN" = x; then
7730          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7731        fi
7732      else
7733        # Otherwise we believe it is a complete path. Use it as it is.
7734        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7735$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7736        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7737$as_echo_n "checking for LN... " >&6; }
7738        if test ! -x "$tool_specified"; then
7739          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7740$as_echo "not found" >&6; }
7741          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7742        fi
7743        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7744$as_echo "$tool_specified" >&6; }
7745      fi
7746    fi
7747  fi
7748
7749
7750
7751  if test "x$LN" = x; then
7752    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7753  fi
7754
7755
7756
7757
7758
7759  # Publish this variable in the help.
7760
7761
7762  if test "x$LS" = x; then
7763    # The variable is not set by user, try to locate tool using the code snippet
7764    for ac_prog in ls
7765do
7766  # Extract the first word of "$ac_prog", so it can be a program name with args.
7767set dummy $ac_prog; ac_word=$2
7768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7769$as_echo_n "checking for $ac_word... " >&6; }
7770if ${ac_cv_path_LS+:} false; then :
7771  $as_echo_n "(cached) " >&6
7772else
7773  case $LS in
7774  [\\/]* | ?:[\\/]*)
7775  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7776  ;;
7777  *)
7778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7779for as_dir in $PATH
7780do
7781  IFS=$as_save_IFS
7782  test -z "$as_dir" && as_dir=.
7783    for ac_exec_ext in '' $ac_executable_extensions; do
7784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7785    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7787    break 2
7788  fi
7789done
7790  done
7791IFS=$as_save_IFS
7792
7793  ;;
7794esac
7795fi
7796LS=$ac_cv_path_LS
7797if test -n "$LS"; then
7798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7799$as_echo "$LS" >&6; }
7800else
7801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7802$as_echo "no" >&6; }
7803fi
7804
7805
7806  test -n "$LS" && break
7807done
7808
7809  else
7810    # The variable is set, but is it from the command line or the environment?
7811
7812    # Try to remove the string !LS! from our list.
7813    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7814    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7815      # If it failed, the variable was not from the command line. Ignore it,
7816      # but warn the user (except for BASH, which is always set by the calling BASH).
7817      if test "xLS" != xBASH; then
7818        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7819$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7820      fi
7821      # Try to locate tool using the code snippet
7822      for ac_prog in ls
7823do
7824  # Extract the first word of "$ac_prog", so it can be a program name with args.
7825set dummy $ac_prog; ac_word=$2
7826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7827$as_echo_n "checking for $ac_word... " >&6; }
7828if ${ac_cv_path_LS+:} false; then :
7829  $as_echo_n "(cached) " >&6
7830else
7831  case $LS in
7832  [\\/]* | ?:[\\/]*)
7833  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7834  ;;
7835  *)
7836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7837for as_dir in $PATH
7838do
7839  IFS=$as_save_IFS
7840  test -z "$as_dir" && as_dir=.
7841    for ac_exec_ext in '' $ac_executable_extensions; do
7842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7843    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7845    break 2
7846  fi
7847done
7848  done
7849IFS=$as_save_IFS
7850
7851  ;;
7852esac
7853fi
7854LS=$ac_cv_path_LS
7855if test -n "$LS"; then
7856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7857$as_echo "$LS" >&6; }
7858else
7859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7860$as_echo "no" >&6; }
7861fi
7862
7863
7864  test -n "$LS" && break
7865done
7866
7867    else
7868      # If it succeeded, then it was overridden by the user. We will use it
7869      # for the tool.
7870
7871      # First remove it from the list of overridden variables, so we can test
7872      # for unknown variables in the end.
7873      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7874
7875      # Check if the provided tool contains a complete path.
7876      tool_specified="$LS"
7877      tool_basename="${tool_specified##*/}"
7878      if test "x$tool_basename" = "x$tool_specified"; then
7879        # A command without a complete path is provided, search $PATH.
7880        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7881$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7882        # Extract the first word of "$tool_basename", so it can be a program name with args.
7883set dummy $tool_basename; ac_word=$2
7884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7885$as_echo_n "checking for $ac_word... " >&6; }
7886if ${ac_cv_path_LS+:} false; then :
7887  $as_echo_n "(cached) " >&6
7888else
7889  case $LS in
7890  [\\/]* | ?:[\\/]*)
7891  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7892  ;;
7893  *)
7894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7895for as_dir in $PATH
7896do
7897  IFS=$as_save_IFS
7898  test -z "$as_dir" && as_dir=.
7899    for ac_exec_ext in '' $ac_executable_extensions; do
7900  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7901    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7903    break 2
7904  fi
7905done
7906  done
7907IFS=$as_save_IFS
7908
7909  ;;
7910esac
7911fi
7912LS=$ac_cv_path_LS
7913if test -n "$LS"; then
7914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7915$as_echo "$LS" >&6; }
7916else
7917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7918$as_echo "no" >&6; }
7919fi
7920
7921
7922        if test "x$LS" = x; then
7923          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7924        fi
7925      else
7926        # Otherwise we believe it is a complete path. Use it as it is.
7927        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7928$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7929        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7930$as_echo_n "checking for LS... " >&6; }
7931        if test ! -x "$tool_specified"; then
7932          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7933$as_echo "not found" >&6; }
7934          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7935        fi
7936        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7937$as_echo "$tool_specified" >&6; }
7938      fi
7939    fi
7940  fi
7941
7942
7943
7944  if test "x$LS" = x; then
7945    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7946  fi
7947
7948
7949
7950
7951
7952  # Publish this variable in the help.
7953
7954
7955  if test "x$MKDIR" = x; then
7956    # The variable is not set by user, try to locate tool using the code snippet
7957    for ac_prog in mkdir
7958do
7959  # Extract the first word of "$ac_prog", so it can be a program name with args.
7960set dummy $ac_prog; ac_word=$2
7961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7962$as_echo_n "checking for $ac_word... " >&6; }
7963if ${ac_cv_path_MKDIR+:} false; then :
7964  $as_echo_n "(cached) " >&6
7965else
7966  case $MKDIR in
7967  [\\/]* | ?:[\\/]*)
7968  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7969  ;;
7970  *)
7971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7972for as_dir in $PATH
7973do
7974  IFS=$as_save_IFS
7975  test -z "$as_dir" && as_dir=.
7976    for ac_exec_ext in '' $ac_executable_extensions; do
7977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7978    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7980    break 2
7981  fi
7982done
7983  done
7984IFS=$as_save_IFS
7985
7986  ;;
7987esac
7988fi
7989MKDIR=$ac_cv_path_MKDIR
7990if test -n "$MKDIR"; then
7991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7992$as_echo "$MKDIR" >&6; }
7993else
7994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7995$as_echo "no" >&6; }
7996fi
7997
7998
7999  test -n "$MKDIR" && break
8000done
8001
8002  else
8003    # The variable is set, but is it from the command line or the environment?
8004
8005    # Try to remove the string !MKDIR! from our list.
8006    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8007    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8008      # If it failed, the variable was not from the command line. Ignore it,
8009      # but warn the user (except for BASH, which is always set by the calling BASH).
8010      if test "xMKDIR" != xBASH; then
8011        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8012$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8013      fi
8014      # Try to locate tool using the code snippet
8015      for ac_prog in mkdir
8016do
8017  # Extract the first word of "$ac_prog", so it can be a program name with args.
8018set dummy $ac_prog; ac_word=$2
8019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8020$as_echo_n "checking for $ac_word... " >&6; }
8021if ${ac_cv_path_MKDIR+:} false; then :
8022  $as_echo_n "(cached) " >&6
8023else
8024  case $MKDIR in
8025  [\\/]* | ?:[\\/]*)
8026  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8027  ;;
8028  *)
8029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8030for as_dir in $PATH
8031do
8032  IFS=$as_save_IFS
8033  test -z "$as_dir" && as_dir=.
8034    for ac_exec_ext in '' $ac_executable_extensions; do
8035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8036    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8038    break 2
8039  fi
8040done
8041  done
8042IFS=$as_save_IFS
8043
8044  ;;
8045esac
8046fi
8047MKDIR=$ac_cv_path_MKDIR
8048if test -n "$MKDIR"; then
8049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8050$as_echo "$MKDIR" >&6; }
8051else
8052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8053$as_echo "no" >&6; }
8054fi
8055
8056
8057  test -n "$MKDIR" && break
8058done
8059
8060    else
8061      # If it succeeded, then it was overridden by the user. We will use it
8062      # for the tool.
8063
8064      # First remove it from the list of overridden variables, so we can test
8065      # for unknown variables in the end.
8066      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8067
8068      # Check if the provided tool contains a complete path.
8069      tool_specified="$MKDIR"
8070      tool_basename="${tool_specified##*/}"
8071      if test "x$tool_basename" = "x$tool_specified"; then
8072        # A command without a complete path is provided, search $PATH.
8073        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8074$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8075        # Extract the first word of "$tool_basename", so it can be a program name with args.
8076set dummy $tool_basename; ac_word=$2
8077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8078$as_echo_n "checking for $ac_word... " >&6; }
8079if ${ac_cv_path_MKDIR+:} false; then :
8080  $as_echo_n "(cached) " >&6
8081else
8082  case $MKDIR in
8083  [\\/]* | ?:[\\/]*)
8084  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8085  ;;
8086  *)
8087  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8088for as_dir in $PATH
8089do
8090  IFS=$as_save_IFS
8091  test -z "$as_dir" && as_dir=.
8092    for ac_exec_ext in '' $ac_executable_extensions; do
8093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8094    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8096    break 2
8097  fi
8098done
8099  done
8100IFS=$as_save_IFS
8101
8102  ;;
8103esac
8104fi
8105MKDIR=$ac_cv_path_MKDIR
8106if test -n "$MKDIR"; then
8107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8108$as_echo "$MKDIR" >&6; }
8109else
8110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8111$as_echo "no" >&6; }
8112fi
8113
8114
8115        if test "x$MKDIR" = x; then
8116          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8117        fi
8118      else
8119        # Otherwise we believe it is a complete path. Use it as it is.
8120        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8121$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8122        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8123$as_echo_n "checking for MKDIR... " >&6; }
8124        if test ! -x "$tool_specified"; then
8125          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8126$as_echo "not found" >&6; }
8127          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8128        fi
8129        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8130$as_echo "$tool_specified" >&6; }
8131      fi
8132    fi
8133  fi
8134
8135
8136
8137  if test "x$MKDIR" = x; then
8138    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8139  fi
8140
8141
8142
8143
8144
8145  # Publish this variable in the help.
8146
8147
8148  if test "x$MKTEMP" = x; then
8149    # The variable is not set by user, try to locate tool using the code snippet
8150    for ac_prog in mktemp
8151do
8152  # Extract the first word of "$ac_prog", so it can be a program name with args.
8153set dummy $ac_prog; ac_word=$2
8154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8155$as_echo_n "checking for $ac_word... " >&6; }
8156if ${ac_cv_path_MKTEMP+:} false; then :
8157  $as_echo_n "(cached) " >&6
8158else
8159  case $MKTEMP in
8160  [\\/]* | ?:[\\/]*)
8161  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8162  ;;
8163  *)
8164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8165for as_dir in $PATH
8166do
8167  IFS=$as_save_IFS
8168  test -z "$as_dir" && as_dir=.
8169    for ac_exec_ext in '' $ac_executable_extensions; do
8170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8171    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8173    break 2
8174  fi
8175done
8176  done
8177IFS=$as_save_IFS
8178
8179  ;;
8180esac
8181fi
8182MKTEMP=$ac_cv_path_MKTEMP
8183if test -n "$MKTEMP"; then
8184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8185$as_echo "$MKTEMP" >&6; }
8186else
8187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8188$as_echo "no" >&6; }
8189fi
8190
8191
8192  test -n "$MKTEMP" && break
8193done
8194
8195  else
8196    # The variable is set, but is it from the command line or the environment?
8197
8198    # Try to remove the string !MKTEMP! from our list.
8199    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8200    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8201      # If it failed, the variable was not from the command line. Ignore it,
8202      # but warn the user (except for BASH, which is always set by the calling BASH).
8203      if test "xMKTEMP" != xBASH; then
8204        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8205$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8206      fi
8207      # Try to locate tool using the code snippet
8208      for ac_prog in mktemp
8209do
8210  # Extract the first word of "$ac_prog", so it can be a program name with args.
8211set dummy $ac_prog; ac_word=$2
8212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8213$as_echo_n "checking for $ac_word... " >&6; }
8214if ${ac_cv_path_MKTEMP+:} false; then :
8215  $as_echo_n "(cached) " >&6
8216else
8217  case $MKTEMP in
8218  [\\/]* | ?:[\\/]*)
8219  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8220  ;;
8221  *)
8222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8223for as_dir in $PATH
8224do
8225  IFS=$as_save_IFS
8226  test -z "$as_dir" && as_dir=.
8227    for ac_exec_ext in '' $ac_executable_extensions; do
8228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8229    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8231    break 2
8232  fi
8233done
8234  done
8235IFS=$as_save_IFS
8236
8237  ;;
8238esac
8239fi
8240MKTEMP=$ac_cv_path_MKTEMP
8241if test -n "$MKTEMP"; then
8242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8243$as_echo "$MKTEMP" >&6; }
8244else
8245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8246$as_echo "no" >&6; }
8247fi
8248
8249
8250  test -n "$MKTEMP" && break
8251done
8252
8253    else
8254      # If it succeeded, then it was overridden by the user. We will use it
8255      # for the tool.
8256
8257      # First remove it from the list of overridden variables, so we can test
8258      # for unknown variables in the end.
8259      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8260
8261      # Check if the provided tool contains a complete path.
8262      tool_specified="$MKTEMP"
8263      tool_basename="${tool_specified##*/}"
8264      if test "x$tool_basename" = "x$tool_specified"; then
8265        # A command without a complete path is provided, search $PATH.
8266        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8267$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8268        # Extract the first word of "$tool_basename", so it can be a program name with args.
8269set dummy $tool_basename; ac_word=$2
8270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8271$as_echo_n "checking for $ac_word... " >&6; }
8272if ${ac_cv_path_MKTEMP+:} false; then :
8273  $as_echo_n "(cached) " >&6
8274else
8275  case $MKTEMP in
8276  [\\/]* | ?:[\\/]*)
8277  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8278  ;;
8279  *)
8280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8281for as_dir in $PATH
8282do
8283  IFS=$as_save_IFS
8284  test -z "$as_dir" && as_dir=.
8285    for ac_exec_ext in '' $ac_executable_extensions; do
8286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8287    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8289    break 2
8290  fi
8291done
8292  done
8293IFS=$as_save_IFS
8294
8295  ;;
8296esac
8297fi
8298MKTEMP=$ac_cv_path_MKTEMP
8299if test -n "$MKTEMP"; then
8300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8301$as_echo "$MKTEMP" >&6; }
8302else
8303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8304$as_echo "no" >&6; }
8305fi
8306
8307
8308        if test "x$MKTEMP" = x; then
8309          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8310        fi
8311      else
8312        # Otherwise we believe it is a complete path. Use it as it is.
8313        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8314$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8315        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8316$as_echo_n "checking for MKTEMP... " >&6; }
8317        if test ! -x "$tool_specified"; then
8318          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8319$as_echo "not found" >&6; }
8320          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8321        fi
8322        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8323$as_echo "$tool_specified" >&6; }
8324      fi
8325    fi
8326  fi
8327
8328
8329
8330  if test "x$MKTEMP" = x; then
8331    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8332  fi
8333
8334
8335
8336
8337
8338  # Publish this variable in the help.
8339
8340
8341  if test "x$MV" = x; then
8342    # The variable is not set by user, try to locate tool using the code snippet
8343    for ac_prog in mv
8344do
8345  # Extract the first word of "$ac_prog", so it can be a program name with args.
8346set dummy $ac_prog; ac_word=$2
8347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8348$as_echo_n "checking for $ac_word... " >&6; }
8349if ${ac_cv_path_MV+:} false; then :
8350  $as_echo_n "(cached) " >&6
8351else
8352  case $MV in
8353  [\\/]* | ?:[\\/]*)
8354  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8355  ;;
8356  *)
8357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8358for as_dir in $PATH
8359do
8360  IFS=$as_save_IFS
8361  test -z "$as_dir" && as_dir=.
8362    for ac_exec_ext in '' $ac_executable_extensions; do
8363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8364    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8366    break 2
8367  fi
8368done
8369  done
8370IFS=$as_save_IFS
8371
8372  ;;
8373esac
8374fi
8375MV=$ac_cv_path_MV
8376if test -n "$MV"; then
8377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8378$as_echo "$MV" >&6; }
8379else
8380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8381$as_echo "no" >&6; }
8382fi
8383
8384
8385  test -n "$MV" && break
8386done
8387
8388  else
8389    # The variable is set, but is it from the command line or the environment?
8390
8391    # Try to remove the string !MV! from our list.
8392    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8393    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8394      # If it failed, the variable was not from the command line. Ignore it,
8395      # but warn the user (except for BASH, which is always set by the calling BASH).
8396      if test "xMV" != xBASH; then
8397        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8398$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8399      fi
8400      # Try to locate tool using the code snippet
8401      for ac_prog in mv
8402do
8403  # Extract the first word of "$ac_prog", so it can be a program name with args.
8404set dummy $ac_prog; ac_word=$2
8405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8406$as_echo_n "checking for $ac_word... " >&6; }
8407if ${ac_cv_path_MV+:} false; then :
8408  $as_echo_n "(cached) " >&6
8409else
8410  case $MV in
8411  [\\/]* | ?:[\\/]*)
8412  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8413  ;;
8414  *)
8415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8416for as_dir in $PATH
8417do
8418  IFS=$as_save_IFS
8419  test -z "$as_dir" && as_dir=.
8420    for ac_exec_ext in '' $ac_executable_extensions; do
8421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8422    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8424    break 2
8425  fi
8426done
8427  done
8428IFS=$as_save_IFS
8429
8430  ;;
8431esac
8432fi
8433MV=$ac_cv_path_MV
8434if test -n "$MV"; then
8435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8436$as_echo "$MV" >&6; }
8437else
8438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8439$as_echo "no" >&6; }
8440fi
8441
8442
8443  test -n "$MV" && break
8444done
8445
8446    else
8447      # If it succeeded, then it was overridden by the user. We will use it
8448      # for the tool.
8449
8450      # First remove it from the list of overridden variables, so we can test
8451      # for unknown variables in the end.
8452      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8453
8454      # Check if the provided tool contains a complete path.
8455      tool_specified="$MV"
8456      tool_basename="${tool_specified##*/}"
8457      if test "x$tool_basename" = "x$tool_specified"; then
8458        # A command without a complete path is provided, search $PATH.
8459        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8460$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8461        # Extract the first word of "$tool_basename", so it can be a program name with args.
8462set dummy $tool_basename; ac_word=$2
8463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8464$as_echo_n "checking for $ac_word... " >&6; }
8465if ${ac_cv_path_MV+:} false; then :
8466  $as_echo_n "(cached) " >&6
8467else
8468  case $MV in
8469  [\\/]* | ?:[\\/]*)
8470  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8471  ;;
8472  *)
8473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8474for as_dir in $PATH
8475do
8476  IFS=$as_save_IFS
8477  test -z "$as_dir" && as_dir=.
8478    for ac_exec_ext in '' $ac_executable_extensions; do
8479  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8480    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8482    break 2
8483  fi
8484done
8485  done
8486IFS=$as_save_IFS
8487
8488  ;;
8489esac
8490fi
8491MV=$ac_cv_path_MV
8492if test -n "$MV"; then
8493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8494$as_echo "$MV" >&6; }
8495else
8496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8497$as_echo "no" >&6; }
8498fi
8499
8500
8501        if test "x$MV" = x; then
8502          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8503        fi
8504      else
8505        # Otherwise we believe it is a complete path. Use it as it is.
8506        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8507$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8508        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8509$as_echo_n "checking for MV... " >&6; }
8510        if test ! -x "$tool_specified"; then
8511          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8512$as_echo "not found" >&6; }
8513          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8514        fi
8515        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8516$as_echo "$tool_specified" >&6; }
8517      fi
8518    fi
8519  fi
8520
8521
8522
8523  if test "x$MV" = x; then
8524    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8525  fi
8526
8527
8528
8529
8530
8531  # Publish this variable in the help.
8532
8533
8534  if test "x$NAWK" = x; then
8535    # The variable is not set by user, try to locate tool using the code snippet
8536    for ac_prog in nawk gawk awk
8537do
8538  # Extract the first word of "$ac_prog", so it can be a program name with args.
8539set dummy $ac_prog; ac_word=$2
8540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8541$as_echo_n "checking for $ac_word... " >&6; }
8542if ${ac_cv_path_NAWK+:} false; then :
8543  $as_echo_n "(cached) " >&6
8544else
8545  case $NAWK in
8546  [\\/]* | ?:[\\/]*)
8547  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8548  ;;
8549  *)
8550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8551for as_dir in $PATH
8552do
8553  IFS=$as_save_IFS
8554  test -z "$as_dir" && as_dir=.
8555    for ac_exec_ext in '' $ac_executable_extensions; do
8556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8557    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8559    break 2
8560  fi
8561done
8562  done
8563IFS=$as_save_IFS
8564
8565  ;;
8566esac
8567fi
8568NAWK=$ac_cv_path_NAWK
8569if test -n "$NAWK"; then
8570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8571$as_echo "$NAWK" >&6; }
8572else
8573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8574$as_echo "no" >&6; }
8575fi
8576
8577
8578  test -n "$NAWK" && break
8579done
8580
8581  else
8582    # The variable is set, but is it from the command line or the environment?
8583
8584    # Try to remove the string !NAWK! from our list.
8585    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8586    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8587      # If it failed, the variable was not from the command line. Ignore it,
8588      # but warn the user (except for BASH, which is always set by the calling BASH).
8589      if test "xNAWK" != xBASH; then
8590        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8591$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8592      fi
8593      # Try to locate tool using the code snippet
8594      for ac_prog in nawk gawk awk
8595do
8596  # Extract the first word of "$ac_prog", so it can be a program name with args.
8597set dummy $ac_prog; ac_word=$2
8598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8599$as_echo_n "checking for $ac_word... " >&6; }
8600if ${ac_cv_path_NAWK+:} false; then :
8601  $as_echo_n "(cached) " >&6
8602else
8603  case $NAWK in
8604  [\\/]* | ?:[\\/]*)
8605  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8606  ;;
8607  *)
8608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8609for as_dir in $PATH
8610do
8611  IFS=$as_save_IFS
8612  test -z "$as_dir" && as_dir=.
8613    for ac_exec_ext in '' $ac_executable_extensions; do
8614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8615    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8617    break 2
8618  fi
8619done
8620  done
8621IFS=$as_save_IFS
8622
8623  ;;
8624esac
8625fi
8626NAWK=$ac_cv_path_NAWK
8627if test -n "$NAWK"; then
8628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8629$as_echo "$NAWK" >&6; }
8630else
8631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8632$as_echo "no" >&6; }
8633fi
8634
8635
8636  test -n "$NAWK" && break
8637done
8638
8639    else
8640      # If it succeeded, then it was overridden by the user. We will use it
8641      # for the tool.
8642
8643      # First remove it from the list of overridden variables, so we can test
8644      # for unknown variables in the end.
8645      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8646
8647      # Check if the provided tool contains a complete path.
8648      tool_specified="$NAWK"
8649      tool_basename="${tool_specified##*/}"
8650      if test "x$tool_basename" = "x$tool_specified"; then
8651        # A command without a complete path is provided, search $PATH.
8652        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8653$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8654        # Extract the first word of "$tool_basename", so it can be a program name with args.
8655set dummy $tool_basename; ac_word=$2
8656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8657$as_echo_n "checking for $ac_word... " >&6; }
8658if ${ac_cv_path_NAWK+:} false; then :
8659  $as_echo_n "(cached) " >&6
8660else
8661  case $NAWK in
8662  [\\/]* | ?:[\\/]*)
8663  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8664  ;;
8665  *)
8666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8667for as_dir in $PATH
8668do
8669  IFS=$as_save_IFS
8670  test -z "$as_dir" && as_dir=.
8671    for ac_exec_ext in '' $ac_executable_extensions; do
8672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8673    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8675    break 2
8676  fi
8677done
8678  done
8679IFS=$as_save_IFS
8680
8681  ;;
8682esac
8683fi
8684NAWK=$ac_cv_path_NAWK
8685if test -n "$NAWK"; then
8686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8687$as_echo "$NAWK" >&6; }
8688else
8689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8690$as_echo "no" >&6; }
8691fi
8692
8693
8694        if test "x$NAWK" = x; then
8695          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8696        fi
8697      else
8698        # Otherwise we believe it is a complete path. Use it as it is.
8699        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8700$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8701        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8702$as_echo_n "checking for NAWK... " >&6; }
8703        if test ! -x "$tool_specified"; then
8704          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8705$as_echo "not found" >&6; }
8706          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8707        fi
8708        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8709$as_echo "$tool_specified" >&6; }
8710      fi
8711    fi
8712  fi
8713
8714
8715
8716  if test "x$NAWK" = x; then
8717    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8718  fi
8719
8720
8721
8722
8723
8724  # Publish this variable in the help.
8725
8726
8727  if test "x$PRINTF" = x; then
8728    # The variable is not set by user, try to locate tool using the code snippet
8729    for ac_prog in printf
8730do
8731  # Extract the first word of "$ac_prog", so it can be a program name with args.
8732set dummy $ac_prog; ac_word=$2
8733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8734$as_echo_n "checking for $ac_word... " >&6; }
8735if ${ac_cv_path_PRINTF+:} false; then :
8736  $as_echo_n "(cached) " >&6
8737else
8738  case $PRINTF in
8739  [\\/]* | ?:[\\/]*)
8740  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8741  ;;
8742  *)
8743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8744for as_dir in $PATH
8745do
8746  IFS=$as_save_IFS
8747  test -z "$as_dir" && as_dir=.
8748    for ac_exec_ext in '' $ac_executable_extensions; do
8749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8750    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8752    break 2
8753  fi
8754done
8755  done
8756IFS=$as_save_IFS
8757
8758  ;;
8759esac
8760fi
8761PRINTF=$ac_cv_path_PRINTF
8762if test -n "$PRINTF"; then
8763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8764$as_echo "$PRINTF" >&6; }
8765else
8766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8767$as_echo "no" >&6; }
8768fi
8769
8770
8771  test -n "$PRINTF" && break
8772done
8773
8774  else
8775    # The variable is set, but is it from the command line or the environment?
8776
8777    # Try to remove the string !PRINTF! from our list.
8778    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8779    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8780      # If it failed, the variable was not from the command line. Ignore it,
8781      # but warn the user (except for BASH, which is always set by the calling BASH).
8782      if test "xPRINTF" != xBASH; then
8783        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8784$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8785      fi
8786      # Try to locate tool using the code snippet
8787      for ac_prog in printf
8788do
8789  # Extract the first word of "$ac_prog", so it can be a program name with args.
8790set dummy $ac_prog; ac_word=$2
8791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8792$as_echo_n "checking for $ac_word... " >&6; }
8793if ${ac_cv_path_PRINTF+:} false; then :
8794  $as_echo_n "(cached) " >&6
8795else
8796  case $PRINTF in
8797  [\\/]* | ?:[\\/]*)
8798  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8799  ;;
8800  *)
8801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8802for as_dir in $PATH
8803do
8804  IFS=$as_save_IFS
8805  test -z "$as_dir" && as_dir=.
8806    for ac_exec_ext in '' $ac_executable_extensions; do
8807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8808    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8810    break 2
8811  fi
8812done
8813  done
8814IFS=$as_save_IFS
8815
8816  ;;
8817esac
8818fi
8819PRINTF=$ac_cv_path_PRINTF
8820if test -n "$PRINTF"; then
8821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8822$as_echo "$PRINTF" >&6; }
8823else
8824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8825$as_echo "no" >&6; }
8826fi
8827
8828
8829  test -n "$PRINTF" && break
8830done
8831
8832    else
8833      # If it succeeded, then it was overridden by the user. We will use it
8834      # for the tool.
8835
8836      # First remove it from the list of overridden variables, so we can test
8837      # for unknown variables in the end.
8838      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8839
8840      # Check if the provided tool contains a complete path.
8841      tool_specified="$PRINTF"
8842      tool_basename="${tool_specified##*/}"
8843      if test "x$tool_basename" = "x$tool_specified"; then
8844        # A command without a complete path is provided, search $PATH.
8845        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8846$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8847        # Extract the first word of "$tool_basename", so it can be a program name with args.
8848set dummy $tool_basename; ac_word=$2
8849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8850$as_echo_n "checking for $ac_word... " >&6; }
8851if ${ac_cv_path_PRINTF+:} false; then :
8852  $as_echo_n "(cached) " >&6
8853else
8854  case $PRINTF in
8855  [\\/]* | ?:[\\/]*)
8856  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8857  ;;
8858  *)
8859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8860for as_dir in $PATH
8861do
8862  IFS=$as_save_IFS
8863  test -z "$as_dir" && as_dir=.
8864    for ac_exec_ext in '' $ac_executable_extensions; do
8865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8866    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8868    break 2
8869  fi
8870done
8871  done
8872IFS=$as_save_IFS
8873
8874  ;;
8875esac
8876fi
8877PRINTF=$ac_cv_path_PRINTF
8878if test -n "$PRINTF"; then
8879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8880$as_echo "$PRINTF" >&6; }
8881else
8882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8883$as_echo "no" >&6; }
8884fi
8885
8886
8887        if test "x$PRINTF" = x; then
8888          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8889        fi
8890      else
8891        # Otherwise we believe it is a complete path. Use it as it is.
8892        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8893$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8894        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8895$as_echo_n "checking for PRINTF... " >&6; }
8896        if test ! -x "$tool_specified"; then
8897          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8898$as_echo "not found" >&6; }
8899          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8900        fi
8901        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8902$as_echo "$tool_specified" >&6; }
8903      fi
8904    fi
8905  fi
8906
8907
8908
8909  if test "x$PRINTF" = x; then
8910    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8911  fi
8912
8913
8914
8915
8916
8917  # Publish this variable in the help.
8918
8919
8920  if test "x$RM" = x; then
8921    # The variable is not set by user, try to locate tool using the code snippet
8922    for ac_prog in rm
8923do
8924  # Extract the first word of "$ac_prog", so it can be a program name with args.
8925set dummy $ac_prog; ac_word=$2
8926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8927$as_echo_n "checking for $ac_word... " >&6; }
8928if ${ac_cv_path_RM+:} false; then :
8929  $as_echo_n "(cached) " >&6
8930else
8931  case $RM in
8932  [\\/]* | ?:[\\/]*)
8933  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8934  ;;
8935  *)
8936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8937for as_dir in $PATH
8938do
8939  IFS=$as_save_IFS
8940  test -z "$as_dir" && as_dir=.
8941    for ac_exec_ext in '' $ac_executable_extensions; do
8942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8943    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8945    break 2
8946  fi
8947done
8948  done
8949IFS=$as_save_IFS
8950
8951  ;;
8952esac
8953fi
8954RM=$ac_cv_path_RM
8955if test -n "$RM"; then
8956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8957$as_echo "$RM" >&6; }
8958else
8959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8960$as_echo "no" >&6; }
8961fi
8962
8963
8964  test -n "$RM" && break
8965done
8966
8967  else
8968    # The variable is set, but is it from the command line or the environment?
8969
8970    # Try to remove the string !RM! from our list.
8971    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8972    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8973      # If it failed, the variable was not from the command line. Ignore it,
8974      # but warn the user (except for BASH, which is always set by the calling BASH).
8975      if test "xRM" != xBASH; then
8976        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8977$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8978      fi
8979      # Try to locate tool using the code snippet
8980      for ac_prog in rm
8981do
8982  # Extract the first word of "$ac_prog", so it can be a program name with args.
8983set dummy $ac_prog; ac_word=$2
8984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8985$as_echo_n "checking for $ac_word... " >&6; }
8986if ${ac_cv_path_RM+:} false; then :
8987  $as_echo_n "(cached) " >&6
8988else
8989  case $RM in
8990  [\\/]* | ?:[\\/]*)
8991  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8992  ;;
8993  *)
8994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8995for as_dir in $PATH
8996do
8997  IFS=$as_save_IFS
8998  test -z "$as_dir" && as_dir=.
8999    for ac_exec_ext in '' $ac_executable_extensions; do
9000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9001    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9003    break 2
9004  fi
9005done
9006  done
9007IFS=$as_save_IFS
9008
9009  ;;
9010esac
9011fi
9012RM=$ac_cv_path_RM
9013if test -n "$RM"; then
9014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9015$as_echo "$RM" >&6; }
9016else
9017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9018$as_echo "no" >&6; }
9019fi
9020
9021
9022  test -n "$RM" && break
9023done
9024
9025    else
9026      # If it succeeded, then it was overridden by the user. We will use it
9027      # for the tool.
9028
9029      # First remove it from the list of overridden variables, so we can test
9030      # for unknown variables in the end.
9031      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9032
9033      # Check if the provided tool contains a complete path.
9034      tool_specified="$RM"
9035      tool_basename="${tool_specified##*/}"
9036      if test "x$tool_basename" = "x$tool_specified"; then
9037        # A command without a complete path is provided, search $PATH.
9038        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9039$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9040        # Extract the first word of "$tool_basename", so it can be a program name with args.
9041set dummy $tool_basename; ac_word=$2
9042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9043$as_echo_n "checking for $ac_word... " >&6; }
9044if ${ac_cv_path_RM+:} false; then :
9045  $as_echo_n "(cached) " >&6
9046else
9047  case $RM in
9048  [\\/]* | ?:[\\/]*)
9049  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9050  ;;
9051  *)
9052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9053for as_dir in $PATH
9054do
9055  IFS=$as_save_IFS
9056  test -z "$as_dir" && as_dir=.
9057    for ac_exec_ext in '' $ac_executable_extensions; do
9058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9059    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9061    break 2
9062  fi
9063done
9064  done
9065IFS=$as_save_IFS
9066
9067  ;;
9068esac
9069fi
9070RM=$ac_cv_path_RM
9071if test -n "$RM"; then
9072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9073$as_echo "$RM" >&6; }
9074else
9075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9076$as_echo "no" >&6; }
9077fi
9078
9079
9080        if test "x$RM" = x; then
9081          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9082        fi
9083      else
9084        # Otherwise we believe it is a complete path. Use it as it is.
9085        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9086$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9087        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9088$as_echo_n "checking for RM... " >&6; }
9089        if test ! -x "$tool_specified"; then
9090          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9091$as_echo "not found" >&6; }
9092          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9093        fi
9094        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9095$as_echo "$tool_specified" >&6; }
9096      fi
9097    fi
9098  fi
9099
9100
9101
9102  if test "x$RM" = x; then
9103    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9104  fi
9105
9106
9107
9108
9109
9110  # Publish this variable in the help.
9111
9112
9113  if test "x$SH" = x; then
9114    # The variable is not set by user, try to locate tool using the code snippet
9115    for ac_prog in sh
9116do
9117  # Extract the first word of "$ac_prog", so it can be a program name with args.
9118set dummy $ac_prog; ac_word=$2
9119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9120$as_echo_n "checking for $ac_word... " >&6; }
9121if ${ac_cv_path_SH+:} false; then :
9122  $as_echo_n "(cached) " >&6
9123else
9124  case $SH in
9125  [\\/]* | ?:[\\/]*)
9126  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9127  ;;
9128  *)
9129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9130for as_dir in $PATH
9131do
9132  IFS=$as_save_IFS
9133  test -z "$as_dir" && as_dir=.
9134    for ac_exec_ext in '' $ac_executable_extensions; do
9135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9136    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9138    break 2
9139  fi
9140done
9141  done
9142IFS=$as_save_IFS
9143
9144  ;;
9145esac
9146fi
9147SH=$ac_cv_path_SH
9148if test -n "$SH"; then
9149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9150$as_echo "$SH" >&6; }
9151else
9152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9153$as_echo "no" >&6; }
9154fi
9155
9156
9157  test -n "$SH" && break
9158done
9159
9160  else
9161    # The variable is set, but is it from the command line or the environment?
9162
9163    # Try to remove the string !SH! from our list.
9164    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9165    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9166      # If it failed, the variable was not from the command line. Ignore it,
9167      # but warn the user (except for BASH, which is always set by the calling BASH).
9168      if test "xSH" != xBASH; then
9169        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9170$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9171      fi
9172      # Try to locate tool using the code snippet
9173      for ac_prog in sh
9174do
9175  # Extract the first word of "$ac_prog", so it can be a program name with args.
9176set dummy $ac_prog; ac_word=$2
9177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9178$as_echo_n "checking for $ac_word... " >&6; }
9179if ${ac_cv_path_SH+:} false; then :
9180  $as_echo_n "(cached) " >&6
9181else
9182  case $SH in
9183  [\\/]* | ?:[\\/]*)
9184  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9185  ;;
9186  *)
9187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9188for as_dir in $PATH
9189do
9190  IFS=$as_save_IFS
9191  test -z "$as_dir" && as_dir=.
9192    for ac_exec_ext in '' $ac_executable_extensions; do
9193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9194    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9196    break 2
9197  fi
9198done
9199  done
9200IFS=$as_save_IFS
9201
9202  ;;
9203esac
9204fi
9205SH=$ac_cv_path_SH
9206if test -n "$SH"; then
9207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9208$as_echo "$SH" >&6; }
9209else
9210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9211$as_echo "no" >&6; }
9212fi
9213
9214
9215  test -n "$SH" && break
9216done
9217
9218    else
9219      # If it succeeded, then it was overridden by the user. We will use it
9220      # for the tool.
9221
9222      # First remove it from the list of overridden variables, so we can test
9223      # for unknown variables in the end.
9224      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9225
9226      # Check if the provided tool contains a complete path.
9227      tool_specified="$SH"
9228      tool_basename="${tool_specified##*/}"
9229      if test "x$tool_basename" = "x$tool_specified"; then
9230        # A command without a complete path is provided, search $PATH.
9231        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9232$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9233        # Extract the first word of "$tool_basename", so it can be a program name with args.
9234set dummy $tool_basename; ac_word=$2
9235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9236$as_echo_n "checking for $ac_word... " >&6; }
9237if ${ac_cv_path_SH+:} false; then :
9238  $as_echo_n "(cached) " >&6
9239else
9240  case $SH in
9241  [\\/]* | ?:[\\/]*)
9242  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9243  ;;
9244  *)
9245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9246for as_dir in $PATH
9247do
9248  IFS=$as_save_IFS
9249  test -z "$as_dir" && as_dir=.
9250    for ac_exec_ext in '' $ac_executable_extensions; do
9251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9252    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9254    break 2
9255  fi
9256done
9257  done
9258IFS=$as_save_IFS
9259
9260  ;;
9261esac
9262fi
9263SH=$ac_cv_path_SH
9264if test -n "$SH"; then
9265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9266$as_echo "$SH" >&6; }
9267else
9268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9269$as_echo "no" >&6; }
9270fi
9271
9272
9273        if test "x$SH" = x; then
9274          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9275        fi
9276      else
9277        # Otherwise we believe it is a complete path. Use it as it is.
9278        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9279$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9280        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9281$as_echo_n "checking for SH... " >&6; }
9282        if test ! -x "$tool_specified"; then
9283          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9284$as_echo "not found" >&6; }
9285          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9286        fi
9287        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9288$as_echo "$tool_specified" >&6; }
9289      fi
9290    fi
9291  fi
9292
9293
9294
9295  if test "x$SH" = x; then
9296    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9297  fi
9298
9299
9300
9301
9302
9303  # Publish this variable in the help.
9304
9305
9306  if test "x$SORT" = x; then
9307    # The variable is not set by user, try to locate tool using the code snippet
9308    for ac_prog in sort
9309do
9310  # Extract the first word of "$ac_prog", so it can be a program name with args.
9311set dummy $ac_prog; ac_word=$2
9312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9313$as_echo_n "checking for $ac_word... " >&6; }
9314if ${ac_cv_path_SORT+:} false; then :
9315  $as_echo_n "(cached) " >&6
9316else
9317  case $SORT in
9318  [\\/]* | ?:[\\/]*)
9319  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9320  ;;
9321  *)
9322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9323for as_dir in $PATH
9324do
9325  IFS=$as_save_IFS
9326  test -z "$as_dir" && as_dir=.
9327    for ac_exec_ext in '' $ac_executable_extensions; do
9328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9329    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9331    break 2
9332  fi
9333done
9334  done
9335IFS=$as_save_IFS
9336
9337  ;;
9338esac
9339fi
9340SORT=$ac_cv_path_SORT
9341if test -n "$SORT"; then
9342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9343$as_echo "$SORT" >&6; }
9344else
9345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9346$as_echo "no" >&6; }
9347fi
9348
9349
9350  test -n "$SORT" && break
9351done
9352
9353  else
9354    # The variable is set, but is it from the command line or the environment?
9355
9356    # Try to remove the string !SORT! from our list.
9357    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9358    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9359      # If it failed, the variable was not from the command line. Ignore it,
9360      # but warn the user (except for BASH, which is always set by the calling BASH).
9361      if test "xSORT" != xBASH; then
9362        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9363$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9364      fi
9365      # Try to locate tool using the code snippet
9366      for ac_prog in sort
9367do
9368  # Extract the first word of "$ac_prog", so it can be a program name with args.
9369set dummy $ac_prog; ac_word=$2
9370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9371$as_echo_n "checking for $ac_word... " >&6; }
9372if ${ac_cv_path_SORT+:} false; then :
9373  $as_echo_n "(cached) " >&6
9374else
9375  case $SORT in
9376  [\\/]* | ?:[\\/]*)
9377  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9378  ;;
9379  *)
9380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9381for as_dir in $PATH
9382do
9383  IFS=$as_save_IFS
9384  test -z "$as_dir" && as_dir=.
9385    for ac_exec_ext in '' $ac_executable_extensions; do
9386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9387    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9389    break 2
9390  fi
9391done
9392  done
9393IFS=$as_save_IFS
9394
9395  ;;
9396esac
9397fi
9398SORT=$ac_cv_path_SORT
9399if test -n "$SORT"; then
9400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9401$as_echo "$SORT" >&6; }
9402else
9403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9404$as_echo "no" >&6; }
9405fi
9406
9407
9408  test -n "$SORT" && break
9409done
9410
9411    else
9412      # If it succeeded, then it was overridden by the user. We will use it
9413      # for the tool.
9414
9415      # First remove it from the list of overridden variables, so we can test
9416      # for unknown variables in the end.
9417      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9418
9419      # Check if the provided tool contains a complete path.
9420      tool_specified="$SORT"
9421      tool_basename="${tool_specified##*/}"
9422      if test "x$tool_basename" = "x$tool_specified"; then
9423        # A command without a complete path is provided, search $PATH.
9424        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9425$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9426        # Extract the first word of "$tool_basename", so it can be a program name with args.
9427set dummy $tool_basename; ac_word=$2
9428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9429$as_echo_n "checking for $ac_word... " >&6; }
9430if ${ac_cv_path_SORT+:} false; then :
9431  $as_echo_n "(cached) " >&6
9432else
9433  case $SORT in
9434  [\\/]* | ?:[\\/]*)
9435  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9436  ;;
9437  *)
9438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9439for as_dir in $PATH
9440do
9441  IFS=$as_save_IFS
9442  test -z "$as_dir" && as_dir=.
9443    for ac_exec_ext in '' $ac_executable_extensions; do
9444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9445    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9447    break 2
9448  fi
9449done
9450  done
9451IFS=$as_save_IFS
9452
9453  ;;
9454esac
9455fi
9456SORT=$ac_cv_path_SORT
9457if test -n "$SORT"; then
9458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9459$as_echo "$SORT" >&6; }
9460else
9461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9462$as_echo "no" >&6; }
9463fi
9464
9465
9466        if test "x$SORT" = x; then
9467          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9468        fi
9469      else
9470        # Otherwise we believe it is a complete path. Use it as it is.
9471        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9472$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9473        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9474$as_echo_n "checking for SORT... " >&6; }
9475        if test ! -x "$tool_specified"; then
9476          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9477$as_echo "not found" >&6; }
9478          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9479        fi
9480        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9481$as_echo "$tool_specified" >&6; }
9482      fi
9483    fi
9484  fi
9485
9486
9487
9488  if test "x$SORT" = x; then
9489    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9490  fi
9491
9492
9493
9494
9495
9496  # Publish this variable in the help.
9497
9498
9499  if test "x$TAIL" = x; then
9500    # The variable is not set by user, try to locate tool using the code snippet
9501    for ac_prog in tail
9502do
9503  # Extract the first word of "$ac_prog", so it can be a program name with args.
9504set dummy $ac_prog; ac_word=$2
9505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9506$as_echo_n "checking for $ac_word... " >&6; }
9507if ${ac_cv_path_TAIL+:} false; then :
9508  $as_echo_n "(cached) " >&6
9509else
9510  case $TAIL in
9511  [\\/]* | ?:[\\/]*)
9512  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9513  ;;
9514  *)
9515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9516for as_dir in $PATH
9517do
9518  IFS=$as_save_IFS
9519  test -z "$as_dir" && as_dir=.
9520    for ac_exec_ext in '' $ac_executable_extensions; do
9521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9522    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9524    break 2
9525  fi
9526done
9527  done
9528IFS=$as_save_IFS
9529
9530  ;;
9531esac
9532fi
9533TAIL=$ac_cv_path_TAIL
9534if test -n "$TAIL"; then
9535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9536$as_echo "$TAIL" >&6; }
9537else
9538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9539$as_echo "no" >&6; }
9540fi
9541
9542
9543  test -n "$TAIL" && break
9544done
9545
9546  else
9547    # The variable is set, but is it from the command line or the environment?
9548
9549    # Try to remove the string !TAIL! from our list.
9550    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9551    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9552      # If it failed, the variable was not from the command line. Ignore it,
9553      # but warn the user (except for BASH, which is always set by the calling BASH).
9554      if test "xTAIL" != xBASH; then
9555        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9556$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9557      fi
9558      # Try to locate tool using the code snippet
9559      for ac_prog in tail
9560do
9561  # Extract the first word of "$ac_prog", so it can be a program name with args.
9562set dummy $ac_prog; ac_word=$2
9563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9564$as_echo_n "checking for $ac_word... " >&6; }
9565if ${ac_cv_path_TAIL+:} false; then :
9566  $as_echo_n "(cached) " >&6
9567else
9568  case $TAIL in
9569  [\\/]* | ?:[\\/]*)
9570  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9571  ;;
9572  *)
9573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9574for as_dir in $PATH
9575do
9576  IFS=$as_save_IFS
9577  test -z "$as_dir" && as_dir=.
9578    for ac_exec_ext in '' $ac_executable_extensions; do
9579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9580    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9582    break 2
9583  fi
9584done
9585  done
9586IFS=$as_save_IFS
9587
9588  ;;
9589esac
9590fi
9591TAIL=$ac_cv_path_TAIL
9592if test -n "$TAIL"; then
9593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9594$as_echo "$TAIL" >&6; }
9595else
9596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9597$as_echo "no" >&6; }
9598fi
9599
9600
9601  test -n "$TAIL" && break
9602done
9603
9604    else
9605      # If it succeeded, then it was overridden by the user. We will use it
9606      # for the tool.
9607
9608      # First remove it from the list of overridden variables, so we can test
9609      # for unknown variables in the end.
9610      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9611
9612      # Check if the provided tool contains a complete path.
9613      tool_specified="$TAIL"
9614      tool_basename="${tool_specified##*/}"
9615      if test "x$tool_basename" = "x$tool_specified"; then
9616        # A command without a complete path is provided, search $PATH.
9617        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9618$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9619        # Extract the first word of "$tool_basename", so it can be a program name with args.
9620set dummy $tool_basename; ac_word=$2
9621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9622$as_echo_n "checking for $ac_word... " >&6; }
9623if ${ac_cv_path_TAIL+:} false; then :
9624  $as_echo_n "(cached) " >&6
9625else
9626  case $TAIL in
9627  [\\/]* | ?:[\\/]*)
9628  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9629  ;;
9630  *)
9631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9632for as_dir in $PATH
9633do
9634  IFS=$as_save_IFS
9635  test -z "$as_dir" && as_dir=.
9636    for ac_exec_ext in '' $ac_executable_extensions; do
9637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9638    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9640    break 2
9641  fi
9642done
9643  done
9644IFS=$as_save_IFS
9645
9646  ;;
9647esac
9648fi
9649TAIL=$ac_cv_path_TAIL
9650if test -n "$TAIL"; then
9651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9652$as_echo "$TAIL" >&6; }
9653else
9654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9655$as_echo "no" >&6; }
9656fi
9657
9658
9659        if test "x$TAIL" = x; then
9660          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9661        fi
9662      else
9663        # Otherwise we believe it is a complete path. Use it as it is.
9664        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9665$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9666        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9667$as_echo_n "checking for TAIL... " >&6; }
9668        if test ! -x "$tool_specified"; then
9669          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9670$as_echo "not found" >&6; }
9671          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9672        fi
9673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9674$as_echo "$tool_specified" >&6; }
9675      fi
9676    fi
9677  fi
9678
9679
9680
9681  if test "x$TAIL" = x; then
9682    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9683  fi
9684
9685
9686
9687
9688
9689  # Publish this variable in the help.
9690
9691
9692  if test "x$TAR" = x; then
9693    # The variable is not set by user, try to locate tool using the code snippet
9694    for ac_prog in tar
9695do
9696  # Extract the first word of "$ac_prog", so it can be a program name with args.
9697set dummy $ac_prog; ac_word=$2
9698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9699$as_echo_n "checking for $ac_word... " >&6; }
9700if ${ac_cv_path_TAR+:} false; then :
9701  $as_echo_n "(cached) " >&6
9702else
9703  case $TAR in
9704  [\\/]* | ?:[\\/]*)
9705  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9706  ;;
9707  *)
9708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9709for as_dir in $PATH
9710do
9711  IFS=$as_save_IFS
9712  test -z "$as_dir" && as_dir=.
9713    for ac_exec_ext in '' $ac_executable_extensions; do
9714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9715    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9717    break 2
9718  fi
9719done
9720  done
9721IFS=$as_save_IFS
9722
9723  ;;
9724esac
9725fi
9726TAR=$ac_cv_path_TAR
9727if test -n "$TAR"; then
9728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9729$as_echo "$TAR" >&6; }
9730else
9731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9732$as_echo "no" >&6; }
9733fi
9734
9735
9736  test -n "$TAR" && break
9737done
9738
9739  else
9740    # The variable is set, but is it from the command line or the environment?
9741
9742    # Try to remove the string !TAR! from our list.
9743    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9744    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9745      # If it failed, the variable was not from the command line. Ignore it,
9746      # but warn the user (except for BASH, which is always set by the calling BASH).
9747      if test "xTAR" != xBASH; then
9748        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9749$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9750      fi
9751      # Try to locate tool using the code snippet
9752      for ac_prog in tar
9753do
9754  # Extract the first word of "$ac_prog", so it can be a program name with args.
9755set dummy $ac_prog; ac_word=$2
9756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9757$as_echo_n "checking for $ac_word... " >&6; }
9758if ${ac_cv_path_TAR+:} false; then :
9759  $as_echo_n "(cached) " >&6
9760else
9761  case $TAR in
9762  [\\/]* | ?:[\\/]*)
9763  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9764  ;;
9765  *)
9766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9767for as_dir in $PATH
9768do
9769  IFS=$as_save_IFS
9770  test -z "$as_dir" && as_dir=.
9771    for ac_exec_ext in '' $ac_executable_extensions; do
9772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9773    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9775    break 2
9776  fi
9777done
9778  done
9779IFS=$as_save_IFS
9780
9781  ;;
9782esac
9783fi
9784TAR=$ac_cv_path_TAR
9785if test -n "$TAR"; then
9786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9787$as_echo "$TAR" >&6; }
9788else
9789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9790$as_echo "no" >&6; }
9791fi
9792
9793
9794  test -n "$TAR" && break
9795done
9796
9797    else
9798      # If it succeeded, then it was overridden by the user. We will use it
9799      # for the tool.
9800
9801      # First remove it from the list of overridden variables, so we can test
9802      # for unknown variables in the end.
9803      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9804
9805      # Check if the provided tool contains a complete path.
9806      tool_specified="$TAR"
9807      tool_basename="${tool_specified##*/}"
9808      if test "x$tool_basename" = "x$tool_specified"; then
9809        # A command without a complete path is provided, search $PATH.
9810        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9811$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9812        # Extract the first word of "$tool_basename", so it can be a program name with args.
9813set dummy $tool_basename; ac_word=$2
9814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9815$as_echo_n "checking for $ac_word... " >&6; }
9816if ${ac_cv_path_TAR+:} false; then :
9817  $as_echo_n "(cached) " >&6
9818else
9819  case $TAR in
9820  [\\/]* | ?:[\\/]*)
9821  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9822  ;;
9823  *)
9824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9825for as_dir in $PATH
9826do
9827  IFS=$as_save_IFS
9828  test -z "$as_dir" && as_dir=.
9829    for ac_exec_ext in '' $ac_executable_extensions; do
9830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9831    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9833    break 2
9834  fi
9835done
9836  done
9837IFS=$as_save_IFS
9838
9839  ;;
9840esac
9841fi
9842TAR=$ac_cv_path_TAR
9843if test -n "$TAR"; then
9844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9845$as_echo "$TAR" >&6; }
9846else
9847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9848$as_echo "no" >&6; }
9849fi
9850
9851
9852        if test "x$TAR" = x; then
9853          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9854        fi
9855      else
9856        # Otherwise we believe it is a complete path. Use it as it is.
9857        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9858$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9859        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9860$as_echo_n "checking for TAR... " >&6; }
9861        if test ! -x "$tool_specified"; then
9862          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9863$as_echo "not found" >&6; }
9864          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9865        fi
9866        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9867$as_echo "$tool_specified" >&6; }
9868      fi
9869    fi
9870  fi
9871
9872
9873
9874  if test "x$TAR" = x; then
9875    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9876  fi
9877
9878
9879
9880
9881
9882  # Publish this variable in the help.
9883
9884
9885  if test "x$TEE" = x; then
9886    # The variable is not set by user, try to locate tool using the code snippet
9887    for ac_prog in tee
9888do
9889  # Extract the first word of "$ac_prog", so it can be a program name with args.
9890set dummy $ac_prog; ac_word=$2
9891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9892$as_echo_n "checking for $ac_word... " >&6; }
9893if ${ac_cv_path_TEE+:} false; then :
9894  $as_echo_n "(cached) " >&6
9895else
9896  case $TEE in
9897  [\\/]* | ?:[\\/]*)
9898  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9899  ;;
9900  *)
9901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9902for as_dir in $PATH
9903do
9904  IFS=$as_save_IFS
9905  test -z "$as_dir" && as_dir=.
9906    for ac_exec_ext in '' $ac_executable_extensions; do
9907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9908    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9910    break 2
9911  fi
9912done
9913  done
9914IFS=$as_save_IFS
9915
9916  ;;
9917esac
9918fi
9919TEE=$ac_cv_path_TEE
9920if test -n "$TEE"; then
9921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9922$as_echo "$TEE" >&6; }
9923else
9924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9925$as_echo "no" >&6; }
9926fi
9927
9928
9929  test -n "$TEE" && break
9930done
9931
9932  else
9933    # The variable is set, but is it from the command line or the environment?
9934
9935    # Try to remove the string !TEE! from our list.
9936    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9937    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9938      # If it failed, the variable was not from the command line. Ignore it,
9939      # but warn the user (except for BASH, which is always set by the calling BASH).
9940      if test "xTEE" != xBASH; then
9941        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9942$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9943      fi
9944      # Try to locate tool using the code snippet
9945      for ac_prog in tee
9946do
9947  # Extract the first word of "$ac_prog", so it can be a program name with args.
9948set dummy $ac_prog; ac_word=$2
9949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9950$as_echo_n "checking for $ac_word... " >&6; }
9951if ${ac_cv_path_TEE+:} false; then :
9952  $as_echo_n "(cached) " >&6
9953else
9954  case $TEE in
9955  [\\/]* | ?:[\\/]*)
9956  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9957  ;;
9958  *)
9959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9960for as_dir in $PATH
9961do
9962  IFS=$as_save_IFS
9963  test -z "$as_dir" && as_dir=.
9964    for ac_exec_ext in '' $ac_executable_extensions; do
9965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9966    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9968    break 2
9969  fi
9970done
9971  done
9972IFS=$as_save_IFS
9973
9974  ;;
9975esac
9976fi
9977TEE=$ac_cv_path_TEE
9978if test -n "$TEE"; then
9979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9980$as_echo "$TEE" >&6; }
9981else
9982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9983$as_echo "no" >&6; }
9984fi
9985
9986
9987  test -n "$TEE" && break
9988done
9989
9990    else
9991      # If it succeeded, then it was overridden by the user. We will use it
9992      # for the tool.
9993
9994      # First remove it from the list of overridden variables, so we can test
9995      # for unknown variables in the end.
9996      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9997
9998      # Check if the provided tool contains a complete path.
9999      tool_specified="$TEE"
10000      tool_basename="${tool_specified##*/}"
10001      if test "x$tool_basename" = "x$tool_specified"; then
10002        # A command without a complete path is provided, search $PATH.
10003        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10004$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10005        # Extract the first word of "$tool_basename", so it can be a program name with args.
10006set dummy $tool_basename; ac_word=$2
10007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10008$as_echo_n "checking for $ac_word... " >&6; }
10009if ${ac_cv_path_TEE+:} false; then :
10010  $as_echo_n "(cached) " >&6
10011else
10012  case $TEE in
10013  [\\/]* | ?:[\\/]*)
10014  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10015  ;;
10016  *)
10017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10018for as_dir in $PATH
10019do
10020  IFS=$as_save_IFS
10021  test -z "$as_dir" && as_dir=.
10022    for ac_exec_ext in '' $ac_executable_extensions; do
10023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10024    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10026    break 2
10027  fi
10028done
10029  done
10030IFS=$as_save_IFS
10031
10032  ;;
10033esac
10034fi
10035TEE=$ac_cv_path_TEE
10036if test -n "$TEE"; then
10037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10038$as_echo "$TEE" >&6; }
10039else
10040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10041$as_echo "no" >&6; }
10042fi
10043
10044
10045        if test "x$TEE" = x; then
10046          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10047        fi
10048      else
10049        # Otherwise we believe it is a complete path. Use it as it is.
10050        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10051$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10052        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10053$as_echo_n "checking for TEE... " >&6; }
10054        if test ! -x "$tool_specified"; then
10055          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10056$as_echo "not found" >&6; }
10057          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10058        fi
10059        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10060$as_echo "$tool_specified" >&6; }
10061      fi
10062    fi
10063  fi
10064
10065
10066
10067  if test "x$TEE" = x; then
10068    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10069  fi
10070
10071
10072
10073
10074
10075  # Publish this variable in the help.
10076
10077
10078  if test "x$TOUCH" = x; then
10079    # The variable is not set by user, try to locate tool using the code snippet
10080    for ac_prog in touch
10081do
10082  # Extract the first word of "$ac_prog", so it can be a program name with args.
10083set dummy $ac_prog; ac_word=$2
10084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10085$as_echo_n "checking for $ac_word... " >&6; }
10086if ${ac_cv_path_TOUCH+:} false; then :
10087  $as_echo_n "(cached) " >&6
10088else
10089  case $TOUCH in
10090  [\\/]* | ?:[\\/]*)
10091  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10092  ;;
10093  *)
10094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10095for as_dir in $PATH
10096do
10097  IFS=$as_save_IFS
10098  test -z "$as_dir" && as_dir=.
10099    for ac_exec_ext in '' $ac_executable_extensions; do
10100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10101    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10103    break 2
10104  fi
10105done
10106  done
10107IFS=$as_save_IFS
10108
10109  ;;
10110esac
10111fi
10112TOUCH=$ac_cv_path_TOUCH
10113if test -n "$TOUCH"; then
10114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10115$as_echo "$TOUCH" >&6; }
10116else
10117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10118$as_echo "no" >&6; }
10119fi
10120
10121
10122  test -n "$TOUCH" && break
10123done
10124
10125  else
10126    # The variable is set, but is it from the command line or the environment?
10127
10128    # Try to remove the string !TOUCH! from our list.
10129    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10130    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10131      # If it failed, the variable was not from the command line. Ignore it,
10132      # but warn the user (except for BASH, which is always set by the calling BASH).
10133      if test "xTOUCH" != xBASH; then
10134        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10135$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10136      fi
10137      # Try to locate tool using the code snippet
10138      for ac_prog in touch
10139do
10140  # Extract the first word of "$ac_prog", so it can be a program name with args.
10141set dummy $ac_prog; ac_word=$2
10142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10143$as_echo_n "checking for $ac_word... " >&6; }
10144if ${ac_cv_path_TOUCH+:} false; then :
10145  $as_echo_n "(cached) " >&6
10146else
10147  case $TOUCH in
10148  [\\/]* | ?:[\\/]*)
10149  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10150  ;;
10151  *)
10152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10153for as_dir in $PATH
10154do
10155  IFS=$as_save_IFS
10156  test -z "$as_dir" && as_dir=.
10157    for ac_exec_ext in '' $ac_executable_extensions; do
10158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10159    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10161    break 2
10162  fi
10163done
10164  done
10165IFS=$as_save_IFS
10166
10167  ;;
10168esac
10169fi
10170TOUCH=$ac_cv_path_TOUCH
10171if test -n "$TOUCH"; then
10172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10173$as_echo "$TOUCH" >&6; }
10174else
10175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10176$as_echo "no" >&6; }
10177fi
10178
10179
10180  test -n "$TOUCH" && break
10181done
10182
10183    else
10184      # If it succeeded, then it was overridden by the user. We will use it
10185      # for the tool.
10186
10187      # First remove it from the list of overridden variables, so we can test
10188      # for unknown variables in the end.
10189      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10190
10191      # Check if the provided tool contains a complete path.
10192      tool_specified="$TOUCH"
10193      tool_basename="${tool_specified##*/}"
10194      if test "x$tool_basename" = "x$tool_specified"; then
10195        # A command without a complete path is provided, search $PATH.
10196        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10197$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10198        # Extract the first word of "$tool_basename", so it can be a program name with args.
10199set dummy $tool_basename; ac_word=$2
10200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10201$as_echo_n "checking for $ac_word... " >&6; }
10202if ${ac_cv_path_TOUCH+:} false; then :
10203  $as_echo_n "(cached) " >&6
10204else
10205  case $TOUCH in
10206  [\\/]* | ?:[\\/]*)
10207  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10208  ;;
10209  *)
10210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10211for as_dir in $PATH
10212do
10213  IFS=$as_save_IFS
10214  test -z "$as_dir" && as_dir=.
10215    for ac_exec_ext in '' $ac_executable_extensions; do
10216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10217    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10219    break 2
10220  fi
10221done
10222  done
10223IFS=$as_save_IFS
10224
10225  ;;
10226esac
10227fi
10228TOUCH=$ac_cv_path_TOUCH
10229if test -n "$TOUCH"; then
10230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10231$as_echo "$TOUCH" >&6; }
10232else
10233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10234$as_echo "no" >&6; }
10235fi
10236
10237
10238        if test "x$TOUCH" = x; then
10239          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10240        fi
10241      else
10242        # Otherwise we believe it is a complete path. Use it as it is.
10243        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10244$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10245        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10246$as_echo_n "checking for TOUCH... " >&6; }
10247        if test ! -x "$tool_specified"; then
10248          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10249$as_echo "not found" >&6; }
10250          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10251        fi
10252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10253$as_echo "$tool_specified" >&6; }
10254      fi
10255    fi
10256  fi
10257
10258
10259
10260  if test "x$TOUCH" = x; then
10261    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10262  fi
10263
10264
10265
10266
10267
10268  # Publish this variable in the help.
10269
10270
10271  if test "x$TR" = x; then
10272    # The variable is not set by user, try to locate tool using the code snippet
10273    for ac_prog in tr
10274do
10275  # Extract the first word of "$ac_prog", so it can be a program name with args.
10276set dummy $ac_prog; ac_word=$2
10277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10278$as_echo_n "checking for $ac_word... " >&6; }
10279if ${ac_cv_path_TR+:} false; then :
10280  $as_echo_n "(cached) " >&6
10281else
10282  case $TR in
10283  [\\/]* | ?:[\\/]*)
10284  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10285  ;;
10286  *)
10287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10288for as_dir in $PATH
10289do
10290  IFS=$as_save_IFS
10291  test -z "$as_dir" && as_dir=.
10292    for ac_exec_ext in '' $ac_executable_extensions; do
10293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10294    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10296    break 2
10297  fi
10298done
10299  done
10300IFS=$as_save_IFS
10301
10302  ;;
10303esac
10304fi
10305TR=$ac_cv_path_TR
10306if test -n "$TR"; then
10307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10308$as_echo "$TR" >&6; }
10309else
10310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10311$as_echo "no" >&6; }
10312fi
10313
10314
10315  test -n "$TR" && break
10316done
10317
10318  else
10319    # The variable is set, but is it from the command line or the environment?
10320
10321    # Try to remove the string !TR! from our list.
10322    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10323    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10324      # If it failed, the variable was not from the command line. Ignore it,
10325      # but warn the user (except for BASH, which is always set by the calling BASH).
10326      if test "xTR" != xBASH; then
10327        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10328$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10329      fi
10330      # Try to locate tool using the code snippet
10331      for ac_prog in tr
10332do
10333  # Extract the first word of "$ac_prog", so it can be a program name with args.
10334set dummy $ac_prog; ac_word=$2
10335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10336$as_echo_n "checking for $ac_word... " >&6; }
10337if ${ac_cv_path_TR+:} false; then :
10338  $as_echo_n "(cached) " >&6
10339else
10340  case $TR in
10341  [\\/]* | ?:[\\/]*)
10342  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10343  ;;
10344  *)
10345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10346for as_dir in $PATH
10347do
10348  IFS=$as_save_IFS
10349  test -z "$as_dir" && as_dir=.
10350    for ac_exec_ext in '' $ac_executable_extensions; do
10351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10352    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10354    break 2
10355  fi
10356done
10357  done
10358IFS=$as_save_IFS
10359
10360  ;;
10361esac
10362fi
10363TR=$ac_cv_path_TR
10364if test -n "$TR"; then
10365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10366$as_echo "$TR" >&6; }
10367else
10368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10369$as_echo "no" >&6; }
10370fi
10371
10372
10373  test -n "$TR" && break
10374done
10375
10376    else
10377      # If it succeeded, then it was overridden by the user. We will use it
10378      # for the tool.
10379
10380      # First remove it from the list of overridden variables, so we can test
10381      # for unknown variables in the end.
10382      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10383
10384      # Check if the provided tool contains a complete path.
10385      tool_specified="$TR"
10386      tool_basename="${tool_specified##*/}"
10387      if test "x$tool_basename" = "x$tool_specified"; then
10388        # A command without a complete path is provided, search $PATH.
10389        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10390$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10391        # Extract the first word of "$tool_basename", so it can be a program name with args.
10392set dummy $tool_basename; ac_word=$2
10393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10394$as_echo_n "checking for $ac_word... " >&6; }
10395if ${ac_cv_path_TR+:} false; then :
10396  $as_echo_n "(cached) " >&6
10397else
10398  case $TR in
10399  [\\/]* | ?:[\\/]*)
10400  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10401  ;;
10402  *)
10403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10404for as_dir in $PATH
10405do
10406  IFS=$as_save_IFS
10407  test -z "$as_dir" && as_dir=.
10408    for ac_exec_ext in '' $ac_executable_extensions; do
10409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10410    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10412    break 2
10413  fi
10414done
10415  done
10416IFS=$as_save_IFS
10417
10418  ;;
10419esac
10420fi
10421TR=$ac_cv_path_TR
10422if test -n "$TR"; then
10423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10424$as_echo "$TR" >&6; }
10425else
10426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10427$as_echo "no" >&6; }
10428fi
10429
10430
10431        if test "x$TR" = x; then
10432          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10433        fi
10434      else
10435        # Otherwise we believe it is a complete path. Use it as it is.
10436        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10437$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10438        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10439$as_echo_n "checking for TR... " >&6; }
10440        if test ! -x "$tool_specified"; then
10441          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10442$as_echo "not found" >&6; }
10443          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10444        fi
10445        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10446$as_echo "$tool_specified" >&6; }
10447      fi
10448    fi
10449  fi
10450
10451
10452
10453  if test "x$TR" = x; then
10454    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10455  fi
10456
10457
10458
10459
10460
10461  # Publish this variable in the help.
10462
10463
10464  if test "x$UNAME" = x; then
10465    # The variable is not set by user, try to locate tool using the code snippet
10466    for ac_prog in uname
10467do
10468  # Extract the first word of "$ac_prog", so it can be a program name with args.
10469set dummy $ac_prog; ac_word=$2
10470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10471$as_echo_n "checking for $ac_word... " >&6; }
10472if ${ac_cv_path_UNAME+:} false; then :
10473  $as_echo_n "(cached) " >&6
10474else
10475  case $UNAME in
10476  [\\/]* | ?:[\\/]*)
10477  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10478  ;;
10479  *)
10480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10481for as_dir in $PATH
10482do
10483  IFS=$as_save_IFS
10484  test -z "$as_dir" && as_dir=.
10485    for ac_exec_ext in '' $ac_executable_extensions; do
10486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10487    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10489    break 2
10490  fi
10491done
10492  done
10493IFS=$as_save_IFS
10494
10495  ;;
10496esac
10497fi
10498UNAME=$ac_cv_path_UNAME
10499if test -n "$UNAME"; then
10500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10501$as_echo "$UNAME" >&6; }
10502else
10503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10504$as_echo "no" >&6; }
10505fi
10506
10507
10508  test -n "$UNAME" && break
10509done
10510
10511  else
10512    # The variable is set, but is it from the command line or the environment?
10513
10514    # Try to remove the string !UNAME! from our list.
10515    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10516    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10517      # If it failed, the variable was not from the command line. Ignore it,
10518      # but warn the user (except for BASH, which is always set by the calling BASH).
10519      if test "xUNAME" != xBASH; then
10520        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10521$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10522      fi
10523      # Try to locate tool using the code snippet
10524      for ac_prog in uname
10525do
10526  # Extract the first word of "$ac_prog", so it can be a program name with args.
10527set dummy $ac_prog; ac_word=$2
10528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10529$as_echo_n "checking for $ac_word... " >&6; }
10530if ${ac_cv_path_UNAME+:} false; then :
10531  $as_echo_n "(cached) " >&6
10532else
10533  case $UNAME in
10534  [\\/]* | ?:[\\/]*)
10535  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10536  ;;
10537  *)
10538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10539for as_dir in $PATH
10540do
10541  IFS=$as_save_IFS
10542  test -z "$as_dir" && as_dir=.
10543    for ac_exec_ext in '' $ac_executable_extensions; do
10544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10545    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10547    break 2
10548  fi
10549done
10550  done
10551IFS=$as_save_IFS
10552
10553  ;;
10554esac
10555fi
10556UNAME=$ac_cv_path_UNAME
10557if test -n "$UNAME"; then
10558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10559$as_echo "$UNAME" >&6; }
10560else
10561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10562$as_echo "no" >&6; }
10563fi
10564
10565
10566  test -n "$UNAME" && break
10567done
10568
10569    else
10570      # If it succeeded, then it was overridden by the user. We will use it
10571      # for the tool.
10572
10573      # First remove it from the list of overridden variables, so we can test
10574      # for unknown variables in the end.
10575      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10576
10577      # Check if the provided tool contains a complete path.
10578      tool_specified="$UNAME"
10579      tool_basename="${tool_specified##*/}"
10580      if test "x$tool_basename" = "x$tool_specified"; then
10581        # A command without a complete path is provided, search $PATH.
10582        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10583$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10584        # Extract the first word of "$tool_basename", so it can be a program name with args.
10585set dummy $tool_basename; ac_word=$2
10586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10587$as_echo_n "checking for $ac_word... " >&6; }
10588if ${ac_cv_path_UNAME+:} false; then :
10589  $as_echo_n "(cached) " >&6
10590else
10591  case $UNAME in
10592  [\\/]* | ?:[\\/]*)
10593  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10594  ;;
10595  *)
10596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10597for as_dir in $PATH
10598do
10599  IFS=$as_save_IFS
10600  test -z "$as_dir" && as_dir=.
10601    for ac_exec_ext in '' $ac_executable_extensions; do
10602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10603    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10605    break 2
10606  fi
10607done
10608  done
10609IFS=$as_save_IFS
10610
10611  ;;
10612esac
10613fi
10614UNAME=$ac_cv_path_UNAME
10615if test -n "$UNAME"; then
10616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10617$as_echo "$UNAME" >&6; }
10618else
10619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10620$as_echo "no" >&6; }
10621fi
10622
10623
10624        if test "x$UNAME" = x; then
10625          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10626        fi
10627      else
10628        # Otherwise we believe it is a complete path. Use it as it is.
10629        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10630$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10631        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10632$as_echo_n "checking for UNAME... " >&6; }
10633        if test ! -x "$tool_specified"; then
10634          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10635$as_echo "not found" >&6; }
10636          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10637        fi
10638        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10639$as_echo "$tool_specified" >&6; }
10640      fi
10641    fi
10642  fi
10643
10644
10645
10646  if test "x$UNAME" = x; then
10647    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10648  fi
10649
10650
10651
10652
10653
10654  # Publish this variable in the help.
10655
10656
10657  if test "x$UNIQ" = x; then
10658    # The variable is not set by user, try to locate tool using the code snippet
10659    for ac_prog in uniq
10660do
10661  # Extract the first word of "$ac_prog", so it can be a program name with args.
10662set dummy $ac_prog; ac_word=$2
10663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10664$as_echo_n "checking for $ac_word... " >&6; }
10665if ${ac_cv_path_UNIQ+:} false; then :
10666  $as_echo_n "(cached) " >&6
10667else
10668  case $UNIQ in
10669  [\\/]* | ?:[\\/]*)
10670  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10671  ;;
10672  *)
10673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10674for as_dir in $PATH
10675do
10676  IFS=$as_save_IFS
10677  test -z "$as_dir" && as_dir=.
10678    for ac_exec_ext in '' $ac_executable_extensions; do
10679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10680    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10682    break 2
10683  fi
10684done
10685  done
10686IFS=$as_save_IFS
10687
10688  ;;
10689esac
10690fi
10691UNIQ=$ac_cv_path_UNIQ
10692if test -n "$UNIQ"; then
10693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10694$as_echo "$UNIQ" >&6; }
10695else
10696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10697$as_echo "no" >&6; }
10698fi
10699
10700
10701  test -n "$UNIQ" && break
10702done
10703
10704  else
10705    # The variable is set, but is it from the command line or the environment?
10706
10707    # Try to remove the string !UNIQ! from our list.
10708    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10709    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10710      # If it failed, the variable was not from the command line. Ignore it,
10711      # but warn the user (except for BASH, which is always set by the calling BASH).
10712      if test "xUNIQ" != xBASH; then
10713        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10714$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10715      fi
10716      # Try to locate tool using the code snippet
10717      for ac_prog in uniq
10718do
10719  # Extract the first word of "$ac_prog", so it can be a program name with args.
10720set dummy $ac_prog; ac_word=$2
10721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10722$as_echo_n "checking for $ac_word... " >&6; }
10723if ${ac_cv_path_UNIQ+:} false; then :
10724  $as_echo_n "(cached) " >&6
10725else
10726  case $UNIQ in
10727  [\\/]* | ?:[\\/]*)
10728  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10729  ;;
10730  *)
10731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10732for as_dir in $PATH
10733do
10734  IFS=$as_save_IFS
10735  test -z "$as_dir" && as_dir=.
10736    for ac_exec_ext in '' $ac_executable_extensions; do
10737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10738    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10740    break 2
10741  fi
10742done
10743  done
10744IFS=$as_save_IFS
10745
10746  ;;
10747esac
10748fi
10749UNIQ=$ac_cv_path_UNIQ
10750if test -n "$UNIQ"; then
10751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10752$as_echo "$UNIQ" >&6; }
10753else
10754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10755$as_echo "no" >&6; }
10756fi
10757
10758
10759  test -n "$UNIQ" && break
10760done
10761
10762    else
10763      # If it succeeded, then it was overridden by the user. We will use it
10764      # for the tool.
10765
10766      # First remove it from the list of overridden variables, so we can test
10767      # for unknown variables in the end.
10768      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10769
10770      # Check if the provided tool contains a complete path.
10771      tool_specified="$UNIQ"
10772      tool_basename="${tool_specified##*/}"
10773      if test "x$tool_basename" = "x$tool_specified"; then
10774        # A command without a complete path is provided, search $PATH.
10775        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10776$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10777        # Extract the first word of "$tool_basename", so it can be a program name with args.
10778set dummy $tool_basename; ac_word=$2
10779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10780$as_echo_n "checking for $ac_word... " >&6; }
10781if ${ac_cv_path_UNIQ+:} false; then :
10782  $as_echo_n "(cached) " >&6
10783else
10784  case $UNIQ in
10785  [\\/]* | ?:[\\/]*)
10786  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10787  ;;
10788  *)
10789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10790for as_dir in $PATH
10791do
10792  IFS=$as_save_IFS
10793  test -z "$as_dir" && as_dir=.
10794    for ac_exec_ext in '' $ac_executable_extensions; do
10795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10796    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10798    break 2
10799  fi
10800done
10801  done
10802IFS=$as_save_IFS
10803
10804  ;;
10805esac
10806fi
10807UNIQ=$ac_cv_path_UNIQ
10808if test -n "$UNIQ"; then
10809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10810$as_echo "$UNIQ" >&6; }
10811else
10812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10813$as_echo "no" >&6; }
10814fi
10815
10816
10817        if test "x$UNIQ" = x; then
10818          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10819        fi
10820      else
10821        # Otherwise we believe it is a complete path. Use it as it is.
10822        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10823$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10824        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10825$as_echo_n "checking for UNIQ... " >&6; }
10826        if test ! -x "$tool_specified"; then
10827          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10828$as_echo "not found" >&6; }
10829          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10830        fi
10831        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10832$as_echo "$tool_specified" >&6; }
10833      fi
10834    fi
10835  fi
10836
10837
10838
10839  if test "x$UNIQ" = x; then
10840    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10841  fi
10842
10843
10844
10845
10846
10847  # Publish this variable in the help.
10848
10849
10850  if test "x$WC" = x; then
10851    # The variable is not set by user, try to locate tool using the code snippet
10852    for ac_prog in wc
10853do
10854  # Extract the first word of "$ac_prog", so it can be a program name with args.
10855set dummy $ac_prog; ac_word=$2
10856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10857$as_echo_n "checking for $ac_word... " >&6; }
10858if ${ac_cv_path_WC+:} false; then :
10859  $as_echo_n "(cached) " >&6
10860else
10861  case $WC in
10862  [\\/]* | ?:[\\/]*)
10863  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10864  ;;
10865  *)
10866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10867for as_dir in $PATH
10868do
10869  IFS=$as_save_IFS
10870  test -z "$as_dir" && as_dir=.
10871    for ac_exec_ext in '' $ac_executable_extensions; do
10872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10873    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10875    break 2
10876  fi
10877done
10878  done
10879IFS=$as_save_IFS
10880
10881  ;;
10882esac
10883fi
10884WC=$ac_cv_path_WC
10885if test -n "$WC"; then
10886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10887$as_echo "$WC" >&6; }
10888else
10889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10890$as_echo "no" >&6; }
10891fi
10892
10893
10894  test -n "$WC" && break
10895done
10896
10897  else
10898    # The variable is set, but is it from the command line or the environment?
10899
10900    # Try to remove the string !WC! from our list.
10901    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10902    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10903      # If it failed, the variable was not from the command line. Ignore it,
10904      # but warn the user (except for BASH, which is always set by the calling BASH).
10905      if test "xWC" != xBASH; then
10906        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10907$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10908      fi
10909      # Try to locate tool using the code snippet
10910      for ac_prog in wc
10911do
10912  # Extract the first word of "$ac_prog", so it can be a program name with args.
10913set dummy $ac_prog; ac_word=$2
10914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10915$as_echo_n "checking for $ac_word... " >&6; }
10916if ${ac_cv_path_WC+:} false; then :
10917  $as_echo_n "(cached) " >&6
10918else
10919  case $WC in
10920  [\\/]* | ?:[\\/]*)
10921  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10922  ;;
10923  *)
10924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10925for as_dir in $PATH
10926do
10927  IFS=$as_save_IFS
10928  test -z "$as_dir" && as_dir=.
10929    for ac_exec_ext in '' $ac_executable_extensions; do
10930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10931    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10933    break 2
10934  fi
10935done
10936  done
10937IFS=$as_save_IFS
10938
10939  ;;
10940esac
10941fi
10942WC=$ac_cv_path_WC
10943if test -n "$WC"; then
10944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10945$as_echo "$WC" >&6; }
10946else
10947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10948$as_echo "no" >&6; }
10949fi
10950
10951
10952  test -n "$WC" && break
10953done
10954
10955    else
10956      # If it succeeded, then it was overridden by the user. We will use it
10957      # for the tool.
10958
10959      # First remove it from the list of overridden variables, so we can test
10960      # for unknown variables in the end.
10961      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10962
10963      # Check if the provided tool contains a complete path.
10964      tool_specified="$WC"
10965      tool_basename="${tool_specified##*/}"
10966      if test "x$tool_basename" = "x$tool_specified"; then
10967        # A command without a complete path is provided, search $PATH.
10968        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10969$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10970        # Extract the first word of "$tool_basename", so it can be a program name with args.
10971set dummy $tool_basename; ac_word=$2
10972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10973$as_echo_n "checking for $ac_word... " >&6; }
10974if ${ac_cv_path_WC+:} false; then :
10975  $as_echo_n "(cached) " >&6
10976else
10977  case $WC in
10978  [\\/]* | ?:[\\/]*)
10979  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10980  ;;
10981  *)
10982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10983for as_dir in $PATH
10984do
10985  IFS=$as_save_IFS
10986  test -z "$as_dir" && as_dir=.
10987    for ac_exec_ext in '' $ac_executable_extensions; do
10988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10989    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10991    break 2
10992  fi
10993done
10994  done
10995IFS=$as_save_IFS
10996
10997  ;;
10998esac
10999fi
11000WC=$ac_cv_path_WC
11001if test -n "$WC"; then
11002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11003$as_echo "$WC" >&6; }
11004else
11005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11006$as_echo "no" >&6; }
11007fi
11008
11009
11010        if test "x$WC" = x; then
11011          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11012        fi
11013      else
11014        # Otherwise we believe it is a complete path. Use it as it is.
11015        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11016$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11017        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11018$as_echo_n "checking for WC... " >&6; }
11019        if test ! -x "$tool_specified"; then
11020          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11021$as_echo "not found" >&6; }
11022          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11023        fi
11024        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11025$as_echo "$tool_specified" >&6; }
11026      fi
11027    fi
11028  fi
11029
11030
11031
11032  if test "x$WC" = x; then
11033    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11034  fi
11035
11036
11037
11038
11039
11040  # Publish this variable in the help.
11041
11042
11043  if test "x$WHICH" = x; then
11044    # The variable is not set by user, try to locate tool using the code snippet
11045    for ac_prog in which
11046do
11047  # Extract the first word of "$ac_prog", so it can be a program name with args.
11048set dummy $ac_prog; ac_word=$2
11049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11050$as_echo_n "checking for $ac_word... " >&6; }
11051if ${ac_cv_path_WHICH+:} false; then :
11052  $as_echo_n "(cached) " >&6
11053else
11054  case $WHICH in
11055  [\\/]* | ?:[\\/]*)
11056  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11057  ;;
11058  *)
11059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11060for as_dir in $PATH
11061do
11062  IFS=$as_save_IFS
11063  test -z "$as_dir" && as_dir=.
11064    for ac_exec_ext in '' $ac_executable_extensions; do
11065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11066    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11068    break 2
11069  fi
11070done
11071  done
11072IFS=$as_save_IFS
11073
11074  ;;
11075esac
11076fi
11077WHICH=$ac_cv_path_WHICH
11078if test -n "$WHICH"; then
11079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11080$as_echo "$WHICH" >&6; }
11081else
11082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11083$as_echo "no" >&6; }
11084fi
11085
11086
11087  test -n "$WHICH" && break
11088done
11089
11090  else
11091    # The variable is set, but is it from the command line or the environment?
11092
11093    # Try to remove the string !WHICH! from our list.
11094    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11095    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11096      # If it failed, the variable was not from the command line. Ignore it,
11097      # but warn the user (except for BASH, which is always set by the calling BASH).
11098      if test "xWHICH" != xBASH; then
11099        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11100$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11101      fi
11102      # Try to locate tool using the code snippet
11103      for ac_prog in which
11104do
11105  # Extract the first word of "$ac_prog", so it can be a program name with args.
11106set dummy $ac_prog; ac_word=$2
11107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11108$as_echo_n "checking for $ac_word... " >&6; }
11109if ${ac_cv_path_WHICH+:} false; then :
11110  $as_echo_n "(cached) " >&6
11111else
11112  case $WHICH in
11113  [\\/]* | ?:[\\/]*)
11114  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11115  ;;
11116  *)
11117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11118for as_dir in $PATH
11119do
11120  IFS=$as_save_IFS
11121  test -z "$as_dir" && as_dir=.
11122    for ac_exec_ext in '' $ac_executable_extensions; do
11123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11124    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11126    break 2
11127  fi
11128done
11129  done
11130IFS=$as_save_IFS
11131
11132  ;;
11133esac
11134fi
11135WHICH=$ac_cv_path_WHICH
11136if test -n "$WHICH"; then
11137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11138$as_echo "$WHICH" >&6; }
11139else
11140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11141$as_echo "no" >&6; }
11142fi
11143
11144
11145  test -n "$WHICH" && break
11146done
11147
11148    else
11149      # If it succeeded, then it was overridden by the user. We will use it
11150      # for the tool.
11151
11152      # First remove it from the list of overridden variables, so we can test
11153      # for unknown variables in the end.
11154      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11155
11156      # Check if the provided tool contains a complete path.
11157      tool_specified="$WHICH"
11158      tool_basename="${tool_specified##*/}"
11159      if test "x$tool_basename" = "x$tool_specified"; then
11160        # A command without a complete path is provided, search $PATH.
11161        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11162$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11163        # Extract the first word of "$tool_basename", so it can be a program name with args.
11164set dummy $tool_basename; ac_word=$2
11165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11166$as_echo_n "checking for $ac_word... " >&6; }
11167if ${ac_cv_path_WHICH+:} false; then :
11168  $as_echo_n "(cached) " >&6
11169else
11170  case $WHICH in
11171  [\\/]* | ?:[\\/]*)
11172  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11173  ;;
11174  *)
11175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11176for as_dir in $PATH
11177do
11178  IFS=$as_save_IFS
11179  test -z "$as_dir" && as_dir=.
11180    for ac_exec_ext in '' $ac_executable_extensions; do
11181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11182    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11184    break 2
11185  fi
11186done
11187  done
11188IFS=$as_save_IFS
11189
11190  ;;
11191esac
11192fi
11193WHICH=$ac_cv_path_WHICH
11194if test -n "$WHICH"; then
11195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11196$as_echo "$WHICH" >&6; }
11197else
11198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11199$as_echo "no" >&6; }
11200fi
11201
11202
11203        if test "x$WHICH" = x; then
11204          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11205        fi
11206      else
11207        # Otherwise we believe it is a complete path. Use it as it is.
11208        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11209$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11210        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11211$as_echo_n "checking for WHICH... " >&6; }
11212        if test ! -x "$tool_specified"; then
11213          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11214$as_echo "not found" >&6; }
11215          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11216        fi
11217        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11218$as_echo "$tool_specified" >&6; }
11219      fi
11220    fi
11221  fi
11222
11223
11224
11225  if test "x$WHICH" = x; then
11226    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11227  fi
11228
11229
11230
11231
11232
11233  # Publish this variable in the help.
11234
11235
11236  if test "x$XARGS" = x; then
11237    # The variable is not set by user, try to locate tool using the code snippet
11238    for ac_prog in xargs
11239do
11240  # Extract the first word of "$ac_prog", so it can be a program name with args.
11241set dummy $ac_prog; ac_word=$2
11242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11243$as_echo_n "checking for $ac_word... " >&6; }
11244if ${ac_cv_path_XARGS+:} false; then :
11245  $as_echo_n "(cached) " >&6
11246else
11247  case $XARGS in
11248  [\\/]* | ?:[\\/]*)
11249  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11250  ;;
11251  *)
11252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11253for as_dir in $PATH
11254do
11255  IFS=$as_save_IFS
11256  test -z "$as_dir" && as_dir=.
11257    for ac_exec_ext in '' $ac_executable_extensions; do
11258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11259    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11261    break 2
11262  fi
11263done
11264  done
11265IFS=$as_save_IFS
11266
11267  ;;
11268esac
11269fi
11270XARGS=$ac_cv_path_XARGS
11271if test -n "$XARGS"; then
11272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11273$as_echo "$XARGS" >&6; }
11274else
11275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11276$as_echo "no" >&6; }
11277fi
11278
11279
11280  test -n "$XARGS" && break
11281done
11282
11283  else
11284    # The variable is set, but is it from the command line or the environment?
11285
11286    # Try to remove the string !XARGS! from our list.
11287    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11288    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11289      # If it failed, the variable was not from the command line. Ignore it,
11290      # but warn the user (except for BASH, which is always set by the calling BASH).
11291      if test "xXARGS" != xBASH; then
11292        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11293$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11294      fi
11295      # Try to locate tool using the code snippet
11296      for ac_prog in xargs
11297do
11298  # Extract the first word of "$ac_prog", so it can be a program name with args.
11299set dummy $ac_prog; ac_word=$2
11300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11301$as_echo_n "checking for $ac_word... " >&6; }
11302if ${ac_cv_path_XARGS+:} false; then :
11303  $as_echo_n "(cached) " >&6
11304else
11305  case $XARGS in
11306  [\\/]* | ?:[\\/]*)
11307  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11308  ;;
11309  *)
11310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11311for as_dir in $PATH
11312do
11313  IFS=$as_save_IFS
11314  test -z "$as_dir" && as_dir=.
11315    for ac_exec_ext in '' $ac_executable_extensions; do
11316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11317    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11319    break 2
11320  fi
11321done
11322  done
11323IFS=$as_save_IFS
11324
11325  ;;
11326esac
11327fi
11328XARGS=$ac_cv_path_XARGS
11329if test -n "$XARGS"; then
11330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11331$as_echo "$XARGS" >&6; }
11332else
11333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11334$as_echo "no" >&6; }
11335fi
11336
11337
11338  test -n "$XARGS" && break
11339done
11340
11341    else
11342      # If it succeeded, then it was overridden by the user. We will use it
11343      # for the tool.
11344
11345      # First remove it from the list of overridden variables, so we can test
11346      # for unknown variables in the end.
11347      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11348
11349      # Check if the provided tool contains a complete path.
11350      tool_specified="$XARGS"
11351      tool_basename="${tool_specified##*/}"
11352      if test "x$tool_basename" = "x$tool_specified"; then
11353        # A command without a complete path is provided, search $PATH.
11354        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11355$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11356        # Extract the first word of "$tool_basename", so it can be a program name with args.
11357set dummy $tool_basename; ac_word=$2
11358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11359$as_echo_n "checking for $ac_word... " >&6; }
11360if ${ac_cv_path_XARGS+:} false; then :
11361  $as_echo_n "(cached) " >&6
11362else
11363  case $XARGS in
11364  [\\/]* | ?:[\\/]*)
11365  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11366  ;;
11367  *)
11368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11369for as_dir in $PATH
11370do
11371  IFS=$as_save_IFS
11372  test -z "$as_dir" && as_dir=.
11373    for ac_exec_ext in '' $ac_executable_extensions; do
11374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11375    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11377    break 2
11378  fi
11379done
11380  done
11381IFS=$as_save_IFS
11382
11383  ;;
11384esac
11385fi
11386XARGS=$ac_cv_path_XARGS
11387if test -n "$XARGS"; then
11388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11389$as_echo "$XARGS" >&6; }
11390else
11391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11392$as_echo "no" >&6; }
11393fi
11394
11395
11396        if test "x$XARGS" = x; then
11397          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11398        fi
11399      else
11400        # Otherwise we believe it is a complete path. Use it as it is.
11401        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11402$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11403        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11404$as_echo_n "checking for XARGS... " >&6; }
11405        if test ! -x "$tool_specified"; then
11406          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11407$as_echo "not found" >&6; }
11408          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11409        fi
11410        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11411$as_echo "$tool_specified" >&6; }
11412      fi
11413    fi
11414  fi
11415
11416
11417
11418  if test "x$XARGS" = x; then
11419    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11420  fi
11421
11422
11423
11424  # Then required tools that require some special treatment.
11425
11426
11427  # Publish this variable in the help.
11428
11429
11430  if test "x$AWK" = x; then
11431    # The variable is not set by user, try to locate tool using the code snippet
11432    for ac_prog in gawk mawk nawk awk
11433do
11434  # Extract the first word of "$ac_prog", so it can be a program name with args.
11435set dummy $ac_prog; ac_word=$2
11436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11437$as_echo_n "checking for $ac_word... " >&6; }
11438if ${ac_cv_prog_AWK+:} false; then :
11439  $as_echo_n "(cached) " >&6
11440else
11441  if test -n "$AWK"; then
11442  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11443else
11444as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11445for as_dir in $PATH
11446do
11447  IFS=$as_save_IFS
11448  test -z "$as_dir" && as_dir=.
11449    for ac_exec_ext in '' $ac_executable_extensions; do
11450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11451    ac_cv_prog_AWK="$ac_prog"
11452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11453    break 2
11454  fi
11455done
11456  done
11457IFS=$as_save_IFS
11458
11459fi
11460fi
11461AWK=$ac_cv_prog_AWK
11462if test -n "$AWK"; then
11463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11464$as_echo "$AWK" >&6; }
11465else
11466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11467$as_echo "no" >&6; }
11468fi
11469
11470
11471  test -n "$AWK" && break
11472done
11473
11474  else
11475    # The variable is set, but is it from the command line or the environment?
11476
11477    # Try to remove the string !AWK! from our list.
11478    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11479    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11480      # If it failed, the variable was not from the command line. Ignore it,
11481      # but warn the user (except for BASH, which is always set by the calling BASH).
11482      if test "xAWK" != xBASH; then
11483        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11484$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11485      fi
11486      # Try to locate tool using the code snippet
11487      for ac_prog in gawk mawk nawk awk
11488do
11489  # Extract the first word of "$ac_prog", so it can be a program name with args.
11490set dummy $ac_prog; ac_word=$2
11491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11492$as_echo_n "checking for $ac_word... " >&6; }
11493if ${ac_cv_prog_AWK+:} false; then :
11494  $as_echo_n "(cached) " >&6
11495else
11496  if test -n "$AWK"; then
11497  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11498else
11499as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11500for as_dir in $PATH
11501do
11502  IFS=$as_save_IFS
11503  test -z "$as_dir" && as_dir=.
11504    for ac_exec_ext in '' $ac_executable_extensions; do
11505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11506    ac_cv_prog_AWK="$ac_prog"
11507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11508    break 2
11509  fi
11510done
11511  done
11512IFS=$as_save_IFS
11513
11514fi
11515fi
11516AWK=$ac_cv_prog_AWK
11517if test -n "$AWK"; then
11518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11519$as_echo "$AWK" >&6; }
11520else
11521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11522$as_echo "no" >&6; }
11523fi
11524
11525
11526  test -n "$AWK" && break
11527done
11528
11529    else
11530      # If it succeeded, then it was overridden by the user. We will use it
11531      # for the tool.
11532
11533      # First remove it from the list of overridden variables, so we can test
11534      # for unknown variables in the end.
11535      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11536
11537      # Check if the provided tool contains a complete path.
11538      tool_specified="$AWK"
11539      tool_basename="${tool_specified##*/}"
11540      if test "x$tool_basename" = "x$tool_specified"; then
11541        # A command without a complete path is provided, search $PATH.
11542        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11543$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11544        # Extract the first word of "$tool_basename", so it can be a program name with args.
11545set dummy $tool_basename; ac_word=$2
11546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11547$as_echo_n "checking for $ac_word... " >&6; }
11548if ${ac_cv_path_AWK+:} false; then :
11549  $as_echo_n "(cached) " >&6
11550else
11551  case $AWK in
11552  [\\/]* | ?:[\\/]*)
11553  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11554  ;;
11555  *)
11556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11557for as_dir in $PATH
11558do
11559  IFS=$as_save_IFS
11560  test -z "$as_dir" && as_dir=.
11561    for ac_exec_ext in '' $ac_executable_extensions; do
11562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11563    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11565    break 2
11566  fi
11567done
11568  done
11569IFS=$as_save_IFS
11570
11571  ;;
11572esac
11573fi
11574AWK=$ac_cv_path_AWK
11575if test -n "$AWK"; then
11576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11577$as_echo "$AWK" >&6; }
11578else
11579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11580$as_echo "no" >&6; }
11581fi
11582
11583
11584        if test "x$AWK" = x; then
11585          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11586        fi
11587      else
11588        # Otherwise we believe it is a complete path. Use it as it is.
11589        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11590$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11591        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11592$as_echo_n "checking for AWK... " >&6; }
11593        if test ! -x "$tool_specified"; then
11594          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11595$as_echo "not found" >&6; }
11596          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11597        fi
11598        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11599$as_echo "$tool_specified" >&6; }
11600      fi
11601    fi
11602  fi
11603
11604
11605  if test "x$AWK" = x; then
11606    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11607  fi
11608
11609
11610
11611
11612  # Publish this variable in the help.
11613
11614
11615  if test "x$GREP" = x; then
11616    # The variable is not set by user, try to locate tool using the code snippet
11617    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11618$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11619if ${ac_cv_path_GREP+:} false; then :
11620  $as_echo_n "(cached) " >&6
11621else
11622  if test -z "$GREP"; then
11623  ac_path_GREP_found=false
11624  # Loop through the user's path and test for each of PROGNAME-LIST
11625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11626for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11627do
11628  IFS=$as_save_IFS
11629  test -z "$as_dir" && as_dir=.
11630    for ac_prog in grep ggrep; do
11631    for ac_exec_ext in '' $ac_executable_extensions; do
11632      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11633      as_fn_executable_p "$ac_path_GREP" || continue
11634# Check for GNU ac_path_GREP and select it if it is found.
11635  # Check for GNU $ac_path_GREP
11636case `"$ac_path_GREP" --version 2>&1` in
11637*GNU*)
11638  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11639*)
11640  ac_count=0
11641  $as_echo_n 0123456789 >"conftest.in"
11642  while :
11643  do
11644    cat "conftest.in" "conftest.in" >"conftest.tmp"
11645    mv "conftest.tmp" "conftest.in"
11646    cp "conftest.in" "conftest.nl"
11647    $as_echo 'GREP' >> "conftest.nl"
11648    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11649    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11650    as_fn_arith $ac_count + 1 && ac_count=$as_val
11651    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11652      # Best one so far, save it but keep looking for a better one
11653      ac_cv_path_GREP="$ac_path_GREP"
11654      ac_path_GREP_max=$ac_count
11655    fi
11656    # 10*(2^10) chars as input seems more than enough
11657    test $ac_count -gt 10 && break
11658  done
11659  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11660esac
11661
11662      $ac_path_GREP_found && break 3
11663    done
11664  done
11665  done
11666IFS=$as_save_IFS
11667  if test -z "$ac_cv_path_GREP"; then
11668    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11669  fi
11670else
11671  ac_cv_path_GREP=$GREP
11672fi
11673
11674fi
11675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11676$as_echo "$ac_cv_path_GREP" >&6; }
11677 GREP="$ac_cv_path_GREP"
11678
11679
11680  else
11681    # The variable is set, but is it from the command line or the environment?
11682
11683    # Try to remove the string !GREP! from our list.
11684    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11685    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11686      # If it failed, the variable was not from the command line. Ignore it,
11687      # but warn the user (except for BASH, which is always set by the calling BASH).
11688      if test "xGREP" != xBASH; then
11689        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11690$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11691      fi
11692      # Try to locate tool using the code snippet
11693      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11694$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11695if ${ac_cv_path_GREP+:} false; then :
11696  $as_echo_n "(cached) " >&6
11697else
11698  if test -z "$GREP"; then
11699  ac_path_GREP_found=false
11700  # Loop through the user's path and test for each of PROGNAME-LIST
11701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11702for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11703do
11704  IFS=$as_save_IFS
11705  test -z "$as_dir" && as_dir=.
11706    for ac_prog in grep ggrep; do
11707    for ac_exec_ext in '' $ac_executable_extensions; do
11708      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11709      as_fn_executable_p "$ac_path_GREP" || continue
11710# Check for GNU ac_path_GREP and select it if it is found.
11711  # Check for GNU $ac_path_GREP
11712case `"$ac_path_GREP" --version 2>&1` in
11713*GNU*)
11714  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11715*)
11716  ac_count=0
11717  $as_echo_n 0123456789 >"conftest.in"
11718  while :
11719  do
11720    cat "conftest.in" "conftest.in" >"conftest.tmp"
11721    mv "conftest.tmp" "conftest.in"
11722    cp "conftest.in" "conftest.nl"
11723    $as_echo 'GREP' >> "conftest.nl"
11724    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11725    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11726    as_fn_arith $ac_count + 1 && ac_count=$as_val
11727    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11728      # Best one so far, save it but keep looking for a better one
11729      ac_cv_path_GREP="$ac_path_GREP"
11730      ac_path_GREP_max=$ac_count
11731    fi
11732    # 10*(2^10) chars as input seems more than enough
11733    test $ac_count -gt 10 && break
11734  done
11735  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11736esac
11737
11738      $ac_path_GREP_found && break 3
11739    done
11740  done
11741  done
11742IFS=$as_save_IFS
11743  if test -z "$ac_cv_path_GREP"; then
11744    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11745  fi
11746else
11747  ac_cv_path_GREP=$GREP
11748fi
11749
11750fi
11751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11752$as_echo "$ac_cv_path_GREP" >&6; }
11753 GREP="$ac_cv_path_GREP"
11754
11755
11756    else
11757      # If it succeeded, then it was overridden by the user. We will use it
11758      # for the tool.
11759
11760      # First remove it from the list of overridden variables, so we can test
11761      # for unknown variables in the end.
11762      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11763
11764      # Check if the provided tool contains a complete path.
11765      tool_specified="$GREP"
11766      tool_basename="${tool_specified##*/}"
11767      if test "x$tool_basename" = "x$tool_specified"; then
11768        # A command without a complete path is provided, search $PATH.
11769        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11770$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11771        # Extract the first word of "$tool_basename", so it can be a program name with args.
11772set dummy $tool_basename; ac_word=$2
11773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11774$as_echo_n "checking for $ac_word... " >&6; }
11775if ${ac_cv_path_GREP+:} false; then :
11776  $as_echo_n "(cached) " >&6
11777else
11778  case $GREP in
11779  [\\/]* | ?:[\\/]*)
11780  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11781  ;;
11782  *)
11783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11784for as_dir in $PATH
11785do
11786  IFS=$as_save_IFS
11787  test -z "$as_dir" && as_dir=.
11788    for ac_exec_ext in '' $ac_executable_extensions; do
11789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11790    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11792    break 2
11793  fi
11794done
11795  done
11796IFS=$as_save_IFS
11797
11798  ;;
11799esac
11800fi
11801GREP=$ac_cv_path_GREP
11802if test -n "$GREP"; then
11803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11804$as_echo "$GREP" >&6; }
11805else
11806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11807$as_echo "no" >&6; }
11808fi
11809
11810
11811        if test "x$GREP" = x; then
11812          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11813        fi
11814      else
11815        # Otherwise we believe it is a complete path. Use it as it is.
11816        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11817$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11818        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11819$as_echo_n "checking for GREP... " >&6; }
11820        if test ! -x "$tool_specified"; then
11821          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11822$as_echo "not found" >&6; }
11823          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11824        fi
11825        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11826$as_echo "$tool_specified" >&6; }
11827      fi
11828    fi
11829  fi
11830
11831
11832  if test "x$GREP" = x; then
11833    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11834  fi
11835
11836
11837
11838
11839  # Publish this variable in the help.
11840
11841
11842  if test "x$EGREP" = x; then
11843    # The variable is not set by user, try to locate tool using the code snippet
11844    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11845$as_echo_n "checking for egrep... " >&6; }
11846if ${ac_cv_path_EGREP+:} false; then :
11847  $as_echo_n "(cached) " >&6
11848else
11849  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11850   then ac_cv_path_EGREP="$GREP -E"
11851   else
11852     if test -z "$EGREP"; then
11853  ac_path_EGREP_found=false
11854  # Loop through the user's path and test for each of PROGNAME-LIST
11855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11856for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11857do
11858  IFS=$as_save_IFS
11859  test -z "$as_dir" && as_dir=.
11860    for ac_prog in egrep; do
11861    for ac_exec_ext in '' $ac_executable_extensions; do
11862      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11863      as_fn_executable_p "$ac_path_EGREP" || continue
11864# Check for GNU ac_path_EGREP and select it if it is found.
11865  # Check for GNU $ac_path_EGREP
11866case `"$ac_path_EGREP" --version 2>&1` in
11867*GNU*)
11868  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11869*)
11870  ac_count=0
11871  $as_echo_n 0123456789 >"conftest.in"
11872  while :
11873  do
11874    cat "conftest.in" "conftest.in" >"conftest.tmp"
11875    mv "conftest.tmp" "conftest.in"
11876    cp "conftest.in" "conftest.nl"
11877    $as_echo 'EGREP' >> "conftest.nl"
11878    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11879    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11880    as_fn_arith $ac_count + 1 && ac_count=$as_val
11881    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11882      # Best one so far, save it but keep looking for a better one
11883      ac_cv_path_EGREP="$ac_path_EGREP"
11884      ac_path_EGREP_max=$ac_count
11885    fi
11886    # 10*(2^10) chars as input seems more than enough
11887    test $ac_count -gt 10 && break
11888  done
11889  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11890esac
11891
11892      $ac_path_EGREP_found && break 3
11893    done
11894  done
11895  done
11896IFS=$as_save_IFS
11897  if test -z "$ac_cv_path_EGREP"; then
11898    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11899  fi
11900else
11901  ac_cv_path_EGREP=$EGREP
11902fi
11903
11904   fi
11905fi
11906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11907$as_echo "$ac_cv_path_EGREP" >&6; }
11908 EGREP="$ac_cv_path_EGREP"
11909
11910
11911  else
11912    # The variable is set, but is it from the command line or the environment?
11913
11914    # Try to remove the string !EGREP! from our list.
11915    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11916    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11917      # If it failed, the variable was not from the command line. Ignore it,
11918      # but warn the user (except for BASH, which is always set by the calling BASH).
11919      if test "xEGREP" != xBASH; then
11920        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11921$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11922      fi
11923      # Try to locate tool using the code snippet
11924      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11925$as_echo_n "checking for egrep... " >&6; }
11926if ${ac_cv_path_EGREP+:} false; then :
11927  $as_echo_n "(cached) " >&6
11928else
11929  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11930   then ac_cv_path_EGREP="$GREP -E"
11931   else
11932     if test -z "$EGREP"; then
11933  ac_path_EGREP_found=false
11934  # Loop through the user's path and test for each of PROGNAME-LIST
11935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11936for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11937do
11938  IFS=$as_save_IFS
11939  test -z "$as_dir" && as_dir=.
11940    for ac_prog in egrep; do
11941    for ac_exec_ext in '' $ac_executable_extensions; do
11942      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11943      as_fn_executable_p "$ac_path_EGREP" || continue
11944# Check for GNU ac_path_EGREP and select it if it is found.
11945  # Check for GNU $ac_path_EGREP
11946case `"$ac_path_EGREP" --version 2>&1` in
11947*GNU*)
11948  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11949*)
11950  ac_count=0
11951  $as_echo_n 0123456789 >"conftest.in"
11952  while :
11953  do
11954    cat "conftest.in" "conftest.in" >"conftest.tmp"
11955    mv "conftest.tmp" "conftest.in"
11956    cp "conftest.in" "conftest.nl"
11957    $as_echo 'EGREP' >> "conftest.nl"
11958    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11959    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11960    as_fn_arith $ac_count + 1 && ac_count=$as_val
11961    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11962      # Best one so far, save it but keep looking for a better one
11963      ac_cv_path_EGREP="$ac_path_EGREP"
11964      ac_path_EGREP_max=$ac_count
11965    fi
11966    # 10*(2^10) chars as input seems more than enough
11967    test $ac_count -gt 10 && break
11968  done
11969  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11970esac
11971
11972      $ac_path_EGREP_found && break 3
11973    done
11974  done
11975  done
11976IFS=$as_save_IFS
11977  if test -z "$ac_cv_path_EGREP"; then
11978    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11979  fi
11980else
11981  ac_cv_path_EGREP=$EGREP
11982fi
11983
11984   fi
11985fi
11986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11987$as_echo "$ac_cv_path_EGREP" >&6; }
11988 EGREP="$ac_cv_path_EGREP"
11989
11990
11991    else
11992      # If it succeeded, then it was overridden by the user. We will use it
11993      # for the tool.
11994
11995      # First remove it from the list of overridden variables, so we can test
11996      # for unknown variables in the end.
11997      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11998
11999      # Check if the provided tool contains a complete path.
12000      tool_specified="$EGREP"
12001      tool_basename="${tool_specified##*/}"
12002      if test "x$tool_basename" = "x$tool_specified"; then
12003        # A command without a complete path is provided, search $PATH.
12004        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12005$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12006        # Extract the first word of "$tool_basename", so it can be a program name with args.
12007set dummy $tool_basename; ac_word=$2
12008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12009$as_echo_n "checking for $ac_word... " >&6; }
12010if ${ac_cv_path_EGREP+:} false; then :
12011  $as_echo_n "(cached) " >&6
12012else
12013  case $EGREP in
12014  [\\/]* | ?:[\\/]*)
12015  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12016  ;;
12017  *)
12018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12019for as_dir in $PATH
12020do
12021  IFS=$as_save_IFS
12022  test -z "$as_dir" && as_dir=.
12023    for ac_exec_ext in '' $ac_executable_extensions; do
12024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12025    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12027    break 2
12028  fi
12029done
12030  done
12031IFS=$as_save_IFS
12032
12033  ;;
12034esac
12035fi
12036EGREP=$ac_cv_path_EGREP
12037if test -n "$EGREP"; then
12038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12039$as_echo "$EGREP" >&6; }
12040else
12041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12042$as_echo "no" >&6; }
12043fi
12044
12045
12046        if test "x$EGREP" = x; then
12047          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12048        fi
12049      else
12050        # Otherwise we believe it is a complete path. Use it as it is.
12051        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12052$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12053        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12054$as_echo_n "checking for EGREP... " >&6; }
12055        if test ! -x "$tool_specified"; then
12056          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12057$as_echo "not found" >&6; }
12058          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12059        fi
12060        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12061$as_echo "$tool_specified" >&6; }
12062      fi
12063    fi
12064  fi
12065
12066
12067  if test "x$EGREP" = x; then
12068    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12069  fi
12070
12071
12072
12073
12074  # Publish this variable in the help.
12075
12076
12077  if test "x$FGREP" = x; then
12078    # The variable is not set by user, try to locate tool using the code snippet
12079    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12080$as_echo_n "checking for fgrep... " >&6; }
12081if ${ac_cv_path_FGREP+:} false; then :
12082  $as_echo_n "(cached) " >&6
12083else
12084  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12085   then ac_cv_path_FGREP="$GREP -F"
12086   else
12087     if test -z "$FGREP"; then
12088  ac_path_FGREP_found=false
12089  # Loop through the user's path and test for each of PROGNAME-LIST
12090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12091for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12092do
12093  IFS=$as_save_IFS
12094  test -z "$as_dir" && as_dir=.
12095    for ac_prog in fgrep; do
12096    for ac_exec_ext in '' $ac_executable_extensions; do
12097      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12098      as_fn_executable_p "$ac_path_FGREP" || continue
12099# Check for GNU ac_path_FGREP and select it if it is found.
12100  # Check for GNU $ac_path_FGREP
12101case `"$ac_path_FGREP" --version 2>&1` in
12102*GNU*)
12103  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12104*)
12105  ac_count=0
12106  $as_echo_n 0123456789 >"conftest.in"
12107  while :
12108  do
12109    cat "conftest.in" "conftest.in" >"conftest.tmp"
12110    mv "conftest.tmp" "conftest.in"
12111    cp "conftest.in" "conftest.nl"
12112    $as_echo 'FGREP' >> "conftest.nl"
12113    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12114    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12115    as_fn_arith $ac_count + 1 && ac_count=$as_val
12116    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12117      # Best one so far, save it but keep looking for a better one
12118      ac_cv_path_FGREP="$ac_path_FGREP"
12119      ac_path_FGREP_max=$ac_count
12120    fi
12121    # 10*(2^10) chars as input seems more than enough
12122    test $ac_count -gt 10 && break
12123  done
12124  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12125esac
12126
12127      $ac_path_FGREP_found && break 3
12128    done
12129  done
12130  done
12131IFS=$as_save_IFS
12132  if test -z "$ac_cv_path_FGREP"; then
12133    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12134  fi
12135else
12136  ac_cv_path_FGREP=$FGREP
12137fi
12138
12139   fi
12140fi
12141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12142$as_echo "$ac_cv_path_FGREP" >&6; }
12143 FGREP="$ac_cv_path_FGREP"
12144
12145
12146  else
12147    # The variable is set, but is it from the command line or the environment?
12148
12149    # Try to remove the string !FGREP! from our list.
12150    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12151    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12152      # If it failed, the variable was not from the command line. Ignore it,
12153      # but warn the user (except for BASH, which is always set by the calling BASH).
12154      if test "xFGREP" != xBASH; then
12155        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12156$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12157      fi
12158      # Try to locate tool using the code snippet
12159      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12160$as_echo_n "checking for fgrep... " >&6; }
12161if ${ac_cv_path_FGREP+:} false; then :
12162  $as_echo_n "(cached) " >&6
12163else
12164  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12165   then ac_cv_path_FGREP="$GREP -F"
12166   else
12167     if test -z "$FGREP"; then
12168  ac_path_FGREP_found=false
12169  # Loop through the user's path and test for each of PROGNAME-LIST
12170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12171for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12172do
12173  IFS=$as_save_IFS
12174  test -z "$as_dir" && as_dir=.
12175    for ac_prog in fgrep; do
12176    for ac_exec_ext in '' $ac_executable_extensions; do
12177      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12178      as_fn_executable_p "$ac_path_FGREP" || continue
12179# Check for GNU ac_path_FGREP and select it if it is found.
12180  # Check for GNU $ac_path_FGREP
12181case `"$ac_path_FGREP" --version 2>&1` in
12182*GNU*)
12183  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12184*)
12185  ac_count=0
12186  $as_echo_n 0123456789 >"conftest.in"
12187  while :
12188  do
12189    cat "conftest.in" "conftest.in" >"conftest.tmp"
12190    mv "conftest.tmp" "conftest.in"
12191    cp "conftest.in" "conftest.nl"
12192    $as_echo 'FGREP' >> "conftest.nl"
12193    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12194    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12195    as_fn_arith $ac_count + 1 && ac_count=$as_val
12196    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12197      # Best one so far, save it but keep looking for a better one
12198      ac_cv_path_FGREP="$ac_path_FGREP"
12199      ac_path_FGREP_max=$ac_count
12200    fi
12201    # 10*(2^10) chars as input seems more than enough
12202    test $ac_count -gt 10 && break
12203  done
12204  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12205esac
12206
12207      $ac_path_FGREP_found && break 3
12208    done
12209  done
12210  done
12211IFS=$as_save_IFS
12212  if test -z "$ac_cv_path_FGREP"; then
12213    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12214  fi
12215else
12216  ac_cv_path_FGREP=$FGREP
12217fi
12218
12219   fi
12220fi
12221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12222$as_echo "$ac_cv_path_FGREP" >&6; }
12223 FGREP="$ac_cv_path_FGREP"
12224
12225
12226    else
12227      # If it succeeded, then it was overridden by the user. We will use it
12228      # for the tool.
12229
12230      # First remove it from the list of overridden variables, so we can test
12231      # for unknown variables in the end.
12232      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12233
12234      # Check if the provided tool contains a complete path.
12235      tool_specified="$FGREP"
12236      tool_basename="${tool_specified##*/}"
12237      if test "x$tool_basename" = "x$tool_specified"; then
12238        # A command without a complete path is provided, search $PATH.
12239        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12240$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12241        # Extract the first word of "$tool_basename", so it can be a program name with args.
12242set dummy $tool_basename; ac_word=$2
12243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12244$as_echo_n "checking for $ac_word... " >&6; }
12245if ${ac_cv_path_FGREP+:} false; then :
12246  $as_echo_n "(cached) " >&6
12247else
12248  case $FGREP in
12249  [\\/]* | ?:[\\/]*)
12250  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12251  ;;
12252  *)
12253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12254for as_dir in $PATH
12255do
12256  IFS=$as_save_IFS
12257  test -z "$as_dir" && as_dir=.
12258    for ac_exec_ext in '' $ac_executable_extensions; do
12259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12260    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12262    break 2
12263  fi
12264done
12265  done
12266IFS=$as_save_IFS
12267
12268  ;;
12269esac
12270fi
12271FGREP=$ac_cv_path_FGREP
12272if test -n "$FGREP"; then
12273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12274$as_echo "$FGREP" >&6; }
12275else
12276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12277$as_echo "no" >&6; }
12278fi
12279
12280
12281        if test "x$FGREP" = x; then
12282          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12283        fi
12284      else
12285        # Otherwise we believe it is a complete path. Use it as it is.
12286        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12287$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12288        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12289$as_echo_n "checking for FGREP... " >&6; }
12290        if test ! -x "$tool_specified"; then
12291          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12292$as_echo "not found" >&6; }
12293          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12294        fi
12295        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12296$as_echo "$tool_specified" >&6; }
12297      fi
12298    fi
12299  fi
12300
12301
12302  if test "x$FGREP" = x; then
12303    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12304  fi
12305
12306
12307
12308
12309  # Publish this variable in the help.
12310
12311
12312  if test "x$SED" = x; then
12313    # The variable is not set by user, try to locate tool using the code snippet
12314    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12315$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12316if ${ac_cv_path_SED+:} false; then :
12317  $as_echo_n "(cached) " >&6
12318else
12319            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12320     for ac_i in 1 2 3 4 5 6 7; do
12321       ac_script="$ac_script$as_nl$ac_script"
12322     done
12323     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12324     { ac_script=; unset ac_script;}
12325     if test -z "$SED"; then
12326  ac_path_SED_found=false
12327  # Loop through the user's path and test for each of PROGNAME-LIST
12328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12329for as_dir in $PATH
12330do
12331  IFS=$as_save_IFS
12332  test -z "$as_dir" && as_dir=.
12333    for ac_prog in sed gsed; do
12334    for ac_exec_ext in '' $ac_executable_extensions; do
12335      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12336      as_fn_executable_p "$ac_path_SED" || continue
12337# Check for GNU ac_path_SED and select it if it is found.
12338  # Check for GNU $ac_path_SED
12339case `"$ac_path_SED" --version 2>&1` in
12340*GNU*)
12341  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12342*)
12343  ac_count=0
12344  $as_echo_n 0123456789 >"conftest.in"
12345  while :
12346  do
12347    cat "conftest.in" "conftest.in" >"conftest.tmp"
12348    mv "conftest.tmp" "conftest.in"
12349    cp "conftest.in" "conftest.nl"
12350    $as_echo '' >> "conftest.nl"
12351    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12352    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12353    as_fn_arith $ac_count + 1 && ac_count=$as_val
12354    if test $ac_count -gt ${ac_path_SED_max-0}; then
12355      # Best one so far, save it but keep looking for a better one
12356      ac_cv_path_SED="$ac_path_SED"
12357      ac_path_SED_max=$ac_count
12358    fi
12359    # 10*(2^10) chars as input seems more than enough
12360    test $ac_count -gt 10 && break
12361  done
12362  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12363esac
12364
12365      $ac_path_SED_found && break 3
12366    done
12367  done
12368  done
12369IFS=$as_save_IFS
12370  if test -z "$ac_cv_path_SED"; then
12371    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12372  fi
12373else
12374  ac_cv_path_SED=$SED
12375fi
12376
12377fi
12378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12379$as_echo "$ac_cv_path_SED" >&6; }
12380 SED="$ac_cv_path_SED"
12381  rm -f conftest.sed
12382
12383  else
12384    # The variable is set, but is it from the command line or the environment?
12385
12386    # Try to remove the string !SED! from our list.
12387    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12388    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12389      # If it failed, the variable was not from the command line. Ignore it,
12390      # but warn the user (except for BASH, which is always set by the calling BASH).
12391      if test "xSED" != xBASH; then
12392        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12393$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12394      fi
12395      # Try to locate tool using the code snippet
12396      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12397$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12398if ${ac_cv_path_SED+:} false; then :
12399  $as_echo_n "(cached) " >&6
12400else
12401            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12402     for ac_i in 1 2 3 4 5 6 7; do
12403       ac_script="$ac_script$as_nl$ac_script"
12404     done
12405     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12406     { ac_script=; unset ac_script;}
12407     if test -z "$SED"; then
12408  ac_path_SED_found=false
12409  # Loop through the user's path and test for each of PROGNAME-LIST
12410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12411for as_dir in $PATH
12412do
12413  IFS=$as_save_IFS
12414  test -z "$as_dir" && as_dir=.
12415    for ac_prog in sed gsed; do
12416    for ac_exec_ext in '' $ac_executable_extensions; do
12417      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12418      as_fn_executable_p "$ac_path_SED" || continue
12419# Check for GNU ac_path_SED and select it if it is found.
12420  # Check for GNU $ac_path_SED
12421case `"$ac_path_SED" --version 2>&1` in
12422*GNU*)
12423  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12424*)
12425  ac_count=0
12426  $as_echo_n 0123456789 >"conftest.in"
12427  while :
12428  do
12429    cat "conftest.in" "conftest.in" >"conftest.tmp"
12430    mv "conftest.tmp" "conftest.in"
12431    cp "conftest.in" "conftest.nl"
12432    $as_echo '' >> "conftest.nl"
12433    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12434    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12435    as_fn_arith $ac_count + 1 && ac_count=$as_val
12436    if test $ac_count -gt ${ac_path_SED_max-0}; then
12437      # Best one so far, save it but keep looking for a better one
12438      ac_cv_path_SED="$ac_path_SED"
12439      ac_path_SED_max=$ac_count
12440    fi
12441    # 10*(2^10) chars as input seems more than enough
12442    test $ac_count -gt 10 && break
12443  done
12444  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12445esac
12446
12447      $ac_path_SED_found && break 3
12448    done
12449  done
12450  done
12451IFS=$as_save_IFS
12452  if test -z "$ac_cv_path_SED"; then
12453    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12454  fi
12455else
12456  ac_cv_path_SED=$SED
12457fi
12458
12459fi
12460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12461$as_echo "$ac_cv_path_SED" >&6; }
12462 SED="$ac_cv_path_SED"
12463  rm -f conftest.sed
12464
12465    else
12466      # If it succeeded, then it was overridden by the user. We will use it
12467      # for the tool.
12468
12469      # First remove it from the list of overridden variables, so we can test
12470      # for unknown variables in the end.
12471      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12472
12473      # Check if the provided tool contains a complete path.
12474      tool_specified="$SED"
12475      tool_basename="${tool_specified##*/}"
12476      if test "x$tool_basename" = "x$tool_specified"; then
12477        # A command without a complete path is provided, search $PATH.
12478        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12479$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12480        # Extract the first word of "$tool_basename", so it can be a program name with args.
12481set dummy $tool_basename; ac_word=$2
12482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12483$as_echo_n "checking for $ac_word... " >&6; }
12484if ${ac_cv_path_SED+:} false; then :
12485  $as_echo_n "(cached) " >&6
12486else
12487  case $SED in
12488  [\\/]* | ?:[\\/]*)
12489  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12490  ;;
12491  *)
12492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12493for as_dir in $PATH
12494do
12495  IFS=$as_save_IFS
12496  test -z "$as_dir" && as_dir=.
12497    for ac_exec_ext in '' $ac_executable_extensions; do
12498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12499    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12501    break 2
12502  fi
12503done
12504  done
12505IFS=$as_save_IFS
12506
12507  ;;
12508esac
12509fi
12510SED=$ac_cv_path_SED
12511if test -n "$SED"; then
12512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12513$as_echo "$SED" >&6; }
12514else
12515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12516$as_echo "no" >&6; }
12517fi
12518
12519
12520        if test "x$SED" = x; then
12521          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12522        fi
12523      else
12524        # Otherwise we believe it is a complete path. Use it as it is.
12525        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12526$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12527        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12528$as_echo_n "checking for SED... " >&6; }
12529        if test ! -x "$tool_specified"; then
12530          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12531$as_echo "not found" >&6; }
12532          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12533        fi
12534        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12535$as_echo "$tool_specified" >&6; }
12536      fi
12537    fi
12538  fi
12539
12540
12541  if test "x$SED" = x; then
12542    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12543  fi
12544
12545
12546
12547  # Always force rm.
12548  RM="$RM -f"
12549
12550  # pwd behaves differently on various platforms and some don't support the -L flag.
12551  # Always use the bash builtin pwd to get uniform behavior.
12552  THEPWDCMD=pwd
12553
12554  # These are not required on all platforms
12555
12556
12557  # Publish this variable in the help.
12558
12559
12560  if test "x$CYGPATH" = x; then
12561    # The variable is not set by user, try to locate tool using the code snippet
12562    for ac_prog in cygpath
12563do
12564  # Extract the first word of "$ac_prog", so it can be a program name with args.
12565set dummy $ac_prog; ac_word=$2
12566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12567$as_echo_n "checking for $ac_word... " >&6; }
12568if ${ac_cv_path_CYGPATH+:} false; then :
12569  $as_echo_n "(cached) " >&6
12570else
12571  case $CYGPATH in
12572  [\\/]* | ?:[\\/]*)
12573  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12574  ;;
12575  *)
12576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12577for as_dir in $PATH
12578do
12579  IFS=$as_save_IFS
12580  test -z "$as_dir" && as_dir=.
12581    for ac_exec_ext in '' $ac_executable_extensions; do
12582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12583    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12585    break 2
12586  fi
12587done
12588  done
12589IFS=$as_save_IFS
12590
12591  ;;
12592esac
12593fi
12594CYGPATH=$ac_cv_path_CYGPATH
12595if test -n "$CYGPATH"; then
12596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12597$as_echo "$CYGPATH" >&6; }
12598else
12599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12600$as_echo "no" >&6; }
12601fi
12602
12603
12604  test -n "$CYGPATH" && break
12605done
12606
12607  else
12608    # The variable is set, but is it from the command line or the environment?
12609
12610    # Try to remove the string !CYGPATH! from our list.
12611    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12612    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12613      # If it failed, the variable was not from the command line. Ignore it,
12614      # but warn the user (except for BASH, which is always set by the calling BASH).
12615      if test "xCYGPATH" != xBASH; then
12616        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12617$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12618      fi
12619      # Try to locate tool using the code snippet
12620      for ac_prog in cygpath
12621do
12622  # Extract the first word of "$ac_prog", so it can be a program name with args.
12623set dummy $ac_prog; ac_word=$2
12624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12625$as_echo_n "checking for $ac_word... " >&6; }
12626if ${ac_cv_path_CYGPATH+:} false; then :
12627  $as_echo_n "(cached) " >&6
12628else
12629  case $CYGPATH in
12630  [\\/]* | ?:[\\/]*)
12631  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12632  ;;
12633  *)
12634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12635for as_dir in $PATH
12636do
12637  IFS=$as_save_IFS
12638  test -z "$as_dir" && as_dir=.
12639    for ac_exec_ext in '' $ac_executable_extensions; do
12640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12641    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12643    break 2
12644  fi
12645done
12646  done
12647IFS=$as_save_IFS
12648
12649  ;;
12650esac
12651fi
12652CYGPATH=$ac_cv_path_CYGPATH
12653if test -n "$CYGPATH"; then
12654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12655$as_echo "$CYGPATH" >&6; }
12656else
12657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12658$as_echo "no" >&6; }
12659fi
12660
12661
12662  test -n "$CYGPATH" && break
12663done
12664
12665    else
12666      # If it succeeded, then it was overridden by the user. We will use it
12667      # for the tool.
12668
12669      # First remove it from the list of overridden variables, so we can test
12670      # for unknown variables in the end.
12671      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12672
12673      # Check if the provided tool contains a complete path.
12674      tool_specified="$CYGPATH"
12675      tool_basename="${tool_specified##*/}"
12676      if test "x$tool_basename" = "x$tool_specified"; then
12677        # A command without a complete path is provided, search $PATH.
12678        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12679$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12680        # Extract the first word of "$tool_basename", so it can be a program name with args.
12681set dummy $tool_basename; ac_word=$2
12682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12683$as_echo_n "checking for $ac_word... " >&6; }
12684if ${ac_cv_path_CYGPATH+:} false; then :
12685  $as_echo_n "(cached) " >&6
12686else
12687  case $CYGPATH in
12688  [\\/]* | ?:[\\/]*)
12689  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12690  ;;
12691  *)
12692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12693for as_dir in $PATH
12694do
12695  IFS=$as_save_IFS
12696  test -z "$as_dir" && as_dir=.
12697    for ac_exec_ext in '' $ac_executable_extensions; do
12698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12699    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12701    break 2
12702  fi
12703done
12704  done
12705IFS=$as_save_IFS
12706
12707  ;;
12708esac
12709fi
12710CYGPATH=$ac_cv_path_CYGPATH
12711if test -n "$CYGPATH"; then
12712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12713$as_echo "$CYGPATH" >&6; }
12714else
12715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12716$as_echo "no" >&6; }
12717fi
12718
12719
12720        if test "x$CYGPATH" = x; then
12721          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12722        fi
12723      else
12724        # Otherwise we believe it is a complete path. Use it as it is.
12725        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12726$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12727        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12728$as_echo_n "checking for CYGPATH... " >&6; }
12729        if test ! -x "$tool_specified"; then
12730          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12731$as_echo "not found" >&6; }
12732          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12733        fi
12734        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12735$as_echo "$tool_specified" >&6; }
12736      fi
12737    fi
12738  fi
12739
12740
12741
12742
12743  # Publish this variable in the help.
12744
12745
12746  if test "x$READLINK" = x; then
12747    # The variable is not set by user, try to locate tool using the code snippet
12748    for ac_prog in greadlink readlink
12749do
12750  # Extract the first word of "$ac_prog", so it can be a program name with args.
12751set dummy $ac_prog; ac_word=$2
12752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12753$as_echo_n "checking for $ac_word... " >&6; }
12754if ${ac_cv_path_READLINK+:} false; then :
12755  $as_echo_n "(cached) " >&6
12756else
12757  case $READLINK in
12758  [\\/]* | ?:[\\/]*)
12759  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12760  ;;
12761  *)
12762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12763for as_dir in $PATH
12764do
12765  IFS=$as_save_IFS
12766  test -z "$as_dir" && as_dir=.
12767    for ac_exec_ext in '' $ac_executable_extensions; do
12768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12769    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12771    break 2
12772  fi
12773done
12774  done
12775IFS=$as_save_IFS
12776
12777  ;;
12778esac
12779fi
12780READLINK=$ac_cv_path_READLINK
12781if test -n "$READLINK"; then
12782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12783$as_echo "$READLINK" >&6; }
12784else
12785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12786$as_echo "no" >&6; }
12787fi
12788
12789
12790  test -n "$READLINK" && break
12791done
12792
12793  else
12794    # The variable is set, but is it from the command line or the environment?
12795
12796    # Try to remove the string !READLINK! from our list.
12797    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12798    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12799      # If it failed, the variable was not from the command line. Ignore it,
12800      # but warn the user (except for BASH, which is always set by the calling BASH).
12801      if test "xREADLINK" != xBASH; then
12802        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12803$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12804      fi
12805      # Try to locate tool using the code snippet
12806      for ac_prog in greadlink readlink
12807do
12808  # Extract the first word of "$ac_prog", so it can be a program name with args.
12809set dummy $ac_prog; ac_word=$2
12810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12811$as_echo_n "checking for $ac_word... " >&6; }
12812if ${ac_cv_path_READLINK+:} false; then :
12813  $as_echo_n "(cached) " >&6
12814else
12815  case $READLINK in
12816  [\\/]* | ?:[\\/]*)
12817  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12818  ;;
12819  *)
12820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12821for as_dir in $PATH
12822do
12823  IFS=$as_save_IFS
12824  test -z "$as_dir" && as_dir=.
12825    for ac_exec_ext in '' $ac_executable_extensions; do
12826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12827    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12829    break 2
12830  fi
12831done
12832  done
12833IFS=$as_save_IFS
12834
12835  ;;
12836esac
12837fi
12838READLINK=$ac_cv_path_READLINK
12839if test -n "$READLINK"; then
12840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12841$as_echo "$READLINK" >&6; }
12842else
12843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12844$as_echo "no" >&6; }
12845fi
12846
12847
12848  test -n "$READLINK" && break
12849done
12850
12851    else
12852      # If it succeeded, then it was overridden by the user. We will use it
12853      # for the tool.
12854
12855      # First remove it from the list of overridden variables, so we can test
12856      # for unknown variables in the end.
12857      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12858
12859      # Check if the provided tool contains a complete path.
12860      tool_specified="$READLINK"
12861      tool_basename="${tool_specified##*/}"
12862      if test "x$tool_basename" = "x$tool_specified"; then
12863        # A command without a complete path is provided, search $PATH.
12864        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12865$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12866        # Extract the first word of "$tool_basename", so it can be a program name with args.
12867set dummy $tool_basename; ac_word=$2
12868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12869$as_echo_n "checking for $ac_word... " >&6; }
12870if ${ac_cv_path_READLINK+:} false; then :
12871  $as_echo_n "(cached) " >&6
12872else
12873  case $READLINK in
12874  [\\/]* | ?:[\\/]*)
12875  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12876  ;;
12877  *)
12878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12879for as_dir in $PATH
12880do
12881  IFS=$as_save_IFS
12882  test -z "$as_dir" && as_dir=.
12883    for ac_exec_ext in '' $ac_executable_extensions; do
12884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12885    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12887    break 2
12888  fi
12889done
12890  done
12891IFS=$as_save_IFS
12892
12893  ;;
12894esac
12895fi
12896READLINK=$ac_cv_path_READLINK
12897if test -n "$READLINK"; then
12898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12899$as_echo "$READLINK" >&6; }
12900else
12901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12902$as_echo "no" >&6; }
12903fi
12904
12905
12906        if test "x$READLINK" = x; then
12907          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12908        fi
12909      else
12910        # Otherwise we believe it is a complete path. Use it as it is.
12911        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12912$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12913        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12914$as_echo_n "checking for READLINK... " >&6; }
12915        if test ! -x "$tool_specified"; then
12916          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12917$as_echo "not found" >&6; }
12918          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12919        fi
12920        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12921$as_echo "$tool_specified" >&6; }
12922      fi
12923    fi
12924  fi
12925
12926
12927
12928
12929  # Publish this variable in the help.
12930
12931
12932  if test "x$DF" = x; then
12933    # The variable is not set by user, try to locate tool using the code snippet
12934    for ac_prog in df
12935do
12936  # Extract the first word of "$ac_prog", so it can be a program name with args.
12937set dummy $ac_prog; ac_word=$2
12938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12939$as_echo_n "checking for $ac_word... " >&6; }
12940if ${ac_cv_path_DF+:} false; then :
12941  $as_echo_n "(cached) " >&6
12942else
12943  case $DF in
12944  [\\/]* | ?:[\\/]*)
12945  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12946  ;;
12947  *)
12948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12949for as_dir in $PATH
12950do
12951  IFS=$as_save_IFS
12952  test -z "$as_dir" && as_dir=.
12953    for ac_exec_ext in '' $ac_executable_extensions; do
12954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12955    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12957    break 2
12958  fi
12959done
12960  done
12961IFS=$as_save_IFS
12962
12963  ;;
12964esac
12965fi
12966DF=$ac_cv_path_DF
12967if test -n "$DF"; then
12968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12969$as_echo "$DF" >&6; }
12970else
12971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12972$as_echo "no" >&6; }
12973fi
12974
12975
12976  test -n "$DF" && break
12977done
12978
12979  else
12980    # The variable is set, but is it from the command line or the environment?
12981
12982    # Try to remove the string !DF! from our list.
12983    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12984    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12985      # If it failed, the variable was not from the command line. Ignore it,
12986      # but warn the user (except for BASH, which is always set by the calling BASH).
12987      if test "xDF" != xBASH; then
12988        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12989$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12990      fi
12991      # Try to locate tool using the code snippet
12992      for ac_prog in df
12993do
12994  # Extract the first word of "$ac_prog", so it can be a program name with args.
12995set dummy $ac_prog; ac_word=$2
12996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12997$as_echo_n "checking for $ac_word... " >&6; }
12998if ${ac_cv_path_DF+:} false; then :
12999  $as_echo_n "(cached) " >&6
13000else
13001  case $DF in
13002  [\\/]* | ?:[\\/]*)
13003  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13004  ;;
13005  *)
13006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13007for as_dir in $PATH
13008do
13009  IFS=$as_save_IFS
13010  test -z "$as_dir" && as_dir=.
13011    for ac_exec_ext in '' $ac_executable_extensions; do
13012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13013    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13015    break 2
13016  fi
13017done
13018  done
13019IFS=$as_save_IFS
13020
13021  ;;
13022esac
13023fi
13024DF=$ac_cv_path_DF
13025if test -n "$DF"; then
13026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13027$as_echo "$DF" >&6; }
13028else
13029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13030$as_echo "no" >&6; }
13031fi
13032
13033
13034  test -n "$DF" && break
13035done
13036
13037    else
13038      # If it succeeded, then it was overridden by the user. We will use it
13039      # for the tool.
13040
13041      # First remove it from the list of overridden variables, so we can test
13042      # for unknown variables in the end.
13043      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13044
13045      # Check if the provided tool contains a complete path.
13046      tool_specified="$DF"
13047      tool_basename="${tool_specified##*/}"
13048      if test "x$tool_basename" = "x$tool_specified"; then
13049        # A command without a complete path is provided, search $PATH.
13050        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13051$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13052        # Extract the first word of "$tool_basename", so it can be a program name with args.
13053set dummy $tool_basename; ac_word=$2
13054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13055$as_echo_n "checking for $ac_word... " >&6; }
13056if ${ac_cv_path_DF+:} false; then :
13057  $as_echo_n "(cached) " >&6
13058else
13059  case $DF in
13060  [\\/]* | ?:[\\/]*)
13061  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13062  ;;
13063  *)
13064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13065for as_dir in $PATH
13066do
13067  IFS=$as_save_IFS
13068  test -z "$as_dir" && as_dir=.
13069    for ac_exec_ext in '' $ac_executable_extensions; do
13070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13071    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13073    break 2
13074  fi
13075done
13076  done
13077IFS=$as_save_IFS
13078
13079  ;;
13080esac
13081fi
13082DF=$ac_cv_path_DF
13083if test -n "$DF"; then
13084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13085$as_echo "$DF" >&6; }
13086else
13087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13088$as_echo "no" >&6; }
13089fi
13090
13091
13092        if test "x$DF" = x; then
13093          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13094        fi
13095      else
13096        # Otherwise we believe it is a complete path. Use it as it is.
13097        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13098$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13099        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13100$as_echo_n "checking for DF... " >&6; }
13101        if test ! -x "$tool_specified"; then
13102          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13103$as_echo "not found" >&6; }
13104          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13105        fi
13106        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13107$as_echo "$tool_specified" >&6; }
13108      fi
13109    fi
13110  fi
13111
13112
13113
13114
13115  # Publish this variable in the help.
13116
13117
13118  if test "x$SETFILE" = x; then
13119    # The variable is not set by user, try to locate tool using the code snippet
13120    for ac_prog in SetFile
13121do
13122  # Extract the first word of "$ac_prog", so it can be a program name with args.
13123set dummy $ac_prog; ac_word=$2
13124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13125$as_echo_n "checking for $ac_word... " >&6; }
13126if ${ac_cv_path_SETFILE+:} false; then :
13127  $as_echo_n "(cached) " >&6
13128else
13129  case $SETFILE in
13130  [\\/]* | ?:[\\/]*)
13131  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13132  ;;
13133  *)
13134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13135for as_dir in $PATH
13136do
13137  IFS=$as_save_IFS
13138  test -z "$as_dir" && as_dir=.
13139    for ac_exec_ext in '' $ac_executable_extensions; do
13140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13141    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13143    break 2
13144  fi
13145done
13146  done
13147IFS=$as_save_IFS
13148
13149  ;;
13150esac
13151fi
13152SETFILE=$ac_cv_path_SETFILE
13153if test -n "$SETFILE"; then
13154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13155$as_echo "$SETFILE" >&6; }
13156else
13157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13158$as_echo "no" >&6; }
13159fi
13160
13161
13162  test -n "$SETFILE" && break
13163done
13164
13165  else
13166    # The variable is set, but is it from the command line or the environment?
13167
13168    # Try to remove the string !SETFILE! from our list.
13169    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13170    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13171      # If it failed, the variable was not from the command line. Ignore it,
13172      # but warn the user (except for BASH, which is always set by the calling BASH).
13173      if test "xSETFILE" != xBASH; then
13174        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13175$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13176      fi
13177      # Try to locate tool using the code snippet
13178      for ac_prog in SetFile
13179do
13180  # Extract the first word of "$ac_prog", so it can be a program name with args.
13181set dummy $ac_prog; ac_word=$2
13182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13183$as_echo_n "checking for $ac_word... " >&6; }
13184if ${ac_cv_path_SETFILE+:} false; then :
13185  $as_echo_n "(cached) " >&6
13186else
13187  case $SETFILE in
13188  [\\/]* | ?:[\\/]*)
13189  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13190  ;;
13191  *)
13192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13193for as_dir in $PATH
13194do
13195  IFS=$as_save_IFS
13196  test -z "$as_dir" && as_dir=.
13197    for ac_exec_ext in '' $ac_executable_extensions; do
13198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13199    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13201    break 2
13202  fi
13203done
13204  done
13205IFS=$as_save_IFS
13206
13207  ;;
13208esac
13209fi
13210SETFILE=$ac_cv_path_SETFILE
13211if test -n "$SETFILE"; then
13212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13213$as_echo "$SETFILE" >&6; }
13214else
13215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13216$as_echo "no" >&6; }
13217fi
13218
13219
13220  test -n "$SETFILE" && break
13221done
13222
13223    else
13224      # If it succeeded, then it was overridden by the user. We will use it
13225      # for the tool.
13226
13227      # First remove it from the list of overridden variables, so we can test
13228      # for unknown variables in the end.
13229      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13230
13231      # Check if the provided tool contains a complete path.
13232      tool_specified="$SETFILE"
13233      tool_basename="${tool_specified##*/}"
13234      if test "x$tool_basename" = "x$tool_specified"; then
13235        # A command without a complete path is provided, search $PATH.
13236        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13237$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13238        # Extract the first word of "$tool_basename", so it can be a program name with args.
13239set dummy $tool_basename; ac_word=$2
13240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13241$as_echo_n "checking for $ac_word... " >&6; }
13242if ${ac_cv_path_SETFILE+:} false; then :
13243  $as_echo_n "(cached) " >&6
13244else
13245  case $SETFILE in
13246  [\\/]* | ?:[\\/]*)
13247  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13248  ;;
13249  *)
13250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13251for as_dir in $PATH
13252do
13253  IFS=$as_save_IFS
13254  test -z "$as_dir" && as_dir=.
13255    for ac_exec_ext in '' $ac_executable_extensions; do
13256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13257    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13259    break 2
13260  fi
13261done
13262  done
13263IFS=$as_save_IFS
13264
13265  ;;
13266esac
13267fi
13268SETFILE=$ac_cv_path_SETFILE
13269if test -n "$SETFILE"; then
13270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13271$as_echo "$SETFILE" >&6; }
13272else
13273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13274$as_echo "no" >&6; }
13275fi
13276
13277
13278        if test "x$SETFILE" = x; then
13279          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13280        fi
13281      else
13282        # Otherwise we believe it is a complete path. Use it as it is.
13283        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13284$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13285        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13286$as_echo_n "checking for SETFILE... " >&6; }
13287        if test ! -x "$tool_specified"; then
13288          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13289$as_echo "not found" >&6; }
13290          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13291        fi
13292        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13293$as_echo "$tool_specified" >&6; }
13294      fi
13295    fi
13296  fi
13297
13298
13299
13300
13301# Now we can determine OpenJDK build and target platforms. This is required to
13302# have early on.
13303# Make sure we can run config.sub.
13304$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13305  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13306
13307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13308$as_echo_n "checking build system type... " >&6; }
13309if ${ac_cv_build+:} false; then :
13310  $as_echo_n "(cached) " >&6
13311else
13312  ac_build_alias=$build_alias
13313test "x$ac_build_alias" = x &&
13314  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13315test "x$ac_build_alias" = x &&
13316  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13317ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13318  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13319
13320fi
13321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13322$as_echo "$ac_cv_build" >&6; }
13323case $ac_cv_build in
13324*-*-*) ;;
13325*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13326esac
13327build=$ac_cv_build
13328ac_save_IFS=$IFS; IFS='-'
13329set x $ac_cv_build
13330shift
13331build_cpu=$1
13332build_vendor=$2
13333shift; shift
13334# Remember, the first character of IFS is used to create $*,
13335# except with old shells:
13336build_os=$*
13337IFS=$ac_save_IFS
13338case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13339
13340
13341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13342$as_echo_n "checking host system type... " >&6; }
13343if ${ac_cv_host+:} false; then :
13344  $as_echo_n "(cached) " >&6
13345else
13346  if test "x$host_alias" = x; then
13347  ac_cv_host=$ac_cv_build
13348else
13349  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13350    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13351fi
13352
13353fi
13354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13355$as_echo "$ac_cv_host" >&6; }
13356case $ac_cv_host in
13357*-*-*) ;;
13358*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13359esac
13360host=$ac_cv_host
13361ac_save_IFS=$IFS; IFS='-'
13362set x $ac_cv_host
13363shift
13364host_cpu=$1
13365host_vendor=$2
13366shift; shift
13367# Remember, the first character of IFS is used to create $*,
13368# except with old shells:
13369host_os=$*
13370IFS=$ac_save_IFS
13371case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13372
13373
13374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13375$as_echo_n "checking target system type... " >&6; }
13376if ${ac_cv_target+:} false; then :
13377  $as_echo_n "(cached) " >&6
13378else
13379  if test "x$target_alias" = x; then
13380  ac_cv_target=$ac_cv_host
13381else
13382  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13383    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13384fi
13385
13386fi
13387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13388$as_echo "$ac_cv_target" >&6; }
13389case $ac_cv_target in
13390*-*-*) ;;
13391*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13392esac
13393target=$ac_cv_target
13394ac_save_IFS=$IFS; IFS='-'
13395set x $ac_cv_target
13396shift
13397target_cpu=$1
13398target_vendor=$2
13399shift; shift
13400# Remember, the first character of IFS is used to create $*,
13401# except with old shells:
13402target_os=$*
13403IFS=$ac_save_IFS
13404case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13405
13406
13407# The aliases save the names the user supplied, while $host etc.
13408# will get canonicalized.
13409test -n "$target_alias" &&
13410  test "$program_prefix$program_suffix$program_transform_name" = \
13411    NONENONEs,x,x, &&
13412  program_prefix=${target_alias}-
13413
13414  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13415  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13416  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13417  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13418  # to use the configure naming style.
13419
13420
13421
13422
13423
13424  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13425  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13426  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13427  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13428  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13429  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13430
13431
13432
13433  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13434
13435  case "$build_os" in
13436    *linux*)
13437      VAR_OS=linux
13438      VAR_OS_API=posix
13439      VAR_OS_ENV=linux
13440      ;;
13441    *solaris*)
13442      VAR_OS=solaris
13443      VAR_OS_API=posix
13444      VAR_OS_ENV=solaris
13445      ;;
13446    *darwin*)
13447      VAR_OS=macosx
13448      VAR_OS_API=posix
13449      VAR_OS_ENV=macosx
13450      ;;
13451    *bsd*)
13452      VAR_OS=bsd
13453      VAR_OS_API=posix
13454      VAR_OS_ENV=bsd
13455      ;;
13456    *cygwin*)
13457      VAR_OS=windows
13458      VAR_OS_API=winapi
13459      VAR_OS_ENV=windows.cygwin
13460      ;;
13461    *mingw*)
13462      VAR_OS=windows
13463      VAR_OS_API=winapi
13464      VAR_OS_ENV=windows.msys
13465      ;;
13466    *aix*)
13467      VAR_OS=aix
13468      VAR_OS_API=posix
13469      VAR_OS_ENV=aix
13470      ;;
13471    *)
13472      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13473      ;;
13474  esac
13475
13476
13477  # First argument is the cpu name from the trip/quad
13478  case "$build_cpu" in
13479    x86_64)
13480      VAR_CPU=x86_64
13481      VAR_CPU_ARCH=x86
13482      VAR_CPU_BITS=64
13483      VAR_CPU_ENDIAN=little
13484      ;;
13485    i?86)
13486      VAR_CPU=x86
13487      VAR_CPU_ARCH=x86
13488      VAR_CPU_BITS=32
13489      VAR_CPU_ENDIAN=little
13490      ;;
13491    arm*)
13492      VAR_CPU=arm
13493      VAR_CPU_ARCH=arm
13494      VAR_CPU_BITS=32
13495      VAR_CPU_ENDIAN=little
13496      ;;
13497    powerpc)
13498      VAR_CPU=ppc
13499      VAR_CPU_ARCH=ppc
13500      VAR_CPU_BITS=32
13501      VAR_CPU_ENDIAN=big
13502      ;;
13503    powerpc64)
13504      VAR_CPU=ppc64
13505      VAR_CPU_ARCH=ppc
13506      VAR_CPU_BITS=64
13507      VAR_CPU_ENDIAN=big
13508      ;;
13509    s390)
13510      VAR_CPU=s390
13511      VAR_CPU_ARCH=s390
13512      VAR_CPU_BITS=32
13513      VAR_CPU_ENDIAN=big
13514      ;;
13515    s390x)
13516      VAR_CPU=s390x
13517      VAR_CPU_ARCH=s390
13518      VAR_CPU_BITS=64
13519      VAR_CPU_ENDIAN=big
13520      ;;
13521    sparc)
13522      VAR_CPU=sparc
13523      VAR_CPU_ARCH=sparc
13524      VAR_CPU_BITS=32
13525      VAR_CPU_ENDIAN=big
13526      ;;
13527    sparcv9)
13528      VAR_CPU=sparcv9
13529      VAR_CPU_ARCH=sparc
13530      VAR_CPU_BITS=64
13531      VAR_CPU_ENDIAN=big
13532      ;;
13533    *)
13534      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13535      ;;
13536  esac
13537
13538  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13539  OPENJDK_BUILD_OS="$VAR_OS"
13540  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13541  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13542  OPENJDK_BUILD_CPU="$VAR_CPU"
13543  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13544  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13545  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13546
13547
13548
13549
13550
13551
13552
13553  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13554$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13556$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13557
13558  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13559
13560  case "$host_os" in
13561    *linux*)
13562      VAR_OS=linux
13563      VAR_OS_API=posix
13564      VAR_OS_ENV=linux
13565      ;;
13566    *solaris*)
13567      VAR_OS=solaris
13568      VAR_OS_API=posix
13569      VAR_OS_ENV=solaris
13570      ;;
13571    *darwin*)
13572      VAR_OS=macosx
13573      VAR_OS_API=posix
13574      VAR_OS_ENV=macosx
13575      ;;
13576    *bsd*)
13577      VAR_OS=bsd
13578      VAR_OS_API=posix
13579      VAR_OS_ENV=bsd
13580      ;;
13581    *cygwin*)
13582      VAR_OS=windows
13583      VAR_OS_API=winapi
13584      VAR_OS_ENV=windows.cygwin
13585      ;;
13586    *mingw*)
13587      VAR_OS=windows
13588      VAR_OS_API=winapi
13589      VAR_OS_ENV=windows.msys
13590      ;;
13591    *aix*)
13592      VAR_OS=aix
13593      VAR_OS_API=posix
13594      VAR_OS_ENV=aix
13595      ;;
13596    *)
13597      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13598      ;;
13599  esac
13600
13601
13602  # First argument is the cpu name from the trip/quad
13603  case "$host_cpu" in
13604    x86_64)
13605      VAR_CPU=x86_64
13606      VAR_CPU_ARCH=x86
13607      VAR_CPU_BITS=64
13608      VAR_CPU_ENDIAN=little
13609      ;;
13610    i?86)
13611      VAR_CPU=x86
13612      VAR_CPU_ARCH=x86
13613      VAR_CPU_BITS=32
13614      VAR_CPU_ENDIAN=little
13615      ;;
13616    arm*)
13617      VAR_CPU=arm
13618      VAR_CPU_ARCH=arm
13619      VAR_CPU_BITS=32
13620      VAR_CPU_ENDIAN=little
13621      ;;
13622    powerpc)
13623      VAR_CPU=ppc
13624      VAR_CPU_ARCH=ppc
13625      VAR_CPU_BITS=32
13626      VAR_CPU_ENDIAN=big
13627      ;;
13628    powerpc64)
13629      VAR_CPU=ppc64
13630      VAR_CPU_ARCH=ppc
13631      VAR_CPU_BITS=64
13632      VAR_CPU_ENDIAN=big
13633      ;;
13634    s390)
13635      VAR_CPU=s390
13636      VAR_CPU_ARCH=s390
13637      VAR_CPU_BITS=32
13638      VAR_CPU_ENDIAN=big
13639      ;;
13640    s390x)
13641      VAR_CPU=s390x
13642      VAR_CPU_ARCH=s390
13643      VAR_CPU_BITS=64
13644      VAR_CPU_ENDIAN=big
13645      ;;
13646    sparc)
13647      VAR_CPU=sparc
13648      VAR_CPU_ARCH=sparc
13649      VAR_CPU_BITS=32
13650      VAR_CPU_ENDIAN=big
13651      ;;
13652    sparcv9)
13653      VAR_CPU=sparcv9
13654      VAR_CPU_ARCH=sparc
13655      VAR_CPU_BITS=64
13656      VAR_CPU_ENDIAN=big
13657      ;;
13658    *)
13659      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13660      ;;
13661  esac
13662
13663  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13664  OPENJDK_TARGET_OS="$VAR_OS"
13665  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13666  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13667  OPENJDK_TARGET_CPU="$VAR_CPU"
13668  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13669  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13670  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13671
13672
13673
13674
13675
13676
13677
13678  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13679$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13681$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13682
13683
13684
13685# Check whether --with-target-bits was given.
13686if test "${with_target_bits+set}" = set; then :
13687  withval=$with_target_bits;
13688fi
13689
13690
13691  # We have three types of compiles:
13692  # native  == normal compilation, target system == build system
13693  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13694  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13695  #
13696  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13697    # We're doing a proper cross-compilation
13698    COMPILE_TYPE="cross"
13699  else
13700    COMPILE_TYPE="native"
13701  fi
13702
13703  if test "x$with_target_bits" != x; then
13704    if test "x$COMPILE_TYPE" = "xcross"; then
13705      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13706    fi
13707
13708    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13709      # A reduced build is requested
13710      COMPILE_TYPE="reduced"
13711      OPENJDK_TARGET_CPU_BITS=32
13712      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13713        OPENJDK_TARGET_CPU=x86
13714      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13715        OPENJDK_TARGET_CPU=sparc
13716      else
13717        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13718      fi
13719    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13720      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
13721    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13722      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13723$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13724    else
13725      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13726    fi
13727  fi
13728
13729
13730  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13731$as_echo_n "checking compilation type... " >&6; }
13732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13733$as_echo "$COMPILE_TYPE" >&6; }
13734
13735
13736  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13737    REQUIRED_OS_NAME=SunOS
13738    REQUIRED_OS_VERSION=5.10
13739  fi
13740  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13741    REQUIRED_OS_NAME=Linux
13742    REQUIRED_OS_VERSION=2.6
13743  fi
13744  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13745    REQUIRED_OS_NAME=Windows
13746    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13747      REQUIRED_OS_VERSION=5.2
13748    else
13749      REQUIRED_OS_VERSION=5.1
13750    fi
13751  fi
13752  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13753    REQUIRED_OS_NAME=Darwin
13754    REQUIRED_OS_VERSION=11.2
13755  fi
13756
13757
13758
13759
13760
13761  # Also store the legacy naming of the cpu.
13762  # Ie i586 and amd64 instead of x86 and x86_64
13763  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13764  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13765    OPENJDK_TARGET_CPU_LEGACY="i586"
13766  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13767    # On all platforms except MacOSX replace x86_64 with amd64.
13768    OPENJDK_TARGET_CPU_LEGACY="amd64"
13769  fi
13770
13771
13772  # And the second legacy naming of the cpu.
13773  # Ie i386 and amd64 instead of x86 and x86_64.
13774  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13775  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13776    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13777  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13778    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13779  fi
13780
13781
13782  # This is the name of the cpu (but using i386 and amd64 instead of
13783  # x86 and x86_64, respectively), preceeded by a /, to be used when
13784  # locating libraries. On macosx, it's empty, though.
13785  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13786  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13787    OPENJDK_TARGET_CPU_LIBDIR=""
13788  fi
13789
13790
13791  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13792  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13793  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13794  OPENJDK_TARGET_CPU_ISADIR=""
13795  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13796    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13797      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13798    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13799      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13800    fi
13801  fi
13802
13803
13804  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13805  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13806  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13807    # On linux only, we replace x86 with i386.
13808    OPENJDK_TARGET_CPU_OSARCH="i386"
13809  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13810    # On all platforms except macosx, we replace x86_64 with amd64.
13811    OPENJDK_TARGET_CPU_OSARCH="amd64"
13812  fi
13813
13814
13815  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13816  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13817    OPENJDK_TARGET_CPU_JLI="i386"
13818  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13819    # On all platforms except macosx, we replace x86_64 with amd64.
13820    OPENJDK_TARGET_CPU_JLI="amd64"
13821  fi
13822  # Now setup the -D flags for building libjli.
13823  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13824  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13825    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13826      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13827    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13828      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13829    fi
13830  fi
13831
13832
13833  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13834  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13835    OPENJDK_TARGET_OS_API_DIR="solaris"
13836  fi
13837  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13838    OPENJDK_TARGET_OS_API_DIR="windows"
13839  fi
13840
13841
13842  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13843      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13844  else
13845      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13846  fi
13847
13848
13849  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13850    A_LP64="LP64:="
13851    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13852    # unpack200.exe
13853    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13854      ADD_LP64="-D_LP64=1"
13855    fi
13856  fi
13857  LP64=$A_LP64
13858
13859
13860  if test "x$COMPILE_TYPE" = "xcross"; then
13861    # FIXME: ... or should this include reduced builds..?
13862    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13863  else
13864    DEFINE_CROSS_COMPILE_ARCH=""
13865  fi
13866
13867
13868  # ZERO_ARCHDEF is used to enable architecture-specific code
13869  case "${OPENJDK_TARGET_CPU}" in
13870    ppc*)    ZERO_ARCHDEF=PPC   ;;
13871    s390*)   ZERO_ARCHDEF=S390  ;;
13872    sparc*)  ZERO_ARCHDEF=SPARC ;;
13873    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13874    x86)     ZERO_ARCHDEF=IA32  ;;
13875    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13876  esac
13877
13878
13879
13880
13881# Continue setting up basic stuff. Most remaining code require fundamental tools.
13882
13883  # Save the current directory this script was started from
13884  CURDIR="$PWD"
13885
13886  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13887    PATH_SEP=";"
13888
13889  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13890  if test $SRC_ROOT_LENGTH -gt 100; then
13891    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13892  fi
13893
13894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13895    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13896$as_echo_n "checking cygwin release... " >&6; }
13897    CYGWIN_VERSION=`$UNAME -r`
13898    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13899$as_echo "$CYGWIN_VERSION" >&6; }
13900    WINDOWS_ENV_VENDOR='cygwin'
13901    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13902
13903    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
13904    if test "x$CYGWIN_VERSION_OK" = x; then
13905      { $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
13906$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;}
13907      as_fn_error $? "Cannot continue" "$LINENO" 5
13908    fi
13909    if test "x$CYGPATH" = x; then
13910      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13911    fi
13912    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13913$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13914    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13915    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13916    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13917    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13918    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13919$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13920    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13921    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13922    if test "x$test_cygdrive_prefix" = x; then
13923      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13924    fi
13925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13926    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13927$as_echo_n "checking msys release... " >&6; }
13928    MSYS_VERSION=`$UNAME -r`
13929    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13930$as_echo "$MSYS_VERSION" >&6; }
13931
13932    WINDOWS_ENV_VENDOR='msys'
13933    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13934
13935    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13936$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13937    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13938    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13939
13940  windows_path="$MSYS_ROOT_PATH"
13941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13942    unix_path=`$CYGPATH -u "$windows_path"`
13943    MSYS_ROOT_PATH="$unix_path"
13944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13946    MSYS_ROOT_PATH="$unix_path"
13947  fi
13948
13949    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13950$as_echo "$MSYS_ROOT_PATH" >&6; }
13951    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13952  else
13953    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13954  fi
13955
13956  # Test if windows or unix (cygwin/msys) find is first in path.
13957  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13958$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13959  FIND_BINARY_OUTPUT=`find --version 2>&1`
13960  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13961    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13962$as_echo "unix style" >&6; }
13963  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
13964    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
13965$as_echo "Windows" >&6; }
13966    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
13967$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
13968    { $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
13969$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
13970    as_fn_error $? "Cannot continue" "$LINENO" 5
13971  else
13972    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
13973$as_echo "unknown" >&6; }
13974    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
13975$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
13976  fi
13977
13978  else
13979    PATH_SEP=":"
13980  fi
13981
13982
13983  # We get the top-level directory from the supporting wrappers.
13984  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
13985$as_echo_n "checking for top-level directory... " >&6; }
13986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
13987$as_echo "$TOPDIR" >&6; }
13988
13989
13990  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
13991
13992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13993
13994  # Input might be given as Windows format, start by converting to
13995  # unix format.
13996  path="$CURDIR"
13997  new_path=`$CYGPATH -u "$path"`
13998
13999  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14000  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14001  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14002  # "foo.exe" is OK but "foo" is an error.
14003  #
14004  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14005  # It is also a way to make sure we got the proper file name for the real test later on.
14006  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14007  if test "x$test_shortpath" = x; then
14008    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14009$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14010    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14011  fi
14012
14013  # Call helper function which possibly converts this using DOS-style short mode.
14014  # If so, the updated path is stored in $new_path.
14015
14016  input_path="$new_path"
14017  # Check if we need to convert this using DOS-style short mode. If the path
14018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14019  # take no chances and rewrite it.
14020  # Note: m4 eats our [], so we need to use [ and ] instead.
14021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14022  if test "x$has_forbidden_chars" != x; then
14023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14024    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14025    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14026    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14027      # Going to short mode and back again did indeed matter. Since short mode is
14028      # case insensitive, let's make it lowercase to improve readability.
14029      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14030      # Now convert it back to Unix-stile (cygpath)
14031      input_path=`$CYGPATH -u "$shortmode_path"`
14032      new_path="$input_path"
14033    fi
14034  fi
14035
14036  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14037  if test "x$test_cygdrive_prefix" = x; then
14038    # As a simple fix, exclude /usr/bin since it's not a real path.
14039    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14040      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14041      # a path prefixed by /cygdrive for fixpath to work.
14042      new_path="$CYGWIN_ROOT_PATH$input_path"
14043    fi
14044  fi
14045
14046
14047  if test "x$path" != "x$new_path"; then
14048    CURDIR="$new_path"
14049    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14050$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14051  fi
14052
14053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14054
14055  path="$CURDIR"
14056  has_colon=`$ECHO $path | $GREP ^.:`
14057  new_path="$path"
14058  if test "x$has_colon" = x; then
14059    # Not in mixed or Windows style, start by that.
14060    new_path=`cmd //c echo $path`
14061  fi
14062
14063
14064  input_path="$new_path"
14065  # Check if we need to convert this using DOS-style short mode. If the path
14066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14067  # take no chances and rewrite it.
14068  # Note: m4 eats our [], so we need to use [ and ] instead.
14069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14070  if test "x$has_forbidden_chars" != x; then
14071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14072    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14073  fi
14074
14075
14076  windows_path="$new_path"
14077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14078    unix_path=`$CYGPATH -u "$windows_path"`
14079    new_path="$unix_path"
14080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14082    new_path="$unix_path"
14083  fi
14084
14085  if test "x$path" != "x$new_path"; then
14086    CURDIR="$new_path"
14087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14088$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14089  fi
14090
14091  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14092  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14093
14094  else
14095    # We're on a posix platform. Hooray! :)
14096    path="$CURDIR"
14097    has_space=`$ECHO "$path" | $GREP " "`
14098    if test "x$has_space" != x; then
14099      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14100$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14101      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14102    fi
14103
14104    # Use eval to expand a potential ~
14105    eval path="$path"
14106    if test ! -f "$path" && test ! -d "$path"; then
14107      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14108    fi
14109
14110    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14111  fi
14112
14113
14114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14115
14116  # Input might be given as Windows format, start by converting to
14117  # unix format.
14118  path="$TOPDIR"
14119  new_path=`$CYGPATH -u "$path"`
14120
14121  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14122  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14123  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14124  # "foo.exe" is OK but "foo" is an error.
14125  #
14126  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14127  # It is also a way to make sure we got the proper file name for the real test later on.
14128  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14129  if test "x$test_shortpath" = x; then
14130    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14131$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14132    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14133  fi
14134
14135  # Call helper function which possibly converts this using DOS-style short mode.
14136  # If so, the updated path is stored in $new_path.
14137
14138  input_path="$new_path"
14139  # Check if we need to convert this using DOS-style short mode. If the path
14140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14141  # take no chances and rewrite it.
14142  # Note: m4 eats our [], so we need to use [ and ] instead.
14143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14144  if test "x$has_forbidden_chars" != x; then
14145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14146    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14147    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14148    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14149      # Going to short mode and back again did indeed matter. Since short mode is
14150      # case insensitive, let's make it lowercase to improve readability.
14151      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14152      # Now convert it back to Unix-stile (cygpath)
14153      input_path=`$CYGPATH -u "$shortmode_path"`
14154      new_path="$input_path"
14155    fi
14156  fi
14157
14158  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14159  if test "x$test_cygdrive_prefix" = x; then
14160    # As a simple fix, exclude /usr/bin since it's not a real path.
14161    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14162      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14163      # a path prefixed by /cygdrive for fixpath to work.
14164      new_path="$CYGWIN_ROOT_PATH$input_path"
14165    fi
14166  fi
14167
14168
14169  if test "x$path" != "x$new_path"; then
14170    TOPDIR="$new_path"
14171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14172$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14173  fi
14174
14175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14176
14177  path="$TOPDIR"
14178  has_colon=`$ECHO $path | $GREP ^.:`
14179  new_path="$path"
14180  if test "x$has_colon" = x; then
14181    # Not in mixed or Windows style, start by that.
14182    new_path=`cmd //c echo $path`
14183  fi
14184
14185
14186  input_path="$new_path"
14187  # Check if we need to convert this using DOS-style short mode. If the path
14188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14189  # take no chances and rewrite it.
14190  # Note: m4 eats our [], so we need to use [ and ] instead.
14191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14192  if test "x$has_forbidden_chars" != x; then
14193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14195  fi
14196
14197
14198  windows_path="$new_path"
14199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14200    unix_path=`$CYGPATH -u "$windows_path"`
14201    new_path="$unix_path"
14202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14204    new_path="$unix_path"
14205  fi
14206
14207  if test "x$path" != "x$new_path"; then
14208    TOPDIR="$new_path"
14209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14210$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14211  fi
14212
14213  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14214  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14215
14216  else
14217    # We're on a posix platform. Hooray! :)
14218    path="$TOPDIR"
14219    has_space=`$ECHO "$path" | $GREP " "`
14220    if test "x$has_space" != x; then
14221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14222$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14223      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14224    fi
14225
14226    # Use eval to expand a potential ~
14227    eval path="$path"
14228    if test ! -f "$path" && test ! -d "$path"; then
14229      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14230    fi
14231
14232    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14233  fi
14234
14235  # SRC_ROOT is a traditional alias for TOPDIR.
14236  SRC_ROOT=$TOPDIR
14237
14238  # Locate the directory of this script.
14239  AUTOCONF_DIR=$TOPDIR/common/autoconf
14240
14241  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
14242    # Add extra search paths on solaris for utilities like ar and as etc...
14243    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
14244  fi
14245
14246  # You can force the sys-root if the sys-root encoded into the cross compiler tools
14247  # is not correct.
14248
14249# Check whether --with-sys-root was given.
14250if test "${with_sys_root+set}" = set; then :
14251  withval=$with_sys_root;
14252fi
14253
14254
14255  if test "x$with_sys_root" != x; then
14256    SYS_ROOT=$with_sys_root
14257  else
14258    SYS_ROOT=/
14259  fi
14260
14261
14262
14263# Check whether --with-tools-dir was given.
14264if test "${with_tools_dir+set}" = set; then :
14265  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
14266
14267fi
14268
14269
14270
14271# Check whether --with-devkit was given.
14272if test "${with_devkit+set}" = set; then :
14273  withval=$with_devkit;
14274        if test "x$with_sys_root" != x; then
14275          as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
14276        fi
14277
14278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14279
14280  # Input might be given as Windows format, start by converting to
14281  # unix format.
14282  path="$with_devkit"
14283  new_path=`$CYGPATH -u "$path"`
14284
14285  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14286  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14287  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14288  # "foo.exe" is OK but "foo" is an error.
14289  #
14290  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14291  # It is also a way to make sure we got the proper file name for the real test later on.
14292  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14293  if test "x$test_shortpath" = x; then
14294    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14295$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14296    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14297  fi
14298
14299  # Call helper function which possibly converts this using DOS-style short mode.
14300  # If so, the updated path is stored in $new_path.
14301
14302  input_path="$new_path"
14303  # Check if we need to convert this using DOS-style short mode. If the path
14304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14305  # take no chances and rewrite it.
14306  # Note: m4 eats our [], so we need to use [ and ] instead.
14307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14308  if test "x$has_forbidden_chars" != x; then
14309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14310    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14311    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14312    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14313      # Going to short mode and back again did indeed matter. Since short mode is
14314      # case insensitive, let's make it lowercase to improve readability.
14315      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14316      # Now convert it back to Unix-stile (cygpath)
14317      input_path=`$CYGPATH -u "$shortmode_path"`
14318      new_path="$input_path"
14319    fi
14320  fi
14321
14322  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14323  if test "x$test_cygdrive_prefix" = x; then
14324    # As a simple fix, exclude /usr/bin since it's not a real path.
14325    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14326      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14327      # a path prefixed by /cygdrive for fixpath to work.
14328      new_path="$CYGWIN_ROOT_PATH$input_path"
14329    fi
14330  fi
14331
14332
14333  if test "x$path" != "x$new_path"; then
14334    with_devkit="$new_path"
14335    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14336$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14337  fi
14338
14339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14340
14341  path="$with_devkit"
14342  has_colon=`$ECHO $path | $GREP ^.:`
14343  new_path="$path"
14344  if test "x$has_colon" = x; then
14345    # Not in mixed or Windows style, start by that.
14346    new_path=`cmd //c echo $path`
14347  fi
14348
14349
14350  input_path="$new_path"
14351  # Check if we need to convert this using DOS-style short mode. If the path
14352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14353  # take no chances and rewrite it.
14354  # Note: m4 eats our [], so we need to use [ and ] instead.
14355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14356  if test "x$has_forbidden_chars" != x; then
14357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14358    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14359  fi
14360
14361
14362  windows_path="$new_path"
14363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14364    unix_path=`$CYGPATH -u "$windows_path"`
14365    new_path="$unix_path"
14366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14368    new_path="$unix_path"
14369  fi
14370
14371  if test "x$path" != "x$new_path"; then
14372    with_devkit="$new_path"
14373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14374$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14375  fi
14376
14377  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14378  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14379
14380  else
14381    # We're on a posix platform. Hooray! :)
14382    path="$with_devkit"
14383    has_space=`$ECHO "$path" | $GREP " "`
14384    if test "x$has_space" != x; then
14385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14386$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14387      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14388    fi
14389
14390    # Use eval to expand a potential ~
14391    eval path="$path"
14392    if test ! -f "$path" && test ! -d "$path"; then
14393      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14394    fi
14395
14396    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14397  fi
14398
14399
14400  if test "x$TOOLS_DIR" = x; then
14401    TOOLS_DIR="$with_devkit/bin"
14402  else
14403    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
14404  fi
14405
14406        if test -d "$with_devkit/$host_alias/libc"; then
14407          SYS_ROOT=$with_devkit/$host_alias/libc
14408        elif test -d "$with_devkit/$host/sys-root"; then
14409          SYS_ROOT=$with_devkit/$host/sys-root
14410        fi
14411
14412fi
14413
14414
14415
14416  # Setup default logging of stdout and stderr to build.log in the output root.
14417  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14418  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14419  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14420
14421
14422
14423
14424
14425# Check if it's a pure open build or if custom sources are to be used.
14426
14427  # Check whether --enable-openjdk-only was given.
14428if test "${enable_openjdk_only+set}" = set; then :
14429  enableval=$enable_openjdk_only;
14430else
14431  enable_openjdk_only="no"
14432fi
14433
14434
14435  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14436$as_echo_n "checking for presence of closed sources... " >&6; }
14437  if test -d "$SRC_ROOT/jdk/src/closed"; then
14438    CLOSED_SOURCE_PRESENT=yes
14439  else
14440    CLOSED_SOURCE_PRESENT=no
14441  fi
14442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14443$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14444
14445  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14446$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14447  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14449$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14450
14451  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14452    OPENJDK=true
14453    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14454      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14455$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14456    fi
14457  else
14458    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14459      OPENJDK=true
14460    else
14461      OPENJDK=false
14462    fi
14463  fi
14464
14465  if test "x$OPENJDK" = "xtrue"; then
14466    SET_OPENJDK="OPENJDK=true"
14467  fi
14468
14469
14470
14471  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14472  # the IncludeCustomExtension macro.
14473
14474
14475# Check whether --with-custom-make-dir was given.
14476if test "${with_custom_make_dir+set}" = set; then :
14477  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
14478$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14479fi
14480
14481
14482
14483
14484# These are needed to be able to create a configuration name (and thus the output directory)
14485
14486  ###############################################################################
14487  #
14488  # Check which variant of the JDK that we want to build.
14489  # Currently we have:
14490  #    normal:   standard edition
14491  # but the custom make system may add other variants
14492  #
14493  # Effectively the JDK variant gives a name to a specific set of
14494  # modules to compile into the JDK. In the future, these modules
14495  # might even be Jigsaw modules.
14496  #
14497  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14498$as_echo_n "checking which variant of the JDK to build... " >&6; }
14499
14500# Check whether --with-jdk-variant was given.
14501if test "${with_jdk_variant+set}" = set; then :
14502  withval=$with_jdk_variant;
14503fi
14504
14505
14506  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14507    JDK_VARIANT="normal"
14508  else
14509    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14510  fi
14511
14512
14513
14514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14515$as_echo "$JDK_VARIANT" >&6; }
14516
14517
14518###############################################################################
14519#
14520# Check which interpreter of the JVM we want to build.
14521# Currently we have:
14522#    template: Template interpreter (the default)
14523#    cpp     : C++ interpreter
14524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14525$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14526
14527# Check whether --with-jvm-interpreter was given.
14528if test "${with_jvm_interpreter+set}" = set; then :
14529  withval=$with_jvm_interpreter;
14530fi
14531
14532
14533if test "x$with_jvm_interpreter" = x; then
14534     with_jvm_interpreter="template"
14535fi
14536
14537JVM_INTERPRETER="$with_jvm_interpreter"
14538
14539if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14540   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14541fi
14542
14543
14544
14545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14546$as_echo "$with_jvm_interpreter" >&6; }
14547
14548
14549
14550  ###############################################################################
14551  #
14552  # Check which variants of the JVM that we want to build.
14553  # Currently we have:
14554  #    server: normal interpreter and a tiered C1/C2 compiler
14555  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14556  #    minimal1: reduced form of client with optional VM services and features stripped out
14557  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14558  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14559  #    zero: no machine code interpreter, no compiler
14560  #    zeroshark: zero interpreter and shark/llvm compiler backend
14561#    core: interpreter only, no compiler (only works on some platforms)
14562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14563$as_echo_n "checking which variants of the JVM to build... " >&6; }
14564
14565# Check whether --with-jvm-variants was given.
14566if test "${with_jvm_variants+set}" = set; then :
14567  withval=$with_jvm_variants;
14568fi
14569
14570
14571  if test "x$with_jvm_variants" = x; then
14572    with_jvm_variants="server"
14573  fi
14574
14575  JVM_VARIANTS=",$with_jvm_variants,"
14576  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,//'`
14577
14578  if test "x$TEST_VARIANTS" != "x,"; then
14579     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14580  fi
14581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14582$as_echo "$with_jvm_variants" >&6; }
14583
14584  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14585  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14586  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14587  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14588  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14589  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14590  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14591
14592  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14593    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14594      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14595    fi
14596  fi
14597  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14598    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14599      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14600    fi
14601  fi
14602  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14603    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14604      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14605    fi
14606  fi
14607
14608  # Replace the commas with AND for use in the build directory name.
14609  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14610  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/'`
14611  if test "x$COUNT_VARIANTS" != "x,1"; then
14612    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14613  else
14614    BUILDING_MULTIPLE_JVM_VARIANTS=no
14615  fi
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626  INCLUDE_SA=true
14627  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14628    INCLUDE_SA=false
14629  fi
14630  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14631    INCLUDE_SA=false
14632  fi
14633  if test "x$VAR_CPU" = xppc64 ; then
14634    INCLUDE_SA=false
14635  fi
14636
14637
14638  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14639    MACOSX_UNIVERSAL="true"
14640  fi
14641
14642
14643
14644
14645  ###############################################################################
14646  #
14647  # Set the debug level
14648  #    release: no debug information, all optimizations, no asserts.
14649  #    fastdebug: debug information (-g), all optimizations, all asserts
14650  #    slowdebug: debug information (-g), no optimizations, all asserts
14651  #
14652  DEBUG_LEVEL="release"
14653  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14654$as_echo_n "checking which debug level to use... " >&6; }
14655  # Check whether --enable-debug was given.
14656if test "${enable_debug+set}" = set; then :
14657  enableval=$enable_debug;
14658        ENABLE_DEBUG="${enableval}"
14659        DEBUG_LEVEL="fastdebug"
14660
14661else
14662  ENABLE_DEBUG="no"
14663fi
14664
14665
14666
14667# Check whether --with-debug-level was given.
14668if test "${with_debug_level+set}" = set; then :
14669  withval=$with_debug_level;
14670        DEBUG_LEVEL="${withval}"
14671        if test "x$ENABLE_DEBUG" = xyes; then
14672          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14673        fi
14674
14675fi
14676
14677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14678$as_echo "$DEBUG_LEVEL" >&6; }
14679
14680  if test "x$DEBUG_LEVEL" != xrelease && \
14681      test "x$DEBUG_LEVEL" != xfastdebug && \
14682      test "x$DEBUG_LEVEL" != xslowdebug; then
14683    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14684  fi
14685
14686
14687  ###############################################################################
14688  #
14689  # Setup legacy vars/targets and new vars to deal with different debug levels.
14690  #
14691
14692  case $DEBUG_LEVEL in
14693    release )
14694      VARIANT="OPT"
14695      FASTDEBUG="false"
14696      DEBUG_CLASSFILES="false"
14697      BUILD_VARIANT_RELEASE=""
14698      HOTSPOT_DEBUG_LEVEL="product"
14699      HOTSPOT_EXPORT="product"
14700      ;;
14701    fastdebug )
14702      VARIANT="DBG"
14703      FASTDEBUG="true"
14704      DEBUG_CLASSFILES="true"
14705      BUILD_VARIANT_RELEASE="-fastdebug"
14706      HOTSPOT_DEBUG_LEVEL="fastdebug"
14707      HOTSPOT_EXPORT="fastdebug"
14708      ;;
14709    slowdebug )
14710      VARIANT="DBG"
14711      FASTDEBUG="false"
14712      DEBUG_CLASSFILES="true"
14713      BUILD_VARIANT_RELEASE="-debug"
14714      HOTSPOT_DEBUG_LEVEL="jvmg"
14715      HOTSPOT_EXPORT="debug"
14716      ;;
14717  esac
14718
14719  #####
14720  # Generate the legacy makefile targets for hotspot.
14721  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14722  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14723  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14724  # But until then ...
14725  HOTSPOT_TARGET=""
14726
14727  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14728    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14729  fi
14730
14731  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14732    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14733  fi
14734
14735  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14736    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14737  fi
14738
14739  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14740    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14741  fi
14742
14743  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14744    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14745  fi
14746
14747  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14748    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14749  fi
14750
14751  if test "x$JVM_VARIANT_CORE" = xtrue; then
14752    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14753  fi
14754
14755  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14756
14757  # On Macosx universal binaries are produced, but they only contain
14758  # 64 bit intel. This invalidates control of which jvms are built
14759  # from configure, but only server is valid anyway. Fix this
14760  # when hotspot makefiles are rewritten.
14761  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14762    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14763  fi
14764
14765  #####
14766
14767
14768
14769
14770
14771
14772
14773
14774# With basic setup done, call the custom early hook.
14775
14776
14777# To properly create a configuration name, we need to have the OpenJDK target
14778# and options (variants and debug level) parsed.
14779
14780
14781
14782# Check whether --with-conf-name was given.
14783if test "${with_conf_name+set}" = set; then :
14784  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
14785fi
14786
14787
14788  # Test from where we are running configure, in or outside of src root.
14789  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
14790$as_echo_n "checking where to store configuration... " >&6; }
14791  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
14792      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
14793      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
14794    # We are running configure from the src root.
14795    # Create a default ./build/target-variant-debuglevel output root.
14796    if test "x${CONF_NAME}" = x; then
14797      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
14798$as_echo "in default location" >&6; }
14799      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
14800    else
14801      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
14802$as_echo "in build directory with custom name" >&6; }
14803    fi
14804    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
14805    $MKDIR -p "$OUTPUT_ROOT"
14806    if test ! -d "$OUTPUT_ROOT"; then
14807      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
14808    fi
14809  else
14810    # We are running configure from outside of the src dir.
14811    # Then use the current directory as output dir!
14812    # If configuration is situated in normal build directory, just use the build
14813    # directory name as configuration name, otherwise use the complete path.
14814    if test "x${CONF_NAME}" = x; then
14815      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
14816    fi
14817    OUTPUT_ROOT="$CURDIR"
14818    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
14819$as_echo "in current directory" >&6; }
14820
14821    # WARNING: This might be a bad thing to do. You need to be sure you want to
14822    # have a configuration in this directory. Do some sanity checks!
14823
14824    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
14825      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
14826      # other files
14827      files_present=`$LS $OUTPUT_ROOT`
14828      # Configure has already touched config.log and confdefs.h in the current dir when this check
14829      # is performed.
14830      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
14831      | $TR -d '\n'`
14832      if test "x$filtered_files" != x; then
14833        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
14834$as_echo "$as_me: Current directory is $CURDIR." >&6;}
14835        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
14836$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
14837        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
14838$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
14839        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
14840$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
14841        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
14842$as_echo "$as_me: seriously mess up just about everything." >&6;}
14843        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
14844$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
14845        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
14846$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
14847        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
14848      fi
14849    fi
14850  fi
14851  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
14852$as_echo_n "checking what configuration name to use... " >&6; }
14853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
14854$as_echo "$CONF_NAME" >&6; }
14855
14856
14857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14858
14859  # Input might be given as Windows format, start by converting to
14860  # unix format.
14861  path="$OUTPUT_ROOT"
14862  new_path=`$CYGPATH -u "$path"`
14863
14864  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14865  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14866  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14867  # "foo.exe" is OK but "foo" is an error.
14868  #
14869  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14870  # It is also a way to make sure we got the proper file name for the real test later on.
14871  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14872  if test "x$test_shortpath" = x; then
14873    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14874$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14875    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
14876  fi
14877
14878  # Call helper function which possibly converts this using DOS-style short mode.
14879  # If so, the updated path is stored in $new_path.
14880
14881  input_path="$new_path"
14882  # Check if we need to convert this using DOS-style short mode. If the path
14883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14884  # take no chances and rewrite it.
14885  # Note: m4 eats our [], so we need to use [ and ] instead.
14886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14887  if test "x$has_forbidden_chars" != x; then
14888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14889    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14890    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14891    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14892      # Going to short mode and back again did indeed matter. Since short mode is
14893      # case insensitive, let's make it lowercase to improve readability.
14894      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14895      # Now convert it back to Unix-stile (cygpath)
14896      input_path=`$CYGPATH -u "$shortmode_path"`
14897      new_path="$input_path"
14898    fi
14899  fi
14900
14901  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14902  if test "x$test_cygdrive_prefix" = x; then
14903    # As a simple fix, exclude /usr/bin since it's not a real path.
14904    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14905      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14906      # a path prefixed by /cygdrive for fixpath to work.
14907      new_path="$CYGWIN_ROOT_PATH$input_path"
14908    fi
14909  fi
14910
14911
14912  if test "x$path" != "x$new_path"; then
14913    OUTPUT_ROOT="$new_path"
14914    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14915$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14916  fi
14917
14918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14919
14920  path="$OUTPUT_ROOT"
14921  has_colon=`$ECHO $path | $GREP ^.:`
14922  new_path="$path"
14923  if test "x$has_colon" = x; then
14924    # Not in mixed or Windows style, start by that.
14925    new_path=`cmd //c echo $path`
14926  fi
14927
14928
14929  input_path="$new_path"
14930  # Check if we need to convert this using DOS-style short mode. If the path
14931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14932  # take no chances and rewrite it.
14933  # Note: m4 eats our [], so we need to use [ and ] instead.
14934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14935  if test "x$has_forbidden_chars" != x; then
14936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14937    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14938  fi
14939
14940
14941  windows_path="$new_path"
14942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14943    unix_path=`$CYGPATH -u "$windows_path"`
14944    new_path="$unix_path"
14945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14947    new_path="$unix_path"
14948  fi
14949
14950  if test "x$path" != "x$new_path"; then
14951    OUTPUT_ROOT="$new_path"
14952    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14953$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14954  fi
14955
14956  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14957  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14958
14959  else
14960    # We're on a posix platform. Hooray! :)
14961    path="$OUTPUT_ROOT"
14962    has_space=`$ECHO "$path" | $GREP " "`
14963    if test "x$has_space" != x; then
14964      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14965$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14966      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14967    fi
14968
14969    # Use eval to expand a potential ~
14970    eval path="$path"
14971    if test ! -f "$path" && test ! -d "$path"; then
14972      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
14973    fi
14974
14975    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
14976  fi
14977
14978
14979  SPEC=$OUTPUT_ROOT/spec.gmk
14980
14981  CONF_NAME=$CONF_NAME
14982
14983  OUTPUT_ROOT=$OUTPUT_ROOT
14984
14985
14986  # Most of the probed defines are put into config.h
14987  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
14988
14989  # The spec.gmk file contains all variables for the make system.
14990  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
14991
14992  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
14993  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
14994
14995  # The bootcycle-spec.gmk file contains support for boot cycle builds.
14996  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
14997
14998  # The compare.sh is used to compare the build output to other builds.
14999  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15000
15001  # Spec.sh is currently used by compare-objects.sh
15002  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
15003
15004  # The generated Makefile knows where the spec.gmk is and where the source is.
15005  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15006  # which will look for generated configurations
15007  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15008
15009
15010
15011# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15012
15013  for ac_prog in apt-get yum port pkgutil pkgadd
15014do
15015  # Extract the first word of "$ac_prog", so it can be a program name with args.
15016set dummy $ac_prog; ac_word=$2
15017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15018$as_echo_n "checking for $ac_word... " >&6; }
15019if ${ac_cv_prog_PKGHANDLER+:} false; then :
15020  $as_echo_n "(cached) " >&6
15021else
15022  if test -n "$PKGHANDLER"; then
15023  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15024else
15025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15026for as_dir in $PATH
15027do
15028  IFS=$as_save_IFS
15029  test -z "$as_dir" && as_dir=.
15030    for ac_exec_ext in '' $ac_executable_extensions; do
15031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15032    ac_cv_prog_PKGHANDLER="$ac_prog"
15033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15034    break 2
15035  fi
15036done
15037  done
15038IFS=$as_save_IFS
15039
15040fi
15041fi
15042PKGHANDLER=$ac_cv_prog_PKGHANDLER
15043if test -n "$PKGHANDLER"; then
15044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15045$as_echo "$PKGHANDLER" >&6; }
15046else
15047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15048$as_echo "no" >&6; }
15049fi
15050
15051
15052  test -n "$PKGHANDLER" && break
15053done
15054
15055
15056
15057# Setup tools that requires more complex handling, or that is not needed by the configure script.
15058
15059
15060  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15061  if test "x$MAKE" != x; then
15062    # User has supplied a make, test it.
15063    if test ! -f "$MAKE"; then
15064      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15065    fi
15066
15067  MAKE_CANDIDATE=""$MAKE""
15068  DESCRIPTION="user supplied MAKE=$MAKE"
15069  if test "x$MAKE_CANDIDATE" != x; then
15070    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15071$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15072    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15073    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15074    if test "x$IS_GNU_MAKE" = x; then
15075      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15076$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15077    else
15078      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15079      if test "x$IS_MODERN_MAKE" = x; then
15080        { $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
15081$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;}
15082      else
15083        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15084          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15085            MAKE_EXPECTED_ENV='cygwin'
15086          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15087            MAKE_EXPECTED_ENV='msys'
15088          else
15089            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15090          fi
15091          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15092          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15093        else
15094          # Not relevant for non-Windows
15095          IS_MAKE_CORRECT_ENV=true
15096        fi
15097        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15098          { $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
15099$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;}
15100        else
15101          FOUND_MAKE=$MAKE_CANDIDATE
15102
15103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15104
15105  # First separate the path from the arguments. This will split at the first
15106  # space.
15107  complete="$FOUND_MAKE"
15108  path="${complete%% *}"
15109  tmp="$complete EOL"
15110  arguments="${tmp#* }"
15111
15112  # Input might be given as Windows format, start by converting to
15113  # unix format.
15114  new_path=`$CYGPATH -u "$path"`
15115
15116  # Now try to locate executable using which
15117  new_path=`$WHICH "$new_path" 2> /dev/null`
15118  # bat and cmd files are not always considered executable in cygwin causing which
15119  # to not find them
15120  if test "x$new_path" = x \
15121      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15122      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15123    new_path=`$CYGPATH -u "$path"`
15124  fi
15125  if test "x$new_path" = x; then
15126    # Oops. Which didn't find the executable.
15127    # The splitting of arguments from the executable at a space might have been incorrect,
15128    # since paths with space are more likely in Windows. Give it another try with the whole
15129    # argument.
15130    path="$complete"
15131    arguments="EOL"
15132    new_path=`$CYGPATH -u "$path"`
15133    new_path=`$WHICH "$new_path" 2> /dev/null`
15134    # bat and cmd files are not always considered executable in cygwin causing which
15135    # to not find them
15136    if test "x$new_path" = x \
15137        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15138        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15139      new_path=`$CYGPATH -u "$path"`
15140    fi
15141    if test "x$new_path" = x; then
15142      # It's still not found. Now this is an unrecoverable error.
15143      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15144$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15145      has_space=`$ECHO "$complete" | $GREP " "`
15146      if test "x$has_space" != x; then
15147        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15148$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15149      fi
15150      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15151    fi
15152  fi
15153
15154  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15155  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15156  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15157  # "foo.exe" is OK but "foo" is an error.
15158  #
15159  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15160  # It is also a way to make sure we got the proper file name for the real test later on.
15161  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15162  if test "x$test_shortpath" = x; then
15163    # Short path failed, file does not exist as specified.
15164    # Try adding .exe or .cmd
15165    if test -f "${new_path}.exe"; then
15166      input_to_shortpath="${new_path}.exe"
15167    elif test -f "${new_path}.cmd"; then
15168      input_to_shortpath="${new_path}.cmd"
15169    else
15170      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15171$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15172      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15173$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15174      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15175    fi
15176  else
15177    input_to_shortpath="$new_path"
15178  fi
15179
15180  # Call helper function which possibly converts this using DOS-style short mode.
15181  # If so, the updated path is stored in $new_path.
15182  new_path="$input_to_shortpath"
15183
15184  input_path="$input_to_shortpath"
15185  # Check if we need to convert this using DOS-style short mode. If the path
15186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15187  # take no chances and rewrite it.
15188  # Note: m4 eats our [], so we need to use [ and ] instead.
15189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15190  if test "x$has_forbidden_chars" != x; then
15191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15192    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15193    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15194    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15195      # Going to short mode and back again did indeed matter. Since short mode is
15196      # case insensitive, let's make it lowercase to improve readability.
15197      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15198      # Now convert it back to Unix-stile (cygpath)
15199      input_path=`$CYGPATH -u "$shortmode_path"`
15200      new_path="$input_path"
15201    fi
15202  fi
15203
15204  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15205  if test "x$test_cygdrive_prefix" = x; then
15206    # As a simple fix, exclude /usr/bin since it's not a real path.
15207    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15208      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15209      # a path prefixed by /cygdrive for fixpath to work.
15210      new_path="$CYGWIN_ROOT_PATH$input_path"
15211    fi
15212  fi
15213
15214  # remove trailing .exe if any
15215  new_path="${new_path/%.exe/}"
15216
15217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15218
15219  # First separate the path from the arguments. This will split at the first
15220  # space.
15221  complete="$FOUND_MAKE"
15222  path="${complete%% *}"
15223  tmp="$complete EOL"
15224  arguments="${tmp#* }"
15225
15226  # Input might be given as Windows format, start by converting to
15227  # unix format.
15228  new_path="$path"
15229
15230  windows_path="$new_path"
15231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15232    unix_path=`$CYGPATH -u "$windows_path"`
15233    new_path="$unix_path"
15234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15236    new_path="$unix_path"
15237  fi
15238
15239
15240  # Now try to locate executable using which
15241  new_path=`$WHICH "$new_path" 2> /dev/null`
15242
15243  if test "x$new_path" = x; then
15244    # Oops. Which didn't find the executable.
15245    # The splitting of arguments from the executable at a space might have been incorrect,
15246    # since paths with space are more likely in Windows. Give it another try with the whole
15247    # argument.
15248    path="$complete"
15249    arguments="EOL"
15250    new_path="$path"
15251
15252  windows_path="$new_path"
15253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15254    unix_path=`$CYGPATH -u "$windows_path"`
15255    new_path="$unix_path"
15256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15258    new_path="$unix_path"
15259  fi
15260
15261
15262    new_path=`$WHICH "$new_path" 2> /dev/null`
15263
15264    if test "x$new_path" = x; then
15265      # It's still not found. Now this is an unrecoverable error.
15266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15267$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15268      has_space=`$ECHO "$complete" | $GREP " "`
15269      if test "x$has_space" != x; then
15270        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15271$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15272      fi
15273      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15274    fi
15275  fi
15276
15277  # Now new_path has a complete unix path to the binary
15278  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15279    # Keep paths in /bin as-is, but remove trailing .exe if any
15280    new_path="${new_path/%.exe/}"
15281    # Do not save /bin paths to all_fixpath_prefixes!
15282  else
15283    # Not in mixed or Windows style, start by that.
15284    new_path=`cmd //c echo $new_path`
15285
15286  input_path="$new_path"
15287  # Check if we need to convert this using DOS-style short mode. If the path
15288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15289  # take no chances and rewrite it.
15290  # Note: m4 eats our [], so we need to use [ and ] instead.
15291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15292  if test "x$has_forbidden_chars" != x; then
15293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15295  fi
15296
15297    # Output is in $new_path
15298
15299  windows_path="$new_path"
15300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15301    unix_path=`$CYGPATH -u "$windows_path"`
15302    new_path="$unix_path"
15303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15305    new_path="$unix_path"
15306  fi
15307
15308    # remove trailing .exe if any
15309    new_path="${new_path/%.exe/}"
15310
15311    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15312    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15313  fi
15314
15315  else
15316    # We're on a posix platform. Hooray! :)
15317    # First separate the path from the arguments. This will split at the first
15318    # space.
15319    complete="$FOUND_MAKE"
15320    path="${complete%% *}"
15321    tmp="$complete EOL"
15322    arguments="${tmp#* }"
15323
15324    # Cannot rely on the command "which" here since it doesn't always work.
15325    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15326    if test -z "$is_absolute_path"; then
15327      # Path to executable is not absolute. Find it.
15328      IFS_save="$IFS"
15329      IFS=:
15330      for p in $PATH; do
15331        if test -f "$p/$path" && test -x "$p/$path"; then
15332          new_path="$p/$path"
15333          break
15334        fi
15335      done
15336      IFS="$IFS_save"
15337    else
15338      # This is an absolute path, we can use it without further modifications.
15339      new_path="$path"
15340    fi
15341
15342    if test "x$new_path" = x; then
15343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15344$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15345      has_space=`$ECHO "$complete" | $GREP " "`
15346      if test "x$has_space" != x; then
15347        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15348$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15349      fi
15350      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15351    fi
15352  fi
15353
15354  # Now join together the path and the arguments once again
15355  if test "x$arguments" != xEOL; then
15356    new_complete="$new_path ${arguments% *}"
15357  else
15358    new_complete="$new_path"
15359  fi
15360
15361  if test "x$complete" != "x$new_complete"; then
15362    FOUND_MAKE="$new_complete"
15363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15364$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15365  fi
15366
15367        fi
15368      fi
15369    fi
15370  fi
15371
15372    if test "x$FOUND_MAKE" = x; then
15373      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15374    fi
15375  else
15376    # Try our hardest to locate a correct version of GNU make
15377    for ac_prog in gmake
15378do
15379  # Extract the first word of "$ac_prog", so it can be a program name with args.
15380set dummy $ac_prog; ac_word=$2
15381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15382$as_echo_n "checking for $ac_word... " >&6; }
15383if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15384  $as_echo_n "(cached) " >&6
15385else
15386  case $CHECK_GMAKE in
15387  [\\/]* | ?:[\\/]*)
15388  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15389  ;;
15390  *)
15391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15392for as_dir in $PATH
15393do
15394  IFS=$as_save_IFS
15395  test -z "$as_dir" && as_dir=.
15396    for ac_exec_ext in '' $ac_executable_extensions; do
15397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15398    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15400    break 2
15401  fi
15402done
15403  done
15404IFS=$as_save_IFS
15405
15406  ;;
15407esac
15408fi
15409CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15410if test -n "$CHECK_GMAKE"; then
15411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15412$as_echo "$CHECK_GMAKE" >&6; }
15413else
15414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15415$as_echo "no" >&6; }
15416fi
15417
15418
15419  test -n "$CHECK_GMAKE" && break
15420done
15421
15422
15423  MAKE_CANDIDATE=""$CHECK_GMAKE""
15424  DESCRIPTION="gmake in PATH"
15425  if test "x$MAKE_CANDIDATE" != x; then
15426    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15427$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15428    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15429    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15430    if test "x$IS_GNU_MAKE" = x; then
15431      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15432$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15433    else
15434      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15435      if test "x$IS_MODERN_MAKE" = x; then
15436        { $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
15437$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;}
15438      else
15439        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15440          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15441            MAKE_EXPECTED_ENV='cygwin'
15442          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15443            MAKE_EXPECTED_ENV='msys'
15444          else
15445            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15446          fi
15447          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15448          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15449        else
15450          # Not relevant for non-Windows
15451          IS_MAKE_CORRECT_ENV=true
15452        fi
15453        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15454          { $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
15455$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;}
15456        else
15457          FOUND_MAKE=$MAKE_CANDIDATE
15458
15459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15460
15461  # First separate the path from the arguments. This will split at the first
15462  # space.
15463  complete="$FOUND_MAKE"
15464  path="${complete%% *}"
15465  tmp="$complete EOL"
15466  arguments="${tmp#* }"
15467
15468  # Input might be given as Windows format, start by converting to
15469  # unix format.
15470  new_path=`$CYGPATH -u "$path"`
15471
15472  # Now try to locate executable using which
15473  new_path=`$WHICH "$new_path" 2> /dev/null`
15474  # bat and cmd files are not always considered executable in cygwin causing which
15475  # to not find them
15476  if test "x$new_path" = x \
15477      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15478      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15479    new_path=`$CYGPATH -u "$path"`
15480  fi
15481  if test "x$new_path" = x; then
15482    # Oops. Which didn't find the executable.
15483    # The splitting of arguments from the executable at a space might have been incorrect,
15484    # since paths with space are more likely in Windows. Give it another try with the whole
15485    # argument.
15486    path="$complete"
15487    arguments="EOL"
15488    new_path=`$CYGPATH -u "$path"`
15489    new_path=`$WHICH "$new_path" 2> /dev/null`
15490    # bat and cmd files are not always considered executable in cygwin causing which
15491    # to not find them
15492    if test "x$new_path" = x \
15493        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15494        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15495      new_path=`$CYGPATH -u "$path"`
15496    fi
15497    if test "x$new_path" = x; then
15498      # It's still not found. Now this is an unrecoverable error.
15499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15500$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15501      has_space=`$ECHO "$complete" | $GREP " "`
15502      if test "x$has_space" != x; then
15503        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15504$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15505      fi
15506      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15507    fi
15508  fi
15509
15510  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15511  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15512  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15513  # "foo.exe" is OK but "foo" is an error.
15514  #
15515  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15516  # It is also a way to make sure we got the proper file name for the real test later on.
15517  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15518  if test "x$test_shortpath" = x; then
15519    # Short path failed, file does not exist as specified.
15520    # Try adding .exe or .cmd
15521    if test -f "${new_path}.exe"; then
15522      input_to_shortpath="${new_path}.exe"
15523    elif test -f "${new_path}.cmd"; then
15524      input_to_shortpath="${new_path}.cmd"
15525    else
15526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15527$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15528      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15529$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15530      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15531    fi
15532  else
15533    input_to_shortpath="$new_path"
15534  fi
15535
15536  # Call helper function which possibly converts this using DOS-style short mode.
15537  # If so, the updated path is stored in $new_path.
15538  new_path="$input_to_shortpath"
15539
15540  input_path="$input_to_shortpath"
15541  # Check if we need to convert this using DOS-style short mode. If the path
15542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15543  # take no chances and rewrite it.
15544  # Note: m4 eats our [], so we need to use [ and ] instead.
15545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15546  if test "x$has_forbidden_chars" != x; then
15547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15548    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15549    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15550    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15551      # Going to short mode and back again did indeed matter. Since short mode is
15552      # case insensitive, let's make it lowercase to improve readability.
15553      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15554      # Now convert it back to Unix-stile (cygpath)
15555      input_path=`$CYGPATH -u "$shortmode_path"`
15556      new_path="$input_path"
15557    fi
15558  fi
15559
15560  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15561  if test "x$test_cygdrive_prefix" = x; then
15562    # As a simple fix, exclude /usr/bin since it's not a real path.
15563    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15564      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15565      # a path prefixed by /cygdrive for fixpath to work.
15566      new_path="$CYGWIN_ROOT_PATH$input_path"
15567    fi
15568  fi
15569
15570  # remove trailing .exe if any
15571  new_path="${new_path/%.exe/}"
15572
15573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15574
15575  # First separate the path from the arguments. This will split at the first
15576  # space.
15577  complete="$FOUND_MAKE"
15578  path="${complete%% *}"
15579  tmp="$complete EOL"
15580  arguments="${tmp#* }"
15581
15582  # Input might be given as Windows format, start by converting to
15583  # unix format.
15584  new_path="$path"
15585
15586  windows_path="$new_path"
15587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15588    unix_path=`$CYGPATH -u "$windows_path"`
15589    new_path="$unix_path"
15590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15592    new_path="$unix_path"
15593  fi
15594
15595
15596  # Now try to locate executable using which
15597  new_path=`$WHICH "$new_path" 2> /dev/null`
15598
15599  if test "x$new_path" = x; then
15600    # Oops. Which didn't find the executable.
15601    # The splitting of arguments from the executable at a space might have been incorrect,
15602    # since paths with space are more likely in Windows. Give it another try with the whole
15603    # argument.
15604    path="$complete"
15605    arguments="EOL"
15606    new_path="$path"
15607
15608  windows_path="$new_path"
15609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15610    unix_path=`$CYGPATH -u "$windows_path"`
15611    new_path="$unix_path"
15612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15614    new_path="$unix_path"
15615  fi
15616
15617
15618    new_path=`$WHICH "$new_path" 2> /dev/null`
15619
15620    if test "x$new_path" = x; then
15621      # It's still not found. Now this is an unrecoverable error.
15622      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15623$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15624      has_space=`$ECHO "$complete" | $GREP " "`
15625      if test "x$has_space" != x; then
15626        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15627$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15628      fi
15629      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15630    fi
15631  fi
15632
15633  # Now new_path has a complete unix path to the binary
15634  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15635    # Keep paths in /bin as-is, but remove trailing .exe if any
15636    new_path="${new_path/%.exe/}"
15637    # Do not save /bin paths to all_fixpath_prefixes!
15638  else
15639    # Not in mixed or Windows style, start by that.
15640    new_path=`cmd //c echo $new_path`
15641
15642  input_path="$new_path"
15643  # Check if we need to convert this using DOS-style short mode. If the path
15644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15645  # take no chances and rewrite it.
15646  # Note: m4 eats our [], so we need to use [ and ] instead.
15647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15648  if test "x$has_forbidden_chars" != x; then
15649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15650    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15651  fi
15652
15653    # Output is in $new_path
15654
15655  windows_path="$new_path"
15656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15657    unix_path=`$CYGPATH -u "$windows_path"`
15658    new_path="$unix_path"
15659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15661    new_path="$unix_path"
15662  fi
15663
15664    # remove trailing .exe if any
15665    new_path="${new_path/%.exe/}"
15666
15667    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15668    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15669  fi
15670
15671  else
15672    # We're on a posix platform. Hooray! :)
15673    # First separate the path from the arguments. This will split at the first
15674    # space.
15675    complete="$FOUND_MAKE"
15676    path="${complete%% *}"
15677    tmp="$complete EOL"
15678    arguments="${tmp#* }"
15679
15680    # Cannot rely on the command "which" here since it doesn't always work.
15681    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15682    if test -z "$is_absolute_path"; then
15683      # Path to executable is not absolute. Find it.
15684      IFS_save="$IFS"
15685      IFS=:
15686      for p in $PATH; do
15687        if test -f "$p/$path" && test -x "$p/$path"; then
15688          new_path="$p/$path"
15689          break
15690        fi
15691      done
15692      IFS="$IFS_save"
15693    else
15694      # This is an absolute path, we can use it without further modifications.
15695      new_path="$path"
15696    fi
15697
15698    if test "x$new_path" = x; then
15699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15700$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15701      has_space=`$ECHO "$complete" | $GREP " "`
15702      if test "x$has_space" != x; then
15703        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15704$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15705      fi
15706      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15707    fi
15708  fi
15709
15710  # Now join together the path and the arguments once again
15711  if test "x$arguments" != xEOL; then
15712    new_complete="$new_path ${arguments% *}"
15713  else
15714    new_complete="$new_path"
15715  fi
15716
15717  if test "x$complete" != "x$new_complete"; then
15718    FOUND_MAKE="$new_complete"
15719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15720$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15721  fi
15722
15723        fi
15724      fi
15725    fi
15726  fi
15727
15728
15729    if test "x$FOUND_MAKE" = x; then
15730      for ac_prog in make
15731do
15732  # Extract the first word of "$ac_prog", so it can be a program name with args.
15733set dummy $ac_prog; ac_word=$2
15734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15735$as_echo_n "checking for $ac_word... " >&6; }
15736if ${ac_cv_path_CHECK_MAKE+:} false; then :
15737  $as_echo_n "(cached) " >&6
15738else
15739  case $CHECK_MAKE in
15740  [\\/]* | ?:[\\/]*)
15741  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
15742  ;;
15743  *)
15744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15745for as_dir in $PATH
15746do
15747  IFS=$as_save_IFS
15748  test -z "$as_dir" && as_dir=.
15749    for ac_exec_ext in '' $ac_executable_extensions; do
15750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15751    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
15752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15753    break 2
15754  fi
15755done
15756  done
15757IFS=$as_save_IFS
15758
15759  ;;
15760esac
15761fi
15762CHECK_MAKE=$ac_cv_path_CHECK_MAKE
15763if test -n "$CHECK_MAKE"; then
15764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
15765$as_echo "$CHECK_MAKE" >&6; }
15766else
15767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15768$as_echo "no" >&6; }
15769fi
15770
15771
15772  test -n "$CHECK_MAKE" && break
15773done
15774
15775
15776  MAKE_CANDIDATE=""$CHECK_MAKE""
15777  DESCRIPTION="make in PATH"
15778  if test "x$MAKE_CANDIDATE" != x; then
15779    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15780$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15781    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15782    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15783    if test "x$IS_GNU_MAKE" = x; then
15784      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15785$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15786    else
15787      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15788      if test "x$IS_MODERN_MAKE" = x; then
15789        { $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
15790$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;}
15791      else
15792        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15793          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15794            MAKE_EXPECTED_ENV='cygwin'
15795          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15796            MAKE_EXPECTED_ENV='msys'
15797          else
15798            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15799          fi
15800          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15801          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15802        else
15803          # Not relevant for non-Windows
15804          IS_MAKE_CORRECT_ENV=true
15805        fi
15806        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15807          { $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
15808$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;}
15809        else
15810          FOUND_MAKE=$MAKE_CANDIDATE
15811
15812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15813
15814  # First separate the path from the arguments. This will split at the first
15815  # space.
15816  complete="$FOUND_MAKE"
15817  path="${complete%% *}"
15818  tmp="$complete EOL"
15819  arguments="${tmp#* }"
15820
15821  # Input might be given as Windows format, start by converting to
15822  # unix format.
15823  new_path=`$CYGPATH -u "$path"`
15824
15825  # Now try to locate executable using which
15826  new_path=`$WHICH "$new_path" 2> /dev/null`
15827  # bat and cmd files are not always considered executable in cygwin causing which
15828  # to not find them
15829  if test "x$new_path" = x \
15830      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15831      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15832    new_path=`$CYGPATH -u "$path"`
15833  fi
15834  if test "x$new_path" = x; then
15835    # Oops. Which didn't find the executable.
15836    # The splitting of arguments from the executable at a space might have been incorrect,
15837    # since paths with space are more likely in Windows. Give it another try with the whole
15838    # argument.
15839    path="$complete"
15840    arguments="EOL"
15841    new_path=`$CYGPATH -u "$path"`
15842    new_path=`$WHICH "$new_path" 2> /dev/null`
15843    # bat and cmd files are not always considered executable in cygwin causing which
15844    # to not find them
15845    if test "x$new_path" = x \
15846        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15847        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15848      new_path=`$CYGPATH -u "$path"`
15849    fi
15850    if test "x$new_path" = x; then
15851      # It's still not found. Now this is an unrecoverable error.
15852      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15853$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15854      has_space=`$ECHO "$complete" | $GREP " "`
15855      if test "x$has_space" != x; then
15856        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15857$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15858      fi
15859      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15860    fi
15861  fi
15862
15863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15866  # "foo.exe" is OK but "foo" is an error.
15867  #
15868  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15869  # It is also a way to make sure we got the proper file name for the real test later on.
15870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15871  if test "x$test_shortpath" = x; then
15872    # Short path failed, file does not exist as specified.
15873    # Try adding .exe or .cmd
15874    if test -f "${new_path}.exe"; then
15875      input_to_shortpath="${new_path}.exe"
15876    elif test -f "${new_path}.cmd"; then
15877      input_to_shortpath="${new_path}.cmd"
15878    else
15879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15880$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15881      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15882$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15883      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15884    fi
15885  else
15886    input_to_shortpath="$new_path"
15887  fi
15888
15889  # Call helper function which possibly converts this using DOS-style short mode.
15890  # If so, the updated path is stored in $new_path.
15891  new_path="$input_to_shortpath"
15892
15893  input_path="$input_to_shortpath"
15894  # Check if we need to convert this using DOS-style short mode. If the path
15895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15896  # take no chances and rewrite it.
15897  # Note: m4 eats our [], so we need to use [ and ] instead.
15898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15899  if test "x$has_forbidden_chars" != x; then
15900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15901    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15902    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15903    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15904      # Going to short mode and back again did indeed matter. Since short mode is
15905      # case insensitive, let's make it lowercase to improve readability.
15906      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15907      # Now convert it back to Unix-stile (cygpath)
15908      input_path=`$CYGPATH -u "$shortmode_path"`
15909      new_path="$input_path"
15910    fi
15911  fi
15912
15913  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15914  if test "x$test_cygdrive_prefix" = x; then
15915    # As a simple fix, exclude /usr/bin since it's not a real path.
15916    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15917      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15918      # a path prefixed by /cygdrive for fixpath to work.
15919      new_path="$CYGWIN_ROOT_PATH$input_path"
15920    fi
15921  fi
15922
15923  # remove trailing .exe if any
15924  new_path="${new_path/%.exe/}"
15925
15926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15927
15928  # First separate the path from the arguments. This will split at the first
15929  # space.
15930  complete="$FOUND_MAKE"
15931  path="${complete%% *}"
15932  tmp="$complete EOL"
15933  arguments="${tmp#* }"
15934
15935  # Input might be given as Windows format, start by converting to
15936  # unix format.
15937  new_path="$path"
15938
15939  windows_path="$new_path"
15940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15941    unix_path=`$CYGPATH -u "$windows_path"`
15942    new_path="$unix_path"
15943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15945    new_path="$unix_path"
15946  fi
15947
15948
15949  # Now try to locate executable using which
15950  new_path=`$WHICH "$new_path" 2> /dev/null`
15951
15952  if test "x$new_path" = x; then
15953    # Oops. Which didn't find the executable.
15954    # The splitting of arguments from the executable at a space might have been incorrect,
15955    # since paths with space are more likely in Windows. Give it another try with the whole
15956    # argument.
15957    path="$complete"
15958    arguments="EOL"
15959    new_path="$path"
15960
15961  windows_path="$new_path"
15962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15963    unix_path=`$CYGPATH -u "$windows_path"`
15964    new_path="$unix_path"
15965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15967    new_path="$unix_path"
15968  fi
15969
15970
15971    new_path=`$WHICH "$new_path" 2> /dev/null`
15972
15973    if test "x$new_path" = x; then
15974      # It's still not found. Now this is an unrecoverable error.
15975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15976$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15977      has_space=`$ECHO "$complete" | $GREP " "`
15978      if test "x$has_space" != x; then
15979        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15980$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15981      fi
15982      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15983    fi
15984  fi
15985
15986  # Now new_path has a complete unix path to the binary
15987  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15988    # Keep paths in /bin as-is, but remove trailing .exe if any
15989    new_path="${new_path/%.exe/}"
15990    # Do not save /bin paths to all_fixpath_prefixes!
15991  else
15992    # Not in mixed or Windows style, start by that.
15993    new_path=`cmd //c echo $new_path`
15994
15995  input_path="$new_path"
15996  # Check if we need to convert this using DOS-style short mode. If the path
15997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15998  # take no chances and rewrite it.
15999  # Note: m4 eats our [], so we need to use [ and ] instead.
16000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16001  if test "x$has_forbidden_chars" != x; then
16002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16003    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16004  fi
16005
16006    # Output is in $new_path
16007
16008  windows_path="$new_path"
16009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16010    unix_path=`$CYGPATH -u "$windows_path"`
16011    new_path="$unix_path"
16012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16014    new_path="$unix_path"
16015  fi
16016
16017    # remove trailing .exe if any
16018    new_path="${new_path/%.exe/}"
16019
16020    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16021    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16022  fi
16023
16024  else
16025    # We're on a posix platform. Hooray! :)
16026    # First separate the path from the arguments. This will split at the first
16027    # space.
16028    complete="$FOUND_MAKE"
16029    path="${complete%% *}"
16030    tmp="$complete EOL"
16031    arguments="${tmp#* }"
16032
16033    # Cannot rely on the command "which" here since it doesn't always work.
16034    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16035    if test -z "$is_absolute_path"; then
16036      # Path to executable is not absolute. Find it.
16037      IFS_save="$IFS"
16038      IFS=:
16039      for p in $PATH; do
16040        if test -f "$p/$path" && test -x "$p/$path"; then
16041          new_path="$p/$path"
16042          break
16043        fi
16044      done
16045      IFS="$IFS_save"
16046    else
16047      # This is an absolute path, we can use it without further modifications.
16048      new_path="$path"
16049    fi
16050
16051    if test "x$new_path" = x; then
16052      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16053$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16054      has_space=`$ECHO "$complete" | $GREP " "`
16055      if test "x$has_space" != x; then
16056        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16057$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16058      fi
16059      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16060    fi
16061  fi
16062
16063  # Now join together the path and the arguments once again
16064  if test "x$arguments" != xEOL; then
16065    new_complete="$new_path ${arguments% *}"
16066  else
16067    new_complete="$new_path"
16068  fi
16069
16070  if test "x$complete" != "x$new_complete"; then
16071    FOUND_MAKE="$new_complete"
16072    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16073$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16074  fi
16075
16076        fi
16077      fi
16078    fi
16079  fi
16080
16081    fi
16082
16083    if test "x$FOUND_MAKE" = x; then
16084      if test "x$TOOLS_DIR" != x; then
16085        # We have a tools-dir, check that as well before giving up.
16086        OLD_PATH=$PATH
16087        PATH=$TOOLS_DIR:$PATH
16088        for ac_prog in gmake
16089do
16090  # Extract the first word of "$ac_prog", so it can be a program name with args.
16091set dummy $ac_prog; ac_word=$2
16092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16093$as_echo_n "checking for $ac_word... " >&6; }
16094if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16095  $as_echo_n "(cached) " >&6
16096else
16097  case $CHECK_TOOLSDIR_GMAKE in
16098  [\\/]* | ?:[\\/]*)
16099  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16100  ;;
16101  *)
16102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16103for as_dir in $PATH
16104do
16105  IFS=$as_save_IFS
16106  test -z "$as_dir" && as_dir=.
16107    for ac_exec_ext in '' $ac_executable_extensions; do
16108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16109    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16111    break 2
16112  fi
16113done
16114  done
16115IFS=$as_save_IFS
16116
16117  ;;
16118esac
16119fi
16120CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16121if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16123$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16124else
16125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16126$as_echo "no" >&6; }
16127fi
16128
16129
16130  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16131done
16132
16133
16134  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16135  DESCRIPTION="gmake in tools-dir"
16136  if test "x$MAKE_CANDIDATE" != x; then
16137    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16138$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16139    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16140    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16141    if test "x$IS_GNU_MAKE" = x; then
16142      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16143$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16144    else
16145      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16146      if test "x$IS_MODERN_MAKE" = x; then
16147        { $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
16148$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;}
16149      else
16150        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16151          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16152            MAKE_EXPECTED_ENV='cygwin'
16153          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16154            MAKE_EXPECTED_ENV='msys'
16155          else
16156            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16157          fi
16158          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16159          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16160        else
16161          # Not relevant for non-Windows
16162          IS_MAKE_CORRECT_ENV=true
16163        fi
16164        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16165          { $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
16166$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;}
16167        else
16168          FOUND_MAKE=$MAKE_CANDIDATE
16169
16170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16171
16172  # First separate the path from the arguments. This will split at the first
16173  # space.
16174  complete="$FOUND_MAKE"
16175  path="${complete%% *}"
16176  tmp="$complete EOL"
16177  arguments="${tmp#* }"
16178
16179  # Input might be given as Windows format, start by converting to
16180  # unix format.
16181  new_path=`$CYGPATH -u "$path"`
16182
16183  # Now try to locate executable using which
16184  new_path=`$WHICH "$new_path" 2> /dev/null`
16185  # bat and cmd files are not always considered executable in cygwin causing which
16186  # to not find them
16187  if test "x$new_path" = x \
16188      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16189      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16190    new_path=`$CYGPATH -u "$path"`
16191  fi
16192  if test "x$new_path" = x; then
16193    # Oops. Which didn't find the executable.
16194    # The splitting of arguments from the executable at a space might have been incorrect,
16195    # since paths with space are more likely in Windows. Give it another try with the whole
16196    # argument.
16197    path="$complete"
16198    arguments="EOL"
16199    new_path=`$CYGPATH -u "$path"`
16200    new_path=`$WHICH "$new_path" 2> /dev/null`
16201    # bat and cmd files are not always considered executable in cygwin causing which
16202    # to not find them
16203    if test "x$new_path" = x \
16204        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16205        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16206      new_path=`$CYGPATH -u "$path"`
16207    fi
16208    if test "x$new_path" = x; then
16209      # It's still not found. Now this is an unrecoverable error.
16210      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16211$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16212      has_space=`$ECHO "$complete" | $GREP " "`
16213      if test "x$has_space" != x; then
16214        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16215$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16216      fi
16217      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16218    fi
16219  fi
16220
16221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16224  # "foo.exe" is OK but "foo" is an error.
16225  #
16226  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16227  # It is also a way to make sure we got the proper file name for the real test later on.
16228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16229  if test "x$test_shortpath" = x; then
16230    # Short path failed, file does not exist as specified.
16231    # Try adding .exe or .cmd
16232    if test -f "${new_path}.exe"; then
16233      input_to_shortpath="${new_path}.exe"
16234    elif test -f "${new_path}.cmd"; then
16235      input_to_shortpath="${new_path}.cmd"
16236    else
16237      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16238$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16239      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16240$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16241      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16242    fi
16243  else
16244    input_to_shortpath="$new_path"
16245  fi
16246
16247  # Call helper function which possibly converts this using DOS-style short mode.
16248  # If so, the updated path is stored in $new_path.
16249  new_path="$input_to_shortpath"
16250
16251  input_path="$input_to_shortpath"
16252  # Check if we need to convert this using DOS-style short mode. If the path
16253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16254  # take no chances and rewrite it.
16255  # Note: m4 eats our [], so we need to use [ and ] instead.
16256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16257  if test "x$has_forbidden_chars" != x; then
16258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16259    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16260    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16261    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16262      # Going to short mode and back again did indeed matter. Since short mode is
16263      # case insensitive, let's make it lowercase to improve readability.
16264      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16265      # Now convert it back to Unix-stile (cygpath)
16266      input_path=`$CYGPATH -u "$shortmode_path"`
16267      new_path="$input_path"
16268    fi
16269  fi
16270
16271  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16272  if test "x$test_cygdrive_prefix" = x; then
16273    # As a simple fix, exclude /usr/bin since it's not a real path.
16274    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16275      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16276      # a path prefixed by /cygdrive for fixpath to work.
16277      new_path="$CYGWIN_ROOT_PATH$input_path"
16278    fi
16279  fi
16280
16281  # remove trailing .exe if any
16282  new_path="${new_path/%.exe/}"
16283
16284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16285
16286  # First separate the path from the arguments. This will split at the first
16287  # space.
16288  complete="$FOUND_MAKE"
16289  path="${complete%% *}"
16290  tmp="$complete EOL"
16291  arguments="${tmp#* }"
16292
16293  # Input might be given as Windows format, start by converting to
16294  # unix format.
16295  new_path="$path"
16296
16297  windows_path="$new_path"
16298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16299    unix_path=`$CYGPATH -u "$windows_path"`
16300    new_path="$unix_path"
16301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16303    new_path="$unix_path"
16304  fi
16305
16306
16307  # Now try to locate executable using which
16308  new_path=`$WHICH "$new_path" 2> /dev/null`
16309
16310  if test "x$new_path" = x; then
16311    # Oops. Which didn't find the executable.
16312    # The splitting of arguments from the executable at a space might have been incorrect,
16313    # since paths with space are more likely in Windows. Give it another try with the whole
16314    # argument.
16315    path="$complete"
16316    arguments="EOL"
16317    new_path="$path"
16318
16319  windows_path="$new_path"
16320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16321    unix_path=`$CYGPATH -u "$windows_path"`
16322    new_path="$unix_path"
16323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16325    new_path="$unix_path"
16326  fi
16327
16328
16329    new_path=`$WHICH "$new_path" 2> /dev/null`
16330
16331    if test "x$new_path" = x; then
16332      # It's still not found. Now this is an unrecoverable error.
16333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16334$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16335      has_space=`$ECHO "$complete" | $GREP " "`
16336      if test "x$has_space" != x; then
16337        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16338$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16339      fi
16340      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16341    fi
16342  fi
16343
16344  # Now new_path has a complete unix path to the binary
16345  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16346    # Keep paths in /bin as-is, but remove trailing .exe if any
16347    new_path="${new_path/%.exe/}"
16348    # Do not save /bin paths to all_fixpath_prefixes!
16349  else
16350    # Not in mixed or Windows style, start by that.
16351    new_path=`cmd //c echo $new_path`
16352
16353  input_path="$new_path"
16354  # Check if we need to convert this using DOS-style short mode. If the path
16355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16356  # take no chances and rewrite it.
16357  # Note: m4 eats our [], so we need to use [ and ] instead.
16358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16359  if test "x$has_forbidden_chars" != x; then
16360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16361    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16362  fi
16363
16364    # Output is in $new_path
16365
16366  windows_path="$new_path"
16367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16368    unix_path=`$CYGPATH -u "$windows_path"`
16369    new_path="$unix_path"
16370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16372    new_path="$unix_path"
16373  fi
16374
16375    # remove trailing .exe if any
16376    new_path="${new_path/%.exe/}"
16377
16378    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16379    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16380  fi
16381
16382  else
16383    # We're on a posix platform. Hooray! :)
16384    # First separate the path from the arguments. This will split at the first
16385    # space.
16386    complete="$FOUND_MAKE"
16387    path="${complete%% *}"
16388    tmp="$complete EOL"
16389    arguments="${tmp#* }"
16390
16391    # Cannot rely on the command "which" here since it doesn't always work.
16392    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16393    if test -z "$is_absolute_path"; then
16394      # Path to executable is not absolute. Find it.
16395      IFS_save="$IFS"
16396      IFS=:
16397      for p in $PATH; do
16398        if test -f "$p/$path" && test -x "$p/$path"; then
16399          new_path="$p/$path"
16400          break
16401        fi
16402      done
16403      IFS="$IFS_save"
16404    else
16405      # This is an absolute path, we can use it without further modifications.
16406      new_path="$path"
16407    fi
16408
16409    if test "x$new_path" = x; then
16410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16411$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16412      has_space=`$ECHO "$complete" | $GREP " "`
16413      if test "x$has_space" != x; then
16414        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16415$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16416      fi
16417      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16418    fi
16419  fi
16420
16421  # Now join together the path and the arguments once again
16422  if test "x$arguments" != xEOL; then
16423    new_complete="$new_path ${arguments% *}"
16424  else
16425    new_complete="$new_path"
16426  fi
16427
16428  if test "x$complete" != "x$new_complete"; then
16429    FOUND_MAKE="$new_complete"
16430    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16431$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16432  fi
16433
16434        fi
16435      fi
16436    fi
16437  fi
16438
16439        if test "x$FOUND_MAKE" = x; then
16440          for ac_prog in make
16441do
16442  # Extract the first word of "$ac_prog", so it can be a program name with args.
16443set dummy $ac_prog; ac_word=$2
16444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16445$as_echo_n "checking for $ac_word... " >&6; }
16446if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16447  $as_echo_n "(cached) " >&6
16448else
16449  case $CHECK_TOOLSDIR_MAKE in
16450  [\\/]* | ?:[\\/]*)
16451  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16452  ;;
16453  *)
16454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16455for as_dir in $PATH
16456do
16457  IFS=$as_save_IFS
16458  test -z "$as_dir" && as_dir=.
16459    for ac_exec_ext in '' $ac_executable_extensions; do
16460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16461    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16463    break 2
16464  fi
16465done
16466  done
16467IFS=$as_save_IFS
16468
16469  ;;
16470esac
16471fi
16472CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16473if test -n "$CHECK_TOOLSDIR_MAKE"; then
16474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16475$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16476else
16477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16478$as_echo "no" >&6; }
16479fi
16480
16481
16482  test -n "$CHECK_TOOLSDIR_MAKE" && break
16483done
16484
16485
16486  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16487  DESCRIPTION="make in tools-dir"
16488  if test "x$MAKE_CANDIDATE" != x; then
16489    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16490$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16491    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16492    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16493    if test "x$IS_GNU_MAKE" = x; then
16494      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16495$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16496    else
16497      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16498      if test "x$IS_MODERN_MAKE" = x; then
16499        { $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
16500$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;}
16501      else
16502        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16503          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16504            MAKE_EXPECTED_ENV='cygwin'
16505          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16506            MAKE_EXPECTED_ENV='msys'
16507          else
16508            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16509          fi
16510          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16511          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16512        else
16513          # Not relevant for non-Windows
16514          IS_MAKE_CORRECT_ENV=true
16515        fi
16516        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16517          { $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
16518$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;}
16519        else
16520          FOUND_MAKE=$MAKE_CANDIDATE
16521
16522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16523
16524  # First separate the path from the arguments. This will split at the first
16525  # space.
16526  complete="$FOUND_MAKE"
16527  path="${complete%% *}"
16528  tmp="$complete EOL"
16529  arguments="${tmp#* }"
16530
16531  # Input might be given as Windows format, start by converting to
16532  # unix format.
16533  new_path=`$CYGPATH -u "$path"`
16534
16535  # Now try to locate executable using which
16536  new_path=`$WHICH "$new_path" 2> /dev/null`
16537  # bat and cmd files are not always considered executable in cygwin causing which
16538  # to not find them
16539  if test "x$new_path" = x \
16540      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16541      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16542    new_path=`$CYGPATH -u "$path"`
16543  fi
16544  if test "x$new_path" = x; then
16545    # Oops. Which didn't find the executable.
16546    # The splitting of arguments from the executable at a space might have been incorrect,
16547    # since paths with space are more likely in Windows. Give it another try with the whole
16548    # argument.
16549    path="$complete"
16550    arguments="EOL"
16551    new_path=`$CYGPATH -u "$path"`
16552    new_path=`$WHICH "$new_path" 2> /dev/null`
16553    # bat and cmd files are not always considered executable in cygwin causing which
16554    # to not find them
16555    if test "x$new_path" = x \
16556        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16557        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16558      new_path=`$CYGPATH -u "$path"`
16559    fi
16560    if test "x$new_path" = x; then
16561      # It's still not found. Now this is an unrecoverable error.
16562      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16563$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16564      has_space=`$ECHO "$complete" | $GREP " "`
16565      if test "x$has_space" != x; then
16566        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16567$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16568      fi
16569      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16570    fi
16571  fi
16572
16573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16576  # "foo.exe" is OK but "foo" is an error.
16577  #
16578  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16579  # It is also a way to make sure we got the proper file name for the real test later on.
16580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16581  if test "x$test_shortpath" = x; then
16582    # Short path failed, file does not exist as specified.
16583    # Try adding .exe or .cmd
16584    if test -f "${new_path}.exe"; then
16585      input_to_shortpath="${new_path}.exe"
16586    elif test -f "${new_path}.cmd"; then
16587      input_to_shortpath="${new_path}.cmd"
16588    else
16589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16590$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16591      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16592$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16593      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16594    fi
16595  else
16596    input_to_shortpath="$new_path"
16597  fi
16598
16599  # Call helper function which possibly converts this using DOS-style short mode.
16600  # If so, the updated path is stored in $new_path.
16601  new_path="$input_to_shortpath"
16602
16603  input_path="$input_to_shortpath"
16604  # Check if we need to convert this using DOS-style short mode. If the path
16605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16606  # take no chances and rewrite it.
16607  # Note: m4 eats our [], so we need to use [ and ] instead.
16608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16609  if test "x$has_forbidden_chars" != x; then
16610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16614      # Going to short mode and back again did indeed matter. Since short mode is
16615      # case insensitive, let's make it lowercase to improve readability.
16616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16617      # Now convert it back to Unix-stile (cygpath)
16618      input_path=`$CYGPATH -u "$shortmode_path"`
16619      new_path="$input_path"
16620    fi
16621  fi
16622
16623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16624  if test "x$test_cygdrive_prefix" = x; then
16625    # As a simple fix, exclude /usr/bin since it's not a real path.
16626    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16628      # a path prefixed by /cygdrive for fixpath to work.
16629      new_path="$CYGWIN_ROOT_PATH$input_path"
16630    fi
16631  fi
16632
16633  # remove trailing .exe if any
16634  new_path="${new_path/%.exe/}"
16635
16636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16637
16638  # First separate the path from the arguments. This will split at the first
16639  # space.
16640  complete="$FOUND_MAKE"
16641  path="${complete%% *}"
16642  tmp="$complete EOL"
16643  arguments="${tmp#* }"
16644
16645  # Input might be given as Windows format, start by converting to
16646  # unix format.
16647  new_path="$path"
16648
16649  windows_path="$new_path"
16650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16651    unix_path=`$CYGPATH -u "$windows_path"`
16652    new_path="$unix_path"
16653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16655    new_path="$unix_path"
16656  fi
16657
16658
16659  # Now try to locate executable using which
16660  new_path=`$WHICH "$new_path" 2> /dev/null`
16661
16662  if test "x$new_path" = x; then
16663    # Oops. Which didn't find the executable.
16664    # The splitting of arguments from the executable at a space might have been incorrect,
16665    # since paths with space are more likely in Windows. Give it another try with the whole
16666    # argument.
16667    path="$complete"
16668    arguments="EOL"
16669    new_path="$path"
16670
16671  windows_path="$new_path"
16672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16673    unix_path=`$CYGPATH -u "$windows_path"`
16674    new_path="$unix_path"
16675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16677    new_path="$unix_path"
16678  fi
16679
16680
16681    new_path=`$WHICH "$new_path" 2> /dev/null`
16682
16683    if test "x$new_path" = x; then
16684      # It's still not found. Now this is an unrecoverable error.
16685      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16686$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16687      has_space=`$ECHO "$complete" | $GREP " "`
16688      if test "x$has_space" != x; then
16689        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16690$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16691      fi
16692      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16693    fi
16694  fi
16695
16696  # Now new_path has a complete unix path to the binary
16697  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16698    # Keep paths in /bin as-is, but remove trailing .exe if any
16699    new_path="${new_path/%.exe/}"
16700    # Do not save /bin paths to all_fixpath_prefixes!
16701  else
16702    # Not in mixed or Windows style, start by that.
16703    new_path=`cmd //c echo $new_path`
16704
16705  input_path="$new_path"
16706  # Check if we need to convert this using DOS-style short mode. If the path
16707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16708  # take no chances and rewrite it.
16709  # Note: m4 eats our [], so we need to use [ and ] instead.
16710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16711  if test "x$has_forbidden_chars" != x; then
16712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16713    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16714  fi
16715
16716    # Output is in $new_path
16717
16718  windows_path="$new_path"
16719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16720    unix_path=`$CYGPATH -u "$windows_path"`
16721    new_path="$unix_path"
16722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16724    new_path="$unix_path"
16725  fi
16726
16727    # remove trailing .exe if any
16728    new_path="${new_path/%.exe/}"
16729
16730    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16731    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16732  fi
16733
16734  else
16735    # We're on a posix platform. Hooray! :)
16736    # First separate the path from the arguments. This will split at the first
16737    # space.
16738    complete="$FOUND_MAKE"
16739    path="${complete%% *}"
16740    tmp="$complete EOL"
16741    arguments="${tmp#* }"
16742
16743    # Cannot rely on the command "which" here since it doesn't always work.
16744    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16745    if test -z "$is_absolute_path"; then
16746      # Path to executable is not absolute. Find it.
16747      IFS_save="$IFS"
16748      IFS=:
16749      for p in $PATH; do
16750        if test -f "$p/$path" && test -x "$p/$path"; then
16751          new_path="$p/$path"
16752          break
16753        fi
16754      done
16755      IFS="$IFS_save"
16756    else
16757      # This is an absolute path, we can use it without further modifications.
16758      new_path="$path"
16759    fi
16760
16761    if test "x$new_path" = x; then
16762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16763$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16764      has_space=`$ECHO "$complete" | $GREP " "`
16765      if test "x$has_space" != x; then
16766        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16767$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16768      fi
16769      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16770    fi
16771  fi
16772
16773  # Now join together the path and the arguments once again
16774  if test "x$arguments" != xEOL; then
16775    new_complete="$new_path ${arguments% *}"
16776  else
16777    new_complete="$new_path"
16778  fi
16779
16780  if test "x$complete" != "x$new_complete"; then
16781    FOUND_MAKE="$new_complete"
16782    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16783$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16784  fi
16785
16786        fi
16787      fi
16788    fi
16789  fi
16790
16791        fi
16792        PATH=$OLD_PATH
16793      fi
16794    fi
16795
16796    if test "x$FOUND_MAKE" = x; then
16797      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
16798    fi
16799  fi
16800
16801  MAKE=$FOUND_MAKE
16802
16803  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
16804$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
16805
16806
16807
16808  # Test if find supports -delete
16809  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
16810$as_echo_n "checking if find supports -delete... " >&6; }
16811  FIND_DELETE="-delete"
16812
16813  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
16814
16815  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
16816
16817  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
16818  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
16819    # No, it does not.
16820    rm $DELETEDIR/TestIfFindSupportsDelete
16821    FIND_DELETE="-exec rm \{\} \+"
16822    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16823$as_echo "no" >&6; }
16824  else
16825    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16826$as_echo "yes" >&6; }
16827  fi
16828  rmdir $DELETEDIR
16829
16830
16831
16832  # These tools might not be installed by default,
16833  # need hint on how to install them.
16834
16835
16836
16837  # Publish this variable in the help.
16838
16839
16840  if test "x$UNZIP" = x; then
16841    # The variable is not set by user, try to locate tool using the code snippet
16842    for ac_prog in unzip
16843do
16844  # Extract the first word of "$ac_prog", so it can be a program name with args.
16845set dummy $ac_prog; ac_word=$2
16846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16847$as_echo_n "checking for $ac_word... " >&6; }
16848if ${ac_cv_path_UNZIP+:} false; then :
16849  $as_echo_n "(cached) " >&6
16850else
16851  case $UNZIP in
16852  [\\/]* | ?:[\\/]*)
16853  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16854  ;;
16855  *)
16856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16857for as_dir in $PATH
16858do
16859  IFS=$as_save_IFS
16860  test -z "$as_dir" && as_dir=.
16861    for ac_exec_ext in '' $ac_executable_extensions; do
16862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16863    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16865    break 2
16866  fi
16867done
16868  done
16869IFS=$as_save_IFS
16870
16871  ;;
16872esac
16873fi
16874UNZIP=$ac_cv_path_UNZIP
16875if test -n "$UNZIP"; then
16876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16877$as_echo "$UNZIP" >&6; }
16878else
16879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16880$as_echo "no" >&6; }
16881fi
16882
16883
16884  test -n "$UNZIP" && break
16885done
16886
16887  else
16888    # The variable is set, but is it from the command line or the environment?
16889
16890    # Try to remove the string !UNZIP! from our list.
16891    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
16892    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
16893      # If it failed, the variable was not from the command line. Ignore it,
16894      # but warn the user (except for BASH, which is always set by the calling BASH).
16895      if test "xUNZIP" != xBASH; then
16896        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
16897$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
16898      fi
16899      # Try to locate tool using the code snippet
16900      for ac_prog in unzip
16901do
16902  # Extract the first word of "$ac_prog", so it can be a program name with args.
16903set dummy $ac_prog; ac_word=$2
16904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16905$as_echo_n "checking for $ac_word... " >&6; }
16906if ${ac_cv_path_UNZIP+:} false; then :
16907  $as_echo_n "(cached) " >&6
16908else
16909  case $UNZIP in
16910  [\\/]* | ?:[\\/]*)
16911  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16912  ;;
16913  *)
16914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16915for as_dir in $PATH
16916do
16917  IFS=$as_save_IFS
16918  test -z "$as_dir" && as_dir=.
16919    for ac_exec_ext in '' $ac_executable_extensions; do
16920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16921    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16923    break 2
16924  fi
16925done
16926  done
16927IFS=$as_save_IFS
16928
16929  ;;
16930esac
16931fi
16932UNZIP=$ac_cv_path_UNZIP
16933if test -n "$UNZIP"; then
16934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16935$as_echo "$UNZIP" >&6; }
16936else
16937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16938$as_echo "no" >&6; }
16939fi
16940
16941
16942  test -n "$UNZIP" && break
16943done
16944
16945    else
16946      # If it succeeded, then it was overridden by the user. We will use it
16947      # for the tool.
16948
16949      # First remove it from the list of overridden variables, so we can test
16950      # for unknown variables in the end.
16951      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
16952
16953      # Check if the provided tool contains a complete path.
16954      tool_specified="$UNZIP"
16955      tool_basename="${tool_specified##*/}"
16956      if test "x$tool_basename" = "x$tool_specified"; then
16957        # A command without a complete path is provided, search $PATH.
16958        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
16959$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
16960        # Extract the first word of "$tool_basename", so it can be a program name with args.
16961set dummy $tool_basename; ac_word=$2
16962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16963$as_echo_n "checking for $ac_word... " >&6; }
16964if ${ac_cv_path_UNZIP+:} false; then :
16965  $as_echo_n "(cached) " >&6
16966else
16967  case $UNZIP in
16968  [\\/]* | ?:[\\/]*)
16969  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16970  ;;
16971  *)
16972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16973for as_dir in $PATH
16974do
16975  IFS=$as_save_IFS
16976  test -z "$as_dir" && as_dir=.
16977    for ac_exec_ext in '' $ac_executable_extensions; do
16978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16979    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16981    break 2
16982  fi
16983done
16984  done
16985IFS=$as_save_IFS
16986
16987  ;;
16988esac
16989fi
16990UNZIP=$ac_cv_path_UNZIP
16991if test -n "$UNZIP"; then
16992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16993$as_echo "$UNZIP" >&6; }
16994else
16995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16996$as_echo "no" >&6; }
16997fi
16998
16999
17000        if test "x$UNZIP" = x; then
17001          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17002        fi
17003      else
17004        # Otherwise we believe it is a complete path. Use it as it is.
17005        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17006$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17007        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17008$as_echo_n "checking for UNZIP... " >&6; }
17009        if test ! -x "$tool_specified"; then
17010          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17011$as_echo "not found" >&6; }
17012          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17013        fi
17014        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17015$as_echo "$tool_specified" >&6; }
17016      fi
17017    fi
17018  fi
17019
17020
17021
17022  if test "x$UNZIP" = x; then
17023    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17024  fi
17025
17026
17027
17028
17029
17030  # Publish this variable in the help.
17031
17032
17033  if test "x$ZIP" = x; then
17034    # The variable is not set by user, try to locate tool using the code snippet
17035    for ac_prog in zip
17036do
17037  # Extract the first word of "$ac_prog", so it can be a program name with args.
17038set dummy $ac_prog; ac_word=$2
17039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17040$as_echo_n "checking for $ac_word... " >&6; }
17041if ${ac_cv_path_ZIP+:} false; then :
17042  $as_echo_n "(cached) " >&6
17043else
17044  case $ZIP in
17045  [\\/]* | ?:[\\/]*)
17046  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17047  ;;
17048  *)
17049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17050for as_dir in $PATH
17051do
17052  IFS=$as_save_IFS
17053  test -z "$as_dir" && as_dir=.
17054    for ac_exec_ext in '' $ac_executable_extensions; do
17055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17056    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17058    break 2
17059  fi
17060done
17061  done
17062IFS=$as_save_IFS
17063
17064  ;;
17065esac
17066fi
17067ZIP=$ac_cv_path_ZIP
17068if test -n "$ZIP"; then
17069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17070$as_echo "$ZIP" >&6; }
17071else
17072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17073$as_echo "no" >&6; }
17074fi
17075
17076
17077  test -n "$ZIP" && break
17078done
17079
17080  else
17081    # The variable is set, but is it from the command line or the environment?
17082
17083    # Try to remove the string !ZIP! from our list.
17084    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17085    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17086      # If it failed, the variable was not from the command line. Ignore it,
17087      # but warn the user (except for BASH, which is always set by the calling BASH).
17088      if test "xZIP" != xBASH; then
17089        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17090$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17091      fi
17092      # Try to locate tool using the code snippet
17093      for ac_prog in zip
17094do
17095  # Extract the first word of "$ac_prog", so it can be a program name with args.
17096set dummy $ac_prog; ac_word=$2
17097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17098$as_echo_n "checking for $ac_word... " >&6; }
17099if ${ac_cv_path_ZIP+:} false; then :
17100  $as_echo_n "(cached) " >&6
17101else
17102  case $ZIP in
17103  [\\/]* | ?:[\\/]*)
17104  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17105  ;;
17106  *)
17107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17108for as_dir in $PATH
17109do
17110  IFS=$as_save_IFS
17111  test -z "$as_dir" && as_dir=.
17112    for ac_exec_ext in '' $ac_executable_extensions; do
17113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17114    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17116    break 2
17117  fi
17118done
17119  done
17120IFS=$as_save_IFS
17121
17122  ;;
17123esac
17124fi
17125ZIP=$ac_cv_path_ZIP
17126if test -n "$ZIP"; then
17127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17128$as_echo "$ZIP" >&6; }
17129else
17130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17131$as_echo "no" >&6; }
17132fi
17133
17134
17135  test -n "$ZIP" && break
17136done
17137
17138    else
17139      # If it succeeded, then it was overridden by the user. We will use it
17140      # for the tool.
17141
17142      # First remove it from the list of overridden variables, so we can test
17143      # for unknown variables in the end.
17144      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17145
17146      # Check if the provided tool contains a complete path.
17147      tool_specified="$ZIP"
17148      tool_basename="${tool_specified##*/}"
17149      if test "x$tool_basename" = "x$tool_specified"; then
17150        # A command without a complete path is provided, search $PATH.
17151        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17152$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17153        # Extract the first word of "$tool_basename", so it can be a program name with args.
17154set dummy $tool_basename; ac_word=$2
17155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17156$as_echo_n "checking for $ac_word... " >&6; }
17157if ${ac_cv_path_ZIP+:} false; then :
17158  $as_echo_n "(cached) " >&6
17159else
17160  case $ZIP in
17161  [\\/]* | ?:[\\/]*)
17162  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17163  ;;
17164  *)
17165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17166for as_dir in $PATH
17167do
17168  IFS=$as_save_IFS
17169  test -z "$as_dir" && as_dir=.
17170    for ac_exec_ext in '' $ac_executable_extensions; do
17171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17172    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17174    break 2
17175  fi
17176done
17177  done
17178IFS=$as_save_IFS
17179
17180  ;;
17181esac
17182fi
17183ZIP=$ac_cv_path_ZIP
17184if test -n "$ZIP"; then
17185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17186$as_echo "$ZIP" >&6; }
17187else
17188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17189$as_echo "no" >&6; }
17190fi
17191
17192
17193        if test "x$ZIP" = x; then
17194          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17195        fi
17196      else
17197        # Otherwise we believe it is a complete path. Use it as it is.
17198        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17199$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17200        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17201$as_echo_n "checking for ZIP... " >&6; }
17202        if test ! -x "$tool_specified"; then
17203          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17204$as_echo "not found" >&6; }
17205          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17206        fi
17207        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17208$as_echo "$tool_specified" >&6; }
17209      fi
17210    fi
17211  fi
17212
17213
17214
17215  if test "x$ZIP" = x; then
17216    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17217  fi
17218
17219
17220
17221  # Non-required basic tools
17222
17223
17224
17225  # Publish this variable in the help.
17226
17227
17228  if test "x$LDD" = x; then
17229    # The variable is not set by user, try to locate tool using the code snippet
17230    for ac_prog in ldd
17231do
17232  # Extract the first word of "$ac_prog", so it can be a program name with args.
17233set dummy $ac_prog; ac_word=$2
17234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17235$as_echo_n "checking for $ac_word... " >&6; }
17236if ${ac_cv_path_LDD+:} false; then :
17237  $as_echo_n "(cached) " >&6
17238else
17239  case $LDD in
17240  [\\/]* | ?:[\\/]*)
17241  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17242  ;;
17243  *)
17244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17245for as_dir in $PATH
17246do
17247  IFS=$as_save_IFS
17248  test -z "$as_dir" && as_dir=.
17249    for ac_exec_ext in '' $ac_executable_extensions; do
17250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17251    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17253    break 2
17254  fi
17255done
17256  done
17257IFS=$as_save_IFS
17258
17259  ;;
17260esac
17261fi
17262LDD=$ac_cv_path_LDD
17263if test -n "$LDD"; then
17264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17265$as_echo "$LDD" >&6; }
17266else
17267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17268$as_echo "no" >&6; }
17269fi
17270
17271
17272  test -n "$LDD" && break
17273done
17274
17275  else
17276    # The variable is set, but is it from the command line or the environment?
17277
17278    # Try to remove the string !LDD! from our list.
17279    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17280    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17281      # If it failed, the variable was not from the command line. Ignore it,
17282      # but warn the user (except for BASH, which is always set by the calling BASH).
17283      if test "xLDD" != xBASH; then
17284        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17285$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17286      fi
17287      # Try to locate tool using the code snippet
17288      for ac_prog in ldd
17289do
17290  # Extract the first word of "$ac_prog", so it can be a program name with args.
17291set dummy $ac_prog; ac_word=$2
17292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17293$as_echo_n "checking for $ac_word... " >&6; }
17294if ${ac_cv_path_LDD+:} false; then :
17295  $as_echo_n "(cached) " >&6
17296else
17297  case $LDD in
17298  [\\/]* | ?:[\\/]*)
17299  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17300  ;;
17301  *)
17302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17303for as_dir in $PATH
17304do
17305  IFS=$as_save_IFS
17306  test -z "$as_dir" && as_dir=.
17307    for ac_exec_ext in '' $ac_executable_extensions; do
17308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17309    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17311    break 2
17312  fi
17313done
17314  done
17315IFS=$as_save_IFS
17316
17317  ;;
17318esac
17319fi
17320LDD=$ac_cv_path_LDD
17321if test -n "$LDD"; then
17322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17323$as_echo "$LDD" >&6; }
17324else
17325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17326$as_echo "no" >&6; }
17327fi
17328
17329
17330  test -n "$LDD" && break
17331done
17332
17333    else
17334      # If it succeeded, then it was overridden by the user. We will use it
17335      # for the tool.
17336
17337      # First remove it from the list of overridden variables, so we can test
17338      # for unknown variables in the end.
17339      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17340
17341      # Check if the provided tool contains a complete path.
17342      tool_specified="$LDD"
17343      tool_basename="${tool_specified##*/}"
17344      if test "x$tool_basename" = "x$tool_specified"; then
17345        # A command without a complete path is provided, search $PATH.
17346        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17347$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17348        # Extract the first word of "$tool_basename", so it can be a program name with args.
17349set dummy $tool_basename; ac_word=$2
17350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17351$as_echo_n "checking for $ac_word... " >&6; }
17352if ${ac_cv_path_LDD+:} false; then :
17353  $as_echo_n "(cached) " >&6
17354else
17355  case $LDD in
17356  [\\/]* | ?:[\\/]*)
17357  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17358  ;;
17359  *)
17360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17361for as_dir in $PATH
17362do
17363  IFS=$as_save_IFS
17364  test -z "$as_dir" && as_dir=.
17365    for ac_exec_ext in '' $ac_executable_extensions; do
17366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17367    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17369    break 2
17370  fi
17371done
17372  done
17373IFS=$as_save_IFS
17374
17375  ;;
17376esac
17377fi
17378LDD=$ac_cv_path_LDD
17379if test -n "$LDD"; then
17380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17381$as_echo "$LDD" >&6; }
17382else
17383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17384$as_echo "no" >&6; }
17385fi
17386
17387
17388        if test "x$LDD" = x; then
17389          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17390        fi
17391      else
17392        # Otherwise we believe it is a complete path. Use it as it is.
17393        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17394$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17395        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17396$as_echo_n "checking for LDD... " >&6; }
17397        if test ! -x "$tool_specified"; then
17398          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17399$as_echo "not found" >&6; }
17400          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17401        fi
17402        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17403$as_echo "$tool_specified" >&6; }
17404      fi
17405    fi
17406  fi
17407
17408
17409  if test "x$LDD" = "x"; then
17410    # List shared lib dependencies is used for
17411    # debug output and checking for forbidden dependencies.
17412    # We can build without it.
17413    LDD="true"
17414  fi
17415
17416
17417  # Publish this variable in the help.
17418
17419
17420  if test "x$OTOOL" = x; then
17421    # The variable is not set by user, try to locate tool using the code snippet
17422    for ac_prog in otool
17423do
17424  # Extract the first word of "$ac_prog", so it can be a program name with args.
17425set dummy $ac_prog; ac_word=$2
17426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17427$as_echo_n "checking for $ac_word... " >&6; }
17428if ${ac_cv_path_OTOOL+:} false; then :
17429  $as_echo_n "(cached) " >&6
17430else
17431  case $OTOOL in
17432  [\\/]* | ?:[\\/]*)
17433  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17434  ;;
17435  *)
17436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17437for as_dir in $PATH
17438do
17439  IFS=$as_save_IFS
17440  test -z "$as_dir" && as_dir=.
17441    for ac_exec_ext in '' $ac_executable_extensions; do
17442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17443    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17445    break 2
17446  fi
17447done
17448  done
17449IFS=$as_save_IFS
17450
17451  ;;
17452esac
17453fi
17454OTOOL=$ac_cv_path_OTOOL
17455if test -n "$OTOOL"; then
17456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17457$as_echo "$OTOOL" >&6; }
17458else
17459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17460$as_echo "no" >&6; }
17461fi
17462
17463
17464  test -n "$OTOOL" && break
17465done
17466
17467  else
17468    # The variable is set, but is it from the command line or the environment?
17469
17470    # Try to remove the string !OTOOL! from our list.
17471    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17472    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17473      # If it failed, the variable was not from the command line. Ignore it,
17474      # but warn the user (except for BASH, which is always set by the calling BASH).
17475      if test "xOTOOL" != xBASH; then
17476        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17477$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17478      fi
17479      # Try to locate tool using the code snippet
17480      for ac_prog in otool
17481do
17482  # Extract the first word of "$ac_prog", so it can be a program name with args.
17483set dummy $ac_prog; ac_word=$2
17484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17485$as_echo_n "checking for $ac_word... " >&6; }
17486if ${ac_cv_path_OTOOL+:} false; then :
17487  $as_echo_n "(cached) " >&6
17488else
17489  case $OTOOL in
17490  [\\/]* | ?:[\\/]*)
17491  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17492  ;;
17493  *)
17494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17495for as_dir in $PATH
17496do
17497  IFS=$as_save_IFS
17498  test -z "$as_dir" && as_dir=.
17499    for ac_exec_ext in '' $ac_executable_extensions; do
17500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17501    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17503    break 2
17504  fi
17505done
17506  done
17507IFS=$as_save_IFS
17508
17509  ;;
17510esac
17511fi
17512OTOOL=$ac_cv_path_OTOOL
17513if test -n "$OTOOL"; then
17514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17515$as_echo "$OTOOL" >&6; }
17516else
17517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17518$as_echo "no" >&6; }
17519fi
17520
17521
17522  test -n "$OTOOL" && break
17523done
17524
17525    else
17526      # If it succeeded, then it was overridden by the user. We will use it
17527      # for the tool.
17528
17529      # First remove it from the list of overridden variables, so we can test
17530      # for unknown variables in the end.
17531      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17532
17533      # Check if the provided tool contains a complete path.
17534      tool_specified="$OTOOL"
17535      tool_basename="${tool_specified##*/}"
17536      if test "x$tool_basename" = "x$tool_specified"; then
17537        # A command without a complete path is provided, search $PATH.
17538        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
17539$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
17540        # Extract the first word of "$tool_basename", so it can be a program name with args.
17541set dummy $tool_basename; ac_word=$2
17542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17543$as_echo_n "checking for $ac_word... " >&6; }
17544if ${ac_cv_path_OTOOL+:} false; then :
17545  $as_echo_n "(cached) " >&6
17546else
17547  case $OTOOL in
17548  [\\/]* | ?:[\\/]*)
17549  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17550  ;;
17551  *)
17552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17553for as_dir in $PATH
17554do
17555  IFS=$as_save_IFS
17556  test -z "$as_dir" && as_dir=.
17557    for ac_exec_ext in '' $ac_executable_extensions; do
17558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17559    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17561    break 2
17562  fi
17563done
17564  done
17565IFS=$as_save_IFS
17566
17567  ;;
17568esac
17569fi
17570OTOOL=$ac_cv_path_OTOOL
17571if test -n "$OTOOL"; then
17572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17573$as_echo "$OTOOL" >&6; }
17574else
17575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17576$as_echo "no" >&6; }
17577fi
17578
17579
17580        if test "x$OTOOL" = x; then
17581          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17582        fi
17583      else
17584        # Otherwise we believe it is a complete path. Use it as it is.
17585        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
17586$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
17587        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
17588$as_echo_n "checking for OTOOL... " >&6; }
17589        if test ! -x "$tool_specified"; then
17590          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17591$as_echo "not found" >&6; }
17592          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
17593        fi
17594        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17595$as_echo "$tool_specified" >&6; }
17596      fi
17597    fi
17598  fi
17599
17600
17601  if test "x$OTOOL" = "x"; then
17602    OTOOL="true"
17603  fi
17604
17605
17606  # Publish this variable in the help.
17607
17608
17609  if test "x$READELF" = x; then
17610    # The variable is not set by user, try to locate tool using the code snippet
17611    for ac_prog in greadelf readelf
17612do
17613  # Extract the first word of "$ac_prog", so it can be a program name with args.
17614set dummy $ac_prog; ac_word=$2
17615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17616$as_echo_n "checking for $ac_word... " >&6; }
17617if ${ac_cv_path_READELF+:} false; then :
17618  $as_echo_n "(cached) " >&6
17619else
17620  case $READELF in
17621  [\\/]* | ?:[\\/]*)
17622  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17623  ;;
17624  *)
17625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17626for as_dir in $PATH
17627do
17628  IFS=$as_save_IFS
17629  test -z "$as_dir" && as_dir=.
17630    for ac_exec_ext in '' $ac_executable_extensions; do
17631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17632    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17634    break 2
17635  fi
17636done
17637  done
17638IFS=$as_save_IFS
17639
17640  ;;
17641esac
17642fi
17643READELF=$ac_cv_path_READELF
17644if test -n "$READELF"; then
17645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17646$as_echo "$READELF" >&6; }
17647else
17648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17649$as_echo "no" >&6; }
17650fi
17651
17652
17653  test -n "$READELF" && break
17654done
17655
17656  else
17657    # The variable is set, but is it from the command line or the environment?
17658
17659    # Try to remove the string !READELF! from our list.
17660    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
17661    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17662      # If it failed, the variable was not from the command line. Ignore it,
17663      # but warn the user (except for BASH, which is always set by the calling BASH).
17664      if test "xREADELF" != xBASH; then
17665        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
17666$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
17667      fi
17668      # Try to locate tool using the code snippet
17669      for ac_prog in greadelf readelf
17670do
17671  # Extract the first word of "$ac_prog", so it can be a program name with args.
17672set dummy $ac_prog; ac_word=$2
17673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17674$as_echo_n "checking for $ac_word... " >&6; }
17675if ${ac_cv_path_READELF+:} false; then :
17676  $as_echo_n "(cached) " >&6
17677else
17678  case $READELF in
17679  [\\/]* | ?:[\\/]*)
17680  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17681  ;;
17682  *)
17683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17684for as_dir in $PATH
17685do
17686  IFS=$as_save_IFS
17687  test -z "$as_dir" && as_dir=.
17688    for ac_exec_ext in '' $ac_executable_extensions; do
17689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17690    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17692    break 2
17693  fi
17694done
17695  done
17696IFS=$as_save_IFS
17697
17698  ;;
17699esac
17700fi
17701READELF=$ac_cv_path_READELF
17702if test -n "$READELF"; then
17703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17704$as_echo "$READELF" >&6; }
17705else
17706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17707$as_echo "no" >&6; }
17708fi
17709
17710
17711  test -n "$READELF" && break
17712done
17713
17714    else
17715      # If it succeeded, then it was overridden by the user. We will use it
17716      # for the tool.
17717
17718      # First remove it from the list of overridden variables, so we can test
17719      # for unknown variables in the end.
17720      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17721
17722      # Check if the provided tool contains a complete path.
17723      tool_specified="$READELF"
17724      tool_basename="${tool_specified##*/}"
17725      if test "x$tool_basename" = "x$tool_specified"; then
17726        # A command without a complete path is provided, search $PATH.
17727        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
17728$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
17729        # Extract the first word of "$tool_basename", so it can be a program name with args.
17730set dummy $tool_basename; ac_word=$2
17731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17732$as_echo_n "checking for $ac_word... " >&6; }
17733if ${ac_cv_path_READELF+:} false; then :
17734  $as_echo_n "(cached) " >&6
17735else
17736  case $READELF in
17737  [\\/]* | ?:[\\/]*)
17738  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17739  ;;
17740  *)
17741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17742for as_dir in $PATH
17743do
17744  IFS=$as_save_IFS
17745  test -z "$as_dir" && as_dir=.
17746    for ac_exec_ext in '' $ac_executable_extensions; do
17747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17748    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17750    break 2
17751  fi
17752done
17753  done
17754IFS=$as_save_IFS
17755
17756  ;;
17757esac
17758fi
17759READELF=$ac_cv_path_READELF
17760if test -n "$READELF"; then
17761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17762$as_echo "$READELF" >&6; }
17763else
17764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17765$as_echo "no" >&6; }
17766fi
17767
17768
17769        if test "x$READELF" = x; then
17770          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17771        fi
17772      else
17773        # Otherwise we believe it is a complete path. Use it as it is.
17774        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
17775$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
17776        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
17777$as_echo_n "checking for READELF... " >&6; }
17778        if test ! -x "$tool_specified"; then
17779          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17780$as_echo "not found" >&6; }
17781          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
17782        fi
17783        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17784$as_echo "$tool_specified" >&6; }
17785      fi
17786    fi
17787  fi
17788
17789
17790
17791
17792  # Publish this variable in the help.
17793
17794
17795  if test "x$HG" = x; then
17796    # The variable is not set by user, try to locate tool using the code snippet
17797    for ac_prog in hg
17798do
17799  # Extract the first word of "$ac_prog", so it can be a program name with args.
17800set dummy $ac_prog; ac_word=$2
17801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17802$as_echo_n "checking for $ac_word... " >&6; }
17803if ${ac_cv_path_HG+:} false; then :
17804  $as_echo_n "(cached) " >&6
17805else
17806  case $HG in
17807  [\\/]* | ?:[\\/]*)
17808  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17809  ;;
17810  *)
17811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17812for as_dir in $PATH
17813do
17814  IFS=$as_save_IFS
17815  test -z "$as_dir" && as_dir=.
17816    for ac_exec_ext in '' $ac_executable_extensions; do
17817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17818    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17820    break 2
17821  fi
17822done
17823  done
17824IFS=$as_save_IFS
17825
17826  ;;
17827esac
17828fi
17829HG=$ac_cv_path_HG
17830if test -n "$HG"; then
17831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17832$as_echo "$HG" >&6; }
17833else
17834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17835$as_echo "no" >&6; }
17836fi
17837
17838
17839  test -n "$HG" && break
17840done
17841
17842  else
17843    # The variable is set, but is it from the command line or the environment?
17844
17845    # Try to remove the string !HG! from our list.
17846    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
17847    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17848      # If it failed, the variable was not from the command line. Ignore it,
17849      # but warn the user (except for BASH, which is always set by the calling BASH).
17850      if test "xHG" != xBASH; then
17851        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
17852$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
17853      fi
17854      # Try to locate tool using the code snippet
17855      for ac_prog in hg
17856do
17857  # Extract the first word of "$ac_prog", so it can be a program name with args.
17858set dummy $ac_prog; ac_word=$2
17859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17860$as_echo_n "checking for $ac_word... " >&6; }
17861if ${ac_cv_path_HG+:} false; then :
17862  $as_echo_n "(cached) " >&6
17863else
17864  case $HG in
17865  [\\/]* | ?:[\\/]*)
17866  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17867  ;;
17868  *)
17869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17870for as_dir in $PATH
17871do
17872  IFS=$as_save_IFS
17873  test -z "$as_dir" && as_dir=.
17874    for ac_exec_ext in '' $ac_executable_extensions; do
17875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17876    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17878    break 2
17879  fi
17880done
17881  done
17882IFS=$as_save_IFS
17883
17884  ;;
17885esac
17886fi
17887HG=$ac_cv_path_HG
17888if test -n "$HG"; then
17889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17890$as_echo "$HG" >&6; }
17891else
17892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17893$as_echo "no" >&6; }
17894fi
17895
17896
17897  test -n "$HG" && break
17898done
17899
17900    else
17901      # If it succeeded, then it was overridden by the user. We will use it
17902      # for the tool.
17903
17904      # First remove it from the list of overridden variables, so we can test
17905      # for unknown variables in the end.
17906      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17907
17908      # Check if the provided tool contains a complete path.
17909      tool_specified="$HG"
17910      tool_basename="${tool_specified##*/}"
17911      if test "x$tool_basename" = "x$tool_specified"; then
17912        # A command without a complete path is provided, search $PATH.
17913        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
17914$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
17915        # Extract the first word of "$tool_basename", so it can be a program name with args.
17916set dummy $tool_basename; ac_word=$2
17917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17918$as_echo_n "checking for $ac_word... " >&6; }
17919if ${ac_cv_path_HG+:} false; then :
17920  $as_echo_n "(cached) " >&6
17921else
17922  case $HG in
17923  [\\/]* | ?:[\\/]*)
17924  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17925  ;;
17926  *)
17927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17928for as_dir in $PATH
17929do
17930  IFS=$as_save_IFS
17931  test -z "$as_dir" && as_dir=.
17932    for ac_exec_ext in '' $ac_executable_extensions; do
17933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17934    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17936    break 2
17937  fi
17938done
17939  done
17940IFS=$as_save_IFS
17941
17942  ;;
17943esac
17944fi
17945HG=$ac_cv_path_HG
17946if test -n "$HG"; then
17947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17948$as_echo "$HG" >&6; }
17949else
17950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17951$as_echo "no" >&6; }
17952fi
17953
17954
17955        if test "x$HG" = x; then
17956          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17957        fi
17958      else
17959        # Otherwise we believe it is a complete path. Use it as it is.
17960        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
17961$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
17962        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
17963$as_echo_n "checking for HG... " >&6; }
17964        if test ! -x "$tool_specified"; then
17965          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17966$as_echo "not found" >&6; }
17967          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
17968        fi
17969        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17970$as_echo "$tool_specified" >&6; }
17971      fi
17972    fi
17973  fi
17974
17975
17976
17977
17978  # Publish this variable in the help.
17979
17980
17981  if test "x$STAT" = x; then
17982    # The variable is not set by user, try to locate tool using the code snippet
17983    for ac_prog in stat
17984do
17985  # Extract the first word of "$ac_prog", so it can be a program name with args.
17986set dummy $ac_prog; ac_word=$2
17987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17988$as_echo_n "checking for $ac_word... " >&6; }
17989if ${ac_cv_path_STAT+:} false; then :
17990  $as_echo_n "(cached) " >&6
17991else
17992  case $STAT in
17993  [\\/]* | ?:[\\/]*)
17994  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
17995  ;;
17996  *)
17997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17998for as_dir in $PATH
17999do
18000  IFS=$as_save_IFS
18001  test -z "$as_dir" && as_dir=.
18002    for ac_exec_ext in '' $ac_executable_extensions; do
18003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18004    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18006    break 2
18007  fi
18008done
18009  done
18010IFS=$as_save_IFS
18011
18012  ;;
18013esac
18014fi
18015STAT=$ac_cv_path_STAT
18016if test -n "$STAT"; then
18017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18018$as_echo "$STAT" >&6; }
18019else
18020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18021$as_echo "no" >&6; }
18022fi
18023
18024
18025  test -n "$STAT" && break
18026done
18027
18028  else
18029    # The variable is set, but is it from the command line or the environment?
18030
18031    # Try to remove the string !STAT! from our list.
18032    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18033    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18034      # If it failed, the variable was not from the command line. Ignore it,
18035      # but warn the user (except for BASH, which is always set by the calling BASH).
18036      if test "xSTAT" != xBASH; then
18037        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18038$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18039      fi
18040      # Try to locate tool using the code snippet
18041      for ac_prog in stat
18042do
18043  # Extract the first word of "$ac_prog", so it can be a program name with args.
18044set dummy $ac_prog; ac_word=$2
18045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18046$as_echo_n "checking for $ac_word... " >&6; }
18047if ${ac_cv_path_STAT+:} false; then :
18048  $as_echo_n "(cached) " >&6
18049else
18050  case $STAT in
18051  [\\/]* | ?:[\\/]*)
18052  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18053  ;;
18054  *)
18055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18056for as_dir in $PATH
18057do
18058  IFS=$as_save_IFS
18059  test -z "$as_dir" && as_dir=.
18060    for ac_exec_ext in '' $ac_executable_extensions; do
18061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18062    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18064    break 2
18065  fi
18066done
18067  done
18068IFS=$as_save_IFS
18069
18070  ;;
18071esac
18072fi
18073STAT=$ac_cv_path_STAT
18074if test -n "$STAT"; then
18075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18076$as_echo "$STAT" >&6; }
18077else
18078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18079$as_echo "no" >&6; }
18080fi
18081
18082
18083  test -n "$STAT" && break
18084done
18085
18086    else
18087      # If it succeeded, then it was overridden by the user. We will use it
18088      # for the tool.
18089
18090      # First remove it from the list of overridden variables, so we can test
18091      # for unknown variables in the end.
18092      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18093
18094      # Check if the provided tool contains a complete path.
18095      tool_specified="$STAT"
18096      tool_basename="${tool_specified##*/}"
18097      if test "x$tool_basename" = "x$tool_specified"; then
18098        # A command without a complete path is provided, search $PATH.
18099        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18100$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18101        # Extract the first word of "$tool_basename", so it can be a program name with args.
18102set dummy $tool_basename; ac_word=$2
18103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18104$as_echo_n "checking for $ac_word... " >&6; }
18105if ${ac_cv_path_STAT+:} false; then :
18106  $as_echo_n "(cached) " >&6
18107else
18108  case $STAT in
18109  [\\/]* | ?:[\\/]*)
18110  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18111  ;;
18112  *)
18113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18114for as_dir in $PATH
18115do
18116  IFS=$as_save_IFS
18117  test -z "$as_dir" && as_dir=.
18118    for ac_exec_ext in '' $ac_executable_extensions; do
18119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18120    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18122    break 2
18123  fi
18124done
18125  done
18126IFS=$as_save_IFS
18127
18128  ;;
18129esac
18130fi
18131STAT=$ac_cv_path_STAT
18132if test -n "$STAT"; then
18133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18134$as_echo "$STAT" >&6; }
18135else
18136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18137$as_echo "no" >&6; }
18138fi
18139
18140
18141        if test "x$STAT" = x; then
18142          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18143        fi
18144      else
18145        # Otherwise we believe it is a complete path. Use it as it is.
18146        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18147$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18148        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18149$as_echo_n "checking for STAT... " >&6; }
18150        if test ! -x "$tool_specified"; then
18151          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18152$as_echo "not found" >&6; }
18153          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18154        fi
18155        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18156$as_echo "$tool_specified" >&6; }
18157      fi
18158    fi
18159  fi
18160
18161
18162
18163
18164  # Publish this variable in the help.
18165
18166
18167  if test "x$TIME" = x; then
18168    # The variable is not set by user, try to locate tool using the code snippet
18169    for ac_prog in time
18170do
18171  # Extract the first word of "$ac_prog", so it can be a program name with args.
18172set dummy $ac_prog; ac_word=$2
18173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18174$as_echo_n "checking for $ac_word... " >&6; }
18175if ${ac_cv_path_TIME+:} false; then :
18176  $as_echo_n "(cached) " >&6
18177else
18178  case $TIME in
18179  [\\/]* | ?:[\\/]*)
18180  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18181  ;;
18182  *)
18183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18184for as_dir in $PATH
18185do
18186  IFS=$as_save_IFS
18187  test -z "$as_dir" && as_dir=.
18188    for ac_exec_ext in '' $ac_executable_extensions; do
18189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18190    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18192    break 2
18193  fi
18194done
18195  done
18196IFS=$as_save_IFS
18197
18198  ;;
18199esac
18200fi
18201TIME=$ac_cv_path_TIME
18202if test -n "$TIME"; then
18203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18204$as_echo "$TIME" >&6; }
18205else
18206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18207$as_echo "no" >&6; }
18208fi
18209
18210
18211  test -n "$TIME" && break
18212done
18213
18214  else
18215    # The variable is set, but is it from the command line or the environment?
18216
18217    # Try to remove the string !TIME! from our list.
18218    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18219    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18220      # If it failed, the variable was not from the command line. Ignore it,
18221      # but warn the user (except for BASH, which is always set by the calling BASH).
18222      if test "xTIME" != xBASH; then
18223        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18224$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18225      fi
18226      # Try to locate tool using the code snippet
18227      for ac_prog in time
18228do
18229  # Extract the first word of "$ac_prog", so it can be a program name with args.
18230set dummy $ac_prog; ac_word=$2
18231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18232$as_echo_n "checking for $ac_word... " >&6; }
18233if ${ac_cv_path_TIME+:} false; then :
18234  $as_echo_n "(cached) " >&6
18235else
18236  case $TIME in
18237  [\\/]* | ?:[\\/]*)
18238  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18239  ;;
18240  *)
18241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18242for as_dir in $PATH
18243do
18244  IFS=$as_save_IFS
18245  test -z "$as_dir" && as_dir=.
18246    for ac_exec_ext in '' $ac_executable_extensions; do
18247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18248    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18250    break 2
18251  fi
18252done
18253  done
18254IFS=$as_save_IFS
18255
18256  ;;
18257esac
18258fi
18259TIME=$ac_cv_path_TIME
18260if test -n "$TIME"; then
18261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18262$as_echo "$TIME" >&6; }
18263else
18264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18265$as_echo "no" >&6; }
18266fi
18267
18268
18269  test -n "$TIME" && break
18270done
18271
18272    else
18273      # If it succeeded, then it was overridden by the user. We will use it
18274      # for the tool.
18275
18276      # First remove it from the list of overridden variables, so we can test
18277      # for unknown variables in the end.
18278      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18279
18280      # Check if the provided tool contains a complete path.
18281      tool_specified="$TIME"
18282      tool_basename="${tool_specified##*/}"
18283      if test "x$tool_basename" = "x$tool_specified"; then
18284        # A command without a complete path is provided, search $PATH.
18285        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18286$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18287        # Extract the first word of "$tool_basename", so it can be a program name with args.
18288set dummy $tool_basename; ac_word=$2
18289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18290$as_echo_n "checking for $ac_word... " >&6; }
18291if ${ac_cv_path_TIME+:} false; then :
18292  $as_echo_n "(cached) " >&6
18293else
18294  case $TIME in
18295  [\\/]* | ?:[\\/]*)
18296  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18297  ;;
18298  *)
18299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18300for as_dir in $PATH
18301do
18302  IFS=$as_save_IFS
18303  test -z "$as_dir" && as_dir=.
18304    for ac_exec_ext in '' $ac_executable_extensions; do
18305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18306    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18308    break 2
18309  fi
18310done
18311  done
18312IFS=$as_save_IFS
18313
18314  ;;
18315esac
18316fi
18317TIME=$ac_cv_path_TIME
18318if test -n "$TIME"; then
18319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18320$as_echo "$TIME" >&6; }
18321else
18322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18323$as_echo "no" >&6; }
18324fi
18325
18326
18327        if test "x$TIME" = x; then
18328          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18329        fi
18330      else
18331        # Otherwise we believe it is a complete path. Use it as it is.
18332        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18333$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18334        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18335$as_echo_n "checking for TIME... " >&6; }
18336        if test ! -x "$tool_specified"; then
18337          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18338$as_echo "not found" >&6; }
18339          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18340        fi
18341        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18342$as_echo "$tool_specified" >&6; }
18343      fi
18344    fi
18345  fi
18346
18347
18348  # Check if it's GNU time
18349  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18350  if test "x$IS_GNU_TIME" != x; then
18351    IS_GNU_TIME=yes
18352  else
18353    IS_GNU_TIME=no
18354  fi
18355
18356
18357  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18358
18359
18360
18361  # Publish this variable in the help.
18362
18363
18364  if test "x$COMM" = x; then
18365    # The variable is not set by user, try to locate tool using the code snippet
18366    for ac_prog in comm
18367do
18368  # Extract the first word of "$ac_prog", so it can be a program name with args.
18369set dummy $ac_prog; ac_word=$2
18370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18371$as_echo_n "checking for $ac_word... " >&6; }
18372if ${ac_cv_path_COMM+:} false; then :
18373  $as_echo_n "(cached) " >&6
18374else
18375  case $COMM in
18376  [\\/]* | ?:[\\/]*)
18377  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18378  ;;
18379  *)
18380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18381for as_dir in $PATH
18382do
18383  IFS=$as_save_IFS
18384  test -z "$as_dir" && as_dir=.
18385    for ac_exec_ext in '' $ac_executable_extensions; do
18386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18387    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18389    break 2
18390  fi
18391done
18392  done
18393IFS=$as_save_IFS
18394
18395  ;;
18396esac
18397fi
18398COMM=$ac_cv_path_COMM
18399if test -n "$COMM"; then
18400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18401$as_echo "$COMM" >&6; }
18402else
18403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18404$as_echo "no" >&6; }
18405fi
18406
18407
18408  test -n "$COMM" && break
18409done
18410
18411  else
18412    # The variable is set, but is it from the command line or the environment?
18413
18414    # Try to remove the string !COMM! from our list.
18415    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18416    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18417      # If it failed, the variable was not from the command line. Ignore it,
18418      # but warn the user (except for BASH, which is always set by the calling BASH).
18419      if test "xCOMM" != xBASH; then
18420        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18421$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18422      fi
18423      # Try to locate tool using the code snippet
18424      for ac_prog in comm
18425do
18426  # Extract the first word of "$ac_prog", so it can be a program name with args.
18427set dummy $ac_prog; ac_word=$2
18428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18429$as_echo_n "checking for $ac_word... " >&6; }
18430if ${ac_cv_path_COMM+:} false; then :
18431  $as_echo_n "(cached) " >&6
18432else
18433  case $COMM in
18434  [\\/]* | ?:[\\/]*)
18435  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18436  ;;
18437  *)
18438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18439for as_dir in $PATH
18440do
18441  IFS=$as_save_IFS
18442  test -z "$as_dir" && as_dir=.
18443    for ac_exec_ext in '' $ac_executable_extensions; do
18444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18445    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18447    break 2
18448  fi
18449done
18450  done
18451IFS=$as_save_IFS
18452
18453  ;;
18454esac
18455fi
18456COMM=$ac_cv_path_COMM
18457if test -n "$COMM"; then
18458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18459$as_echo "$COMM" >&6; }
18460else
18461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18462$as_echo "no" >&6; }
18463fi
18464
18465
18466  test -n "$COMM" && break
18467done
18468
18469    else
18470      # If it succeeded, then it was overridden by the user. We will use it
18471      # for the tool.
18472
18473      # First remove it from the list of overridden variables, so we can test
18474      # for unknown variables in the end.
18475      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18476
18477      # Check if the provided tool contains a complete path.
18478      tool_specified="$COMM"
18479      tool_basename="${tool_specified##*/}"
18480      if test "x$tool_basename" = "x$tool_specified"; then
18481        # A command without a complete path is provided, search $PATH.
18482        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18483$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18484        # Extract the first word of "$tool_basename", so it can be a program name with args.
18485set dummy $tool_basename; ac_word=$2
18486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18487$as_echo_n "checking for $ac_word... " >&6; }
18488if ${ac_cv_path_COMM+:} false; then :
18489  $as_echo_n "(cached) " >&6
18490else
18491  case $COMM in
18492  [\\/]* | ?:[\\/]*)
18493  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18494  ;;
18495  *)
18496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18497for as_dir in $PATH
18498do
18499  IFS=$as_save_IFS
18500  test -z "$as_dir" && as_dir=.
18501    for ac_exec_ext in '' $ac_executable_extensions; do
18502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18503    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18505    break 2
18506  fi
18507done
18508  done
18509IFS=$as_save_IFS
18510
18511  ;;
18512esac
18513fi
18514COMM=$ac_cv_path_COMM
18515if test -n "$COMM"; then
18516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18517$as_echo "$COMM" >&6; }
18518else
18519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18520$as_echo "no" >&6; }
18521fi
18522
18523
18524        if test "x$COMM" = x; then
18525          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18526        fi
18527      else
18528        # Otherwise we believe it is a complete path. Use it as it is.
18529        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18530$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18531        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18532$as_echo_n "checking for COMM... " >&6; }
18533        if test ! -x "$tool_specified"; then
18534          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18535$as_echo "not found" >&6; }
18536          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18537        fi
18538        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18539$as_echo "$tool_specified" >&6; }
18540      fi
18541    fi
18542  fi
18543
18544
18545
18546  if test "x$COMM" = x; then
18547    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18548  fi
18549
18550
18551  fi
18552
18553  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18554
18555
18556
18557  # Publish this variable in the help.
18558
18559
18560  if test "x$DSYMUTIL" = x; then
18561    # The variable is not set by user, try to locate tool using the code snippet
18562    for ac_prog in dsymutil
18563do
18564  # Extract the first word of "$ac_prog", so it can be a program name with args.
18565set dummy $ac_prog; ac_word=$2
18566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18567$as_echo_n "checking for $ac_word... " >&6; }
18568if ${ac_cv_path_DSYMUTIL+:} false; then :
18569  $as_echo_n "(cached) " >&6
18570else
18571  case $DSYMUTIL in
18572  [\\/]* | ?:[\\/]*)
18573  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18574  ;;
18575  *)
18576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18577for as_dir in $PATH
18578do
18579  IFS=$as_save_IFS
18580  test -z "$as_dir" && as_dir=.
18581    for ac_exec_ext in '' $ac_executable_extensions; do
18582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18583    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18585    break 2
18586  fi
18587done
18588  done
18589IFS=$as_save_IFS
18590
18591  ;;
18592esac
18593fi
18594DSYMUTIL=$ac_cv_path_DSYMUTIL
18595if test -n "$DSYMUTIL"; then
18596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18597$as_echo "$DSYMUTIL" >&6; }
18598else
18599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18600$as_echo "no" >&6; }
18601fi
18602
18603
18604  test -n "$DSYMUTIL" && break
18605done
18606
18607  else
18608    # The variable is set, but is it from the command line or the environment?
18609
18610    # Try to remove the string !DSYMUTIL! from our list.
18611    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18612    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18613      # If it failed, the variable was not from the command line. Ignore it,
18614      # but warn the user (except for BASH, which is always set by the calling BASH).
18615      if test "xDSYMUTIL" != xBASH; then
18616        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18617$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18618      fi
18619      # Try to locate tool using the code snippet
18620      for ac_prog in dsymutil
18621do
18622  # Extract the first word of "$ac_prog", so it can be a program name with args.
18623set dummy $ac_prog; ac_word=$2
18624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18625$as_echo_n "checking for $ac_word... " >&6; }
18626if ${ac_cv_path_DSYMUTIL+:} false; then :
18627  $as_echo_n "(cached) " >&6
18628else
18629  case $DSYMUTIL in
18630  [\\/]* | ?:[\\/]*)
18631  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18632  ;;
18633  *)
18634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18635for as_dir in $PATH
18636do
18637  IFS=$as_save_IFS
18638  test -z "$as_dir" && as_dir=.
18639    for ac_exec_ext in '' $ac_executable_extensions; do
18640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18641    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18643    break 2
18644  fi
18645done
18646  done
18647IFS=$as_save_IFS
18648
18649  ;;
18650esac
18651fi
18652DSYMUTIL=$ac_cv_path_DSYMUTIL
18653if test -n "$DSYMUTIL"; then
18654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18655$as_echo "$DSYMUTIL" >&6; }
18656else
18657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18658$as_echo "no" >&6; }
18659fi
18660
18661
18662  test -n "$DSYMUTIL" && break
18663done
18664
18665    else
18666      # If it succeeded, then it was overridden by the user. We will use it
18667      # for the tool.
18668
18669      # First remove it from the list of overridden variables, so we can test
18670      # for unknown variables in the end.
18671      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18672
18673      # Check if the provided tool contains a complete path.
18674      tool_specified="$DSYMUTIL"
18675      tool_basename="${tool_specified##*/}"
18676      if test "x$tool_basename" = "x$tool_specified"; then
18677        # A command without a complete path is provided, search $PATH.
18678        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
18679$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
18680        # Extract the first word of "$tool_basename", so it can be a program name with args.
18681set dummy $tool_basename; ac_word=$2
18682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18683$as_echo_n "checking for $ac_word... " >&6; }
18684if ${ac_cv_path_DSYMUTIL+:} false; then :
18685  $as_echo_n "(cached) " >&6
18686else
18687  case $DSYMUTIL in
18688  [\\/]* | ?:[\\/]*)
18689  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18690  ;;
18691  *)
18692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18693for as_dir in $PATH
18694do
18695  IFS=$as_save_IFS
18696  test -z "$as_dir" && as_dir=.
18697    for ac_exec_ext in '' $ac_executable_extensions; do
18698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18699    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18701    break 2
18702  fi
18703done
18704  done
18705IFS=$as_save_IFS
18706
18707  ;;
18708esac
18709fi
18710DSYMUTIL=$ac_cv_path_DSYMUTIL
18711if test -n "$DSYMUTIL"; then
18712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18713$as_echo "$DSYMUTIL" >&6; }
18714else
18715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18716$as_echo "no" >&6; }
18717fi
18718
18719
18720        if test "x$DSYMUTIL" = x; then
18721          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18722        fi
18723      else
18724        # Otherwise we believe it is a complete path. Use it as it is.
18725        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
18726$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
18727        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
18728$as_echo_n "checking for DSYMUTIL... " >&6; }
18729        if test ! -x "$tool_specified"; then
18730          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18731$as_echo "not found" >&6; }
18732          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
18733        fi
18734        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18735$as_echo "$tool_specified" >&6; }
18736      fi
18737    fi
18738  fi
18739
18740
18741
18742  if test "x$DSYMUTIL" = x; then
18743    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
18744  fi
18745
18746
18747
18748
18749
18750  # Publish this variable in the help.
18751
18752
18753  if test "x$XATTR" = x; then
18754    # The variable is not set by user, try to locate tool using the code snippet
18755    for ac_prog in xattr
18756do
18757  # Extract the first word of "$ac_prog", so it can be a program name with args.
18758set dummy $ac_prog; ac_word=$2
18759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18760$as_echo_n "checking for $ac_word... " >&6; }
18761if ${ac_cv_path_XATTR+:} false; then :
18762  $as_echo_n "(cached) " >&6
18763else
18764  case $XATTR in
18765  [\\/]* | ?:[\\/]*)
18766  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18767  ;;
18768  *)
18769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18770for as_dir in $PATH
18771do
18772  IFS=$as_save_IFS
18773  test -z "$as_dir" && as_dir=.
18774    for ac_exec_ext in '' $ac_executable_extensions; do
18775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18776    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18778    break 2
18779  fi
18780done
18781  done
18782IFS=$as_save_IFS
18783
18784  ;;
18785esac
18786fi
18787XATTR=$ac_cv_path_XATTR
18788if test -n "$XATTR"; then
18789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18790$as_echo "$XATTR" >&6; }
18791else
18792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18793$as_echo "no" >&6; }
18794fi
18795
18796
18797  test -n "$XATTR" && break
18798done
18799
18800  else
18801    # The variable is set, but is it from the command line or the environment?
18802
18803    # Try to remove the string !XATTR! from our list.
18804    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
18805    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18806      # If it failed, the variable was not from the command line. Ignore it,
18807      # but warn the user (except for BASH, which is always set by the calling BASH).
18808      if test "xXATTR" != xBASH; then
18809        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
18810$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
18811      fi
18812      # Try to locate tool using the code snippet
18813      for ac_prog in xattr
18814do
18815  # Extract the first word of "$ac_prog", so it can be a program name with args.
18816set dummy $ac_prog; ac_word=$2
18817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18818$as_echo_n "checking for $ac_word... " >&6; }
18819if ${ac_cv_path_XATTR+:} false; then :
18820  $as_echo_n "(cached) " >&6
18821else
18822  case $XATTR in
18823  [\\/]* | ?:[\\/]*)
18824  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18825  ;;
18826  *)
18827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18828for as_dir in $PATH
18829do
18830  IFS=$as_save_IFS
18831  test -z "$as_dir" && as_dir=.
18832    for ac_exec_ext in '' $ac_executable_extensions; do
18833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18834    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18836    break 2
18837  fi
18838done
18839  done
18840IFS=$as_save_IFS
18841
18842  ;;
18843esac
18844fi
18845XATTR=$ac_cv_path_XATTR
18846if test -n "$XATTR"; then
18847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18848$as_echo "$XATTR" >&6; }
18849else
18850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18851$as_echo "no" >&6; }
18852fi
18853
18854
18855  test -n "$XATTR" && break
18856done
18857
18858    else
18859      # If it succeeded, then it was overridden by the user. We will use it
18860      # for the tool.
18861
18862      # First remove it from the list of overridden variables, so we can test
18863      # for unknown variables in the end.
18864      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18865
18866      # Check if the provided tool contains a complete path.
18867      tool_specified="$XATTR"
18868      tool_basename="${tool_specified##*/}"
18869      if test "x$tool_basename" = "x$tool_specified"; then
18870        # A command without a complete path is provided, search $PATH.
18871        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
18872$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
18873        # Extract the first word of "$tool_basename", so it can be a program name with args.
18874set dummy $tool_basename; ac_word=$2
18875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18876$as_echo_n "checking for $ac_word... " >&6; }
18877if ${ac_cv_path_XATTR+:} false; then :
18878  $as_echo_n "(cached) " >&6
18879else
18880  case $XATTR in
18881  [\\/]* | ?:[\\/]*)
18882  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18883  ;;
18884  *)
18885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18886for as_dir in $PATH
18887do
18888  IFS=$as_save_IFS
18889  test -z "$as_dir" && as_dir=.
18890    for ac_exec_ext in '' $ac_executable_extensions; do
18891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18892    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18894    break 2
18895  fi
18896done
18897  done
18898IFS=$as_save_IFS
18899
18900  ;;
18901esac
18902fi
18903XATTR=$ac_cv_path_XATTR
18904if test -n "$XATTR"; then
18905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18906$as_echo "$XATTR" >&6; }
18907else
18908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18909$as_echo "no" >&6; }
18910fi
18911
18912
18913        if test "x$XATTR" = x; then
18914          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18915        fi
18916      else
18917        # Otherwise we believe it is a complete path. Use it as it is.
18918        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
18919$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
18920        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
18921$as_echo_n "checking for XATTR... " >&6; }
18922        if test ! -x "$tool_specified"; then
18923          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18924$as_echo "not found" >&6; }
18925          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
18926        fi
18927        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18928$as_echo "$tool_specified" >&6; }
18929      fi
18930    fi
18931  fi
18932
18933
18934
18935  if test "x$XATTR" = x; then
18936    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
18937  fi
18938
18939
18940
18941
18942  # Publish this variable in the help.
18943
18944
18945  if test "x$CODESIGN" = x; then
18946    # The variable is not set by user, try to locate tool using the code snippet
18947    for ac_prog in codesign
18948do
18949  # Extract the first word of "$ac_prog", so it can be a program name with args.
18950set dummy $ac_prog; ac_word=$2
18951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18952$as_echo_n "checking for $ac_word... " >&6; }
18953if ${ac_cv_path_CODESIGN+:} false; then :
18954  $as_echo_n "(cached) " >&6
18955else
18956  case $CODESIGN in
18957  [\\/]* | ?:[\\/]*)
18958  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18959  ;;
18960  *)
18961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18962for as_dir in $PATH
18963do
18964  IFS=$as_save_IFS
18965  test -z "$as_dir" && as_dir=.
18966    for ac_exec_ext in '' $ac_executable_extensions; do
18967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18968    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18970    break 2
18971  fi
18972done
18973  done
18974IFS=$as_save_IFS
18975
18976  ;;
18977esac
18978fi
18979CODESIGN=$ac_cv_path_CODESIGN
18980if test -n "$CODESIGN"; then
18981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
18982$as_echo "$CODESIGN" >&6; }
18983else
18984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18985$as_echo "no" >&6; }
18986fi
18987
18988
18989  test -n "$CODESIGN" && break
18990done
18991
18992  else
18993    # The variable is set, but is it from the command line or the environment?
18994
18995    # Try to remove the string !CODESIGN! from our list.
18996    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
18997    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18998      # If it failed, the variable was not from the command line. Ignore it,
18999      # but warn the user (except for BASH, which is always set by the calling BASH).
19000      if test "xCODESIGN" != xBASH; then
19001        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19002$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19003      fi
19004      # Try to locate tool using the code snippet
19005      for ac_prog in codesign
19006do
19007  # Extract the first word of "$ac_prog", so it can be a program name with args.
19008set dummy $ac_prog; ac_word=$2
19009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19010$as_echo_n "checking for $ac_word... " >&6; }
19011if ${ac_cv_path_CODESIGN+:} false; then :
19012  $as_echo_n "(cached) " >&6
19013else
19014  case $CODESIGN in
19015  [\\/]* | ?:[\\/]*)
19016  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19017  ;;
19018  *)
19019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19020for as_dir in $PATH
19021do
19022  IFS=$as_save_IFS
19023  test -z "$as_dir" && as_dir=.
19024    for ac_exec_ext in '' $ac_executable_extensions; do
19025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19026    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19028    break 2
19029  fi
19030done
19031  done
19032IFS=$as_save_IFS
19033
19034  ;;
19035esac
19036fi
19037CODESIGN=$ac_cv_path_CODESIGN
19038if test -n "$CODESIGN"; then
19039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19040$as_echo "$CODESIGN" >&6; }
19041else
19042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19043$as_echo "no" >&6; }
19044fi
19045
19046
19047  test -n "$CODESIGN" && break
19048done
19049
19050    else
19051      # If it succeeded, then it was overridden by the user. We will use it
19052      # for the tool.
19053
19054      # First remove it from the list of overridden variables, so we can test
19055      # for unknown variables in the end.
19056      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19057
19058      # Check if the provided tool contains a complete path.
19059      tool_specified="$CODESIGN"
19060      tool_basename="${tool_specified##*/}"
19061      if test "x$tool_basename" = "x$tool_specified"; then
19062        # A command without a complete path is provided, search $PATH.
19063        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19064$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19065        # Extract the first word of "$tool_basename", so it can be a program name with args.
19066set dummy $tool_basename; ac_word=$2
19067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19068$as_echo_n "checking for $ac_word... " >&6; }
19069if ${ac_cv_path_CODESIGN+:} false; then :
19070  $as_echo_n "(cached) " >&6
19071else
19072  case $CODESIGN in
19073  [\\/]* | ?:[\\/]*)
19074  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19075  ;;
19076  *)
19077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19078for as_dir in $PATH
19079do
19080  IFS=$as_save_IFS
19081  test -z "$as_dir" && as_dir=.
19082    for ac_exec_ext in '' $ac_executable_extensions; do
19083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19084    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19086    break 2
19087  fi
19088done
19089  done
19090IFS=$as_save_IFS
19091
19092  ;;
19093esac
19094fi
19095CODESIGN=$ac_cv_path_CODESIGN
19096if test -n "$CODESIGN"; then
19097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19098$as_echo "$CODESIGN" >&6; }
19099else
19100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19101$as_echo "no" >&6; }
19102fi
19103
19104
19105        if test "x$CODESIGN" = x; then
19106          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19107        fi
19108      else
19109        # Otherwise we believe it is a complete path. Use it as it is.
19110        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19111$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19112        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19113$as_echo_n "checking for CODESIGN... " >&6; }
19114        if test ! -x "$tool_specified"; then
19115          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19116$as_echo "not found" >&6; }
19117          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19118        fi
19119        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19120$as_echo "$tool_specified" >&6; }
19121      fi
19122    fi
19123  fi
19124
19125
19126    if test "x$CODESIGN" != "x"; then
19127      # Verify that the openjdk_codesign certificate is present
19128      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19129$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19130      rm -f codesign-testfile
19131      touch codesign-testfile
19132      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19133      rm -f codesign-testfile
19134      if test "x$CODESIGN" = x; then
19135        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19136$as_echo "no" >&6; }
19137      else
19138        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19139$as_echo "yes" >&6; }
19140      fi
19141    fi
19142  fi
19143
19144
19145# Check if pkg-config is available.
19146
19147
19148if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19149	if test -n "$ac_tool_prefix"; then
19150  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19151set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19153$as_echo_n "checking for $ac_word... " >&6; }
19154if ${ac_cv_path_PKG_CONFIG+:} false; then :
19155  $as_echo_n "(cached) " >&6
19156else
19157  case $PKG_CONFIG in
19158  [\\/]* | ?:[\\/]*)
19159  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19160  ;;
19161  *)
19162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19163for as_dir in $PATH
19164do
19165  IFS=$as_save_IFS
19166  test -z "$as_dir" && as_dir=.
19167    for ac_exec_ext in '' $ac_executable_extensions; do
19168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19169    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19171    break 2
19172  fi
19173done
19174  done
19175IFS=$as_save_IFS
19176
19177  ;;
19178esac
19179fi
19180PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19181if test -n "$PKG_CONFIG"; then
19182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19183$as_echo "$PKG_CONFIG" >&6; }
19184else
19185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19186$as_echo "no" >&6; }
19187fi
19188
19189
19190fi
19191if test -z "$ac_cv_path_PKG_CONFIG"; then
19192  ac_pt_PKG_CONFIG=$PKG_CONFIG
19193  # Extract the first word of "pkg-config", so it can be a program name with args.
19194set dummy pkg-config; ac_word=$2
19195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19196$as_echo_n "checking for $ac_word... " >&6; }
19197if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19198  $as_echo_n "(cached) " >&6
19199else
19200  case $ac_pt_PKG_CONFIG in
19201  [\\/]* | ?:[\\/]*)
19202  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19203  ;;
19204  *)
19205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19206for as_dir in $PATH
19207do
19208  IFS=$as_save_IFS
19209  test -z "$as_dir" && as_dir=.
19210    for ac_exec_ext in '' $ac_executable_extensions; do
19211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19212    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19214    break 2
19215  fi
19216done
19217  done
19218IFS=$as_save_IFS
19219
19220  ;;
19221esac
19222fi
19223ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19224if test -n "$ac_pt_PKG_CONFIG"; then
19225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19226$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19227else
19228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19229$as_echo "no" >&6; }
19230fi
19231
19232  if test "x$ac_pt_PKG_CONFIG" = x; then
19233    PKG_CONFIG=""
19234  else
19235    case $cross_compiling:$ac_tool_warned in
19236yes:)
19237{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19238$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19239ac_tool_warned=yes ;;
19240esac
19241    PKG_CONFIG=$ac_pt_PKG_CONFIG
19242  fi
19243else
19244  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19245fi
19246
19247fi
19248if test -n "$PKG_CONFIG"; then
19249	_pkg_min_version=0.9.0
19250	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19251$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19252	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19253		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19254$as_echo "yes" >&6; }
19255	else
19256		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19257$as_echo "no" >&6; }
19258		PKG_CONFIG=""
19259	fi
19260
19261fi
19262
19263# After basic tools have been setup, we can check build os specific details.
19264
19265  ###############################################################################
19266
19267  # Note that this is the build platform OS version!
19268
19269  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19270  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19271  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19272  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19273
19274
19275
19276
19277
19278# Setup builddeps, for automatic downloading of tools we need.
19279# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19280# boot-jdk setup, but we need to have basic tools setup first.
19281
19282
19283# Check whether --with-builddeps-conf was given.
19284if test "${with_builddeps_conf+set}" = set; then :
19285  withval=$with_builddeps_conf;
19286fi
19287
19288
19289
19290# Check whether --with-builddeps-server was given.
19291if test "${with_builddeps_server+set}" = set; then :
19292  withval=$with_builddeps_server;
19293fi
19294
19295
19296
19297# Check whether --with-builddeps-dir was given.
19298if test "${with_builddeps_dir+set}" = set; then :
19299  withval=$with_builddeps_dir;
19300else
19301  with_builddeps_dir=/localhome/builddeps
19302fi
19303
19304
19305
19306# Check whether --with-builddeps-group was given.
19307if test "${with_builddeps_group+set}" = set; then :
19308  withval=$with_builddeps_group;
19309fi
19310
19311
19312
19313
19314  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19315    if test "x$with_builddeps_conf" != x; then
19316      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19317$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19318      builddepsfile=$with_builddeps_conf
19319      if test -s $builddepsfile; then
19320        . $builddepsfile
19321        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19322$as_echo "loaded!" >&6; }
19323      else
19324        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19325      fi
19326    else
19327      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19328$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19329      builddepsfile=`mktemp`
19330      touch $builddepsfile
19331      # Put all found confs into a single file.
19332      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19333      # Source the file to acquire the variables
19334      if test -s $builddepsfile; then
19335        . $builddepsfile
19336        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19337$as_echo "found at least one!" >&6; }
19338      else
19339        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19340      fi
19341    fi
19342    # Create build and target names that use _ instead of "-" and ".".
19343    # This is necessary to use them in variable names.
19344    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19345    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19346    # Extract rewrite information for build and target
19347    eval rewritten_build=\${REWRITE_${build_var}}
19348    if test "x$rewritten_build" = x; then
19349      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19350      echo Build stays the same $rewritten_build
19351    else
19352      echo Rewriting build for builddeps into $rewritten_build
19353    fi
19354    eval rewritten_target=\${REWRITE_${target_var}}
19355    if test "x$rewritten_target" = x; then
19356      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19357      echo Target stays the same $rewritten_target
19358    else
19359      echo Rewriting target for builddeps into $rewritten_target
19360    fi
19361    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19362    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19363  fi
19364  for ac_prog in 7z unzip
19365do
19366  # Extract the first word of "$ac_prog", so it can be a program name with args.
19367set dummy $ac_prog; ac_word=$2
19368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19369$as_echo_n "checking for $ac_word... " >&6; }
19370if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19371  $as_echo_n "(cached) " >&6
19372else
19373  if test -n "$BDEPS_UNZIP"; then
19374  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19375else
19376as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19377for as_dir in $PATH
19378do
19379  IFS=$as_save_IFS
19380  test -z "$as_dir" && as_dir=.
19381    for ac_exec_ext in '' $ac_executable_extensions; do
19382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19383    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19385    break 2
19386  fi
19387done
19388  done
19389IFS=$as_save_IFS
19390
19391fi
19392fi
19393BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19394if test -n "$BDEPS_UNZIP"; then
19395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19396$as_echo "$BDEPS_UNZIP" >&6; }
19397else
19398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19399$as_echo "no" >&6; }
19400fi
19401
19402
19403  test -n "$BDEPS_UNZIP" && break
19404done
19405
19406  if test "x$BDEPS_UNZIP" = x7z; then
19407    BDEPS_UNZIP="7z x"
19408  fi
19409
19410  for ac_prog in wget lftp ftp
19411do
19412  # Extract the first word of "$ac_prog", so it can be a program name with args.
19413set dummy $ac_prog; ac_word=$2
19414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19415$as_echo_n "checking for $ac_word... " >&6; }
19416if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19417  $as_echo_n "(cached) " >&6
19418else
19419  if test -n "$BDEPS_FTP"; then
19420  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19421else
19422as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19423for as_dir in $PATH
19424do
19425  IFS=$as_save_IFS
19426  test -z "$as_dir" && as_dir=.
19427    for ac_exec_ext in '' $ac_executable_extensions; do
19428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19429    ac_cv_prog_BDEPS_FTP="$ac_prog"
19430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19431    break 2
19432  fi
19433done
19434  done
19435IFS=$as_save_IFS
19436
19437fi
19438fi
19439BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19440if test -n "$BDEPS_FTP"; then
19441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19442$as_echo "$BDEPS_FTP" >&6; }
19443else
19444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19445$as_echo "no" >&6; }
19446fi
19447
19448
19449  test -n "$BDEPS_FTP" && break
19450done
19451
19452
19453
19454###############################################################################
19455#
19456# Determine OpenJDK variants, options and version numbers.
19457#
19458###############################################################################
19459
19460# We need build & target for this.
19461
19462
19463  ###############################################################################
19464  #
19465  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19466  # We always build headless support.
19467  #
19468  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19469$as_echo_n "checking headful support... " >&6; }
19470  # Check whether --enable-headful was given.
19471if test "${enable_headful+set}" = set; then :
19472  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19473else
19474  SUPPORT_HEADFUL=yes
19475fi
19476
19477
19478  SUPPORT_HEADLESS=yes
19479  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19480
19481  if test "x$SUPPORT_HEADFUL" = xyes; then
19482    # We are building both headful and headless.
19483    headful_msg="include support for both headful and headless"
19484  fi
19485
19486  if test "x$SUPPORT_HEADFUL" = xno; then
19487    # Thus we are building headless only.
19488    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19489    headful_msg="headless only"
19490  fi
19491
19492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19493$as_echo "$headful_msg" >&6; }
19494
19495
19496
19497
19498
19499  # Control wether Hotspot runs Queens test after build.
19500  # Check whether --enable-hotspot-test-in-build was given.
19501if test "${enable_hotspot_test_in_build+set}" = set; then :
19502  enableval=$enable_hotspot_test_in_build;
19503else
19504  enable_hotspot_test_in_build=no
19505fi
19506
19507  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19508    TEST_IN_BUILD=true
19509  else
19510    TEST_IN_BUILD=false
19511  fi
19512
19513
19514  ###############################################################################
19515  #
19516  # Choose cacerts source file
19517  #
19518
19519# Check whether --with-cacerts-file was given.
19520if test "${with_cacerts_file+set}" = set; then :
19521  withval=$with_cacerts_file;
19522fi
19523
19524  if test "x$with_cacerts_file" != x; then
19525    CACERTS_FILE=$with_cacerts_file
19526  else
19527    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19528  fi
19529
19530
19531  ###############################################################################
19532  #
19533  # Enable or disable unlimited crypto
19534  #
19535  # Check whether --enable-unlimited-crypto was given.
19536if test "${enable_unlimited_crypto+set}" = set; then :
19537  enableval=$enable_unlimited_crypto;
19538else
19539  enable_unlimited_crypto=no
19540fi
19541
19542  if test "x$enable_unlimited_crypto" = "xyes"; then
19543    UNLIMITED_CRYPTO=true
19544  else
19545    UNLIMITED_CRYPTO=false
19546  fi
19547
19548
19549  ###############################################################################
19550  #
19551  # Enable or disable the elliptic curve crypto implementation
19552  #
19553
19554
19555  ###############################################################################
19556  #
19557  # --enable-rmiconnector-iiop
19558  #
19559  # Check whether --enable-rmiconnector-iiop was given.
19560if test "${enable_rmiconnector_iiop+set}" = set; then :
19561  enableval=$enable_rmiconnector_iiop;
19562fi
19563
19564  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19565    RMICONNECTOR_IIOP=true
19566  else
19567    RMICONNECTOR_IIOP=false
19568  fi
19569
19570
19571  ###############################################################################
19572  #
19573  # Compress jars
19574  #
19575  COMPRESS_JARS=false
19576
19577
19578
19579
19580  # Source the version numbers
19581  . $AUTOCONF_DIR/version-numbers
19582
19583  # Get the settings from parameters
19584
19585# Check whether --with-milestone was given.
19586if test "${with_milestone+set}" = set; then :
19587  withval=$with_milestone;
19588fi
19589
19590  if test "x$with_milestone" = xyes; then
19591    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19592  elif test "x$with_milestone" != x; then
19593    MILESTONE="$with_milestone"
19594  fi
19595  if test "x$MILESTONE" = x; then
19596    MILESTONE=internal
19597  fi
19598
19599
19600# Check whether --with-update-version was given.
19601if test "${with_update_version+set}" = set; then :
19602  withval=$with_update_version;
19603fi
19604
19605  if test "x$with_update_version" = xyes; then
19606    as_fn_error $? "Update version must have a value" "$LINENO" 5
19607  elif test "x$with_update_version" != x; then
19608    JDK_UPDATE_VERSION="$with_update_version"
19609    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19610    # to a bug in expr (which reduces it to just X). To work around this, we
19611    # always add a 0 to one digit update versions.
19612    if test "${#JDK_UPDATE_VERSION}" = "1"; then
19613      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19614    fi
19615  fi
19616
19617
19618# Check whether --with-user-release-suffix was given.
19619if test "${with_user_release_suffix+set}" = set; then :
19620  withval=$with_user_release_suffix;
19621fi
19622
19623  if test "x$with_user_release_suffix" = xyes; then
19624    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19625  elif test "x$with_user_release_suffix" != x; then
19626    USER_RELEASE_SUFFIX="$with_user_release_suffix"
19627  fi
19628
19629
19630# Check whether --with-build-number was given.
19631if test "${with_build_number+set}" = set; then :
19632  withval=$with_build_number;
19633fi
19634
19635  if test "x$with_build_number" = xyes; then
19636    as_fn_error $? "Build number must have a value" "$LINENO" 5
19637  elif test "x$with_build_number" != x; then
19638    JDK_BUILD_NUMBER="$with_build_number"
19639  fi
19640  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19641  if test "x$JDK_BUILD_NUMBER" = x; then
19642    JDK_BUILD_NUMBER=b00
19643    if test "x$USER_RELEASE_SUFFIX" = x; then
19644      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19645      # Avoid [:alnum:] since it depends on the locale.
19646      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19647      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19648    fi
19649  fi
19650
19651  # Now set the JDK version, milestone, build number etc.
19652
19653
19654
19655
19656
19657
19658
19659
19660
19661
19662
19663
19664
19665
19666
19667  COPYRIGHT_YEAR=`date +'%Y'`
19668
19669
19670  if test "x$JDK_UPDATE_VERSION" != x; then
19671    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
19672  else
19673    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
19674  fi
19675
19676
19677  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
19678
19679
19680
19681###############################################################################
19682#
19683# Setup BootJDK, used to bootstrap the build.
19684#
19685###############################################################################
19686
19687
19688  BOOT_JDK_FOUND=no
19689
19690# Check whether --with-boot-jdk was given.
19691if test "${with_boot_jdk+set}" = set; then :
19692  withval=$with_boot_jdk;
19693fi
19694
19695
19696  # We look for the Boot JDK through various means, going from more certain to
19697  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
19698  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
19699  # must check if this is indeed valid; otherwise we'll continue looking.
19700
19701  # Test: Is bootjdk explicitely set by command line arguments?
19702
19703  if test "x$BOOT_JDK_FOUND" = xno; then
19704    # Now execute the test
19705
19706  if test "x$with_boot_jdk" != x; then
19707    BOOT_JDK=$with_boot_jdk
19708    BOOT_JDK_FOUND=maybe
19709    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
19710$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
19711  fi
19712
19713
19714    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19715    if test "x$BOOT_JDK_FOUND" = xmaybe; then
19716      # Do we have a bin/java?
19717      if test ! -x "$BOOT_JDK/bin/java"; then
19718        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19719$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19720        BOOT_JDK_FOUND=no
19721      else
19722        # Do we have a bin/javac?
19723        if test ! -x "$BOOT_JDK/bin/javac"; then
19724          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19725$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19726          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19727$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19728          BOOT_JDK_FOUND=no
19729        else
19730          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19731          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19732            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19733$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19734            BOOT_JDK_FOUND=no
19735          else
19736            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19737            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19738
19739            # Extra M4 quote needed to protect [] in grep expression.
19740            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
19741            if test "x$FOUND_CORRECT_VERSION" = x; then
19742              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19743$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19744              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
19745$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
19746              BOOT_JDK_FOUND=no
19747            else
19748              # We're done! :-)
19749              BOOT_JDK_FOUND=yes
19750
19751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19752
19753  # Input might be given as Windows format, start by converting to
19754  # unix format.
19755  path="$BOOT_JDK"
19756  new_path=`$CYGPATH -u "$path"`
19757
19758  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19759  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19760  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19761  # "foo.exe" is OK but "foo" is an error.
19762  #
19763  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19764  # It is also a way to make sure we got the proper file name for the real test later on.
19765  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19766  if test "x$test_shortpath" = x; then
19767    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19768$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19769    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19770  fi
19771
19772  # Call helper function which possibly converts this using DOS-style short mode.
19773  # If so, the updated path is stored in $new_path.
19774
19775  input_path="$new_path"
19776  # Check if we need to convert this using DOS-style short mode. If the path
19777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19778  # take no chances and rewrite it.
19779  # Note: m4 eats our [], so we need to use [ and ] instead.
19780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19781  if test "x$has_forbidden_chars" != x; then
19782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19783    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19784    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19785    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19786      # Going to short mode and back again did indeed matter. Since short mode is
19787      # case insensitive, let's make it lowercase to improve readability.
19788      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19789      # Now convert it back to Unix-stile (cygpath)
19790      input_path=`$CYGPATH -u "$shortmode_path"`
19791      new_path="$input_path"
19792    fi
19793  fi
19794
19795  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19796  if test "x$test_cygdrive_prefix" = x; then
19797    # As a simple fix, exclude /usr/bin since it's not a real path.
19798    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19799      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19800      # a path prefixed by /cygdrive for fixpath to work.
19801      new_path="$CYGWIN_ROOT_PATH$input_path"
19802    fi
19803  fi
19804
19805
19806  if test "x$path" != "x$new_path"; then
19807    BOOT_JDK="$new_path"
19808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19809$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19810  fi
19811
19812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19813
19814  path="$BOOT_JDK"
19815  has_colon=`$ECHO $path | $GREP ^.:`
19816  new_path="$path"
19817  if test "x$has_colon" = x; then
19818    # Not in mixed or Windows style, start by that.
19819    new_path=`cmd //c echo $path`
19820  fi
19821
19822
19823  input_path="$new_path"
19824  # Check if we need to convert this using DOS-style short mode. If the path
19825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19826  # take no chances and rewrite it.
19827  # Note: m4 eats our [], so we need to use [ and ] instead.
19828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19829  if test "x$has_forbidden_chars" != x; then
19830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19831    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19832  fi
19833
19834
19835  windows_path="$new_path"
19836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19837    unix_path=`$CYGPATH -u "$windows_path"`
19838    new_path="$unix_path"
19839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19841    new_path="$unix_path"
19842  fi
19843
19844  if test "x$path" != "x$new_path"; then
19845    BOOT_JDK="$new_path"
19846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19847$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19848  fi
19849
19850  # Save the first 10 bytes of this path to the storage, so fixpath can work.
19851  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19852
19853  else
19854    # We're on a posix platform. Hooray! :)
19855    path="$BOOT_JDK"
19856    has_space=`$ECHO "$path" | $GREP " "`
19857    if test "x$has_space" != x; then
19858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19859$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19860      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
19861    fi
19862
19863    # Use eval to expand a potential ~
19864    eval path="$path"
19865    if test ! -f "$path" && test ! -d "$path"; then
19866      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
19867    fi
19868
19869    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
19870  fi
19871
19872              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
19873$as_echo_n "checking for Boot JDK... " >&6; }
19874              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
19875$as_echo "$BOOT_JDK" >&6; }
19876              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
19877$as_echo_n "checking Boot JDK version... " >&6; }
19878              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
19879              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
19880$as_echo "$BOOT_JDK_VERSION" >&6; }
19881            fi # end check jdk version
19882          fi # end check rt.jar
19883        fi # end check javac
19884      fi # end check java
19885    fi # end check boot jdk found
19886  fi
19887
19888  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
19889    # Having specified an argument which is incorrect will produce an instant failure;
19890    # we should not go on looking
19891    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
19892  fi
19893
19894  # Test: Is bootjdk available from builddeps?
19895
19896  if test "x$BOOT_JDK_FOUND" = xno; then
19897    # Now execute the test
19898
19899
19900
19901  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19902    # Source the builddeps file again, to make sure it uses the latest variables!
19903    . $builddepsfile
19904    # Look for a target and build machine specific resource!
19905    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19906    if test "x$resource" = x; then
19907      # Ok, lets instead look for a target specific resource
19908      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
19909    fi
19910    if test "x$resource" = x; then
19911      # Ok, lets instead look for a build specific resource
19912      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
19913    fi
19914    if test "x$resource" = x; then
19915      # Ok, lets instead look for a generic resource
19916      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
19917      resource=${builddep_bootjdk}
19918    fi
19919    if test "x$resource" != x; then
19920      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
19921$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
19922      # If the resource in the builddeps.conf file is an existing directory,
19923      # for example /java/linux/cups
19924      if test -d ${resource}; then
19925        depdir=${resource}
19926      else
19927
19928  # bootjdk is for example mymodule
19929  # $resource is for example libs/general/libmymod_1_2_3.zip
19930  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19931  # $with_builddeps_dir is for example /localhome/builddeps
19932  # depdir is the name of the variable into which we store the depdir, eg MYMOD
19933  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19934  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19935  filename=`basename $resource`
19936  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19937  filebase=${filename%%.*}
19938  extension=${filename#*.}
19939  installdir=$with_builddeps_dir/$filebase
19940  if test ! -f $installdir/$filename.unpacked; then
19941    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
19942$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19943    if test ! -d $installdir; then
19944      mkdir -p $installdir
19945    fi
19946    if test ! -d $installdir; then
19947      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19948    fi
19949    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
19950    touch $tmpfile
19951    if test ! -f $tmpfile; then
19952      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19953    fi
19954
19955  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19956  # $tmpfile is the local file name for the downloaded file.
19957  VALID_TOOL=no
19958  if test "x$BDEPS_FTP" = xwget; then
19959    VALID_TOOL=yes
19960    wget -O $tmpfile $with_builddeps_server/$resource
19961  fi
19962  if test "x$BDEPS_FTP" = xlftp; then
19963    VALID_TOOL=yes
19964    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19965  fi
19966  if test "x$BDEPS_FTP" = xftp; then
19967    VALID_TOOL=yes
19968    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19969    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19970    FTPUSERPWD=${FTPSERVER%%@*}
19971    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19972      FTPUSER=${userpwd%%:*}
19973      FTPPWD=${userpwd#*@}
19974      FTPSERVER=${FTPSERVER#*@}
19975    else
19976      FTPUSER=ftp
19977      FTPPWD=ftp
19978    fi
19979    # the "pass" command does not work on some
19980    # ftp clients (read ftp.exe) but if it works,
19981    # passive mode is better!
19982    ( \
19983        echo "user $FTPUSER $FTPPWD"        ; \
19984        echo "pass"                         ; \
19985        echo "bin"                          ; \
19986        echo "get $FTPPATH $tmpfile"              ; \
19987    ) | ftp -in $FTPSERVER
19988  fi
19989  if test "x$VALID_TOOL" != xyes; then
19990    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19991  fi
19992
19993    mv $tmpfile $installdir/$filename
19994    if test ! -s $installdir/$filename; then
19995      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19996    fi
19997    case "$extension" in
19998      zip)  echo "Unzipping $installdir/$filename..."
19999        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20000        ;;
20001      tar.gz) echo "Untaring $installdir/$filename..."
20002        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20003        ;;
20004      tgz) echo "Untaring $installdir/$filename..."
20005        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20006        ;;
20007      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20008        ;;
20009    esac
20010  fi
20011  if test -f $installdir/$filename.unpacked; then
20012    depdir=$installdir
20013  fi
20014
20015      fi
20016      # Source the builddeps file again, because in the previous command, the depdir
20017      # was updated to point at the current build dependency install directory.
20018      . $builddepsfile
20019      # Now extract variables from the builddeps.conf files.
20020      theroot=${builddep_bootjdk_ROOT}
20021      thecflags=${builddep_bootjdk_CFLAGS}
20022      thelibs=${builddep_bootjdk_LIBS}
20023      if test "x$depdir" = x; then
20024        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20025      fi
20026      BOOT_JDK=$depdir
20027      if test "x$theroot" != x; then
20028        BOOT_JDK="$theroot"
20029      fi
20030      if test "x$thecflags" != x; then
20031        BOOT_JDK_CFLAGS="$thecflags"
20032      fi
20033      if test "x$thelibs" != x; then
20034        BOOT_JDK_LIBS="$thelibs"
20035      fi
20036      BOOT_JDK_FOUND=maybe
20037      else BOOT_JDK_FOUND=no
20038
20039    fi
20040    else BOOT_JDK_FOUND=no
20041
20042  fi
20043
20044
20045
20046    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20047    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20048      # Do we have a bin/java?
20049      if test ! -x "$BOOT_JDK/bin/java"; then
20050        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20051$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20052        BOOT_JDK_FOUND=no
20053      else
20054        # Do we have a bin/javac?
20055        if test ! -x "$BOOT_JDK/bin/javac"; then
20056          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20057$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20058          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20059$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20060          BOOT_JDK_FOUND=no
20061        else
20062          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20063          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20064            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20065$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20066            BOOT_JDK_FOUND=no
20067          else
20068            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20069            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20070
20071            # Extra M4 quote needed to protect [] in grep expression.
20072            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20073            if test "x$FOUND_CORRECT_VERSION" = x; then
20074              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20075$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20076              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20077$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20078              BOOT_JDK_FOUND=no
20079            else
20080              # We're done! :-)
20081              BOOT_JDK_FOUND=yes
20082
20083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20084
20085  # Input might be given as Windows format, start by converting to
20086  # unix format.
20087  path="$BOOT_JDK"
20088  new_path=`$CYGPATH -u "$path"`
20089
20090  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20091  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20092  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20093  # "foo.exe" is OK but "foo" is an error.
20094  #
20095  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20096  # It is also a way to make sure we got the proper file name for the real test later on.
20097  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20098  if test "x$test_shortpath" = x; then
20099    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20100$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20101    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20102  fi
20103
20104  # Call helper function which possibly converts this using DOS-style short mode.
20105  # If so, the updated path is stored in $new_path.
20106
20107  input_path="$new_path"
20108  # Check if we need to convert this using DOS-style short mode. If the path
20109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20110  # take no chances and rewrite it.
20111  # Note: m4 eats our [], so we need to use [ and ] instead.
20112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20113  if test "x$has_forbidden_chars" != x; then
20114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20115    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20116    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20117    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20118      # Going to short mode and back again did indeed matter. Since short mode is
20119      # case insensitive, let's make it lowercase to improve readability.
20120      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20121      # Now convert it back to Unix-stile (cygpath)
20122      input_path=`$CYGPATH -u "$shortmode_path"`
20123      new_path="$input_path"
20124    fi
20125  fi
20126
20127  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20128  if test "x$test_cygdrive_prefix" = x; then
20129    # As a simple fix, exclude /usr/bin since it's not a real path.
20130    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20131      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20132      # a path prefixed by /cygdrive for fixpath to work.
20133      new_path="$CYGWIN_ROOT_PATH$input_path"
20134    fi
20135  fi
20136
20137
20138  if test "x$path" != "x$new_path"; then
20139    BOOT_JDK="$new_path"
20140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20141$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20142  fi
20143
20144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20145
20146  path="$BOOT_JDK"
20147  has_colon=`$ECHO $path | $GREP ^.:`
20148  new_path="$path"
20149  if test "x$has_colon" = x; then
20150    # Not in mixed or Windows style, start by that.
20151    new_path=`cmd //c echo $path`
20152  fi
20153
20154
20155  input_path="$new_path"
20156  # Check if we need to convert this using DOS-style short mode. If the path
20157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20158  # take no chances and rewrite it.
20159  # Note: m4 eats our [], so we need to use [ and ] instead.
20160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20161  if test "x$has_forbidden_chars" != x; then
20162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20163    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20164  fi
20165
20166
20167  windows_path="$new_path"
20168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20169    unix_path=`$CYGPATH -u "$windows_path"`
20170    new_path="$unix_path"
20171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20173    new_path="$unix_path"
20174  fi
20175
20176  if test "x$path" != "x$new_path"; then
20177    BOOT_JDK="$new_path"
20178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20179$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20180  fi
20181
20182  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20183  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20184
20185  else
20186    # We're on a posix platform. Hooray! :)
20187    path="$BOOT_JDK"
20188    has_space=`$ECHO "$path" | $GREP " "`
20189    if test "x$has_space" != x; then
20190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20191$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20192      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20193    fi
20194
20195    # Use eval to expand a potential ~
20196    eval path="$path"
20197    if test ! -f "$path" && test ! -d "$path"; then
20198      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20199    fi
20200
20201    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20202  fi
20203
20204              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20205$as_echo_n "checking for Boot JDK... " >&6; }
20206              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20207$as_echo "$BOOT_JDK" >&6; }
20208              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20209$as_echo_n "checking Boot JDK version... " >&6; }
20210              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20211              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20212$as_echo "$BOOT_JDK_VERSION" >&6; }
20213            fi # end check jdk version
20214          fi # end check rt.jar
20215        fi # end check javac
20216      fi # end check java
20217    fi # end check boot jdk found
20218  fi
20219
20220
20221  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20222
20223  if test "x$BOOT_JDK_FOUND" = xno; then
20224    # Now execute the test
20225
20226  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20227    # First check at user selected default
20228
20229  if test "x$BOOT_JDK_FOUND" = xno; then
20230    # Now execute the test
20231
20232  if test -x /usr/libexec/java_home; then
20233    BOOT_JDK=`/usr/libexec/java_home `
20234    BOOT_JDK_FOUND=maybe
20235    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20236$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20237  fi
20238
20239
20240    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20241    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20242      # Do we have a bin/java?
20243      if test ! -x "$BOOT_JDK/bin/java"; then
20244        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20245$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20246        BOOT_JDK_FOUND=no
20247      else
20248        # Do we have a bin/javac?
20249        if test ! -x "$BOOT_JDK/bin/javac"; then
20250          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20251$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20252          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20253$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20254          BOOT_JDK_FOUND=no
20255        else
20256          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20257          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20258            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20259$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20260            BOOT_JDK_FOUND=no
20261          else
20262            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20263            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20264
20265            # Extra M4 quote needed to protect [] in grep expression.
20266            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20267            if test "x$FOUND_CORRECT_VERSION" = x; then
20268              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20269$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20270              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20271$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20272              BOOT_JDK_FOUND=no
20273            else
20274              # We're done! :-)
20275              BOOT_JDK_FOUND=yes
20276
20277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20278
20279  # Input might be given as Windows format, start by converting to
20280  # unix format.
20281  path="$BOOT_JDK"
20282  new_path=`$CYGPATH -u "$path"`
20283
20284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20287  # "foo.exe" is OK but "foo" is an error.
20288  #
20289  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20290  # It is also a way to make sure we got the proper file name for the real test later on.
20291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20292  if test "x$test_shortpath" = x; then
20293    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20294$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20295    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20296  fi
20297
20298  # Call helper function which possibly converts this using DOS-style short mode.
20299  # If so, the updated path is stored in $new_path.
20300
20301  input_path="$new_path"
20302  # Check if we need to convert this using DOS-style short mode. If the path
20303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20304  # take no chances and rewrite it.
20305  # Note: m4 eats our [], so we need to use [ and ] instead.
20306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20307  if test "x$has_forbidden_chars" != x; then
20308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20309    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20310    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20311    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20312      # Going to short mode and back again did indeed matter. Since short mode is
20313      # case insensitive, let's make it lowercase to improve readability.
20314      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20315      # Now convert it back to Unix-stile (cygpath)
20316      input_path=`$CYGPATH -u "$shortmode_path"`
20317      new_path="$input_path"
20318    fi
20319  fi
20320
20321  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20322  if test "x$test_cygdrive_prefix" = x; then
20323    # As a simple fix, exclude /usr/bin since it's not a real path.
20324    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20325      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20326      # a path prefixed by /cygdrive for fixpath to work.
20327      new_path="$CYGWIN_ROOT_PATH$input_path"
20328    fi
20329  fi
20330
20331
20332  if test "x$path" != "x$new_path"; then
20333    BOOT_JDK="$new_path"
20334    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20335$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20336  fi
20337
20338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20339
20340  path="$BOOT_JDK"
20341  has_colon=`$ECHO $path | $GREP ^.:`
20342  new_path="$path"
20343  if test "x$has_colon" = x; then
20344    # Not in mixed or Windows style, start by that.
20345    new_path=`cmd //c echo $path`
20346  fi
20347
20348
20349  input_path="$new_path"
20350  # Check if we need to convert this using DOS-style short mode. If the path
20351  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20352  # take no chances and rewrite it.
20353  # Note: m4 eats our [], so we need to use [ and ] instead.
20354  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20355  if test "x$has_forbidden_chars" != x; then
20356    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20357    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20358  fi
20359
20360
20361  windows_path="$new_path"
20362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20363    unix_path=`$CYGPATH -u "$windows_path"`
20364    new_path="$unix_path"
20365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20367    new_path="$unix_path"
20368  fi
20369
20370  if test "x$path" != "x$new_path"; then
20371    BOOT_JDK="$new_path"
20372    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20373$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20374  fi
20375
20376  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20377  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20378
20379  else
20380    # We're on a posix platform. Hooray! :)
20381    path="$BOOT_JDK"
20382    has_space=`$ECHO "$path" | $GREP " "`
20383    if test "x$has_space" != x; then
20384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20385$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20386      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20387    fi
20388
20389    # Use eval to expand a potential ~
20390    eval path="$path"
20391    if test ! -f "$path" && test ! -d "$path"; then
20392      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20393    fi
20394
20395    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20396  fi
20397
20398              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20399$as_echo_n "checking for Boot JDK... " >&6; }
20400              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20401$as_echo "$BOOT_JDK" >&6; }
20402              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20403$as_echo_n "checking Boot JDK version... " >&6; }
20404              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20405              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20406$as_echo "$BOOT_JDK_VERSION" >&6; }
20407            fi # end check jdk version
20408          fi # end check rt.jar
20409        fi # end check javac
20410      fi # end check java
20411    fi # end check boot jdk found
20412  fi
20413
20414    # If that did not work out (e.g. too old), try explicit versions instead
20415
20416  if test "x$BOOT_JDK_FOUND" = xno; then
20417    # Now execute the test
20418
20419  if test -x /usr/libexec/java_home; then
20420    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20421    BOOT_JDK_FOUND=maybe
20422    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20423$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20424  fi
20425
20426
20427    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20428    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20429      # Do we have a bin/java?
20430      if test ! -x "$BOOT_JDK/bin/java"; then
20431        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20432$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20433        BOOT_JDK_FOUND=no
20434      else
20435        # Do we have a bin/javac?
20436        if test ! -x "$BOOT_JDK/bin/javac"; then
20437          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20438$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20439          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20440$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20441          BOOT_JDK_FOUND=no
20442        else
20443          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20444          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20445            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20447            BOOT_JDK_FOUND=no
20448          else
20449            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20450            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20451
20452            # Extra M4 quote needed to protect [] in grep expression.
20453            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20454            if test "x$FOUND_CORRECT_VERSION" = x; then
20455              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20456$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20457              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20458$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20459              BOOT_JDK_FOUND=no
20460            else
20461              # We're done! :-)
20462              BOOT_JDK_FOUND=yes
20463
20464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20465
20466  # Input might be given as Windows format, start by converting to
20467  # unix format.
20468  path="$BOOT_JDK"
20469  new_path=`$CYGPATH -u "$path"`
20470
20471  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20472  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20473  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20474  # "foo.exe" is OK but "foo" is an error.
20475  #
20476  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20477  # It is also a way to make sure we got the proper file name for the real test later on.
20478  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20479  if test "x$test_shortpath" = x; then
20480    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20481$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20482    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20483  fi
20484
20485  # Call helper function which possibly converts this using DOS-style short mode.
20486  # If so, the updated path is stored in $new_path.
20487
20488  input_path="$new_path"
20489  # Check if we need to convert this using DOS-style short mode. If the path
20490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20491  # take no chances and rewrite it.
20492  # Note: m4 eats our [], so we need to use [ and ] instead.
20493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20494  if test "x$has_forbidden_chars" != x; then
20495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20496    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20497    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20498    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20499      # Going to short mode and back again did indeed matter. Since short mode is
20500      # case insensitive, let's make it lowercase to improve readability.
20501      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20502      # Now convert it back to Unix-stile (cygpath)
20503      input_path=`$CYGPATH -u "$shortmode_path"`
20504      new_path="$input_path"
20505    fi
20506  fi
20507
20508  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20509  if test "x$test_cygdrive_prefix" = x; then
20510    # As a simple fix, exclude /usr/bin since it's not a real path.
20511    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20512      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20513      # a path prefixed by /cygdrive for fixpath to work.
20514      new_path="$CYGWIN_ROOT_PATH$input_path"
20515    fi
20516  fi
20517
20518
20519  if test "x$path" != "x$new_path"; then
20520    BOOT_JDK="$new_path"
20521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20522$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20523  fi
20524
20525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20526
20527  path="$BOOT_JDK"
20528  has_colon=`$ECHO $path | $GREP ^.:`
20529  new_path="$path"
20530  if test "x$has_colon" = x; then
20531    # Not in mixed or Windows style, start by that.
20532    new_path=`cmd //c echo $path`
20533  fi
20534
20535
20536  input_path="$new_path"
20537  # Check if we need to convert this using DOS-style short mode. If the path
20538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20539  # take no chances and rewrite it.
20540  # Note: m4 eats our [], so we need to use [ and ] instead.
20541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20542  if test "x$has_forbidden_chars" != x; then
20543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20544    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20545  fi
20546
20547
20548  windows_path="$new_path"
20549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20550    unix_path=`$CYGPATH -u "$windows_path"`
20551    new_path="$unix_path"
20552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20554    new_path="$unix_path"
20555  fi
20556
20557  if test "x$path" != "x$new_path"; then
20558    BOOT_JDK="$new_path"
20559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20560$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20561  fi
20562
20563  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20564  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20565
20566  else
20567    # We're on a posix platform. Hooray! :)
20568    path="$BOOT_JDK"
20569    has_space=`$ECHO "$path" | $GREP " "`
20570    if test "x$has_space" != x; then
20571      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20572$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20573      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20574    fi
20575
20576    # Use eval to expand a potential ~
20577    eval path="$path"
20578    if test ! -f "$path" && test ! -d "$path"; then
20579      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20580    fi
20581
20582    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20583  fi
20584
20585              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20586$as_echo_n "checking for Boot JDK... " >&6; }
20587              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20588$as_echo "$BOOT_JDK" >&6; }
20589              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20590$as_echo_n "checking Boot JDK version... " >&6; }
20591              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20592              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20593$as_echo "$BOOT_JDK_VERSION" >&6; }
20594            fi # end check jdk version
20595          fi # end check rt.jar
20596        fi # end check javac
20597      fi # end check java
20598    fi # end check boot jdk found
20599  fi
20600
20601
20602  if test "x$BOOT_JDK_FOUND" = xno; then
20603    # Now execute the test
20604
20605  if test -x /usr/libexec/java_home; then
20606    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20607    BOOT_JDK_FOUND=maybe
20608    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20609$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20610  fi
20611
20612
20613    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20614    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20615      # Do we have a bin/java?
20616      if test ! -x "$BOOT_JDK/bin/java"; then
20617        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20618$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20619        BOOT_JDK_FOUND=no
20620      else
20621        # Do we have a bin/javac?
20622        if test ! -x "$BOOT_JDK/bin/javac"; then
20623          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20624$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20625          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20626$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20627          BOOT_JDK_FOUND=no
20628        else
20629          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20630          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20631            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20632$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20633            BOOT_JDK_FOUND=no
20634          else
20635            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20636            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20637
20638            # Extra M4 quote needed to protect [] in grep expression.
20639            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20640            if test "x$FOUND_CORRECT_VERSION" = x; then
20641              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20642$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20643              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20644$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20645              BOOT_JDK_FOUND=no
20646            else
20647              # We're done! :-)
20648              BOOT_JDK_FOUND=yes
20649
20650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20651
20652  # Input might be given as Windows format, start by converting to
20653  # unix format.
20654  path="$BOOT_JDK"
20655  new_path=`$CYGPATH -u "$path"`
20656
20657  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20658  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20659  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20660  # "foo.exe" is OK but "foo" is an error.
20661  #
20662  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20663  # It is also a way to make sure we got the proper file name for the real test later on.
20664  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20665  if test "x$test_shortpath" = x; then
20666    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20667$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20668    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20669  fi
20670
20671  # Call helper function which possibly converts this using DOS-style short mode.
20672  # If so, the updated path is stored in $new_path.
20673
20674  input_path="$new_path"
20675  # Check if we need to convert this using DOS-style short mode. If the path
20676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20677  # take no chances and rewrite it.
20678  # Note: m4 eats our [], so we need to use [ and ] instead.
20679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20680  if test "x$has_forbidden_chars" != x; then
20681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20682    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20683    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20684    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20685      # Going to short mode and back again did indeed matter. Since short mode is
20686      # case insensitive, let's make it lowercase to improve readability.
20687      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20688      # Now convert it back to Unix-stile (cygpath)
20689      input_path=`$CYGPATH -u "$shortmode_path"`
20690      new_path="$input_path"
20691    fi
20692  fi
20693
20694  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20695  if test "x$test_cygdrive_prefix" = x; then
20696    # As a simple fix, exclude /usr/bin since it's not a real path.
20697    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20698      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20699      # a path prefixed by /cygdrive for fixpath to work.
20700      new_path="$CYGWIN_ROOT_PATH$input_path"
20701    fi
20702  fi
20703
20704
20705  if test "x$path" != "x$new_path"; then
20706    BOOT_JDK="$new_path"
20707    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20708$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20709  fi
20710
20711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20712
20713  path="$BOOT_JDK"
20714  has_colon=`$ECHO $path | $GREP ^.:`
20715  new_path="$path"
20716  if test "x$has_colon" = x; then
20717    # Not in mixed or Windows style, start by that.
20718    new_path=`cmd //c echo $path`
20719  fi
20720
20721
20722  input_path="$new_path"
20723  # Check if we need to convert this using DOS-style short mode. If the path
20724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20725  # take no chances and rewrite it.
20726  # Note: m4 eats our [], so we need to use [ and ] instead.
20727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20728  if test "x$has_forbidden_chars" != x; then
20729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20730    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20731  fi
20732
20733
20734  windows_path="$new_path"
20735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20736    unix_path=`$CYGPATH -u "$windows_path"`
20737    new_path="$unix_path"
20738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20740    new_path="$unix_path"
20741  fi
20742
20743  if test "x$path" != "x$new_path"; then
20744    BOOT_JDK="$new_path"
20745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20746$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20747  fi
20748
20749  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20750  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20751
20752  else
20753    # We're on a posix platform. Hooray! :)
20754    path="$BOOT_JDK"
20755    has_space=`$ECHO "$path" | $GREP " "`
20756    if test "x$has_space" != x; then
20757      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20758$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20759      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20760    fi
20761
20762    # Use eval to expand a potential ~
20763    eval path="$path"
20764    if test ! -f "$path" && test ! -d "$path"; then
20765      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20766    fi
20767
20768    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20769  fi
20770
20771              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20772$as_echo_n "checking for Boot JDK... " >&6; }
20773              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20774$as_echo "$BOOT_JDK" >&6; }
20775              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20776$as_echo_n "checking Boot JDK version... " >&6; }
20777              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20778              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20779$as_echo "$BOOT_JDK_VERSION" >&6; }
20780            fi # end check jdk version
20781          fi # end check rt.jar
20782        fi # end check javac
20783      fi # end check java
20784    fi # end check boot jdk found
20785  fi
20786
20787
20788  if test "x$BOOT_JDK_FOUND" = xno; then
20789    # Now execute the test
20790
20791  if test -x /usr/libexec/java_home; then
20792    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
20793    BOOT_JDK_FOUND=maybe
20794    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
20795$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
20796  fi
20797
20798
20799    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20800    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20801      # Do we have a bin/java?
20802      if test ! -x "$BOOT_JDK/bin/java"; then
20803        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20804$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20805        BOOT_JDK_FOUND=no
20806      else
20807        # Do we have a bin/javac?
20808        if test ! -x "$BOOT_JDK/bin/javac"; then
20809          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20810$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20811          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20812$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20813          BOOT_JDK_FOUND=no
20814        else
20815          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20816          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20817            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20818$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20819            BOOT_JDK_FOUND=no
20820          else
20821            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20822            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20823
20824            # Extra M4 quote needed to protect [] in grep expression.
20825            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20826            if test "x$FOUND_CORRECT_VERSION" = x; then
20827              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20828$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20829              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20830$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20831              BOOT_JDK_FOUND=no
20832            else
20833              # We're done! :-)
20834              BOOT_JDK_FOUND=yes
20835
20836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20837
20838  # Input might be given as Windows format, start by converting to
20839  # unix format.
20840  path="$BOOT_JDK"
20841  new_path=`$CYGPATH -u "$path"`
20842
20843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20846  # "foo.exe" is OK but "foo" is an error.
20847  #
20848  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20849  # It is also a way to make sure we got the proper file name for the real test later on.
20850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20851  if test "x$test_shortpath" = x; then
20852    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20853$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20854    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20855  fi
20856
20857  # Call helper function which possibly converts this using DOS-style short mode.
20858  # If so, the updated path is stored in $new_path.
20859
20860  input_path="$new_path"
20861  # Check if we need to convert this using DOS-style short mode. If the path
20862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20863  # take no chances and rewrite it.
20864  # Note: m4 eats our [], so we need to use [ and ] instead.
20865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20866  if test "x$has_forbidden_chars" != x; then
20867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20871      # Going to short mode and back again did indeed matter. Since short mode is
20872      # case insensitive, let's make it lowercase to improve readability.
20873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20874      # Now convert it back to Unix-stile (cygpath)
20875      input_path=`$CYGPATH -u "$shortmode_path"`
20876      new_path="$input_path"
20877    fi
20878  fi
20879
20880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20881  if test "x$test_cygdrive_prefix" = x; then
20882    # As a simple fix, exclude /usr/bin since it's not a real path.
20883    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20885      # a path prefixed by /cygdrive for fixpath to work.
20886      new_path="$CYGWIN_ROOT_PATH$input_path"
20887    fi
20888  fi
20889
20890
20891  if test "x$path" != "x$new_path"; then
20892    BOOT_JDK="$new_path"
20893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20894$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20895  fi
20896
20897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20898
20899  path="$BOOT_JDK"
20900  has_colon=`$ECHO $path | $GREP ^.:`
20901  new_path="$path"
20902  if test "x$has_colon" = x; then
20903    # Not in mixed or Windows style, start by that.
20904    new_path=`cmd //c echo $path`
20905  fi
20906
20907
20908  input_path="$new_path"
20909  # Check if we need to convert this using DOS-style short mode. If the path
20910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20911  # take no chances and rewrite it.
20912  # Note: m4 eats our [], so we need to use [ and ] instead.
20913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20914  if test "x$has_forbidden_chars" != x; then
20915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20917  fi
20918
20919
20920  windows_path="$new_path"
20921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20922    unix_path=`$CYGPATH -u "$windows_path"`
20923    new_path="$unix_path"
20924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20926    new_path="$unix_path"
20927  fi
20928
20929  if test "x$path" != "x$new_path"; then
20930    BOOT_JDK="$new_path"
20931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20932$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20933  fi
20934
20935  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20936  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20937
20938  else
20939    # We're on a posix platform. Hooray! :)
20940    path="$BOOT_JDK"
20941    has_space=`$ECHO "$path" | $GREP " "`
20942    if test "x$has_space" != x; then
20943      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20944$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20945      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20946    fi
20947
20948    # Use eval to expand a potential ~
20949    eval path="$path"
20950    if test ! -f "$path" && test ! -d "$path"; then
20951      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20952    fi
20953
20954    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20955  fi
20956
20957              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20958$as_echo_n "checking for Boot JDK... " >&6; }
20959              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20960$as_echo "$BOOT_JDK" >&6; }
20961              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20962$as_echo_n "checking Boot JDK version... " >&6; }
20963              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20964              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20965$as_echo "$BOOT_JDK_VERSION" >&6; }
20966            fi # end check jdk version
20967          fi # end check rt.jar
20968        fi # end check javac
20969      fi # end check java
20970    fi # end check boot jdk found
20971  fi
20972
20973  fi
20974
20975
20976    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20977    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20978      # Do we have a bin/java?
20979      if test ! -x "$BOOT_JDK/bin/java"; then
20980        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20981$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20982        BOOT_JDK_FOUND=no
20983      else
20984        # Do we have a bin/javac?
20985        if test ! -x "$BOOT_JDK/bin/javac"; then
20986          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20987$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20988          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20989$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20990          BOOT_JDK_FOUND=no
20991        else
20992          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20993          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20994            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20996            BOOT_JDK_FOUND=no
20997          else
20998            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20999            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21000
21001            # Extra M4 quote needed to protect [] in grep expression.
21002            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21003            if test "x$FOUND_CORRECT_VERSION" = x; then
21004              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21005$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21006              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21007$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21008              BOOT_JDK_FOUND=no
21009            else
21010              # We're done! :-)
21011              BOOT_JDK_FOUND=yes
21012
21013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21014
21015  # Input might be given as Windows format, start by converting to
21016  # unix format.
21017  path="$BOOT_JDK"
21018  new_path=`$CYGPATH -u "$path"`
21019
21020  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21021  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21022  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21023  # "foo.exe" is OK but "foo" is an error.
21024  #
21025  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21026  # It is also a way to make sure we got the proper file name for the real test later on.
21027  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21028  if test "x$test_shortpath" = x; then
21029    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21030$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21031    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21032  fi
21033
21034  # Call helper function which possibly converts this using DOS-style short mode.
21035  # If so, the updated path is stored in $new_path.
21036
21037  input_path="$new_path"
21038  # Check if we need to convert this using DOS-style short mode. If the path
21039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21040  # take no chances and rewrite it.
21041  # Note: m4 eats our [], so we need to use [ and ] instead.
21042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21043  if test "x$has_forbidden_chars" != x; then
21044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21045    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21046    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21047    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21048      # Going to short mode and back again did indeed matter. Since short mode is
21049      # case insensitive, let's make it lowercase to improve readability.
21050      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21051      # Now convert it back to Unix-stile (cygpath)
21052      input_path=`$CYGPATH -u "$shortmode_path"`
21053      new_path="$input_path"
21054    fi
21055  fi
21056
21057  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21058  if test "x$test_cygdrive_prefix" = x; then
21059    # As a simple fix, exclude /usr/bin since it's not a real path.
21060    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21061      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21062      # a path prefixed by /cygdrive for fixpath to work.
21063      new_path="$CYGWIN_ROOT_PATH$input_path"
21064    fi
21065  fi
21066
21067
21068  if test "x$path" != "x$new_path"; then
21069    BOOT_JDK="$new_path"
21070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21071$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21072  fi
21073
21074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21075
21076  path="$BOOT_JDK"
21077  has_colon=`$ECHO $path | $GREP ^.:`
21078  new_path="$path"
21079  if test "x$has_colon" = x; then
21080    # Not in mixed or Windows style, start by that.
21081    new_path=`cmd //c echo $path`
21082  fi
21083
21084
21085  input_path="$new_path"
21086  # Check if we need to convert this using DOS-style short mode. If the path
21087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21088  # take no chances and rewrite it.
21089  # Note: m4 eats our [], so we need to use [ and ] instead.
21090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21091  if test "x$has_forbidden_chars" != x; then
21092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21093    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21094  fi
21095
21096
21097  windows_path="$new_path"
21098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21099    unix_path=`$CYGPATH -u "$windows_path"`
21100    new_path="$unix_path"
21101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21103    new_path="$unix_path"
21104  fi
21105
21106  if test "x$path" != "x$new_path"; then
21107    BOOT_JDK="$new_path"
21108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21109$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21110  fi
21111
21112  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21113  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21114
21115  else
21116    # We're on a posix platform. Hooray! :)
21117    path="$BOOT_JDK"
21118    has_space=`$ECHO "$path" | $GREP " "`
21119    if test "x$has_space" != x; then
21120      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21121$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21122      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21123    fi
21124
21125    # Use eval to expand a potential ~
21126    eval path="$path"
21127    if test ! -f "$path" && test ! -d "$path"; then
21128      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21129    fi
21130
21131    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21132  fi
21133
21134              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21135$as_echo_n "checking for Boot JDK... " >&6; }
21136              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21137$as_echo "$BOOT_JDK" >&6; }
21138              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21139$as_echo_n "checking Boot JDK version... " >&6; }
21140              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21141              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21142$as_echo "$BOOT_JDK_VERSION" >&6; }
21143            fi # end check jdk version
21144          fi # end check rt.jar
21145        fi # end check javac
21146      fi # end check java
21147    fi # end check boot jdk found
21148  fi
21149
21150
21151  # Test: Is $JAVA_HOME set?
21152
21153  if test "x$BOOT_JDK_FOUND" = xno; then
21154    # Now execute the test
21155
21156  if test "x$JAVA_HOME" != x; then
21157    JAVA_HOME_PROCESSED="$JAVA_HOME"
21158
21159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21160
21161  # Input might be given as Windows format, start by converting to
21162  # unix format.
21163  path="$JAVA_HOME_PROCESSED"
21164  new_path=`$CYGPATH -u "$path"`
21165
21166  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21167  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21168  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21169  # "foo.exe" is OK but "foo" is an error.
21170  #
21171  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21172  # It is also a way to make sure we got the proper file name for the real test later on.
21173  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21174  if test "x$test_shortpath" = x; then
21175    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21176$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21177    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21178  fi
21179
21180  # Call helper function which possibly converts this using DOS-style short mode.
21181  # If so, the updated path is stored in $new_path.
21182
21183  input_path="$new_path"
21184  # Check if we need to convert this using DOS-style short mode. If the path
21185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21186  # take no chances and rewrite it.
21187  # Note: m4 eats our [], so we need to use [ and ] instead.
21188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21189  if test "x$has_forbidden_chars" != x; then
21190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21191    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21192    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21193    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21194      # Going to short mode and back again did indeed matter. Since short mode is
21195      # case insensitive, let's make it lowercase to improve readability.
21196      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21197      # Now convert it back to Unix-stile (cygpath)
21198      input_path=`$CYGPATH -u "$shortmode_path"`
21199      new_path="$input_path"
21200    fi
21201  fi
21202
21203  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21204  if test "x$test_cygdrive_prefix" = x; then
21205    # As a simple fix, exclude /usr/bin since it's not a real path.
21206    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21207      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21208      # a path prefixed by /cygdrive for fixpath to work.
21209      new_path="$CYGWIN_ROOT_PATH$input_path"
21210    fi
21211  fi
21212
21213
21214  if test "x$path" != "x$new_path"; then
21215    JAVA_HOME_PROCESSED="$new_path"
21216    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21217$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21218  fi
21219
21220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21221
21222  path="$JAVA_HOME_PROCESSED"
21223  has_colon=`$ECHO $path | $GREP ^.:`
21224  new_path="$path"
21225  if test "x$has_colon" = x; then
21226    # Not in mixed or Windows style, start by that.
21227    new_path=`cmd //c echo $path`
21228  fi
21229
21230
21231  input_path="$new_path"
21232  # Check if we need to convert this using DOS-style short mode. If the path
21233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21234  # take no chances and rewrite it.
21235  # Note: m4 eats our [], so we need to use [ and ] instead.
21236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21237  if test "x$has_forbidden_chars" != x; then
21238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21239    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21240  fi
21241
21242
21243  windows_path="$new_path"
21244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21245    unix_path=`$CYGPATH -u "$windows_path"`
21246    new_path="$unix_path"
21247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21249    new_path="$unix_path"
21250  fi
21251
21252  if test "x$path" != "x$new_path"; then
21253    JAVA_HOME_PROCESSED="$new_path"
21254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21255$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21256  fi
21257
21258  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21259  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21260
21261  else
21262    # We're on a posix platform. Hooray! :)
21263    path="$JAVA_HOME_PROCESSED"
21264    has_space=`$ECHO "$path" | $GREP " "`
21265    if test "x$has_space" != x; then
21266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21267$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21268      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21269    fi
21270
21271    # Use eval to expand a potential ~
21272    eval path="$path"
21273    if test ! -f "$path" && test ! -d "$path"; then
21274      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21275    fi
21276
21277    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21278  fi
21279
21280    if test ! -d "$JAVA_HOME_PROCESSED"; then
21281      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21282$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21283    else
21284      # Aha, the user has set a JAVA_HOME
21285      # let us use that as the Boot JDK.
21286      BOOT_JDK="$JAVA_HOME_PROCESSED"
21287      BOOT_JDK_FOUND=maybe
21288      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21289$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21290    fi
21291  fi
21292
21293
21294    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21295    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21296      # Do we have a bin/java?
21297      if test ! -x "$BOOT_JDK/bin/java"; then
21298        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21299$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21300        BOOT_JDK_FOUND=no
21301      else
21302        # Do we have a bin/javac?
21303        if test ! -x "$BOOT_JDK/bin/javac"; then
21304          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21305$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21306          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21307$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21308          BOOT_JDK_FOUND=no
21309        else
21310          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21311          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21312            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21313$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21314            BOOT_JDK_FOUND=no
21315          else
21316            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21317            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21318
21319            # Extra M4 quote needed to protect [] in grep expression.
21320            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21321            if test "x$FOUND_CORRECT_VERSION" = x; then
21322              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21324              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21325$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21326              BOOT_JDK_FOUND=no
21327            else
21328              # We're done! :-)
21329              BOOT_JDK_FOUND=yes
21330
21331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21332
21333  # Input might be given as Windows format, start by converting to
21334  # unix format.
21335  path="$BOOT_JDK"
21336  new_path=`$CYGPATH -u "$path"`
21337
21338  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21339  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21340  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21341  # "foo.exe" is OK but "foo" is an error.
21342  #
21343  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21344  # It is also a way to make sure we got the proper file name for the real test later on.
21345  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21346  if test "x$test_shortpath" = x; then
21347    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21348$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21349    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21350  fi
21351
21352  # Call helper function which possibly converts this using DOS-style short mode.
21353  # If so, the updated path is stored in $new_path.
21354
21355  input_path="$new_path"
21356  # Check if we need to convert this using DOS-style short mode. If the path
21357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21358  # take no chances and rewrite it.
21359  # Note: m4 eats our [], so we need to use [ and ] instead.
21360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21361  if test "x$has_forbidden_chars" != x; then
21362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21363    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21364    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21365    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21366      # Going to short mode and back again did indeed matter. Since short mode is
21367      # case insensitive, let's make it lowercase to improve readability.
21368      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21369      # Now convert it back to Unix-stile (cygpath)
21370      input_path=`$CYGPATH -u "$shortmode_path"`
21371      new_path="$input_path"
21372    fi
21373  fi
21374
21375  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21376  if test "x$test_cygdrive_prefix" = x; then
21377    # As a simple fix, exclude /usr/bin since it's not a real path.
21378    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21379      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21380      # a path prefixed by /cygdrive for fixpath to work.
21381      new_path="$CYGWIN_ROOT_PATH$input_path"
21382    fi
21383  fi
21384
21385
21386  if test "x$path" != "x$new_path"; then
21387    BOOT_JDK="$new_path"
21388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21389$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21390  fi
21391
21392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21393
21394  path="$BOOT_JDK"
21395  has_colon=`$ECHO $path | $GREP ^.:`
21396  new_path="$path"
21397  if test "x$has_colon" = x; then
21398    # Not in mixed or Windows style, start by that.
21399    new_path=`cmd //c echo $path`
21400  fi
21401
21402
21403  input_path="$new_path"
21404  # Check if we need to convert this using DOS-style short mode. If the path
21405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21406  # take no chances and rewrite it.
21407  # Note: m4 eats our [], so we need to use [ and ] instead.
21408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21409  if test "x$has_forbidden_chars" != x; then
21410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21411    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21412  fi
21413
21414
21415  windows_path="$new_path"
21416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21417    unix_path=`$CYGPATH -u "$windows_path"`
21418    new_path="$unix_path"
21419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21421    new_path="$unix_path"
21422  fi
21423
21424  if test "x$path" != "x$new_path"; then
21425    BOOT_JDK="$new_path"
21426    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21427$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21428  fi
21429
21430  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21431  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21432
21433  else
21434    # We're on a posix platform. Hooray! :)
21435    path="$BOOT_JDK"
21436    has_space=`$ECHO "$path" | $GREP " "`
21437    if test "x$has_space" != x; then
21438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21439$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21440      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21441    fi
21442
21443    # Use eval to expand a potential ~
21444    eval path="$path"
21445    if test ! -f "$path" && test ! -d "$path"; then
21446      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21447    fi
21448
21449    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21450  fi
21451
21452              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21453$as_echo_n "checking for Boot JDK... " >&6; }
21454              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21455$as_echo "$BOOT_JDK" >&6; }
21456              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21457$as_echo_n "checking Boot JDK version... " >&6; }
21458              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21459              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21460$as_echo "$BOOT_JDK_VERSION" >&6; }
21461            fi # end check jdk version
21462          fi # end check rt.jar
21463        fi # end check javac
21464      fi # end check java
21465    fi # end check boot jdk found
21466  fi
21467
21468
21469  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21470
21471  if test "x$BOOT_JDK_FOUND" = xno; then
21472    # Now execute the test
21473
21474  # Extract the first word of "javac", so it can be a program name with args.
21475set dummy javac; ac_word=$2
21476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21477$as_echo_n "checking for $ac_word... " >&6; }
21478if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21479  $as_echo_n "(cached) " >&6
21480else
21481  case $JAVAC_CHECK in
21482  [\\/]* | ?:[\\/]*)
21483  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21484  ;;
21485  *)
21486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21487for as_dir in $PATH
21488do
21489  IFS=$as_save_IFS
21490  test -z "$as_dir" && as_dir=.
21491    for ac_exec_ext in '' $ac_executable_extensions; do
21492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21493    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21495    break 2
21496  fi
21497done
21498  done
21499IFS=$as_save_IFS
21500
21501  ;;
21502esac
21503fi
21504JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21505if test -n "$JAVAC_CHECK"; then
21506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21507$as_echo "$JAVAC_CHECK" >&6; }
21508else
21509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21510$as_echo "no" >&6; }
21511fi
21512
21513
21514  # Extract the first word of "java", so it can be a program name with args.
21515set dummy java; ac_word=$2
21516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21517$as_echo_n "checking for $ac_word... " >&6; }
21518if ${ac_cv_path_JAVA_CHECK+:} false; then :
21519  $as_echo_n "(cached) " >&6
21520else
21521  case $JAVA_CHECK in
21522  [\\/]* | ?:[\\/]*)
21523  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21524  ;;
21525  *)
21526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21527for as_dir in $PATH
21528do
21529  IFS=$as_save_IFS
21530  test -z "$as_dir" && as_dir=.
21531    for ac_exec_ext in '' $ac_executable_extensions; do
21532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21533    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21535    break 2
21536  fi
21537done
21538  done
21539IFS=$as_save_IFS
21540
21541  ;;
21542esac
21543fi
21544JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21545if test -n "$JAVA_CHECK"; then
21546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21547$as_echo "$JAVA_CHECK" >&6; }
21548else
21549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21550$as_echo "no" >&6; }
21551fi
21552
21553
21554  BINARY="$JAVAC_CHECK"
21555  if test "x$JAVAC_CHECK" = x; then
21556    BINARY="$JAVA_CHECK"
21557  fi
21558  if test "x$BINARY" != x; then
21559    # So there is a java(c) binary, it might be part of a JDK.
21560    # Lets find the JDK/JRE directory by following symbolic links.
21561    # Linux/GNU systems often have links from /usr/bin/java to
21562    # /etc/alternatives/java to the real JDK binary.
21563
21564  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21565    # Follow a chain of symbolic links. Use readlink
21566    # where it exists, else fall back to horribly
21567    # complicated shell code.
21568    if test "x$READLINK_TESTED" != yes; then
21569      # On MacOSX there is a readlink tool with a different
21570      # purpose than the GNU readlink tool. Check the found readlink.
21571      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21572      if test "x$ISGNU" = x; then
21573        # A readlink that we do not know how to use.
21574        # Are there other non-GNU readlinks out there?
21575        READLINK_TESTED=yes
21576        READLINK=
21577      fi
21578    fi
21579
21580    if test "x$READLINK" != x; then
21581      BINARY=`$READLINK -f $BINARY`
21582    else
21583      # Save the current directory for restoring afterwards
21584      STARTDIR=$PWD
21585      COUNTER=0
21586      sym_link_dir=`$DIRNAME $BINARY`
21587      sym_link_file=`$BASENAME $BINARY`
21588      cd $sym_link_dir
21589      # Use -P flag to resolve symlinks in directories.
21590      cd `$THEPWDCMD -P`
21591      sym_link_dir=`$THEPWDCMD -P`
21592      # Resolve file symlinks
21593      while test $COUNTER -lt 20; do
21594        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21595        if test "x$ISLINK" == x; then
21596          # This is not a symbolic link! We are done!
21597          break
21598        fi
21599        # Again resolve directory symlinks since the target of the just found
21600        # link could be in a different directory
21601        cd `$DIRNAME $ISLINK`
21602        sym_link_dir=`$THEPWDCMD -P`
21603        sym_link_file=`$BASENAME $ISLINK`
21604        let COUNTER=COUNTER+1
21605      done
21606      cd $STARTDIR
21607      BINARY=$sym_link_dir/$sym_link_file
21608    fi
21609  fi
21610
21611    BOOT_JDK=`dirname "$BINARY"`
21612    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21613    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21614      # Looks like we found ourselves an JDK
21615      BOOT_JDK_FOUND=maybe
21616      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21617$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21618    fi
21619  fi
21620
21621
21622    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21623    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21624      # Do we have a bin/java?
21625      if test ! -x "$BOOT_JDK/bin/java"; then
21626        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21627$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21628        BOOT_JDK_FOUND=no
21629      else
21630        # Do we have a bin/javac?
21631        if test ! -x "$BOOT_JDK/bin/javac"; then
21632          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21633$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21634          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21635$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21636          BOOT_JDK_FOUND=no
21637        else
21638          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21639          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21640            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21641$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21642            BOOT_JDK_FOUND=no
21643          else
21644            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21645            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21646
21647            # Extra M4 quote needed to protect [] in grep expression.
21648            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21649            if test "x$FOUND_CORRECT_VERSION" = x; then
21650              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21651$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21652              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21653$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21654              BOOT_JDK_FOUND=no
21655            else
21656              # We're done! :-)
21657              BOOT_JDK_FOUND=yes
21658
21659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21660
21661  # Input might be given as Windows format, start by converting to
21662  # unix format.
21663  path="$BOOT_JDK"
21664  new_path=`$CYGPATH -u "$path"`
21665
21666  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21667  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21668  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21669  # "foo.exe" is OK but "foo" is an error.
21670  #
21671  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21672  # It is also a way to make sure we got the proper file name for the real test later on.
21673  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21674  if test "x$test_shortpath" = x; then
21675    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21676$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21677    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21678  fi
21679
21680  # Call helper function which possibly converts this using DOS-style short mode.
21681  # If so, the updated path is stored in $new_path.
21682
21683  input_path="$new_path"
21684  # Check if we need to convert this using DOS-style short mode. If the path
21685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21686  # take no chances and rewrite it.
21687  # Note: m4 eats our [], so we need to use [ and ] instead.
21688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21689  if test "x$has_forbidden_chars" != x; then
21690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21691    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21692    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21693    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21694      # Going to short mode and back again did indeed matter. Since short mode is
21695      # case insensitive, let's make it lowercase to improve readability.
21696      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21697      # Now convert it back to Unix-stile (cygpath)
21698      input_path=`$CYGPATH -u "$shortmode_path"`
21699      new_path="$input_path"
21700    fi
21701  fi
21702
21703  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21704  if test "x$test_cygdrive_prefix" = x; then
21705    # As a simple fix, exclude /usr/bin since it's not a real path.
21706    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21707      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21708      # a path prefixed by /cygdrive for fixpath to work.
21709      new_path="$CYGWIN_ROOT_PATH$input_path"
21710    fi
21711  fi
21712
21713
21714  if test "x$path" != "x$new_path"; then
21715    BOOT_JDK="$new_path"
21716    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21717$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21718  fi
21719
21720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21721
21722  path="$BOOT_JDK"
21723  has_colon=`$ECHO $path | $GREP ^.:`
21724  new_path="$path"
21725  if test "x$has_colon" = x; then
21726    # Not in mixed or Windows style, start by that.
21727    new_path=`cmd //c echo $path`
21728  fi
21729
21730
21731  input_path="$new_path"
21732  # Check if we need to convert this using DOS-style short mode. If the path
21733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21734  # take no chances and rewrite it.
21735  # Note: m4 eats our [], so we need to use [ and ] instead.
21736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21737  if test "x$has_forbidden_chars" != x; then
21738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21739    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21740  fi
21741
21742
21743  windows_path="$new_path"
21744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21745    unix_path=`$CYGPATH -u "$windows_path"`
21746    new_path="$unix_path"
21747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21749    new_path="$unix_path"
21750  fi
21751
21752  if test "x$path" != "x$new_path"; then
21753    BOOT_JDK="$new_path"
21754    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21755$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21756  fi
21757
21758  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21759  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21760
21761  else
21762    # We're on a posix platform. Hooray! :)
21763    path="$BOOT_JDK"
21764    has_space=`$ECHO "$path" | $GREP " "`
21765    if test "x$has_space" != x; then
21766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21767$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21768      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21769    fi
21770
21771    # Use eval to expand a potential ~
21772    eval path="$path"
21773    if test ! -f "$path" && test ! -d "$path"; then
21774      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21775    fi
21776
21777    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21778  fi
21779
21780              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21781$as_echo_n "checking for Boot JDK... " >&6; }
21782              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21783$as_echo "$BOOT_JDK" >&6; }
21784              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21785$as_echo_n "checking Boot JDK version... " >&6; }
21786              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21787              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21788$as_echo "$BOOT_JDK_VERSION" >&6; }
21789            fi # end check jdk version
21790          fi # end check rt.jar
21791        fi # end check javac
21792      fi # end check java
21793    fi # end check boot jdk found
21794  fi
21795
21796
21797  # Test: Is there a JDK installed in default, well-known locations?
21798
21799  if test "x$BOOT_JDK_FOUND" = xno; then
21800    # Now execute the test
21801
21802  if test "x$OPENJDK_TARGET_OS" = xwindows; then
21803
21804  if test "x$BOOT_JDK_FOUND" = xno; then
21805    # Now execute the test
21806
21807  if test "x$ProgramW6432" != x; then
21808    VIRTUAL_DIR="$ProgramW6432/Java"
21809
21810  windows_path="$VIRTUAL_DIR"
21811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21812    unix_path=`$CYGPATH -u "$windows_path"`
21813    VIRTUAL_DIR="$unix_path"
21814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21816    VIRTUAL_DIR="$unix_path"
21817  fi
21818
21819
21820  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21821  BOOT_JDK_SUFFIX=""
21822  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21823  if test "x$ALL_JDKS_FOUND" != x; then
21824    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21825
21826  if test "x$BOOT_JDK_FOUND" = xno; then
21827    # Now execute the test
21828
21829        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21830        if test -d "$BOOT_JDK"; then
21831          BOOT_JDK_FOUND=maybe
21832          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21833$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21834        fi
21835
21836
21837    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21838    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21839      # Do we have a bin/java?
21840      if test ! -x "$BOOT_JDK/bin/java"; then
21841        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21842$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21843        BOOT_JDK_FOUND=no
21844      else
21845        # Do we have a bin/javac?
21846        if test ! -x "$BOOT_JDK/bin/javac"; then
21847          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21848$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21849          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21850$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21851          BOOT_JDK_FOUND=no
21852        else
21853          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21854          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21855            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21856$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21857            BOOT_JDK_FOUND=no
21858          else
21859            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21860            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21861
21862            # Extra M4 quote needed to protect [] in grep expression.
21863            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21864            if test "x$FOUND_CORRECT_VERSION" = x; then
21865              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21866$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21867              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21868$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21869              BOOT_JDK_FOUND=no
21870            else
21871              # We're done! :-)
21872              BOOT_JDK_FOUND=yes
21873
21874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21875
21876  # Input might be given as Windows format, start by converting to
21877  # unix format.
21878  path="$BOOT_JDK"
21879  new_path=`$CYGPATH -u "$path"`
21880
21881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21884  # "foo.exe" is OK but "foo" is an error.
21885  #
21886  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21887  # It is also a way to make sure we got the proper file name for the real test later on.
21888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21889  if test "x$test_shortpath" = x; then
21890    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21891$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21892    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21893  fi
21894
21895  # Call helper function which possibly converts this using DOS-style short mode.
21896  # If so, the updated path is stored in $new_path.
21897
21898  input_path="$new_path"
21899  # Check if we need to convert this using DOS-style short mode. If the path
21900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21901  # take no chances and rewrite it.
21902  # Note: m4 eats our [], so we need to use [ and ] instead.
21903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21904  if test "x$has_forbidden_chars" != x; then
21905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21909      # Going to short mode and back again did indeed matter. Since short mode is
21910      # case insensitive, let's make it lowercase to improve readability.
21911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21912      # Now convert it back to Unix-stile (cygpath)
21913      input_path=`$CYGPATH -u "$shortmode_path"`
21914      new_path="$input_path"
21915    fi
21916  fi
21917
21918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21919  if test "x$test_cygdrive_prefix" = x; then
21920    # As a simple fix, exclude /usr/bin since it's not a real path.
21921    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21923      # a path prefixed by /cygdrive for fixpath to work.
21924      new_path="$CYGWIN_ROOT_PATH$input_path"
21925    fi
21926  fi
21927
21928
21929  if test "x$path" != "x$new_path"; then
21930    BOOT_JDK="$new_path"
21931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21932$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21933  fi
21934
21935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21936
21937  path="$BOOT_JDK"
21938  has_colon=`$ECHO $path | $GREP ^.:`
21939  new_path="$path"
21940  if test "x$has_colon" = x; then
21941    # Not in mixed or Windows style, start by that.
21942    new_path=`cmd //c echo $path`
21943  fi
21944
21945
21946  input_path="$new_path"
21947  # Check if we need to convert this using DOS-style short mode. If the path
21948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21949  # take no chances and rewrite it.
21950  # Note: m4 eats our [], so we need to use [ and ] instead.
21951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21952  if test "x$has_forbidden_chars" != x; then
21953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21955  fi
21956
21957
21958  windows_path="$new_path"
21959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21960    unix_path=`$CYGPATH -u "$windows_path"`
21961    new_path="$unix_path"
21962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21964    new_path="$unix_path"
21965  fi
21966
21967  if test "x$path" != "x$new_path"; then
21968    BOOT_JDK="$new_path"
21969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21970$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21971  fi
21972
21973  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21974  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21975
21976  else
21977    # We're on a posix platform. Hooray! :)
21978    path="$BOOT_JDK"
21979    has_space=`$ECHO "$path" | $GREP " "`
21980    if test "x$has_space" != x; then
21981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21982$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21983      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21984    fi
21985
21986    # Use eval to expand a potential ~
21987    eval path="$path"
21988    if test ! -f "$path" && test ! -d "$path"; then
21989      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21990    fi
21991
21992    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21993  fi
21994
21995              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21996$as_echo_n "checking for Boot JDK... " >&6; }
21997              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21998$as_echo "$BOOT_JDK" >&6; }
21999              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22000$as_echo_n "checking Boot JDK version... " >&6; }
22001              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22002              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22003$as_echo "$BOOT_JDK_VERSION" >&6; }
22004            fi # end check jdk version
22005          fi # end check rt.jar
22006        fi # end check javac
22007      fi # end check java
22008    fi # end check boot jdk found
22009  fi
22010
22011    done
22012  fi
22013
22014  fi
22015
22016
22017    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22018    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22019      # Do we have a bin/java?
22020      if test ! -x "$BOOT_JDK/bin/java"; then
22021        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22022$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22023        BOOT_JDK_FOUND=no
22024      else
22025        # Do we have a bin/javac?
22026        if test ! -x "$BOOT_JDK/bin/javac"; then
22027          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22028$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22029          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22030$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22031          BOOT_JDK_FOUND=no
22032        else
22033          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22034          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22035            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22036$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22037            BOOT_JDK_FOUND=no
22038          else
22039            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22040            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22041
22042            # Extra M4 quote needed to protect [] in grep expression.
22043            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22044            if test "x$FOUND_CORRECT_VERSION" = x; then
22045              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22046$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22047              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22048$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22049              BOOT_JDK_FOUND=no
22050            else
22051              # We're done! :-)
22052              BOOT_JDK_FOUND=yes
22053
22054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22055
22056  # Input might be given as Windows format, start by converting to
22057  # unix format.
22058  path="$BOOT_JDK"
22059  new_path=`$CYGPATH -u "$path"`
22060
22061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22064  # "foo.exe" is OK but "foo" is an error.
22065  #
22066  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22067  # It is also a way to make sure we got the proper file name for the real test later on.
22068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22069  if test "x$test_shortpath" = x; then
22070    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22071$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22072    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22073  fi
22074
22075  # Call helper function which possibly converts this using DOS-style short mode.
22076  # If so, the updated path is stored in $new_path.
22077
22078  input_path="$new_path"
22079  # Check if we need to convert this using DOS-style short mode. If the path
22080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22081  # take no chances and rewrite it.
22082  # Note: m4 eats our [], so we need to use [ and ] instead.
22083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22084  if test "x$has_forbidden_chars" != x; then
22085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22086    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22087    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22088    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22089      # Going to short mode and back again did indeed matter. Since short mode is
22090      # case insensitive, let's make it lowercase to improve readability.
22091      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22092      # Now convert it back to Unix-stile (cygpath)
22093      input_path=`$CYGPATH -u "$shortmode_path"`
22094      new_path="$input_path"
22095    fi
22096  fi
22097
22098  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22099  if test "x$test_cygdrive_prefix" = x; then
22100    # As a simple fix, exclude /usr/bin since it's not a real path.
22101    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22102      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22103      # a path prefixed by /cygdrive for fixpath to work.
22104      new_path="$CYGWIN_ROOT_PATH$input_path"
22105    fi
22106  fi
22107
22108
22109  if test "x$path" != "x$new_path"; then
22110    BOOT_JDK="$new_path"
22111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22112$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22113  fi
22114
22115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22116
22117  path="$BOOT_JDK"
22118  has_colon=`$ECHO $path | $GREP ^.:`
22119  new_path="$path"
22120  if test "x$has_colon" = x; then
22121    # Not in mixed or Windows style, start by that.
22122    new_path=`cmd //c echo $path`
22123  fi
22124
22125
22126  input_path="$new_path"
22127  # Check if we need to convert this using DOS-style short mode. If the path
22128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22129  # take no chances and rewrite it.
22130  # Note: m4 eats our [], so we need to use [ and ] instead.
22131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22132  if test "x$has_forbidden_chars" != x; then
22133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22134    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22135  fi
22136
22137
22138  windows_path="$new_path"
22139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22140    unix_path=`$CYGPATH -u "$windows_path"`
22141    new_path="$unix_path"
22142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22144    new_path="$unix_path"
22145  fi
22146
22147  if test "x$path" != "x$new_path"; then
22148    BOOT_JDK="$new_path"
22149    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22150$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22151  fi
22152
22153  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22154  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22155
22156  else
22157    # We're on a posix platform. Hooray! :)
22158    path="$BOOT_JDK"
22159    has_space=`$ECHO "$path" | $GREP " "`
22160    if test "x$has_space" != x; then
22161      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22162$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22163      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22164    fi
22165
22166    # Use eval to expand a potential ~
22167    eval path="$path"
22168    if test ! -f "$path" && test ! -d "$path"; then
22169      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22170    fi
22171
22172    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22173  fi
22174
22175              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22176$as_echo_n "checking for Boot JDK... " >&6; }
22177              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22178$as_echo "$BOOT_JDK" >&6; }
22179              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22180$as_echo_n "checking Boot JDK version... " >&6; }
22181              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22182              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22183$as_echo "$BOOT_JDK_VERSION" >&6; }
22184            fi # end check jdk version
22185          fi # end check rt.jar
22186        fi # end check javac
22187      fi # end check java
22188    fi # end check boot jdk found
22189  fi
22190
22191
22192  if test "x$BOOT_JDK_FOUND" = xno; then
22193    # Now execute the test
22194
22195  if test "x$PROGRAMW6432" != x; then
22196    VIRTUAL_DIR="$PROGRAMW6432/Java"
22197
22198  windows_path="$VIRTUAL_DIR"
22199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22200    unix_path=`$CYGPATH -u "$windows_path"`
22201    VIRTUAL_DIR="$unix_path"
22202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22204    VIRTUAL_DIR="$unix_path"
22205  fi
22206
22207
22208  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22209  BOOT_JDK_SUFFIX=""
22210  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22211  if test "x$ALL_JDKS_FOUND" != x; then
22212    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22213
22214  if test "x$BOOT_JDK_FOUND" = xno; then
22215    # Now execute the test
22216
22217        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22218        if test -d "$BOOT_JDK"; then
22219          BOOT_JDK_FOUND=maybe
22220          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22221$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22222        fi
22223
22224
22225    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22226    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22227      # Do we have a bin/java?
22228      if test ! -x "$BOOT_JDK/bin/java"; then
22229        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22230$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22231        BOOT_JDK_FOUND=no
22232      else
22233        # Do we have a bin/javac?
22234        if test ! -x "$BOOT_JDK/bin/javac"; then
22235          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22236$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22237          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22238$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22239          BOOT_JDK_FOUND=no
22240        else
22241          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22242          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22243            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22244$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22245            BOOT_JDK_FOUND=no
22246          else
22247            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22248            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22249
22250            # Extra M4 quote needed to protect [] in grep expression.
22251            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22252            if test "x$FOUND_CORRECT_VERSION" = x; then
22253              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22254$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22255              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22256$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22257              BOOT_JDK_FOUND=no
22258            else
22259              # We're done! :-)
22260              BOOT_JDK_FOUND=yes
22261
22262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22263
22264  # Input might be given as Windows format, start by converting to
22265  # unix format.
22266  path="$BOOT_JDK"
22267  new_path=`$CYGPATH -u "$path"`
22268
22269  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22270  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22271  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22272  # "foo.exe" is OK but "foo" is an error.
22273  #
22274  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22275  # It is also a way to make sure we got the proper file name for the real test later on.
22276  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22277  if test "x$test_shortpath" = x; then
22278    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22279$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22280    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22281  fi
22282
22283  # Call helper function which possibly converts this using DOS-style short mode.
22284  # If so, the updated path is stored in $new_path.
22285
22286  input_path="$new_path"
22287  # Check if we need to convert this using DOS-style short mode. If the path
22288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22289  # take no chances and rewrite it.
22290  # Note: m4 eats our [], so we need to use [ and ] instead.
22291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22292  if test "x$has_forbidden_chars" != x; then
22293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22294    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22295    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22296    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22297      # Going to short mode and back again did indeed matter. Since short mode is
22298      # case insensitive, let's make it lowercase to improve readability.
22299      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22300      # Now convert it back to Unix-stile (cygpath)
22301      input_path=`$CYGPATH -u "$shortmode_path"`
22302      new_path="$input_path"
22303    fi
22304  fi
22305
22306  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22307  if test "x$test_cygdrive_prefix" = x; then
22308    # As a simple fix, exclude /usr/bin since it's not a real path.
22309    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22310      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22311      # a path prefixed by /cygdrive for fixpath to work.
22312      new_path="$CYGWIN_ROOT_PATH$input_path"
22313    fi
22314  fi
22315
22316
22317  if test "x$path" != "x$new_path"; then
22318    BOOT_JDK="$new_path"
22319    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22320$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22321  fi
22322
22323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22324
22325  path="$BOOT_JDK"
22326  has_colon=`$ECHO $path | $GREP ^.:`
22327  new_path="$path"
22328  if test "x$has_colon" = x; then
22329    # Not in mixed or Windows style, start by that.
22330    new_path=`cmd //c echo $path`
22331  fi
22332
22333
22334  input_path="$new_path"
22335  # Check if we need to convert this using DOS-style short mode. If the path
22336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22337  # take no chances and rewrite it.
22338  # Note: m4 eats our [], so we need to use [ and ] instead.
22339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22340  if test "x$has_forbidden_chars" != x; then
22341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22342    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22343  fi
22344
22345
22346  windows_path="$new_path"
22347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22348    unix_path=`$CYGPATH -u "$windows_path"`
22349    new_path="$unix_path"
22350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22352    new_path="$unix_path"
22353  fi
22354
22355  if test "x$path" != "x$new_path"; then
22356    BOOT_JDK="$new_path"
22357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22358$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22359  fi
22360
22361  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22362  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22363
22364  else
22365    # We're on a posix platform. Hooray! :)
22366    path="$BOOT_JDK"
22367    has_space=`$ECHO "$path" | $GREP " "`
22368    if test "x$has_space" != x; then
22369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22370$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22371      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22372    fi
22373
22374    # Use eval to expand a potential ~
22375    eval path="$path"
22376    if test ! -f "$path" && test ! -d "$path"; then
22377      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22378    fi
22379
22380    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22381  fi
22382
22383              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22384$as_echo_n "checking for Boot JDK... " >&6; }
22385              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22386$as_echo "$BOOT_JDK" >&6; }
22387              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22388$as_echo_n "checking Boot JDK version... " >&6; }
22389              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22390              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22391$as_echo "$BOOT_JDK_VERSION" >&6; }
22392            fi # end check jdk version
22393          fi # end check rt.jar
22394        fi # end check javac
22395      fi # end check java
22396    fi # end check boot jdk found
22397  fi
22398
22399    done
22400  fi
22401
22402  fi
22403
22404
22405    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22406    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22407      # Do we have a bin/java?
22408      if test ! -x "$BOOT_JDK/bin/java"; then
22409        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22410$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22411        BOOT_JDK_FOUND=no
22412      else
22413        # Do we have a bin/javac?
22414        if test ! -x "$BOOT_JDK/bin/javac"; then
22415          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22416$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22417          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22418$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22419          BOOT_JDK_FOUND=no
22420        else
22421          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22422          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22423            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22424$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22425            BOOT_JDK_FOUND=no
22426          else
22427            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22428            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22429
22430            # Extra M4 quote needed to protect [] in grep expression.
22431            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22432            if test "x$FOUND_CORRECT_VERSION" = x; then
22433              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22434$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22435              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22436$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22437              BOOT_JDK_FOUND=no
22438            else
22439              # We're done! :-)
22440              BOOT_JDK_FOUND=yes
22441
22442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22443
22444  # Input might be given as Windows format, start by converting to
22445  # unix format.
22446  path="$BOOT_JDK"
22447  new_path=`$CYGPATH -u "$path"`
22448
22449  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22450  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22451  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22452  # "foo.exe" is OK but "foo" is an error.
22453  #
22454  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22455  # It is also a way to make sure we got the proper file name for the real test later on.
22456  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22457  if test "x$test_shortpath" = x; then
22458    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22459$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22460    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22461  fi
22462
22463  # Call helper function which possibly converts this using DOS-style short mode.
22464  # If so, the updated path is stored in $new_path.
22465
22466  input_path="$new_path"
22467  # Check if we need to convert this using DOS-style short mode. If the path
22468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22469  # take no chances and rewrite it.
22470  # Note: m4 eats our [], so we need to use [ and ] instead.
22471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22472  if test "x$has_forbidden_chars" != x; then
22473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22474    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22475    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22476    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22477      # Going to short mode and back again did indeed matter. Since short mode is
22478      # case insensitive, let's make it lowercase to improve readability.
22479      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22480      # Now convert it back to Unix-stile (cygpath)
22481      input_path=`$CYGPATH -u "$shortmode_path"`
22482      new_path="$input_path"
22483    fi
22484  fi
22485
22486  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22487  if test "x$test_cygdrive_prefix" = x; then
22488    # As a simple fix, exclude /usr/bin since it's not a real path.
22489    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22490      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22491      # a path prefixed by /cygdrive for fixpath to work.
22492      new_path="$CYGWIN_ROOT_PATH$input_path"
22493    fi
22494  fi
22495
22496
22497  if test "x$path" != "x$new_path"; then
22498    BOOT_JDK="$new_path"
22499    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22500$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22501  fi
22502
22503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22504
22505  path="$BOOT_JDK"
22506  has_colon=`$ECHO $path | $GREP ^.:`
22507  new_path="$path"
22508  if test "x$has_colon" = x; then
22509    # Not in mixed or Windows style, start by that.
22510    new_path=`cmd //c echo $path`
22511  fi
22512
22513
22514  input_path="$new_path"
22515  # Check if we need to convert this using DOS-style short mode. If the path
22516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22517  # take no chances and rewrite it.
22518  # Note: m4 eats our [], so we need to use [ and ] instead.
22519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22520  if test "x$has_forbidden_chars" != x; then
22521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22522    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22523  fi
22524
22525
22526  windows_path="$new_path"
22527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22528    unix_path=`$CYGPATH -u "$windows_path"`
22529    new_path="$unix_path"
22530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22532    new_path="$unix_path"
22533  fi
22534
22535  if test "x$path" != "x$new_path"; then
22536    BOOT_JDK="$new_path"
22537    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22538$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22539  fi
22540
22541  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22542  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22543
22544  else
22545    # We're on a posix platform. Hooray! :)
22546    path="$BOOT_JDK"
22547    has_space=`$ECHO "$path" | $GREP " "`
22548    if test "x$has_space" != x; then
22549      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22550$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22551      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22552    fi
22553
22554    # Use eval to expand a potential ~
22555    eval path="$path"
22556    if test ! -f "$path" && test ! -d "$path"; then
22557      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22558    fi
22559
22560    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22561  fi
22562
22563              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22564$as_echo_n "checking for Boot JDK... " >&6; }
22565              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22566$as_echo "$BOOT_JDK" >&6; }
22567              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22568$as_echo_n "checking Boot JDK version... " >&6; }
22569              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22570              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22571$as_echo "$BOOT_JDK_VERSION" >&6; }
22572            fi # end check jdk version
22573          fi # end check rt.jar
22574        fi # end check javac
22575      fi # end check java
22576    fi # end check boot jdk found
22577  fi
22578
22579
22580  if test "x$BOOT_JDK_FOUND" = xno; then
22581    # Now execute the test
22582
22583  if test "x$PROGRAMFILES" != x; then
22584    VIRTUAL_DIR="$PROGRAMFILES/Java"
22585
22586  windows_path="$VIRTUAL_DIR"
22587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22588    unix_path=`$CYGPATH -u "$windows_path"`
22589    VIRTUAL_DIR="$unix_path"
22590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22592    VIRTUAL_DIR="$unix_path"
22593  fi
22594
22595
22596  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22597  BOOT_JDK_SUFFIX=""
22598  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22599  if test "x$ALL_JDKS_FOUND" != x; then
22600    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22601
22602  if test "x$BOOT_JDK_FOUND" = xno; then
22603    # Now execute the test
22604
22605        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22606        if test -d "$BOOT_JDK"; then
22607          BOOT_JDK_FOUND=maybe
22608          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22609$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22610        fi
22611
22612
22613    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22614    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22615      # Do we have a bin/java?
22616      if test ! -x "$BOOT_JDK/bin/java"; then
22617        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22618$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22619        BOOT_JDK_FOUND=no
22620      else
22621        # Do we have a bin/javac?
22622        if test ! -x "$BOOT_JDK/bin/javac"; then
22623          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22624$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22625          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22626$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22627          BOOT_JDK_FOUND=no
22628        else
22629          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22630          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22631            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22632$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22633            BOOT_JDK_FOUND=no
22634          else
22635            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22636            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22637
22638            # Extra M4 quote needed to protect [] in grep expression.
22639            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22640            if test "x$FOUND_CORRECT_VERSION" = x; then
22641              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22642$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22643              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22644$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22645              BOOT_JDK_FOUND=no
22646            else
22647              # We're done! :-)
22648              BOOT_JDK_FOUND=yes
22649
22650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22651
22652  # Input might be given as Windows format, start by converting to
22653  # unix format.
22654  path="$BOOT_JDK"
22655  new_path=`$CYGPATH -u "$path"`
22656
22657  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22658  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22659  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22660  # "foo.exe" is OK but "foo" is an error.
22661  #
22662  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22663  # It is also a way to make sure we got the proper file name for the real test later on.
22664  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22665  if test "x$test_shortpath" = x; then
22666    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22667$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22668    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22669  fi
22670
22671  # Call helper function which possibly converts this using DOS-style short mode.
22672  # If so, the updated path is stored in $new_path.
22673
22674  input_path="$new_path"
22675  # Check if we need to convert this using DOS-style short mode. If the path
22676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22677  # take no chances and rewrite it.
22678  # Note: m4 eats our [], so we need to use [ and ] instead.
22679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22680  if test "x$has_forbidden_chars" != x; then
22681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22682    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22683    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22684    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22685      # Going to short mode and back again did indeed matter. Since short mode is
22686      # case insensitive, let's make it lowercase to improve readability.
22687      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22688      # Now convert it back to Unix-stile (cygpath)
22689      input_path=`$CYGPATH -u "$shortmode_path"`
22690      new_path="$input_path"
22691    fi
22692  fi
22693
22694  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22695  if test "x$test_cygdrive_prefix" = x; then
22696    # As a simple fix, exclude /usr/bin since it's not a real path.
22697    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22698      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22699      # a path prefixed by /cygdrive for fixpath to work.
22700      new_path="$CYGWIN_ROOT_PATH$input_path"
22701    fi
22702  fi
22703
22704
22705  if test "x$path" != "x$new_path"; then
22706    BOOT_JDK="$new_path"
22707    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22708$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22709  fi
22710
22711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22712
22713  path="$BOOT_JDK"
22714  has_colon=`$ECHO $path | $GREP ^.:`
22715  new_path="$path"
22716  if test "x$has_colon" = x; then
22717    # Not in mixed or Windows style, start by that.
22718    new_path=`cmd //c echo $path`
22719  fi
22720
22721
22722  input_path="$new_path"
22723  # Check if we need to convert this using DOS-style short mode. If the path
22724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22725  # take no chances and rewrite it.
22726  # Note: m4 eats our [], so we need to use [ and ] instead.
22727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22728  if test "x$has_forbidden_chars" != x; then
22729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22730    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22731  fi
22732
22733
22734  windows_path="$new_path"
22735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22736    unix_path=`$CYGPATH -u "$windows_path"`
22737    new_path="$unix_path"
22738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22740    new_path="$unix_path"
22741  fi
22742
22743  if test "x$path" != "x$new_path"; then
22744    BOOT_JDK="$new_path"
22745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22746$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22747  fi
22748
22749  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22750  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22751
22752  else
22753    # We're on a posix platform. Hooray! :)
22754    path="$BOOT_JDK"
22755    has_space=`$ECHO "$path" | $GREP " "`
22756    if test "x$has_space" != x; then
22757      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22758$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22759      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22760    fi
22761
22762    # Use eval to expand a potential ~
22763    eval path="$path"
22764    if test ! -f "$path" && test ! -d "$path"; then
22765      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22766    fi
22767
22768    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22769  fi
22770
22771              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22772$as_echo_n "checking for Boot JDK... " >&6; }
22773              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22774$as_echo "$BOOT_JDK" >&6; }
22775              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22776$as_echo_n "checking Boot JDK version... " >&6; }
22777              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22778              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22779$as_echo "$BOOT_JDK_VERSION" >&6; }
22780            fi # end check jdk version
22781          fi # end check rt.jar
22782        fi # end check javac
22783      fi # end check java
22784    fi # end check boot jdk found
22785  fi
22786
22787    done
22788  fi
22789
22790  fi
22791
22792
22793    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22794    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22795      # Do we have a bin/java?
22796      if test ! -x "$BOOT_JDK/bin/java"; then
22797        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22798$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22799        BOOT_JDK_FOUND=no
22800      else
22801        # Do we have a bin/javac?
22802        if test ! -x "$BOOT_JDK/bin/javac"; then
22803          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22804$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22805          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22806$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22807          BOOT_JDK_FOUND=no
22808        else
22809          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22810          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22811            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22812$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22813            BOOT_JDK_FOUND=no
22814          else
22815            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22816            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22817
22818            # Extra M4 quote needed to protect [] in grep expression.
22819            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22820            if test "x$FOUND_CORRECT_VERSION" = x; then
22821              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22822$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22823              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22824$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22825              BOOT_JDK_FOUND=no
22826            else
22827              # We're done! :-)
22828              BOOT_JDK_FOUND=yes
22829
22830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22831
22832  # Input might be given as Windows format, start by converting to
22833  # unix format.
22834  path="$BOOT_JDK"
22835  new_path=`$CYGPATH -u "$path"`
22836
22837  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22838  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22839  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22840  # "foo.exe" is OK but "foo" is an error.
22841  #
22842  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22843  # It is also a way to make sure we got the proper file name for the real test later on.
22844  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22845  if test "x$test_shortpath" = x; then
22846    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22847$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22848    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22849  fi
22850
22851  # Call helper function which possibly converts this using DOS-style short mode.
22852  # If so, the updated path is stored in $new_path.
22853
22854  input_path="$new_path"
22855  # Check if we need to convert this using DOS-style short mode. If the path
22856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22857  # take no chances and rewrite it.
22858  # Note: m4 eats our [], so we need to use [ and ] instead.
22859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22860  if test "x$has_forbidden_chars" != x; then
22861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22862    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22863    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22864    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22865      # Going to short mode and back again did indeed matter. Since short mode is
22866      # case insensitive, let's make it lowercase to improve readability.
22867      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22868      # Now convert it back to Unix-stile (cygpath)
22869      input_path=`$CYGPATH -u "$shortmode_path"`
22870      new_path="$input_path"
22871    fi
22872  fi
22873
22874  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22875  if test "x$test_cygdrive_prefix" = x; then
22876    # As a simple fix, exclude /usr/bin since it's not a real path.
22877    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22878      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22879      # a path prefixed by /cygdrive for fixpath to work.
22880      new_path="$CYGWIN_ROOT_PATH$input_path"
22881    fi
22882  fi
22883
22884
22885  if test "x$path" != "x$new_path"; then
22886    BOOT_JDK="$new_path"
22887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22888$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22889  fi
22890
22891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22892
22893  path="$BOOT_JDK"
22894  has_colon=`$ECHO $path | $GREP ^.:`
22895  new_path="$path"
22896  if test "x$has_colon" = x; then
22897    # Not in mixed or Windows style, start by that.
22898    new_path=`cmd //c echo $path`
22899  fi
22900
22901
22902  input_path="$new_path"
22903  # Check if we need to convert this using DOS-style short mode. If the path
22904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22905  # take no chances and rewrite it.
22906  # Note: m4 eats our [], so we need to use [ and ] instead.
22907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22908  if test "x$has_forbidden_chars" != x; then
22909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22910    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22911  fi
22912
22913
22914  windows_path="$new_path"
22915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22916    unix_path=`$CYGPATH -u "$windows_path"`
22917    new_path="$unix_path"
22918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22920    new_path="$unix_path"
22921  fi
22922
22923  if test "x$path" != "x$new_path"; then
22924    BOOT_JDK="$new_path"
22925    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22926$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22927  fi
22928
22929  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22930  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22931
22932  else
22933    # We're on a posix platform. Hooray! :)
22934    path="$BOOT_JDK"
22935    has_space=`$ECHO "$path" | $GREP " "`
22936    if test "x$has_space" != x; then
22937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22938$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22939      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22940    fi
22941
22942    # Use eval to expand a potential ~
22943    eval path="$path"
22944    if test ! -f "$path" && test ! -d "$path"; then
22945      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22946    fi
22947
22948    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22949  fi
22950
22951              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22952$as_echo_n "checking for Boot JDK... " >&6; }
22953              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22954$as_echo "$BOOT_JDK" >&6; }
22955              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22956$as_echo_n "checking Boot JDK version... " >&6; }
22957              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22958              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22959$as_echo "$BOOT_JDK_VERSION" >&6; }
22960            fi # end check jdk version
22961          fi # end check rt.jar
22962        fi # end check javac
22963      fi # end check java
22964    fi # end check boot jdk found
22965  fi
22966
22967
22968  if test "x$BOOT_JDK_FOUND" = xno; then
22969    # Now execute the test
22970
22971  if test "x$ProgramFiles" != x; then
22972    VIRTUAL_DIR="$ProgramFiles/Java"
22973
22974  windows_path="$VIRTUAL_DIR"
22975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22976    unix_path=`$CYGPATH -u "$windows_path"`
22977    VIRTUAL_DIR="$unix_path"
22978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22980    VIRTUAL_DIR="$unix_path"
22981  fi
22982
22983
22984  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22985  BOOT_JDK_SUFFIX=""
22986  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22987  if test "x$ALL_JDKS_FOUND" != x; then
22988    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22989
22990  if test "x$BOOT_JDK_FOUND" = xno; then
22991    # Now execute the test
22992
22993        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22994        if test -d "$BOOT_JDK"; then
22995          BOOT_JDK_FOUND=maybe
22996          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22997$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22998        fi
22999
23000
23001    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23002    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23003      # Do we have a bin/java?
23004      if test ! -x "$BOOT_JDK/bin/java"; then
23005        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23006$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23007        BOOT_JDK_FOUND=no
23008      else
23009        # Do we have a bin/javac?
23010        if test ! -x "$BOOT_JDK/bin/javac"; then
23011          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23013          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23014$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23015          BOOT_JDK_FOUND=no
23016        else
23017          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23018          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23019            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23020$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23021            BOOT_JDK_FOUND=no
23022          else
23023            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23024            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23025
23026            # Extra M4 quote needed to protect [] in grep expression.
23027            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23028            if test "x$FOUND_CORRECT_VERSION" = x; then
23029              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23030$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23031              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23032$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23033              BOOT_JDK_FOUND=no
23034            else
23035              # We're done! :-)
23036              BOOT_JDK_FOUND=yes
23037
23038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23039
23040  # Input might be given as Windows format, start by converting to
23041  # unix format.
23042  path="$BOOT_JDK"
23043  new_path=`$CYGPATH -u "$path"`
23044
23045  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23046  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23047  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23048  # "foo.exe" is OK but "foo" is an error.
23049  #
23050  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23051  # It is also a way to make sure we got the proper file name for the real test later on.
23052  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23053  if test "x$test_shortpath" = x; then
23054    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23055$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23056    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23057  fi
23058
23059  # Call helper function which possibly converts this using DOS-style short mode.
23060  # If so, the updated path is stored in $new_path.
23061
23062  input_path="$new_path"
23063  # Check if we need to convert this using DOS-style short mode. If the path
23064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23065  # take no chances and rewrite it.
23066  # Note: m4 eats our [], so we need to use [ and ] instead.
23067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23068  if test "x$has_forbidden_chars" != x; then
23069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23070    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23071    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23072    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23073      # Going to short mode and back again did indeed matter. Since short mode is
23074      # case insensitive, let's make it lowercase to improve readability.
23075      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23076      # Now convert it back to Unix-stile (cygpath)
23077      input_path=`$CYGPATH -u "$shortmode_path"`
23078      new_path="$input_path"
23079    fi
23080  fi
23081
23082  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23083  if test "x$test_cygdrive_prefix" = x; then
23084    # As a simple fix, exclude /usr/bin since it's not a real path.
23085    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23086      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23087      # a path prefixed by /cygdrive for fixpath to work.
23088      new_path="$CYGWIN_ROOT_PATH$input_path"
23089    fi
23090  fi
23091
23092
23093  if test "x$path" != "x$new_path"; then
23094    BOOT_JDK="$new_path"
23095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23096$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23097  fi
23098
23099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23100
23101  path="$BOOT_JDK"
23102  has_colon=`$ECHO $path | $GREP ^.:`
23103  new_path="$path"
23104  if test "x$has_colon" = x; then
23105    # Not in mixed or Windows style, start by that.
23106    new_path=`cmd //c echo $path`
23107  fi
23108
23109
23110  input_path="$new_path"
23111  # Check if we need to convert this using DOS-style short mode. If the path
23112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23113  # take no chances and rewrite it.
23114  # Note: m4 eats our [], so we need to use [ and ] instead.
23115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23116  if test "x$has_forbidden_chars" != x; then
23117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23118    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23119  fi
23120
23121
23122  windows_path="$new_path"
23123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23124    unix_path=`$CYGPATH -u "$windows_path"`
23125    new_path="$unix_path"
23126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23128    new_path="$unix_path"
23129  fi
23130
23131  if test "x$path" != "x$new_path"; then
23132    BOOT_JDK="$new_path"
23133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23134$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23135  fi
23136
23137  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23138  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23139
23140  else
23141    # We're on a posix platform. Hooray! :)
23142    path="$BOOT_JDK"
23143    has_space=`$ECHO "$path" | $GREP " "`
23144    if test "x$has_space" != x; then
23145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23146$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23147      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23148    fi
23149
23150    # Use eval to expand a potential ~
23151    eval path="$path"
23152    if test ! -f "$path" && test ! -d "$path"; then
23153      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23154    fi
23155
23156    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23157  fi
23158
23159              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23160$as_echo_n "checking for Boot JDK... " >&6; }
23161              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23162$as_echo "$BOOT_JDK" >&6; }
23163              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23164$as_echo_n "checking Boot JDK version... " >&6; }
23165              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23166              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23167$as_echo "$BOOT_JDK_VERSION" >&6; }
23168            fi # end check jdk version
23169          fi # end check rt.jar
23170        fi # end check javac
23171      fi # end check java
23172    fi # end check boot jdk found
23173  fi
23174
23175    done
23176  fi
23177
23178  fi
23179
23180
23181    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23182    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23183      # Do we have a bin/java?
23184      if test ! -x "$BOOT_JDK/bin/java"; then
23185        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23186$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23187        BOOT_JDK_FOUND=no
23188      else
23189        # Do we have a bin/javac?
23190        if test ! -x "$BOOT_JDK/bin/javac"; then
23191          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23192$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23193          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23194$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23195          BOOT_JDK_FOUND=no
23196        else
23197          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23198          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23199            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23200$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23201            BOOT_JDK_FOUND=no
23202          else
23203            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23204            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23205
23206            # Extra M4 quote needed to protect [] in grep expression.
23207            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23208            if test "x$FOUND_CORRECT_VERSION" = x; then
23209              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23210$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23211              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23212$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23213              BOOT_JDK_FOUND=no
23214            else
23215              # We're done! :-)
23216              BOOT_JDK_FOUND=yes
23217
23218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23219
23220  # Input might be given as Windows format, start by converting to
23221  # unix format.
23222  path="$BOOT_JDK"
23223  new_path=`$CYGPATH -u "$path"`
23224
23225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23228  # "foo.exe" is OK but "foo" is an error.
23229  #
23230  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23231  # It is also a way to make sure we got the proper file name for the real test later on.
23232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23233  if test "x$test_shortpath" = x; then
23234    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23235$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23236    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23237  fi
23238
23239  # Call helper function which possibly converts this using DOS-style short mode.
23240  # If so, the updated path is stored in $new_path.
23241
23242  input_path="$new_path"
23243  # Check if we need to convert this using DOS-style short mode. If the path
23244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23245  # take no chances and rewrite it.
23246  # Note: m4 eats our [], so we need to use [ and ] instead.
23247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23248  if test "x$has_forbidden_chars" != x; then
23249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23250    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23251    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23252    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23253      # Going to short mode and back again did indeed matter. Since short mode is
23254      # case insensitive, let's make it lowercase to improve readability.
23255      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23256      # Now convert it back to Unix-stile (cygpath)
23257      input_path=`$CYGPATH -u "$shortmode_path"`
23258      new_path="$input_path"
23259    fi
23260  fi
23261
23262  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23263  if test "x$test_cygdrive_prefix" = x; then
23264    # As a simple fix, exclude /usr/bin since it's not a real path.
23265    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23266      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23267      # a path prefixed by /cygdrive for fixpath to work.
23268      new_path="$CYGWIN_ROOT_PATH$input_path"
23269    fi
23270  fi
23271
23272
23273  if test "x$path" != "x$new_path"; then
23274    BOOT_JDK="$new_path"
23275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23276$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23277  fi
23278
23279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23280
23281  path="$BOOT_JDK"
23282  has_colon=`$ECHO $path | $GREP ^.:`
23283  new_path="$path"
23284  if test "x$has_colon" = x; then
23285    # Not in mixed or Windows style, start by that.
23286    new_path=`cmd //c echo $path`
23287  fi
23288
23289
23290  input_path="$new_path"
23291  # Check if we need to convert this using DOS-style short mode. If the path
23292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23293  # take no chances and rewrite it.
23294  # Note: m4 eats our [], so we need to use [ and ] instead.
23295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23296  if test "x$has_forbidden_chars" != x; then
23297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23298    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23299  fi
23300
23301
23302  windows_path="$new_path"
23303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23304    unix_path=`$CYGPATH -u "$windows_path"`
23305    new_path="$unix_path"
23306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23308    new_path="$unix_path"
23309  fi
23310
23311  if test "x$path" != "x$new_path"; then
23312    BOOT_JDK="$new_path"
23313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23314$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23315  fi
23316
23317  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23318  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23319
23320  else
23321    # We're on a posix platform. Hooray! :)
23322    path="$BOOT_JDK"
23323    has_space=`$ECHO "$path" | $GREP " "`
23324    if test "x$has_space" != x; then
23325      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23326$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23327      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23328    fi
23329
23330    # Use eval to expand a potential ~
23331    eval path="$path"
23332    if test ! -f "$path" && test ! -d "$path"; then
23333      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23334    fi
23335
23336    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23337  fi
23338
23339              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23340$as_echo_n "checking for Boot JDK... " >&6; }
23341              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23342$as_echo "$BOOT_JDK" >&6; }
23343              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23344$as_echo_n "checking Boot JDK version... " >&6; }
23345              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23346              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23347$as_echo "$BOOT_JDK_VERSION" >&6; }
23348            fi # end check jdk version
23349          fi # end check rt.jar
23350        fi # end check javac
23351      fi # end check java
23352    fi # end check boot jdk found
23353  fi
23354
23355
23356  if test "x$BOOT_JDK_FOUND" = xno; then
23357    # Now execute the test
23358
23359  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23360  BOOT_JDK_SUFFIX=""
23361  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23362  if test "x$ALL_JDKS_FOUND" != x; then
23363    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23364
23365  if test "x$BOOT_JDK_FOUND" = xno; then
23366    # Now execute the test
23367
23368        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23369        if test -d "$BOOT_JDK"; then
23370          BOOT_JDK_FOUND=maybe
23371          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23372$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23373        fi
23374
23375
23376    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23377    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23378      # Do we have a bin/java?
23379      if test ! -x "$BOOT_JDK/bin/java"; then
23380        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23381$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23382        BOOT_JDK_FOUND=no
23383      else
23384        # Do we have a bin/javac?
23385        if test ! -x "$BOOT_JDK/bin/javac"; then
23386          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23387$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23388          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23389$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23390          BOOT_JDK_FOUND=no
23391        else
23392          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23393          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23394            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23395$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23396            BOOT_JDK_FOUND=no
23397          else
23398            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23399            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23400
23401            # Extra M4 quote needed to protect [] in grep expression.
23402            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23403            if test "x$FOUND_CORRECT_VERSION" = x; then
23404              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23405$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23406              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23407$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23408              BOOT_JDK_FOUND=no
23409            else
23410              # We're done! :-)
23411              BOOT_JDK_FOUND=yes
23412
23413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23414
23415  # Input might be given as Windows format, start by converting to
23416  # unix format.
23417  path="$BOOT_JDK"
23418  new_path=`$CYGPATH -u "$path"`
23419
23420  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23421  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23422  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23423  # "foo.exe" is OK but "foo" is an error.
23424  #
23425  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23426  # It is also a way to make sure we got the proper file name for the real test later on.
23427  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23428  if test "x$test_shortpath" = x; then
23429    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23430$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23431    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23432  fi
23433
23434  # Call helper function which possibly converts this using DOS-style short mode.
23435  # If so, the updated path is stored in $new_path.
23436
23437  input_path="$new_path"
23438  # Check if we need to convert this using DOS-style short mode. If the path
23439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23440  # take no chances and rewrite it.
23441  # Note: m4 eats our [], so we need to use [ and ] instead.
23442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23443  if test "x$has_forbidden_chars" != x; then
23444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23445    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23446    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23447    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23448      # Going to short mode and back again did indeed matter. Since short mode is
23449      # case insensitive, let's make it lowercase to improve readability.
23450      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23451      # Now convert it back to Unix-stile (cygpath)
23452      input_path=`$CYGPATH -u "$shortmode_path"`
23453      new_path="$input_path"
23454    fi
23455  fi
23456
23457  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23458  if test "x$test_cygdrive_prefix" = x; then
23459    # As a simple fix, exclude /usr/bin since it's not a real path.
23460    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23461      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23462      # a path prefixed by /cygdrive for fixpath to work.
23463      new_path="$CYGWIN_ROOT_PATH$input_path"
23464    fi
23465  fi
23466
23467
23468  if test "x$path" != "x$new_path"; then
23469    BOOT_JDK="$new_path"
23470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23471$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23472  fi
23473
23474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23475
23476  path="$BOOT_JDK"
23477  has_colon=`$ECHO $path | $GREP ^.:`
23478  new_path="$path"
23479  if test "x$has_colon" = x; then
23480    # Not in mixed or Windows style, start by that.
23481    new_path=`cmd //c echo $path`
23482  fi
23483
23484
23485  input_path="$new_path"
23486  # Check if we need to convert this using DOS-style short mode. If the path
23487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23488  # take no chances and rewrite it.
23489  # Note: m4 eats our [], so we need to use [ and ] instead.
23490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23491  if test "x$has_forbidden_chars" != x; then
23492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23493    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23494  fi
23495
23496
23497  windows_path="$new_path"
23498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23499    unix_path=`$CYGPATH -u "$windows_path"`
23500    new_path="$unix_path"
23501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23503    new_path="$unix_path"
23504  fi
23505
23506  if test "x$path" != "x$new_path"; then
23507    BOOT_JDK="$new_path"
23508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23509$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23510  fi
23511
23512  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23513  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23514
23515  else
23516    # We're on a posix platform. Hooray! :)
23517    path="$BOOT_JDK"
23518    has_space=`$ECHO "$path" | $GREP " "`
23519    if test "x$has_space" != x; then
23520      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23521$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23522      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23523    fi
23524
23525    # Use eval to expand a potential ~
23526    eval path="$path"
23527    if test ! -f "$path" && test ! -d "$path"; then
23528      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23529    fi
23530
23531    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23532  fi
23533
23534              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23535$as_echo_n "checking for Boot JDK... " >&6; }
23536              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23537$as_echo "$BOOT_JDK" >&6; }
23538              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23539$as_echo_n "checking Boot JDK version... " >&6; }
23540              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23541              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23542$as_echo "$BOOT_JDK_VERSION" >&6; }
23543            fi # end check jdk version
23544          fi # end check rt.jar
23545        fi # end check javac
23546      fi # end check java
23547    fi # end check boot jdk found
23548  fi
23549
23550    done
23551  fi
23552
23553
23554    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23555    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23556      # Do we have a bin/java?
23557      if test ! -x "$BOOT_JDK/bin/java"; then
23558        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23559$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23560        BOOT_JDK_FOUND=no
23561      else
23562        # Do we have a bin/javac?
23563        if test ! -x "$BOOT_JDK/bin/javac"; then
23564          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23565$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23566          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23567$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23568          BOOT_JDK_FOUND=no
23569        else
23570          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23571          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23572            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23573$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23574            BOOT_JDK_FOUND=no
23575          else
23576            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23577            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23578
23579            # Extra M4 quote needed to protect [] in grep expression.
23580            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23581            if test "x$FOUND_CORRECT_VERSION" = x; then
23582              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23583$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23584              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23585$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23586              BOOT_JDK_FOUND=no
23587            else
23588              # We're done! :-)
23589              BOOT_JDK_FOUND=yes
23590
23591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23592
23593  # Input might be given as Windows format, start by converting to
23594  # unix format.
23595  path="$BOOT_JDK"
23596  new_path=`$CYGPATH -u "$path"`
23597
23598  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23599  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23600  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23601  # "foo.exe" is OK but "foo" is an error.
23602  #
23603  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23604  # It is also a way to make sure we got the proper file name for the real test later on.
23605  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23606  if test "x$test_shortpath" = x; then
23607    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23608$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23609    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23610  fi
23611
23612  # Call helper function which possibly converts this using DOS-style short mode.
23613  # If so, the updated path is stored in $new_path.
23614
23615  input_path="$new_path"
23616  # Check if we need to convert this using DOS-style short mode. If the path
23617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23618  # take no chances and rewrite it.
23619  # Note: m4 eats our [], so we need to use [ and ] instead.
23620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23621  if test "x$has_forbidden_chars" != x; then
23622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23623    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23624    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23625    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23626      # Going to short mode and back again did indeed matter. Since short mode is
23627      # case insensitive, let's make it lowercase to improve readability.
23628      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23629      # Now convert it back to Unix-stile (cygpath)
23630      input_path=`$CYGPATH -u "$shortmode_path"`
23631      new_path="$input_path"
23632    fi
23633  fi
23634
23635  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23636  if test "x$test_cygdrive_prefix" = x; then
23637    # As a simple fix, exclude /usr/bin since it's not a real path.
23638    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23639      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23640      # a path prefixed by /cygdrive for fixpath to work.
23641      new_path="$CYGWIN_ROOT_PATH$input_path"
23642    fi
23643  fi
23644
23645
23646  if test "x$path" != "x$new_path"; then
23647    BOOT_JDK="$new_path"
23648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23649$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23650  fi
23651
23652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23653
23654  path="$BOOT_JDK"
23655  has_colon=`$ECHO $path | $GREP ^.:`
23656  new_path="$path"
23657  if test "x$has_colon" = x; then
23658    # Not in mixed or Windows style, start by that.
23659    new_path=`cmd //c echo $path`
23660  fi
23661
23662
23663  input_path="$new_path"
23664  # Check if we need to convert this using DOS-style short mode. If the path
23665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23666  # take no chances and rewrite it.
23667  # Note: m4 eats our [], so we need to use [ and ] instead.
23668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23669  if test "x$has_forbidden_chars" != x; then
23670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23671    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23672  fi
23673
23674
23675  windows_path="$new_path"
23676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23677    unix_path=`$CYGPATH -u "$windows_path"`
23678    new_path="$unix_path"
23679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23681    new_path="$unix_path"
23682  fi
23683
23684  if test "x$path" != "x$new_path"; then
23685    BOOT_JDK="$new_path"
23686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23687$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23688  fi
23689
23690  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23691  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23692
23693  else
23694    # We're on a posix platform. Hooray! :)
23695    path="$BOOT_JDK"
23696    has_space=`$ECHO "$path" | $GREP " "`
23697    if test "x$has_space" != x; then
23698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23699$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23700      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23701    fi
23702
23703    # Use eval to expand a potential ~
23704    eval path="$path"
23705    if test ! -f "$path" && test ! -d "$path"; then
23706      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23707    fi
23708
23709    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23710  fi
23711
23712              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23713$as_echo_n "checking for Boot JDK... " >&6; }
23714              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23715$as_echo "$BOOT_JDK" >&6; }
23716              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23717$as_echo_n "checking Boot JDK version... " >&6; }
23718              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23719              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23720$as_echo "$BOOT_JDK_VERSION" >&6; }
23721            fi # end check jdk version
23722          fi # end check rt.jar
23723        fi # end check javac
23724      fi # end check java
23725    fi # end check boot jdk found
23726  fi
23727
23728  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23729
23730  if test "x$BOOT_JDK_FOUND" = xno; then
23731    # Now execute the test
23732
23733  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23734  BOOT_JDK_SUFFIX="/Contents/Home"
23735  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23736  if test "x$ALL_JDKS_FOUND" != x; then
23737    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23738
23739  if test "x$BOOT_JDK_FOUND" = xno; then
23740    # Now execute the test
23741
23742        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23743        if test -d "$BOOT_JDK"; then
23744          BOOT_JDK_FOUND=maybe
23745          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23746$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23747        fi
23748
23749
23750    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23751    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23752      # Do we have a bin/java?
23753      if test ! -x "$BOOT_JDK/bin/java"; then
23754        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23755$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23756        BOOT_JDK_FOUND=no
23757      else
23758        # Do we have a bin/javac?
23759        if test ! -x "$BOOT_JDK/bin/javac"; then
23760          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23761$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23762          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23763$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23764          BOOT_JDK_FOUND=no
23765        else
23766          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23767          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23768            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23769$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23770            BOOT_JDK_FOUND=no
23771          else
23772            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23773            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23774
23775            # Extra M4 quote needed to protect [] in grep expression.
23776            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23777            if test "x$FOUND_CORRECT_VERSION" = x; then
23778              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23779$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23780              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23781$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23782              BOOT_JDK_FOUND=no
23783            else
23784              # We're done! :-)
23785              BOOT_JDK_FOUND=yes
23786
23787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23788
23789  # Input might be given as Windows format, start by converting to
23790  # unix format.
23791  path="$BOOT_JDK"
23792  new_path=`$CYGPATH -u "$path"`
23793
23794  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23795  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23796  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23797  # "foo.exe" is OK but "foo" is an error.
23798  #
23799  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23800  # It is also a way to make sure we got the proper file name for the real test later on.
23801  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23802  if test "x$test_shortpath" = x; then
23803    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23804$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23805    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23806  fi
23807
23808  # Call helper function which possibly converts this using DOS-style short mode.
23809  # If so, the updated path is stored in $new_path.
23810
23811  input_path="$new_path"
23812  # Check if we need to convert this using DOS-style short mode. If the path
23813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23814  # take no chances and rewrite it.
23815  # Note: m4 eats our [], so we need to use [ and ] instead.
23816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23817  if test "x$has_forbidden_chars" != x; then
23818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23819    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23820    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23821    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23822      # Going to short mode and back again did indeed matter. Since short mode is
23823      # case insensitive, let's make it lowercase to improve readability.
23824      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23825      # Now convert it back to Unix-stile (cygpath)
23826      input_path=`$CYGPATH -u "$shortmode_path"`
23827      new_path="$input_path"
23828    fi
23829  fi
23830
23831  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23832  if test "x$test_cygdrive_prefix" = x; then
23833    # As a simple fix, exclude /usr/bin since it's not a real path.
23834    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23835      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23836      # a path prefixed by /cygdrive for fixpath to work.
23837      new_path="$CYGWIN_ROOT_PATH$input_path"
23838    fi
23839  fi
23840
23841
23842  if test "x$path" != "x$new_path"; then
23843    BOOT_JDK="$new_path"
23844    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23845$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23846  fi
23847
23848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23849
23850  path="$BOOT_JDK"
23851  has_colon=`$ECHO $path | $GREP ^.:`
23852  new_path="$path"
23853  if test "x$has_colon" = x; then
23854    # Not in mixed or Windows style, start by that.
23855    new_path=`cmd //c echo $path`
23856  fi
23857
23858
23859  input_path="$new_path"
23860  # Check if we need to convert this using DOS-style short mode. If the path
23861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23862  # take no chances and rewrite it.
23863  # Note: m4 eats our [], so we need to use [ and ] instead.
23864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23865  if test "x$has_forbidden_chars" != x; then
23866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23867    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23868  fi
23869
23870
23871  windows_path="$new_path"
23872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23873    unix_path=`$CYGPATH -u "$windows_path"`
23874    new_path="$unix_path"
23875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23877    new_path="$unix_path"
23878  fi
23879
23880  if test "x$path" != "x$new_path"; then
23881    BOOT_JDK="$new_path"
23882    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23883$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23884  fi
23885
23886  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23887  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23888
23889  else
23890    # We're on a posix platform. Hooray! :)
23891    path="$BOOT_JDK"
23892    has_space=`$ECHO "$path" | $GREP " "`
23893    if test "x$has_space" != x; then
23894      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23895$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23896      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23897    fi
23898
23899    # Use eval to expand a potential ~
23900    eval path="$path"
23901    if test ! -f "$path" && test ! -d "$path"; then
23902      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23903    fi
23904
23905    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23906  fi
23907
23908              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23909$as_echo_n "checking for Boot JDK... " >&6; }
23910              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23911$as_echo "$BOOT_JDK" >&6; }
23912              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23913$as_echo_n "checking Boot JDK version... " >&6; }
23914              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23915              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23916$as_echo "$BOOT_JDK_VERSION" >&6; }
23917            fi # end check jdk version
23918          fi # end check rt.jar
23919        fi # end check javac
23920      fi # end check java
23921    fi # end check boot jdk found
23922  fi
23923
23924    done
23925  fi
23926
23927
23928    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23929    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23930      # Do we have a bin/java?
23931      if test ! -x "$BOOT_JDK/bin/java"; then
23932        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23933$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23934        BOOT_JDK_FOUND=no
23935      else
23936        # Do we have a bin/javac?
23937        if test ! -x "$BOOT_JDK/bin/javac"; then
23938          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23939$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23940          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23941$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23942          BOOT_JDK_FOUND=no
23943        else
23944          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23945          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23946            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23947$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23948            BOOT_JDK_FOUND=no
23949          else
23950            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23951            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23952
23953            # Extra M4 quote needed to protect [] in grep expression.
23954            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23955            if test "x$FOUND_CORRECT_VERSION" = x; then
23956              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23957$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23958              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23959$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23960              BOOT_JDK_FOUND=no
23961            else
23962              # We're done! :-)
23963              BOOT_JDK_FOUND=yes
23964
23965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23966
23967  # Input might be given as Windows format, start by converting to
23968  # unix format.
23969  path="$BOOT_JDK"
23970  new_path=`$CYGPATH -u "$path"`
23971
23972  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23973  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23974  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23975  # "foo.exe" is OK but "foo" is an error.
23976  #
23977  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23978  # It is also a way to make sure we got the proper file name for the real test later on.
23979  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23980  if test "x$test_shortpath" = x; then
23981    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23982$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23983    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23984  fi
23985
23986  # Call helper function which possibly converts this using DOS-style short mode.
23987  # If so, the updated path is stored in $new_path.
23988
23989  input_path="$new_path"
23990  # Check if we need to convert this using DOS-style short mode. If the path
23991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23992  # take no chances and rewrite it.
23993  # Note: m4 eats our [], so we need to use [ and ] instead.
23994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23995  if test "x$has_forbidden_chars" != x; then
23996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23997    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23998    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23999    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24000      # Going to short mode and back again did indeed matter. Since short mode is
24001      # case insensitive, let's make it lowercase to improve readability.
24002      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24003      # Now convert it back to Unix-stile (cygpath)
24004      input_path=`$CYGPATH -u "$shortmode_path"`
24005      new_path="$input_path"
24006    fi
24007  fi
24008
24009  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24010  if test "x$test_cygdrive_prefix" = x; then
24011    # As a simple fix, exclude /usr/bin since it's not a real path.
24012    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24013      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24014      # a path prefixed by /cygdrive for fixpath to work.
24015      new_path="$CYGWIN_ROOT_PATH$input_path"
24016    fi
24017  fi
24018
24019
24020  if test "x$path" != "x$new_path"; then
24021    BOOT_JDK="$new_path"
24022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24023$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24024  fi
24025
24026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24027
24028  path="$BOOT_JDK"
24029  has_colon=`$ECHO $path | $GREP ^.:`
24030  new_path="$path"
24031  if test "x$has_colon" = x; then
24032    # Not in mixed or Windows style, start by that.
24033    new_path=`cmd //c echo $path`
24034  fi
24035
24036
24037  input_path="$new_path"
24038  # Check if we need to convert this using DOS-style short mode. If the path
24039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24040  # take no chances and rewrite it.
24041  # Note: m4 eats our [], so we need to use [ and ] instead.
24042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24043  if test "x$has_forbidden_chars" != x; then
24044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24045    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24046  fi
24047
24048
24049  windows_path="$new_path"
24050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24051    unix_path=`$CYGPATH -u "$windows_path"`
24052    new_path="$unix_path"
24053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24055    new_path="$unix_path"
24056  fi
24057
24058  if test "x$path" != "x$new_path"; then
24059    BOOT_JDK="$new_path"
24060    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24061$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24062  fi
24063
24064  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24065  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24066
24067  else
24068    # We're on a posix platform. Hooray! :)
24069    path="$BOOT_JDK"
24070    has_space=`$ECHO "$path" | $GREP " "`
24071    if test "x$has_space" != x; then
24072      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24073$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24074      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24075    fi
24076
24077    # Use eval to expand a potential ~
24078    eval path="$path"
24079    if test ! -f "$path" && test ! -d "$path"; then
24080      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24081    fi
24082
24083    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24084  fi
24085
24086              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24087$as_echo_n "checking for Boot JDK... " >&6; }
24088              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24089$as_echo "$BOOT_JDK" >&6; }
24090              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24091$as_echo_n "checking Boot JDK version... " >&6; }
24092              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24093              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24094$as_echo "$BOOT_JDK_VERSION" >&6; }
24095            fi # end check jdk version
24096          fi # end check rt.jar
24097        fi # end check javac
24098      fi # end check java
24099    fi # end check boot jdk found
24100  fi
24101
24102
24103  if test "x$BOOT_JDK_FOUND" = xno; then
24104    # Now execute the test
24105
24106  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24107  BOOT_JDK_SUFFIX="/Contents/Home"
24108  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24109  if test "x$ALL_JDKS_FOUND" != x; then
24110    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24111
24112  if test "x$BOOT_JDK_FOUND" = xno; then
24113    # Now execute the test
24114
24115        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24116        if test -d "$BOOT_JDK"; then
24117          BOOT_JDK_FOUND=maybe
24118          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24119$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24120        fi
24121
24122
24123    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24124    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24125      # Do we have a bin/java?
24126      if test ! -x "$BOOT_JDK/bin/java"; then
24127        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24128$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24129        BOOT_JDK_FOUND=no
24130      else
24131        # Do we have a bin/javac?
24132        if test ! -x "$BOOT_JDK/bin/javac"; then
24133          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24134$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24135          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24136$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24137          BOOT_JDK_FOUND=no
24138        else
24139          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24140          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24141            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24142$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24143            BOOT_JDK_FOUND=no
24144          else
24145            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24146            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24147
24148            # Extra M4 quote needed to protect [] in grep expression.
24149            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24150            if test "x$FOUND_CORRECT_VERSION" = x; then
24151              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24152$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24153              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24154$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24155              BOOT_JDK_FOUND=no
24156            else
24157              # We're done! :-)
24158              BOOT_JDK_FOUND=yes
24159
24160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24161
24162  # Input might be given as Windows format, start by converting to
24163  # unix format.
24164  path="$BOOT_JDK"
24165  new_path=`$CYGPATH -u "$path"`
24166
24167  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24168  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24169  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24170  # "foo.exe" is OK but "foo" is an error.
24171  #
24172  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24173  # It is also a way to make sure we got the proper file name for the real test later on.
24174  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24175  if test "x$test_shortpath" = x; then
24176    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24177$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24178    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24179  fi
24180
24181  # Call helper function which possibly converts this using DOS-style short mode.
24182  # If so, the updated path is stored in $new_path.
24183
24184  input_path="$new_path"
24185  # Check if we need to convert this using DOS-style short mode. If the path
24186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24187  # take no chances and rewrite it.
24188  # Note: m4 eats our [], so we need to use [ and ] instead.
24189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24190  if test "x$has_forbidden_chars" != x; then
24191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24192    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24193    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24194    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24195      # Going to short mode and back again did indeed matter. Since short mode is
24196      # case insensitive, let's make it lowercase to improve readability.
24197      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24198      # Now convert it back to Unix-stile (cygpath)
24199      input_path=`$CYGPATH -u "$shortmode_path"`
24200      new_path="$input_path"
24201    fi
24202  fi
24203
24204  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24205  if test "x$test_cygdrive_prefix" = x; then
24206    # As a simple fix, exclude /usr/bin since it's not a real path.
24207    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24208      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24209      # a path prefixed by /cygdrive for fixpath to work.
24210      new_path="$CYGWIN_ROOT_PATH$input_path"
24211    fi
24212  fi
24213
24214
24215  if test "x$path" != "x$new_path"; then
24216    BOOT_JDK="$new_path"
24217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24218$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24219  fi
24220
24221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24222
24223  path="$BOOT_JDK"
24224  has_colon=`$ECHO $path | $GREP ^.:`
24225  new_path="$path"
24226  if test "x$has_colon" = x; then
24227    # Not in mixed or Windows style, start by that.
24228    new_path=`cmd //c echo $path`
24229  fi
24230
24231
24232  input_path="$new_path"
24233  # Check if we need to convert this using DOS-style short mode. If the path
24234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24235  # take no chances and rewrite it.
24236  # Note: m4 eats our [], so we need to use [ and ] instead.
24237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24238  if test "x$has_forbidden_chars" != x; then
24239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24240    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24241  fi
24242
24243
24244  windows_path="$new_path"
24245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24246    unix_path=`$CYGPATH -u "$windows_path"`
24247    new_path="$unix_path"
24248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24250    new_path="$unix_path"
24251  fi
24252
24253  if test "x$path" != "x$new_path"; then
24254    BOOT_JDK="$new_path"
24255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24256$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24257  fi
24258
24259  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24260  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24261
24262  else
24263    # We're on a posix platform. Hooray! :)
24264    path="$BOOT_JDK"
24265    has_space=`$ECHO "$path" | $GREP " "`
24266    if test "x$has_space" != x; then
24267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24268$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24269      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24270    fi
24271
24272    # Use eval to expand a potential ~
24273    eval path="$path"
24274    if test ! -f "$path" && test ! -d "$path"; then
24275      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24276    fi
24277
24278    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24279  fi
24280
24281              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24282$as_echo_n "checking for Boot JDK... " >&6; }
24283              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24284$as_echo "$BOOT_JDK" >&6; }
24285              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24286$as_echo_n "checking Boot JDK version... " >&6; }
24287              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24288              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24289$as_echo "$BOOT_JDK_VERSION" >&6; }
24290            fi # end check jdk version
24291          fi # end check rt.jar
24292        fi # end check javac
24293      fi # end check java
24294    fi # end check boot jdk found
24295  fi
24296
24297    done
24298  fi
24299
24300
24301    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24302    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24303      # Do we have a bin/java?
24304      if test ! -x "$BOOT_JDK/bin/java"; then
24305        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24306$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24307        BOOT_JDK_FOUND=no
24308      else
24309        # Do we have a bin/javac?
24310        if test ! -x "$BOOT_JDK/bin/javac"; then
24311          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24312$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24313          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24314$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24315          BOOT_JDK_FOUND=no
24316        else
24317          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24318          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24319            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24320$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24321            BOOT_JDK_FOUND=no
24322          else
24323            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24324            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24325
24326            # Extra M4 quote needed to protect [] in grep expression.
24327            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24328            if test "x$FOUND_CORRECT_VERSION" = x; then
24329              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24330$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24331              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24332$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24333              BOOT_JDK_FOUND=no
24334            else
24335              # We're done! :-)
24336              BOOT_JDK_FOUND=yes
24337
24338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24339
24340  # Input might be given as Windows format, start by converting to
24341  # unix format.
24342  path="$BOOT_JDK"
24343  new_path=`$CYGPATH -u "$path"`
24344
24345  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24346  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24347  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24348  # "foo.exe" is OK but "foo" is an error.
24349  #
24350  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24351  # It is also a way to make sure we got the proper file name for the real test later on.
24352  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24353  if test "x$test_shortpath" = x; then
24354    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24355$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24356    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24357  fi
24358
24359  # Call helper function which possibly converts this using DOS-style short mode.
24360  # If so, the updated path is stored in $new_path.
24361
24362  input_path="$new_path"
24363  # Check if we need to convert this using DOS-style short mode. If the path
24364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24365  # take no chances and rewrite it.
24366  # Note: m4 eats our [], so we need to use [ and ] instead.
24367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24368  if test "x$has_forbidden_chars" != x; then
24369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24373      # Going to short mode and back again did indeed matter. Since short mode is
24374      # case insensitive, let's make it lowercase to improve readability.
24375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24376      # Now convert it back to Unix-stile (cygpath)
24377      input_path=`$CYGPATH -u "$shortmode_path"`
24378      new_path="$input_path"
24379    fi
24380  fi
24381
24382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24383  if test "x$test_cygdrive_prefix" = x; then
24384    # As a simple fix, exclude /usr/bin since it's not a real path.
24385    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24387      # a path prefixed by /cygdrive for fixpath to work.
24388      new_path="$CYGWIN_ROOT_PATH$input_path"
24389    fi
24390  fi
24391
24392
24393  if test "x$path" != "x$new_path"; then
24394    BOOT_JDK="$new_path"
24395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24396$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24397  fi
24398
24399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24400
24401  path="$BOOT_JDK"
24402  has_colon=`$ECHO $path | $GREP ^.:`
24403  new_path="$path"
24404  if test "x$has_colon" = x; then
24405    # Not in mixed or Windows style, start by that.
24406    new_path=`cmd //c echo $path`
24407  fi
24408
24409
24410  input_path="$new_path"
24411  # Check if we need to convert this using DOS-style short mode. If the path
24412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24413  # take no chances and rewrite it.
24414  # Note: m4 eats our [], so we need to use [ and ] instead.
24415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24416  if test "x$has_forbidden_chars" != x; then
24417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24418    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24419  fi
24420
24421
24422  windows_path="$new_path"
24423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24424    unix_path=`$CYGPATH -u "$windows_path"`
24425    new_path="$unix_path"
24426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24428    new_path="$unix_path"
24429  fi
24430
24431  if test "x$path" != "x$new_path"; then
24432    BOOT_JDK="$new_path"
24433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24434$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24435  fi
24436
24437  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24438  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24439
24440  else
24441    # We're on a posix platform. Hooray! :)
24442    path="$BOOT_JDK"
24443    has_space=`$ECHO "$path" | $GREP " "`
24444    if test "x$has_space" != x; then
24445      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24446$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24447      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24448    fi
24449
24450    # Use eval to expand a potential ~
24451    eval path="$path"
24452    if test ! -f "$path" && test ! -d "$path"; then
24453      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24454    fi
24455
24456    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24457  fi
24458
24459              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24460$as_echo_n "checking for Boot JDK... " >&6; }
24461              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24462$as_echo "$BOOT_JDK" >&6; }
24463              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24464$as_echo_n "checking Boot JDK version... " >&6; }
24465              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24466              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24467$as_echo "$BOOT_JDK_VERSION" >&6; }
24468            fi # end check jdk version
24469          fi # end check rt.jar
24470        fi # end check javac
24471      fi # end check java
24472    fi # end check boot jdk found
24473  fi
24474
24475  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24476
24477  if test "x$BOOT_JDK_FOUND" = xno; then
24478    # Now execute the test
24479
24480  BOOT_JDK_PREFIX="/usr/lib/jvm"
24481  BOOT_JDK_SUFFIX=""
24482  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24483  if test "x$ALL_JDKS_FOUND" != x; then
24484    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24485
24486  if test "x$BOOT_JDK_FOUND" = xno; then
24487    # Now execute the test
24488
24489        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24490        if test -d "$BOOT_JDK"; then
24491          BOOT_JDK_FOUND=maybe
24492          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24493$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24494        fi
24495
24496
24497    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24498    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24499      # Do we have a bin/java?
24500      if test ! -x "$BOOT_JDK/bin/java"; then
24501        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24502$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24503        BOOT_JDK_FOUND=no
24504      else
24505        # Do we have a bin/javac?
24506        if test ! -x "$BOOT_JDK/bin/javac"; then
24507          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24508$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24509          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24510$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24511          BOOT_JDK_FOUND=no
24512        else
24513          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24514          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24515            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24516$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24517            BOOT_JDK_FOUND=no
24518          else
24519            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24520            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24521
24522            # Extra M4 quote needed to protect [] in grep expression.
24523            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24524            if test "x$FOUND_CORRECT_VERSION" = x; then
24525              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24526$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24527              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24528$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24529              BOOT_JDK_FOUND=no
24530            else
24531              # We're done! :-)
24532              BOOT_JDK_FOUND=yes
24533
24534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24535
24536  # Input might be given as Windows format, start by converting to
24537  # unix format.
24538  path="$BOOT_JDK"
24539  new_path=`$CYGPATH -u "$path"`
24540
24541  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24542  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24543  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24544  # "foo.exe" is OK but "foo" is an error.
24545  #
24546  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24547  # It is also a way to make sure we got the proper file name for the real test later on.
24548  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24549  if test "x$test_shortpath" = x; then
24550    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24551$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24552    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24553  fi
24554
24555  # Call helper function which possibly converts this using DOS-style short mode.
24556  # If so, the updated path is stored in $new_path.
24557
24558  input_path="$new_path"
24559  # Check if we need to convert this using DOS-style short mode. If the path
24560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24561  # take no chances and rewrite it.
24562  # Note: m4 eats our [], so we need to use [ and ] instead.
24563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24564  if test "x$has_forbidden_chars" != x; then
24565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24569      # Going to short mode and back again did indeed matter. Since short mode is
24570      # case insensitive, let's make it lowercase to improve readability.
24571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24572      # Now convert it back to Unix-stile (cygpath)
24573      input_path=`$CYGPATH -u "$shortmode_path"`
24574      new_path="$input_path"
24575    fi
24576  fi
24577
24578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24579  if test "x$test_cygdrive_prefix" = x; then
24580    # As a simple fix, exclude /usr/bin since it's not a real path.
24581    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24583      # a path prefixed by /cygdrive for fixpath to work.
24584      new_path="$CYGWIN_ROOT_PATH$input_path"
24585    fi
24586  fi
24587
24588
24589  if test "x$path" != "x$new_path"; then
24590    BOOT_JDK="$new_path"
24591    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24592$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24593  fi
24594
24595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24596
24597  path="$BOOT_JDK"
24598  has_colon=`$ECHO $path | $GREP ^.:`
24599  new_path="$path"
24600  if test "x$has_colon" = x; then
24601    # Not in mixed or Windows style, start by that.
24602    new_path=`cmd //c echo $path`
24603  fi
24604
24605
24606  input_path="$new_path"
24607  # Check if we need to convert this using DOS-style short mode. If the path
24608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24609  # take no chances and rewrite it.
24610  # Note: m4 eats our [], so we need to use [ and ] instead.
24611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24612  if test "x$has_forbidden_chars" != x; then
24613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24614    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24615  fi
24616
24617
24618  windows_path="$new_path"
24619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24620    unix_path=`$CYGPATH -u "$windows_path"`
24621    new_path="$unix_path"
24622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24624    new_path="$unix_path"
24625  fi
24626
24627  if test "x$path" != "x$new_path"; then
24628    BOOT_JDK="$new_path"
24629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24630$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24631  fi
24632
24633  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24634  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24635
24636  else
24637    # We're on a posix platform. Hooray! :)
24638    path="$BOOT_JDK"
24639    has_space=`$ECHO "$path" | $GREP " "`
24640    if test "x$has_space" != x; then
24641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24642$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24643      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24644    fi
24645
24646    # Use eval to expand a potential ~
24647    eval path="$path"
24648    if test ! -f "$path" && test ! -d "$path"; then
24649      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24650    fi
24651
24652    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24653  fi
24654
24655              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24656$as_echo_n "checking for Boot JDK... " >&6; }
24657              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24658$as_echo "$BOOT_JDK" >&6; }
24659              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24660$as_echo_n "checking Boot JDK version... " >&6; }
24661              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24662              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24663$as_echo "$BOOT_JDK_VERSION" >&6; }
24664            fi # end check jdk version
24665          fi # end check rt.jar
24666        fi # end check javac
24667      fi # end check java
24668    fi # end check boot jdk found
24669  fi
24670
24671    done
24672  fi
24673
24674
24675    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24676    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24677      # Do we have a bin/java?
24678      if test ! -x "$BOOT_JDK/bin/java"; then
24679        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24680$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24681        BOOT_JDK_FOUND=no
24682      else
24683        # Do we have a bin/javac?
24684        if test ! -x "$BOOT_JDK/bin/javac"; then
24685          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24686$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24687          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24688$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24689          BOOT_JDK_FOUND=no
24690        else
24691          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24692          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24693            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24694$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24695            BOOT_JDK_FOUND=no
24696          else
24697            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24698            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24699
24700            # Extra M4 quote needed to protect [] in grep expression.
24701            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24702            if test "x$FOUND_CORRECT_VERSION" = x; then
24703              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24704$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24705              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24706$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24707              BOOT_JDK_FOUND=no
24708            else
24709              # We're done! :-)
24710              BOOT_JDK_FOUND=yes
24711
24712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24713
24714  # Input might be given as Windows format, start by converting to
24715  # unix format.
24716  path="$BOOT_JDK"
24717  new_path=`$CYGPATH -u "$path"`
24718
24719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24722  # "foo.exe" is OK but "foo" is an error.
24723  #
24724  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24725  # It is also a way to make sure we got the proper file name for the real test later on.
24726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24727  if test "x$test_shortpath" = x; then
24728    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24729$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24730    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24731  fi
24732
24733  # Call helper function which possibly converts this using DOS-style short mode.
24734  # If so, the updated path is stored in $new_path.
24735
24736  input_path="$new_path"
24737  # Check if we need to convert this using DOS-style short mode. If the path
24738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24739  # take no chances and rewrite it.
24740  # Note: m4 eats our [], so we need to use [ and ] instead.
24741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24742  if test "x$has_forbidden_chars" != x; then
24743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24747      # Going to short mode and back again did indeed matter. Since short mode is
24748      # case insensitive, let's make it lowercase to improve readability.
24749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24750      # Now convert it back to Unix-stile (cygpath)
24751      input_path=`$CYGPATH -u "$shortmode_path"`
24752      new_path="$input_path"
24753    fi
24754  fi
24755
24756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24757  if test "x$test_cygdrive_prefix" = x; then
24758    # As a simple fix, exclude /usr/bin since it's not a real path.
24759    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24761      # a path prefixed by /cygdrive for fixpath to work.
24762      new_path="$CYGWIN_ROOT_PATH$input_path"
24763    fi
24764  fi
24765
24766
24767  if test "x$path" != "x$new_path"; then
24768    BOOT_JDK="$new_path"
24769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24770$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24771  fi
24772
24773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24774
24775  path="$BOOT_JDK"
24776  has_colon=`$ECHO $path | $GREP ^.:`
24777  new_path="$path"
24778  if test "x$has_colon" = x; then
24779    # Not in mixed or Windows style, start by that.
24780    new_path=`cmd //c echo $path`
24781  fi
24782
24783
24784  input_path="$new_path"
24785  # Check if we need to convert this using DOS-style short mode. If the path
24786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24787  # take no chances and rewrite it.
24788  # Note: m4 eats our [], so we need to use [ and ] instead.
24789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24790  if test "x$has_forbidden_chars" != x; then
24791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24793  fi
24794
24795
24796  windows_path="$new_path"
24797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24798    unix_path=`$CYGPATH -u "$windows_path"`
24799    new_path="$unix_path"
24800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24802    new_path="$unix_path"
24803  fi
24804
24805  if test "x$path" != "x$new_path"; then
24806    BOOT_JDK="$new_path"
24807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24808$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24809  fi
24810
24811  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24812  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24813
24814  else
24815    # We're on a posix platform. Hooray! :)
24816    path="$BOOT_JDK"
24817    has_space=`$ECHO "$path" | $GREP " "`
24818    if test "x$has_space" != x; then
24819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24820$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24821      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24822    fi
24823
24824    # Use eval to expand a potential ~
24825    eval path="$path"
24826    if test ! -f "$path" && test ! -d "$path"; then
24827      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24828    fi
24829
24830    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24831  fi
24832
24833              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24834$as_echo_n "checking for Boot JDK... " >&6; }
24835              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24836$as_echo "$BOOT_JDK" >&6; }
24837              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24838$as_echo_n "checking Boot JDK version... " >&6; }
24839              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24840              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24841$as_echo "$BOOT_JDK_VERSION" >&6; }
24842            fi # end check jdk version
24843          fi # end check rt.jar
24844        fi # end check javac
24845      fi # end check java
24846    fi # end check boot jdk found
24847  fi
24848
24849  fi
24850
24851
24852    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24853    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24854      # Do we have a bin/java?
24855      if test ! -x "$BOOT_JDK/bin/java"; then
24856        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24857$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24858        BOOT_JDK_FOUND=no
24859      else
24860        # Do we have a bin/javac?
24861        if test ! -x "$BOOT_JDK/bin/javac"; then
24862          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24863$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24864          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24865$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24866          BOOT_JDK_FOUND=no
24867        else
24868          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24869          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24870            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24871$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24872            BOOT_JDK_FOUND=no
24873          else
24874            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24875            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24876
24877            # Extra M4 quote needed to protect [] in grep expression.
24878            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24879            if test "x$FOUND_CORRECT_VERSION" = x; then
24880              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24881$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24882              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24883$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24884              BOOT_JDK_FOUND=no
24885            else
24886              # We're done! :-)
24887              BOOT_JDK_FOUND=yes
24888
24889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24890
24891  # Input might be given as Windows format, start by converting to
24892  # unix format.
24893  path="$BOOT_JDK"
24894  new_path=`$CYGPATH -u "$path"`
24895
24896  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24897  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24898  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24899  # "foo.exe" is OK but "foo" is an error.
24900  #
24901  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24902  # It is also a way to make sure we got the proper file name for the real test later on.
24903  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24904  if test "x$test_shortpath" = x; then
24905    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24906$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24907    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24908  fi
24909
24910  # Call helper function which possibly converts this using DOS-style short mode.
24911  # If so, the updated path is stored in $new_path.
24912
24913  input_path="$new_path"
24914  # Check if we need to convert this using DOS-style short mode. If the path
24915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24916  # take no chances and rewrite it.
24917  # Note: m4 eats our [], so we need to use [ and ] instead.
24918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24919  if test "x$has_forbidden_chars" != x; then
24920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24921    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24922    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24923    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24924      # Going to short mode and back again did indeed matter. Since short mode is
24925      # case insensitive, let's make it lowercase to improve readability.
24926      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24927      # Now convert it back to Unix-stile (cygpath)
24928      input_path=`$CYGPATH -u "$shortmode_path"`
24929      new_path="$input_path"
24930    fi
24931  fi
24932
24933  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24934  if test "x$test_cygdrive_prefix" = x; then
24935    # As a simple fix, exclude /usr/bin since it's not a real path.
24936    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24937      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24938      # a path prefixed by /cygdrive for fixpath to work.
24939      new_path="$CYGWIN_ROOT_PATH$input_path"
24940    fi
24941  fi
24942
24943
24944  if test "x$path" != "x$new_path"; then
24945    BOOT_JDK="$new_path"
24946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24947$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24948  fi
24949
24950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24951
24952  path="$BOOT_JDK"
24953  has_colon=`$ECHO $path | $GREP ^.:`
24954  new_path="$path"
24955  if test "x$has_colon" = x; then
24956    # Not in mixed or Windows style, start by that.
24957    new_path=`cmd //c echo $path`
24958  fi
24959
24960
24961  input_path="$new_path"
24962  # Check if we need to convert this using DOS-style short mode. If the path
24963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24964  # take no chances and rewrite it.
24965  # Note: m4 eats our [], so we need to use [ and ] instead.
24966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24967  if test "x$has_forbidden_chars" != x; then
24968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24969    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24970  fi
24971
24972
24973  windows_path="$new_path"
24974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24975    unix_path=`$CYGPATH -u "$windows_path"`
24976    new_path="$unix_path"
24977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24979    new_path="$unix_path"
24980  fi
24981
24982  if test "x$path" != "x$new_path"; then
24983    BOOT_JDK="$new_path"
24984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24985$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24986  fi
24987
24988  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24989  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24990
24991  else
24992    # We're on a posix platform. Hooray! :)
24993    path="$BOOT_JDK"
24994    has_space=`$ECHO "$path" | $GREP " "`
24995    if test "x$has_space" != x; then
24996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24997$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24998      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24999    fi
25000
25001    # Use eval to expand a potential ~
25002    eval path="$path"
25003    if test ! -f "$path" && test ! -d "$path"; then
25004      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25005    fi
25006
25007    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25008  fi
25009
25010              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25011$as_echo_n "checking for Boot JDK... " >&6; }
25012              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25013$as_echo "$BOOT_JDK" >&6; }
25014              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25015$as_echo_n "checking Boot JDK version... " >&6; }
25016              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25017              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25018$as_echo "$BOOT_JDK_VERSION" >&6; }
25019            fi # end check jdk version
25020          fi # end check rt.jar
25021        fi # end check javac
25022      fi # end check java
25023    fi # end check boot jdk found
25024  fi
25025
25026
25027  # If we haven't found anything yet, we've truly lost. Give up.
25028  if test "x$BOOT_JDK_FOUND" = xno; then
25029
25030  # Print a helpful message on how to acquire the necessary build dependency.
25031  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25032  MISSING_DEPENDENCY=openjdk
25033
25034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25035    cygwin_help $MISSING_DEPENDENCY
25036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25037    msys_help $MISSING_DEPENDENCY
25038  else
25039    PKGHANDLER_COMMAND=
25040
25041    case $PKGHANDLER in
25042      apt-get)
25043        apt_help     $MISSING_DEPENDENCY ;;
25044      yum)
25045        yum_help     $MISSING_DEPENDENCY ;;
25046      port)
25047        port_help    $MISSING_DEPENDENCY ;;
25048      pkgutil)
25049        pkgutil_help $MISSING_DEPENDENCY ;;
25050      pkgadd)
25051        pkgadd_help  $MISSING_DEPENDENCY ;;
25052    esac
25053
25054    if test "x$PKGHANDLER_COMMAND" != x; then
25055      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25056    fi
25057  fi
25058
25059    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25060$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25061    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25062$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25063    as_fn_error $? "Cannot continue" "$LINENO" 5
25064  fi
25065
25066  # Setup proper paths for what we found
25067  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
25068  if test ! -f "$BOOT_RTJAR"; then
25069    # On MacOSX it is called classes.jar
25070    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
25071    if test -f "$BOOT_RTJAR"; then
25072      # Remove the ..
25073      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
25074    fi
25075  fi
25076  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
25077  BOOT_JDK="$BOOT_JDK"
25078
25079
25080
25081
25082  # Setup tools from the Boot JDK.
25083
25084  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25085
25086  # Publish this variable in the help.
25087
25088
25089  if test "x$JAVA" = x; then
25090    # The variable is not set by user, try to locate tool using the code snippet
25091
25092      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25093$as_echo_n "checking for java in Boot JDK... " >&6; }
25094      JAVA=$BOOT_JDK/bin/java
25095      if test ! -x $JAVA; then
25096        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25097$as_echo "not found" >&6; }
25098        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25099$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25100        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25101      fi
25102      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25103$as_echo "ok" >&6; }
25104
25105
25106  else
25107    # The variable is set, but is it from the command line or the environment?
25108
25109    # Try to remove the string !JAVA! from our list.
25110    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25111    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25112      # If it failed, the variable was not from the command line. Ignore it,
25113      # but warn the user (except for BASH, which is always set by the calling BASH).
25114      if test "xJAVA" != xBASH; then
25115        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25116$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25117      fi
25118      # Try to locate tool using the code snippet
25119
25120      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25121$as_echo_n "checking for java in Boot JDK... " >&6; }
25122      JAVA=$BOOT_JDK/bin/java
25123      if test ! -x $JAVA; then
25124        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25125$as_echo "not found" >&6; }
25126        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25127$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25128        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25129      fi
25130      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25131$as_echo "ok" >&6; }
25132
25133
25134    else
25135      # If it succeeded, then it was overridden by the user. We will use it
25136      # for the tool.
25137
25138      # First remove it from the list of overridden variables, so we can test
25139      # for unknown variables in the end.
25140      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25141
25142      # Check if the provided tool contains a complete path.
25143      tool_specified="$JAVA"
25144      tool_basename="${tool_specified##*/}"
25145      if test "x$tool_basename" = "x$tool_specified"; then
25146        # A command without a complete path is provided, search $PATH.
25147        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25148$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25149        # Extract the first word of "$tool_basename", so it can be a program name with args.
25150set dummy $tool_basename; ac_word=$2
25151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25152$as_echo_n "checking for $ac_word... " >&6; }
25153if ${ac_cv_path_JAVA+:} false; then :
25154  $as_echo_n "(cached) " >&6
25155else
25156  case $JAVA in
25157  [\\/]* | ?:[\\/]*)
25158  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25159  ;;
25160  *)
25161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25162for as_dir in $PATH
25163do
25164  IFS=$as_save_IFS
25165  test -z "$as_dir" && as_dir=.
25166    for ac_exec_ext in '' $ac_executable_extensions; do
25167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25168    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25170    break 2
25171  fi
25172done
25173  done
25174IFS=$as_save_IFS
25175
25176  ;;
25177esac
25178fi
25179JAVA=$ac_cv_path_JAVA
25180if test -n "$JAVA"; then
25181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25182$as_echo "$JAVA" >&6; }
25183else
25184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25185$as_echo "no" >&6; }
25186fi
25187
25188
25189        if test "x$JAVA" = x; then
25190          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25191        fi
25192      else
25193        # Otherwise we believe it is a complete path. Use it as it is.
25194        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25195$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25196        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25197$as_echo_n "checking for JAVA... " >&6; }
25198        if test ! -x "$tool_specified"; then
25199          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25200$as_echo "not found" >&6; }
25201          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25202        fi
25203        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25204$as_echo "$tool_specified" >&6; }
25205      fi
25206    fi
25207  fi
25208
25209
25210
25211  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25212
25213  # Publish this variable in the help.
25214
25215
25216  if test "x$JAVAC" = x; then
25217    # The variable is not set by user, try to locate tool using the code snippet
25218
25219      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25220$as_echo_n "checking for javac in Boot JDK... " >&6; }
25221      JAVAC=$BOOT_JDK/bin/javac
25222      if test ! -x $JAVAC; then
25223        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25224$as_echo "not found" >&6; }
25225        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25226$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25227        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25228      fi
25229      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25230$as_echo "ok" >&6; }
25231
25232
25233  else
25234    # The variable is set, but is it from the command line or the environment?
25235
25236    # Try to remove the string !JAVAC! from our list.
25237    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25238    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25239      # If it failed, the variable was not from the command line. Ignore it,
25240      # but warn the user (except for BASH, which is always set by the calling BASH).
25241      if test "xJAVAC" != xBASH; then
25242        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25243$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25244      fi
25245      # Try to locate tool using the code snippet
25246
25247      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25248$as_echo_n "checking for javac in Boot JDK... " >&6; }
25249      JAVAC=$BOOT_JDK/bin/javac
25250      if test ! -x $JAVAC; then
25251        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25252$as_echo "not found" >&6; }
25253        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25254$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25255        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25256      fi
25257      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25258$as_echo "ok" >&6; }
25259
25260
25261    else
25262      # If it succeeded, then it was overridden by the user. We will use it
25263      # for the tool.
25264
25265      # First remove it from the list of overridden variables, so we can test
25266      # for unknown variables in the end.
25267      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25268
25269      # Check if the provided tool contains a complete path.
25270      tool_specified="$JAVAC"
25271      tool_basename="${tool_specified##*/}"
25272      if test "x$tool_basename" = "x$tool_specified"; then
25273        # A command without a complete path is provided, search $PATH.
25274        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25275$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25276        # Extract the first word of "$tool_basename", so it can be a program name with args.
25277set dummy $tool_basename; ac_word=$2
25278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25279$as_echo_n "checking for $ac_word... " >&6; }
25280if ${ac_cv_path_JAVAC+:} false; then :
25281  $as_echo_n "(cached) " >&6
25282else
25283  case $JAVAC in
25284  [\\/]* | ?:[\\/]*)
25285  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25286  ;;
25287  *)
25288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25289for as_dir in $PATH
25290do
25291  IFS=$as_save_IFS
25292  test -z "$as_dir" && as_dir=.
25293    for ac_exec_ext in '' $ac_executable_extensions; do
25294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25295    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25297    break 2
25298  fi
25299done
25300  done
25301IFS=$as_save_IFS
25302
25303  ;;
25304esac
25305fi
25306JAVAC=$ac_cv_path_JAVAC
25307if test -n "$JAVAC"; then
25308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25309$as_echo "$JAVAC" >&6; }
25310else
25311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25312$as_echo "no" >&6; }
25313fi
25314
25315
25316        if test "x$JAVAC" = x; then
25317          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25318        fi
25319      else
25320        # Otherwise we believe it is a complete path. Use it as it is.
25321        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25322$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25323        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25324$as_echo_n "checking for JAVAC... " >&6; }
25325        if test ! -x "$tool_specified"; then
25326          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25327$as_echo "not found" >&6; }
25328          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25329        fi
25330        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25331$as_echo "$tool_specified" >&6; }
25332      fi
25333    fi
25334  fi
25335
25336
25337
25338  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25339
25340  # Publish this variable in the help.
25341
25342
25343  if test "x$JAVAH" = x; then
25344    # The variable is not set by user, try to locate tool using the code snippet
25345
25346      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25347$as_echo_n "checking for javah in Boot JDK... " >&6; }
25348      JAVAH=$BOOT_JDK/bin/javah
25349      if test ! -x $JAVAH; then
25350        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25351$as_echo "not found" >&6; }
25352        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25353$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25354        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25355      fi
25356      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25357$as_echo "ok" >&6; }
25358
25359
25360  else
25361    # The variable is set, but is it from the command line or the environment?
25362
25363    # Try to remove the string !JAVAH! from our list.
25364    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25365    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25366      # If it failed, the variable was not from the command line. Ignore it,
25367      # but warn the user (except for BASH, which is always set by the calling BASH).
25368      if test "xJAVAH" != xBASH; then
25369        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25370$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25371      fi
25372      # Try to locate tool using the code snippet
25373
25374      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25375$as_echo_n "checking for javah in Boot JDK... " >&6; }
25376      JAVAH=$BOOT_JDK/bin/javah
25377      if test ! -x $JAVAH; then
25378        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25379$as_echo "not found" >&6; }
25380        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25381$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25382        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25383      fi
25384      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25385$as_echo "ok" >&6; }
25386
25387
25388    else
25389      # If it succeeded, then it was overridden by the user. We will use it
25390      # for the tool.
25391
25392      # First remove it from the list of overridden variables, so we can test
25393      # for unknown variables in the end.
25394      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25395
25396      # Check if the provided tool contains a complete path.
25397      tool_specified="$JAVAH"
25398      tool_basename="${tool_specified##*/}"
25399      if test "x$tool_basename" = "x$tool_specified"; then
25400        # A command without a complete path is provided, search $PATH.
25401        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25402$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25403        # Extract the first word of "$tool_basename", so it can be a program name with args.
25404set dummy $tool_basename; ac_word=$2
25405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25406$as_echo_n "checking for $ac_word... " >&6; }
25407if ${ac_cv_path_JAVAH+:} false; then :
25408  $as_echo_n "(cached) " >&6
25409else
25410  case $JAVAH in
25411  [\\/]* | ?:[\\/]*)
25412  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25413  ;;
25414  *)
25415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25416for as_dir in $PATH
25417do
25418  IFS=$as_save_IFS
25419  test -z "$as_dir" && as_dir=.
25420    for ac_exec_ext in '' $ac_executable_extensions; do
25421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25422    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25424    break 2
25425  fi
25426done
25427  done
25428IFS=$as_save_IFS
25429
25430  ;;
25431esac
25432fi
25433JAVAH=$ac_cv_path_JAVAH
25434if test -n "$JAVAH"; then
25435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25436$as_echo "$JAVAH" >&6; }
25437else
25438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25439$as_echo "no" >&6; }
25440fi
25441
25442
25443        if test "x$JAVAH" = x; then
25444          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25445        fi
25446      else
25447        # Otherwise we believe it is a complete path. Use it as it is.
25448        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25449$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25450        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25451$as_echo_n "checking for JAVAH... " >&6; }
25452        if test ! -x "$tool_specified"; then
25453          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25454$as_echo "not found" >&6; }
25455          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25456        fi
25457        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25458$as_echo "$tool_specified" >&6; }
25459      fi
25460    fi
25461  fi
25462
25463
25464
25465  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25466
25467  # Publish this variable in the help.
25468
25469
25470  if test "x$JAR" = x; then
25471    # The variable is not set by user, try to locate tool using the code snippet
25472
25473      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25474$as_echo_n "checking for jar in Boot JDK... " >&6; }
25475      JAR=$BOOT_JDK/bin/jar
25476      if test ! -x $JAR; then
25477        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25478$as_echo "not found" >&6; }
25479        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25480$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25481        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25482      fi
25483      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25484$as_echo "ok" >&6; }
25485
25486
25487  else
25488    # The variable is set, but is it from the command line or the environment?
25489
25490    # Try to remove the string !JAR! from our list.
25491    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25492    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25493      # If it failed, the variable was not from the command line. Ignore it,
25494      # but warn the user (except for BASH, which is always set by the calling BASH).
25495      if test "xJAR" != xBASH; then
25496        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25497$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25498      fi
25499      # Try to locate tool using the code snippet
25500
25501      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25502$as_echo_n "checking for jar in Boot JDK... " >&6; }
25503      JAR=$BOOT_JDK/bin/jar
25504      if test ! -x $JAR; then
25505        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25506$as_echo "not found" >&6; }
25507        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25508$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25509        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25510      fi
25511      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25512$as_echo "ok" >&6; }
25513
25514
25515    else
25516      # If it succeeded, then it was overridden by the user. We will use it
25517      # for the tool.
25518
25519      # First remove it from the list of overridden variables, so we can test
25520      # for unknown variables in the end.
25521      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25522
25523      # Check if the provided tool contains a complete path.
25524      tool_specified="$JAR"
25525      tool_basename="${tool_specified##*/}"
25526      if test "x$tool_basename" = "x$tool_specified"; then
25527        # A command without a complete path is provided, search $PATH.
25528        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25529$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25530        # Extract the first word of "$tool_basename", so it can be a program name with args.
25531set dummy $tool_basename; ac_word=$2
25532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25533$as_echo_n "checking for $ac_word... " >&6; }
25534if ${ac_cv_path_JAR+:} false; then :
25535  $as_echo_n "(cached) " >&6
25536else
25537  case $JAR in
25538  [\\/]* | ?:[\\/]*)
25539  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25540  ;;
25541  *)
25542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25543for as_dir in $PATH
25544do
25545  IFS=$as_save_IFS
25546  test -z "$as_dir" && as_dir=.
25547    for ac_exec_ext in '' $ac_executable_extensions; do
25548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25549    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25551    break 2
25552  fi
25553done
25554  done
25555IFS=$as_save_IFS
25556
25557  ;;
25558esac
25559fi
25560JAR=$ac_cv_path_JAR
25561if test -n "$JAR"; then
25562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25563$as_echo "$JAR" >&6; }
25564else
25565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25566$as_echo "no" >&6; }
25567fi
25568
25569
25570        if test "x$JAR" = x; then
25571          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25572        fi
25573      else
25574        # Otherwise we believe it is a complete path. Use it as it is.
25575        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25576$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25577        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25578$as_echo_n "checking for JAR... " >&6; }
25579        if test ! -x "$tool_specified"; then
25580          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25581$as_echo "not found" >&6; }
25582          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25583        fi
25584        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25585$as_echo "$tool_specified" >&6; }
25586      fi
25587    fi
25588  fi
25589
25590
25591
25592  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25593
25594  # Publish this variable in the help.
25595
25596
25597  if test "x$NATIVE2ASCII" = x; then
25598    # The variable is not set by user, try to locate tool using the code snippet
25599
25600      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25601$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25602      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25603      if test ! -x $NATIVE2ASCII; then
25604        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25605$as_echo "not found" >&6; }
25606        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25607$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25608        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25609      fi
25610      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25611$as_echo "ok" >&6; }
25612
25613
25614  else
25615    # The variable is set, but is it from the command line or the environment?
25616
25617    # Try to remove the string !NATIVE2ASCII! from our list.
25618    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25619    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25620      # If it failed, the variable was not from the command line. Ignore it,
25621      # but warn the user (except for BASH, which is always set by the calling BASH).
25622      if test "xNATIVE2ASCII" != xBASH; then
25623        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25624$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25625      fi
25626      # Try to locate tool using the code snippet
25627
25628      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25629$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25630      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25631      if test ! -x $NATIVE2ASCII; then
25632        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25633$as_echo "not found" >&6; }
25634        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25635$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25636        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25637      fi
25638      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25639$as_echo "ok" >&6; }
25640
25641
25642    else
25643      # If it succeeded, then it was overridden by the user. We will use it
25644      # for the tool.
25645
25646      # First remove it from the list of overridden variables, so we can test
25647      # for unknown variables in the end.
25648      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25649
25650      # Check if the provided tool contains a complete path.
25651      tool_specified="$NATIVE2ASCII"
25652      tool_basename="${tool_specified##*/}"
25653      if test "x$tool_basename" = "x$tool_specified"; then
25654        # A command without a complete path is provided, search $PATH.
25655        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25656$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25657        # Extract the first word of "$tool_basename", so it can be a program name with args.
25658set dummy $tool_basename; ac_word=$2
25659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25660$as_echo_n "checking for $ac_word... " >&6; }
25661if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25662  $as_echo_n "(cached) " >&6
25663else
25664  case $NATIVE2ASCII in
25665  [\\/]* | ?:[\\/]*)
25666  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25667  ;;
25668  *)
25669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25670for as_dir in $PATH
25671do
25672  IFS=$as_save_IFS
25673  test -z "$as_dir" && as_dir=.
25674    for ac_exec_ext in '' $ac_executable_extensions; do
25675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25676    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25678    break 2
25679  fi
25680done
25681  done
25682IFS=$as_save_IFS
25683
25684  ;;
25685esac
25686fi
25687NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25688if test -n "$NATIVE2ASCII"; then
25689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25690$as_echo "$NATIVE2ASCII" >&6; }
25691else
25692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25693$as_echo "no" >&6; }
25694fi
25695
25696
25697        if test "x$NATIVE2ASCII" = x; then
25698          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25699        fi
25700      else
25701        # Otherwise we believe it is a complete path. Use it as it is.
25702        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25703$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25704        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
25705$as_echo_n "checking for NATIVE2ASCII... " >&6; }
25706        if test ! -x "$tool_specified"; then
25707          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25708$as_echo "not found" >&6; }
25709          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
25710        fi
25711        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25712$as_echo "$tool_specified" >&6; }
25713      fi
25714    fi
25715  fi
25716
25717
25718
25719  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25720
25721  # Publish this variable in the help.
25722
25723
25724  if test "x$JARSIGNER" = x; then
25725    # The variable is not set by user, try to locate tool using the code snippet
25726
25727      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25728$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25729      JARSIGNER=$BOOT_JDK/bin/jarsigner
25730      if test ! -x $JARSIGNER; then
25731        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25732$as_echo "not found" >&6; }
25733        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25734$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25735        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25736      fi
25737      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25738$as_echo "ok" >&6; }
25739
25740
25741  else
25742    # The variable is set, but is it from the command line or the environment?
25743
25744    # Try to remove the string !JARSIGNER! from our list.
25745    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
25746    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25747      # If it failed, the variable was not from the command line. Ignore it,
25748      # but warn the user (except for BASH, which is always set by the calling BASH).
25749      if test "xJARSIGNER" != xBASH; then
25750        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
25751$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
25752      fi
25753      # Try to locate tool using the code snippet
25754
25755      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25756$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25757      JARSIGNER=$BOOT_JDK/bin/jarsigner
25758      if test ! -x $JARSIGNER; then
25759        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25760$as_echo "not found" >&6; }
25761        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25762$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25763        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25764      fi
25765      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25766$as_echo "ok" >&6; }
25767
25768
25769    else
25770      # If it succeeded, then it was overridden by the user. We will use it
25771      # for the tool.
25772
25773      # First remove it from the list of overridden variables, so we can test
25774      # for unknown variables in the end.
25775      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25776
25777      # Check if the provided tool contains a complete path.
25778      tool_specified="$JARSIGNER"
25779      tool_basename="${tool_specified##*/}"
25780      if test "x$tool_basename" = "x$tool_specified"; then
25781        # A command without a complete path is provided, search $PATH.
25782        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
25783$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
25784        # Extract the first word of "$tool_basename", so it can be a program name with args.
25785set dummy $tool_basename; ac_word=$2
25786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25787$as_echo_n "checking for $ac_word... " >&6; }
25788if ${ac_cv_path_JARSIGNER+:} false; then :
25789  $as_echo_n "(cached) " >&6
25790else
25791  case $JARSIGNER in
25792  [\\/]* | ?:[\\/]*)
25793  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
25794  ;;
25795  *)
25796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25797for as_dir in $PATH
25798do
25799  IFS=$as_save_IFS
25800  test -z "$as_dir" && as_dir=.
25801    for ac_exec_ext in '' $ac_executable_extensions; do
25802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25803    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
25804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25805    break 2
25806  fi
25807done
25808  done
25809IFS=$as_save_IFS
25810
25811  ;;
25812esac
25813fi
25814JARSIGNER=$ac_cv_path_JARSIGNER
25815if test -n "$JARSIGNER"; then
25816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
25817$as_echo "$JARSIGNER" >&6; }
25818else
25819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25820$as_echo "no" >&6; }
25821fi
25822
25823
25824        if test "x$JARSIGNER" = x; then
25825          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25826        fi
25827      else
25828        # Otherwise we believe it is a complete path. Use it as it is.
25829        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
25830$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
25831        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
25832$as_echo_n "checking for JARSIGNER... " >&6; }
25833        if test ! -x "$tool_specified"; then
25834          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25835$as_echo "not found" >&6; }
25836          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
25837        fi
25838        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25839$as_echo "$tool_specified" >&6; }
25840      fi
25841    fi
25842  fi
25843
25844
25845
25846  # Finally, set some other options...
25847
25848  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
25849  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
25850
25851
25852
25853
25854  ##############################################################################
25855  #
25856  # Specify jvm options for anything that is run with the Boot JDK.
25857  # Not all JVM:s accept the same arguments on the command line.
25858  #
25859
25860# Check whether --with-boot-jdk-jvmargs was given.
25861if test "${with_boot_jdk_jvmargs+set}" = set; then :
25862  withval=$with_boot_jdk_jvmargs;
25863fi
25864
25865
25866  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
25867$as_echo_n "checking flags for boot jdk java command ... " >&6; }
25868
25869  # Starting amount of heap memory.
25870
25871  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
25872  $ECHO "Command: $JAVA -Xms64M -version" >&5
25873  OUTPUT=`$JAVA -Xms64M -version 2>&1`
25874  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25875  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25876  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25877    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
25878    JVM_ARG_OK=true
25879  else
25880    $ECHO "Arg failed:" >&5
25881    $ECHO "$OUTPUT" >&5
25882    JVM_ARG_OK=false
25883  fi
25884
25885
25886  # Maximum amount of heap memory.
25887  # Maximum stack size.
25888  if test "x$BUILD_NUM_BITS" = x32; then
25889    JVM_MAX_HEAP=1100M
25890    STACK_SIZE=768
25891  else
25892    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
25893    # pointers are used. Apparently, we need to increase the heap and stack
25894    # space for the jvm. More specifically, when running javac to build huge
25895    # jdk batch
25896    JVM_MAX_HEAP=1600M
25897    STACK_SIZE=1536
25898  fi
25899
25900  $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
25901  $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
25902  OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
25903  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25904  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25905  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25906    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx$JVM_MAX_HEAP"
25907    JVM_ARG_OK=true
25908  else
25909    $ECHO "Arg failed:" >&5
25910    $ECHO "$OUTPUT" >&5
25911    JVM_ARG_OK=false
25912  fi
25913
25914
25915  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
25916  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
25917  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
25918  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25919  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25920  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25921    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
25922    JVM_ARG_OK=true
25923  else
25924    $ECHO "Arg failed:" >&5
25925    $ECHO "$OUTPUT" >&5
25926    JVM_ARG_OK=false
25927  fi
25928
25929
25930  # Disable special log output when a debug build is used as Boot JDK...
25931
25932  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
25933  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
25934  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
25935  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25936  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25937  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25938    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
25939    JVM_ARG_OK=true
25940  else
25941    $ECHO "Arg failed:" >&5
25942    $ECHO "$OUTPUT" >&5
25943    JVM_ARG_OK=false
25944  fi
25945
25946
25947  # Apply user provided options.
25948
25949  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
25950  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
25951  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
25952  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25953  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25954  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25955    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
25956    JVM_ARG_OK=true
25957  else
25958    $ECHO "Arg failed:" >&5
25959    $ECHO "$OUTPUT" >&5
25960    JVM_ARG_OK=false
25961  fi
25962
25963
25964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
25965$as_echo "$boot_jdk_jvmargs" >&6; }
25966
25967  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
25968  JAVA_FLAGS=$boot_jdk_jvmargs
25969
25970  BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
25971
25972  JAVA_FLAGS=$JAVA_FLAGS
25973
25974
25975
25976###############################################################################
25977#
25978# Configure the sources to use. We can add or override individual directories.
25979#
25980###############################################################################
25981
25982
25983  # Where are the sources. Any of these can be overridden
25984  # using --with-override-corba and the likes.
25985  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
25986  CORBA_TOPDIR="$SRC_ROOT/corba"
25987  JAXP_TOPDIR="$SRC_ROOT/jaxp"
25988  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
25989  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
25990  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
25991  JDK_TOPDIR="$SRC_ROOT/jdk"
25992
25993
25994
25995
25996
25997
25998
25999
26000
26001
26002  ###############################################################################
26003  #
26004  # Pickup additional source for a component from outside of the source root
26005  # or override source for a component.
26006  #
26007
26008# Check whether --with-add-source-root was given.
26009if test "${with_add_source_root+set}" = set; then :
26010  withval=$with_add_source_root;
26011fi
26012
26013
26014
26015# Check whether --with-override-source-root was given.
26016if test "${with_override_source_root+set}" = set; then :
26017  withval=$with_override_source_root;
26018fi
26019
26020
26021
26022# Check whether --with-adds-and-overrides was given.
26023if test "${with_adds_and_overrides+set}" = set; then :
26024  withval=$with_adds_and_overrides;
26025fi
26026
26027
26028  if test "x$with_adds_and_overrides" != x; then
26029    with_add_source_root="$with_adds_and_overrides/adds"
26030    with_override_source_root="$with_adds_and_overrides/overrides"
26031  fi
26032
26033  if test "x$with_add_source_root" != x; then
26034    if ! test -d $with_add_source_root; then
26035      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26036    fi
26037    CURDIR="$PWD"
26038    cd "$with_add_source_root"
26039    ADD_SRC_ROOT="`pwd`"
26040    cd "$CURDIR"
26041    # Verify that the addon source root does not have any root makefiles.
26042    # If it does, then it is usually an error, prevent this.
26043    if test -f $with_add_source_root/langtools/make/Makefile; then
26044      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
26045    fi
26046    if test -f $with_add_source_root/corba/make/Makefile; then
26047      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
26048    fi
26049    if test -f $with_add_source_root/jaxp/make/Makefile; then
26050      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
26051    fi
26052    if test -f $with_add_source_root/jaxws/make/Makefile; then
26053      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
26054    fi
26055    if test -f $with_add_source_root/hotspot/make/Makefile; then
26056      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
26057    fi
26058    if test -f $with_add_source_root/nashorn/make/Makefile; then
26059      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
26060    fi
26061    if test -f $with_add_source_root/jdk/make/Makefile; then
26062      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
26063    fi
26064  fi
26065
26066
26067  if test "x$with_override_source_root" != x; then
26068    if ! test -d $with_override_source_root; then
26069      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26070    fi
26071    CURDIR="$PWD"
26072    cd "$with_override_source_root"
26073    OVERRIDE_SRC_ROOT="`pwd`"
26074    cd "$CURDIR"
26075    if test -f $with_override_source_root/langtools/make/Makefile; then
26076      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
26077    fi
26078    if test -f $with_override_source_root/corba/make/Makefile; then
26079      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
26080    fi
26081    if test -f $with_override_source_root/jaxp/make/Makefile; then
26082      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
26083    fi
26084    if test -f $with_override_source_root/jaxws/make/Makefile; then
26085      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
26086    fi
26087    if test -f $with_override_source_root/hotspot/make/Makefile; then
26088      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
26089    fi
26090    if test -f $with_override_source_root/nashorn/make/Makefile; then
26091      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
26092    fi
26093    if test -f $with_override_source_root/jdk/make/Makefile; then
26094      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
26095    fi
26096  fi
26097
26098
26099  ###############################################################################
26100  #
26101  # Override a repo completely, this is used for example when you have 3 small
26102  # development sandboxes of the langtools sources and want to avoid having 3 full
26103  # OpenJDK sources checked out on disk.
26104  #
26105  # Assuming that the 3 langtools sandboxes are located here:
26106  # /home/fredrik/sandbox1/langtools
26107  # /home/fredrik/sandbox2/langtools
26108  # /home/fredrik/sandbox3/langtools
26109  #
26110  # From the source root you create build subdirs manually:
26111  #     mkdir -p build1 build2 build3
26112  # in each build directory run:
26113  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26114  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26115  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26116  #
26117
26118
26119# Check whether --with-override-langtools was given.
26120if test "${with_override_langtools+set}" = set; then :
26121  withval=$with_override_langtools;
26122fi
26123
26124
26125
26126# Check whether --with-override-corba was given.
26127if test "${with_override_corba+set}" = set; then :
26128  withval=$with_override_corba;
26129fi
26130
26131
26132
26133# Check whether --with-override-jaxp was given.
26134if test "${with_override_jaxp+set}" = set; then :
26135  withval=$with_override_jaxp;
26136fi
26137
26138
26139
26140# Check whether --with-override-jaxws was given.
26141if test "${with_override_jaxws+set}" = set; then :
26142  withval=$with_override_jaxws;
26143fi
26144
26145
26146
26147# Check whether --with-override-hotspot was given.
26148if test "${with_override_hotspot+set}" = set; then :
26149  withval=$with_override_hotspot;
26150fi
26151
26152
26153
26154# Check whether --with-override-nashorn was given.
26155if test "${with_override_nashorn+set}" = set; then :
26156  withval=$with_override_nashorn;
26157fi
26158
26159
26160
26161# Check whether --with-override-jdk was given.
26162if test "${with_override_jdk+set}" = set; then :
26163  withval=$with_override_jdk;
26164fi
26165
26166
26167  if test "x$with_override_langtools" != x; then
26168    CURDIR="$PWD"
26169    cd "$with_override_langtools"
26170    LANGTOOLS_TOPDIR="`pwd`"
26171    cd "$CURDIR"
26172    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26173      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26174    fi
26175    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26176$as_echo_n "checking if langtools should be overridden... " >&6; }
26177    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26178$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26179  fi
26180  if test "x$with_override_corba" != x; then
26181    CURDIR="$PWD"
26182    cd "$with_override_corba"
26183    CORBA_TOPDIR="`pwd`"
26184    cd "$CURDIR"
26185    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26186      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26187    fi
26188    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26189$as_echo_n "checking if corba should be overridden... " >&6; }
26190    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26191$as_echo "yes with $CORBA_TOPDIR" >&6; }
26192  fi
26193  if test "x$with_override_jaxp" != x; then
26194    CURDIR="$PWD"
26195    cd "$with_override_jaxp"
26196    JAXP_TOPDIR="`pwd`"
26197    cd "$CURDIR"
26198    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26199      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26200    fi
26201    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26202$as_echo_n "checking if jaxp should be overridden... " >&6; }
26203    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26204$as_echo "yes with $JAXP_TOPDIR" >&6; }
26205  fi
26206  if test "x$with_override_jaxws" != x; then
26207    CURDIR="$PWD"
26208    cd "$with_override_jaxws"
26209    JAXWS_TOPDIR="`pwd`"
26210    cd "$CURDIR"
26211    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26212      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26213    fi
26214    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26215$as_echo_n "checking if jaxws should be overridden... " >&6; }
26216    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26217$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26218  fi
26219  if test "x$with_override_hotspot" != x; then
26220    CURDIR="$PWD"
26221    cd "$with_override_hotspot"
26222    HOTSPOT_TOPDIR="`pwd`"
26223    cd "$CURDIR"
26224    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26225      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26226    fi
26227    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26228$as_echo_n "checking if hotspot should be overridden... " >&6; }
26229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26230$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26231  fi
26232  if test "x$with_override_nashorn" != x; then
26233    CURDIR="$PWD"
26234    cd "$with_override_nashorn"
26235    NASHORN_TOPDIR="`pwd`"
26236    cd "$CURDIR"
26237    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26238      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26239    fi
26240    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26241$as_echo_n "checking if nashorn should be overridden... " >&6; }
26242    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26243$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26244  fi
26245  if test "x$with_override_jdk" != x; then
26246    CURDIR="$PWD"
26247    cd "$with_override_jdk"
26248    JDK_TOPDIR="`pwd`"
26249    cd "$CURDIR"
26250    if ! test -f $JDK_TOPDIR/make/Makefile; then
26251      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26252    fi
26253    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26254$as_echo_n "checking if JDK should be overridden... " >&6; }
26255    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26256$as_echo "yes with $JDK_TOPDIR" >&6; }
26257  fi
26258
26259
26260  BUILD_OUTPUT="$OUTPUT_ROOT"
26261
26262
26263  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26264  BUILD_HOTSPOT=true
26265
26266
26267
26268# Check whether --with-import-hotspot was given.
26269if test "${with_import_hotspot+set}" = set; then :
26270  withval=$with_import_hotspot;
26271fi
26272
26273  if test "x$with_import_hotspot" != x; then
26274    CURDIR="$PWD"
26275    cd "$with_import_hotspot"
26276    HOTSPOT_DIST="`pwd`"
26277    cd "$CURDIR"
26278    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26279      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26280    fi
26281    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26282$as_echo_n "checking if hotspot should be imported... " >&6; }
26283    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26284$as_echo "yes from $HOTSPOT_DIST" >&6; }
26285    BUILD_HOTSPOT=false
26286  fi
26287
26288  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26289
26290
26291###############################################################################
26292#
26293# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26294# native code.
26295#
26296###############################################################################
26297
26298# First determine the toolchain type (compiler family)
26299
26300
26301# Check whether --with-toolchain-type was given.
26302if test "${with_toolchain_type+set}" = set; then :
26303  withval=$with_toolchain_type;
26304fi
26305
26306
26307  # Use indirect variable referencing
26308  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26309  VALID_TOOLCHAINS=${!toolchain_var_name}
26310
26311  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26312    # On Mac OS X, default toolchain to clang after Xcode 5
26313    XCODE_VERSION_OUTPUT=`xcodebuild -version 2>&1 | $HEAD -n 1`
26314    $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26315    if test $? -ne 0; then
26316      as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26317    fi
26318    XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26319        $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26320        $CUT -f 1 -d .`
26321    { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26322$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26323    if test $XCODE_MAJOR_VERSION -ge 5; then
26324        DEFAULT_TOOLCHAIN="clang"
26325    else
26326        DEFAULT_TOOLCHAIN="gcc"
26327    fi
26328  else
26329    # First toolchain type in the list is the default
26330    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26331  fi
26332
26333  if test "x$with_toolchain_type" = xlist; then
26334    # List all toolchains
26335    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26336$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26337    for toolchain in $VALID_TOOLCHAINS; do
26338      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26339      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26340      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26341    done
26342
26343    exit 0
26344  elif test "x$with_toolchain_type" != x; then
26345    # User override; check that it is valid
26346    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26347      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26348$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26349      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26350$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26351      as_fn_error $? "Cannot continue." "$LINENO" 5
26352    fi
26353    TOOLCHAIN_TYPE=$with_toolchain_type
26354  else
26355    # No flag given, use default
26356    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26357  fi
26358
26359
26360  TOOLCHAIN_CC_BINARY_clang="clang"
26361  TOOLCHAIN_CC_BINARY_gcc="gcc"
26362  TOOLCHAIN_CC_BINARY_microsoft="cl"
26363  TOOLCHAIN_CC_BINARY_solstudio="cc"
26364  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26365
26366  TOOLCHAIN_CXX_BINARY_clang="clang++"
26367  TOOLCHAIN_CXX_BINARY_gcc="g++"
26368  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26369  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26370  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26371
26372  # Use indirect variable referencing
26373  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26374  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26375  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26376  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26377  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26378  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26379
26380
26381  # Define filename patterns
26382  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26383    LIBRARY_PREFIX=
26384    SHARED_LIBRARY_SUFFIX='.dll'
26385    STATIC_LIBRARY_SUFFIX='.lib'
26386    SHARED_LIBRARY='$1.dll'
26387    STATIC_LIBRARY='$1.lib'
26388    OBJ_SUFFIX='.obj'
26389    EXE_SUFFIX='.exe'
26390  else
26391    LIBRARY_PREFIX=lib
26392    SHARED_LIBRARY_SUFFIX='.so'
26393    STATIC_LIBRARY_SUFFIX='.a'
26394    SHARED_LIBRARY='lib$1.so'
26395    STATIC_LIBRARY='lib$1.a'
26396    OBJ_SUFFIX='.o'
26397    EXE_SUFFIX=''
26398    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26399      SHARED_LIBRARY='lib$1.dylib'
26400      SHARED_LIBRARY_SUFFIX='.dylib'
26401    fi
26402  fi
26403
26404
26405
26406
26407
26408
26409
26410
26411
26412
26413  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26414    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26415$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26416  else
26417    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26418$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26419  fi
26420
26421
26422# Then detect the actual binaries needed
26423
26424  # FIXME: Is this needed?
26425  ac_ext=cpp
26426ac_cpp='$CXXCPP $CPPFLAGS'
26427ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26428ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26429ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26430
26431
26432  # Store the CFLAGS etc passed to the configure script.
26433  ORG_CFLAGS="$CFLAGS"
26434  ORG_CXXFLAGS="$CXXFLAGS"
26435  ORG_OBJCFLAGS="$OBJCFLAGS"
26436
26437  # On Windows, we need to detect the visual studio installation first.
26438  # This will change the PATH, but we need to keep that new PATH even
26439  # after toolchain detection is done, since the compiler (on x86) uses
26440  # it for DLL resolution in runtime.
26441  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26442
26443  # Store path to cygwin link.exe to help excluding it when searching for
26444  # VS linker. This must be done before changing the PATH when looking for VS.
26445  # Extract the first word of "link", so it can be a program name with args.
26446set dummy link; ac_word=$2
26447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26448$as_echo_n "checking for $ac_word... " >&6; }
26449if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26450  $as_echo_n "(cached) " >&6
26451else
26452  case $CYGWIN_LINK in
26453  [\\/]* | ?:[\\/]*)
26454  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26455  ;;
26456  *)
26457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26458for as_dir in $PATH
26459do
26460  IFS=$as_save_IFS
26461  test -z "$as_dir" && as_dir=.
26462    for ac_exec_ext in '' $ac_executable_extensions; do
26463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26464    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26466    break 2
26467  fi
26468done
26469  done
26470IFS=$as_save_IFS
26471
26472  ;;
26473esac
26474fi
26475CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26476if test -n "$CYGWIN_LINK"; then
26477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26478$as_echo "$CYGWIN_LINK" >&6; }
26479else
26480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26481$as_echo "no" >&6; }
26482fi
26483
26484
26485  if test "x$CYGWIN_LINK" != x; then
26486    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26487$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26488    "$CYGWIN_LINK" --version > /dev/null
26489    if test $? -eq 0 ; then
26490      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26491$as_echo "yes" >&6; }
26492    else
26493      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26494$as_echo "no" >&6; }
26495      # This might be the VS linker. Don't exclude it later on.
26496      CYGWIN_LINK=""
26497    fi
26498  fi
26499
26500  # First-hand choice is to locate and run the vsvars bat file.
26501
26502  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26503    VCVARSFILE="vc/bin/vcvars32.bat"
26504  else
26505    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26506  fi
26507
26508  VS_ENV_CMD=""
26509  VS_ENV_ARGS=""
26510  if test "x$with_toolsdir" != x; then
26511
26512  if test "x$VS_ENV_CMD" = x; then
26513    VS100BASE="$with_toolsdir/../.."
26514    METHOD="--with-tools-dir"
26515
26516  windows_path="$VS100BASE"
26517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26518    unix_path=`$CYGPATH -u "$windows_path"`
26519    VS100BASE="$unix_path"
26520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26522    VS100BASE="$unix_path"
26523  fi
26524
26525    if test -d "$VS100BASE"; then
26526      if test -f "$VS100BASE/$VCVARSFILE"; then
26527        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26528$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26529        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26530      else
26531        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26532$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26533        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26534$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26535      fi
26536    fi
26537  fi
26538
26539  fi
26540
26541  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26542    # Having specified an argument which is incorrect will produce an instant failure;
26543    # we should not go on looking
26544    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26545$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26546    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26547$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26548    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26549  fi
26550
26551  if test "x$VS100COMNTOOLS" != x; then
26552
26553  if test "x$VS_ENV_CMD" = x; then
26554    VS100BASE="$VS100COMNTOOLS/../.."
26555    METHOD="VS100COMNTOOLS variable"
26556
26557  windows_path="$VS100BASE"
26558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26559    unix_path=`$CYGPATH -u "$windows_path"`
26560    VS100BASE="$unix_path"
26561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26563    VS100BASE="$unix_path"
26564  fi
26565
26566    if test -d "$VS100BASE"; then
26567      if test -f "$VS100BASE/$VCVARSFILE"; then
26568        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26569$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26570        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26571      else
26572        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26573$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26574        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26575$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26576      fi
26577    fi
26578  fi
26579
26580  fi
26581  if test "x$PROGRAMFILES" != x; then
26582
26583  if test "x$VS_ENV_CMD" = x; then
26584    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26585    METHOD="well-known name"
26586
26587  windows_path="$VS100BASE"
26588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26589    unix_path=`$CYGPATH -u "$windows_path"`
26590    VS100BASE="$unix_path"
26591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26593    VS100BASE="$unix_path"
26594  fi
26595
26596    if test -d "$VS100BASE"; then
26597      if test -f "$VS100BASE/$VCVARSFILE"; then
26598        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26599$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26600        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26601      else
26602        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26603$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26604        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26605$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26606      fi
26607    fi
26608  fi
26609
26610  fi
26611
26612  if test "x$VS_ENV_CMD" = x; then
26613    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26614    METHOD="well-known name"
26615
26616  windows_path="$VS100BASE"
26617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26618    unix_path=`$CYGPATH -u "$windows_path"`
26619    VS100BASE="$unix_path"
26620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26622    VS100BASE="$unix_path"
26623  fi
26624
26625    if test -d "$VS100BASE"; then
26626      if test -f "$VS100BASE/$VCVARSFILE"; then
26627        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26628$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26629        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26630      else
26631        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26632$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26633        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26634$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26635      fi
26636    fi
26637  fi
26638
26639
26640  if test "x$VS_ENV_CMD" = x; then
26641    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26642    METHOD="well-known name"
26643
26644  windows_path="$VS100BASE"
26645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26646    unix_path=`$CYGPATH -u "$windows_path"`
26647    VS100BASE="$unix_path"
26648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26650    VS100BASE="$unix_path"
26651  fi
26652
26653    if test -d "$VS100BASE"; then
26654      if test -f "$VS100BASE/$VCVARSFILE"; then
26655        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26656$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26657        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26658      else
26659        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26660$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26661        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26662$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26663      fi
26664    fi
26665  fi
26666
26667
26668  if test "x$ProgramW6432" != x; then
26669
26670  if test "x$VS_ENV_CMD" = x; then
26671    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
26672    METHOD="well-known name"
26673
26674  windows_path="$WIN_SDK_BASE"
26675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26676    unix_path=`$CYGPATH -u "$windows_path"`
26677    WIN_SDK_BASE="$unix_path"
26678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26680    WIN_SDK_BASE="$unix_path"
26681  fi
26682
26683    if test -d "$WIN_SDK_BASE"; then
26684      # There have been cases of partial or broken SDK installations. A missing
26685      # lib dir is not going to work.
26686      if test ! -d "$WIN_SDK_BASE/../lib"; then
26687        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26688$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26689        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26690$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26691      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26692        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26693$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26694        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26695        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26696          VS_ENV_ARGS="/x86"
26697        else
26698          VS_ENV_ARGS="/x64"
26699        fi
26700      else
26701        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26702$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26703        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26704$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26705      fi
26706    fi
26707  fi
26708
26709  fi
26710  if test "x$PROGRAMW6432" != x; then
26711
26712  if test "x$VS_ENV_CMD" = x; then
26713    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
26714    METHOD="well-known name"
26715
26716  windows_path="$WIN_SDK_BASE"
26717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26718    unix_path=`$CYGPATH -u "$windows_path"`
26719    WIN_SDK_BASE="$unix_path"
26720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26722    WIN_SDK_BASE="$unix_path"
26723  fi
26724
26725    if test -d "$WIN_SDK_BASE"; then
26726      # There have been cases of partial or broken SDK installations. A missing
26727      # lib dir is not going to work.
26728      if test ! -d "$WIN_SDK_BASE/../lib"; then
26729        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26730$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26731        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26732$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26733      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26734        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26735$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26736        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26737        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26738          VS_ENV_ARGS="/x86"
26739        else
26740          VS_ENV_ARGS="/x64"
26741        fi
26742      else
26743        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26744$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26745        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26746$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26747      fi
26748    fi
26749  fi
26750
26751  fi
26752  if test "x$PROGRAMFILES" != x; then
26753
26754  if test "x$VS_ENV_CMD" = x; then
26755    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
26756    METHOD="well-known name"
26757
26758  windows_path="$WIN_SDK_BASE"
26759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26760    unix_path=`$CYGPATH -u "$windows_path"`
26761    WIN_SDK_BASE="$unix_path"
26762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26764    WIN_SDK_BASE="$unix_path"
26765  fi
26766
26767    if test -d "$WIN_SDK_BASE"; then
26768      # There have been cases of partial or broken SDK installations. A missing
26769      # lib dir is not going to work.
26770      if test ! -d "$WIN_SDK_BASE/../lib"; then
26771        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26772$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26773        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26774$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26775      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26776        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26777$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26778        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26779        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26780          VS_ENV_ARGS="/x86"
26781        else
26782          VS_ENV_ARGS="/x64"
26783        fi
26784      else
26785        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26786$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26787        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26788$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26789      fi
26790    fi
26791  fi
26792
26793  fi
26794
26795  if test "x$VS_ENV_CMD" = x; then
26796    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
26797    METHOD="well-known name"
26798
26799  windows_path="$WIN_SDK_BASE"
26800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26801    unix_path=`$CYGPATH -u "$windows_path"`
26802    WIN_SDK_BASE="$unix_path"
26803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26805    WIN_SDK_BASE="$unix_path"
26806  fi
26807
26808    if test -d "$WIN_SDK_BASE"; then
26809      # There have been cases of partial or broken SDK installations. A missing
26810      # lib dir is not going to work.
26811      if test ! -d "$WIN_SDK_BASE/../lib"; then
26812        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26813$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26814        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26815$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26816      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26817        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26818$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26819        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26820        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26821          VS_ENV_ARGS="/x86"
26822        else
26823          VS_ENV_ARGS="/x64"
26824        fi
26825      else
26826        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26827$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26828        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26829$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26830      fi
26831    fi
26832  fi
26833
26834
26835  if test "x$VS_ENV_CMD" = x; then
26836    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
26837    METHOD="well-known name"
26838
26839  windows_path="$WIN_SDK_BASE"
26840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26841    unix_path=`$CYGPATH -u "$windows_path"`
26842    WIN_SDK_BASE="$unix_path"
26843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26845    WIN_SDK_BASE="$unix_path"
26846  fi
26847
26848    if test -d "$WIN_SDK_BASE"; then
26849      # There have been cases of partial or broken SDK installations. A missing
26850      # lib dir is not going to work.
26851      if test ! -d "$WIN_SDK_BASE/../lib"; then
26852        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26853$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26854        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26855$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26856      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26857        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26858$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26859        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26860        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26861          VS_ENV_ARGS="/x86"
26862        else
26863          VS_ENV_ARGS="/x64"
26864        fi
26865      else
26866        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26867$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26868        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26869$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26870      fi
26871    fi
26872  fi
26873
26874
26875  if test "x$VS_ENV_CMD" != x; then
26876    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
26877
26878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26879
26880  # First separate the path from the arguments. This will split at the first
26881  # space.
26882  complete="$VS_ENV_CMD"
26883  path="${complete%% *}"
26884  tmp="$complete EOL"
26885  arguments="${tmp#* }"
26886
26887  # Input might be given as Windows format, start by converting to
26888  # unix format.
26889  new_path=`$CYGPATH -u "$path"`
26890
26891  # Now try to locate executable using which
26892  new_path=`$WHICH "$new_path" 2> /dev/null`
26893  # bat and cmd files are not always considered executable in cygwin causing which
26894  # to not find them
26895  if test "x$new_path" = x \
26896      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26897      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26898    new_path=`$CYGPATH -u "$path"`
26899  fi
26900  if test "x$new_path" = x; then
26901    # Oops. Which didn't find the executable.
26902    # The splitting of arguments from the executable at a space might have been incorrect,
26903    # since paths with space are more likely in Windows. Give it another try with the whole
26904    # argument.
26905    path="$complete"
26906    arguments="EOL"
26907    new_path=`$CYGPATH -u "$path"`
26908    new_path=`$WHICH "$new_path" 2> /dev/null`
26909    # bat and cmd files are not always considered executable in cygwin causing which
26910    # to not find them
26911    if test "x$new_path" = x \
26912        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26913        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26914      new_path=`$CYGPATH -u "$path"`
26915    fi
26916    if test "x$new_path" = x; then
26917      # It's still not found. Now this is an unrecoverable error.
26918      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26919$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26920      has_space=`$ECHO "$complete" | $GREP " "`
26921      if test "x$has_space" != x; then
26922        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26923$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26924      fi
26925      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26926    fi
26927  fi
26928
26929  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26930  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26931  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26932  # "foo.exe" is OK but "foo" is an error.
26933  #
26934  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26935  # It is also a way to make sure we got the proper file name for the real test later on.
26936  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26937  if test "x$test_shortpath" = x; then
26938    # Short path failed, file does not exist as specified.
26939    # Try adding .exe or .cmd
26940    if test -f "${new_path}.exe"; then
26941      input_to_shortpath="${new_path}.exe"
26942    elif test -f "${new_path}.cmd"; then
26943      input_to_shortpath="${new_path}.cmd"
26944    else
26945      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
26946$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
26947      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26948$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26949      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26950    fi
26951  else
26952    input_to_shortpath="$new_path"
26953  fi
26954
26955  # Call helper function which possibly converts this using DOS-style short mode.
26956  # If so, the updated path is stored in $new_path.
26957  new_path="$input_to_shortpath"
26958
26959  input_path="$input_to_shortpath"
26960  # Check if we need to convert this using DOS-style short mode. If the path
26961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26962  # take no chances and rewrite it.
26963  # Note: m4 eats our [], so we need to use [ and ] instead.
26964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26965  if test "x$has_forbidden_chars" != x; then
26966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26967    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26968    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26969    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26970      # Going to short mode and back again did indeed matter. Since short mode is
26971      # case insensitive, let's make it lowercase to improve readability.
26972      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26973      # Now convert it back to Unix-stile (cygpath)
26974      input_path=`$CYGPATH -u "$shortmode_path"`
26975      new_path="$input_path"
26976    fi
26977  fi
26978
26979  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26980  if test "x$test_cygdrive_prefix" = x; then
26981    # As a simple fix, exclude /usr/bin since it's not a real path.
26982    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26983      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26984      # a path prefixed by /cygdrive for fixpath to work.
26985      new_path="$CYGWIN_ROOT_PATH$input_path"
26986    fi
26987  fi
26988
26989  # remove trailing .exe if any
26990  new_path="${new_path/%.exe/}"
26991
26992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26993
26994  # First separate the path from the arguments. This will split at the first
26995  # space.
26996  complete="$VS_ENV_CMD"
26997  path="${complete%% *}"
26998  tmp="$complete EOL"
26999  arguments="${tmp#* }"
27000
27001  # Input might be given as Windows format, start by converting to
27002  # unix format.
27003  new_path="$path"
27004
27005  windows_path="$new_path"
27006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27007    unix_path=`$CYGPATH -u "$windows_path"`
27008    new_path="$unix_path"
27009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27011    new_path="$unix_path"
27012  fi
27013
27014
27015  # Now try to locate executable using which
27016  new_path=`$WHICH "$new_path" 2> /dev/null`
27017
27018  if test "x$new_path" = x; then
27019    # Oops. Which didn't find the executable.
27020    # The splitting of arguments from the executable at a space might have been incorrect,
27021    # since paths with space are more likely in Windows. Give it another try with the whole
27022    # argument.
27023    path="$complete"
27024    arguments="EOL"
27025    new_path="$path"
27026
27027  windows_path="$new_path"
27028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27029    unix_path=`$CYGPATH -u "$windows_path"`
27030    new_path="$unix_path"
27031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27033    new_path="$unix_path"
27034  fi
27035
27036
27037    new_path=`$WHICH "$new_path" 2> /dev/null`
27038
27039    if test "x$new_path" = x; then
27040      # It's still not found. Now this is an unrecoverable error.
27041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27042$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27043      has_space=`$ECHO "$complete" | $GREP " "`
27044      if test "x$has_space" != x; then
27045        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27046$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27047      fi
27048      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27049    fi
27050  fi
27051
27052  # Now new_path has a complete unix path to the binary
27053  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27054    # Keep paths in /bin as-is, but remove trailing .exe if any
27055    new_path="${new_path/%.exe/}"
27056    # Do not save /bin paths to all_fixpath_prefixes!
27057  else
27058    # Not in mixed or Windows style, start by that.
27059    new_path=`cmd //c echo $new_path`
27060
27061  input_path="$new_path"
27062  # Check if we need to convert this using DOS-style short mode. If the path
27063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27064  # take no chances and rewrite it.
27065  # Note: m4 eats our [], so we need to use [ and ] instead.
27066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27067  if test "x$has_forbidden_chars" != x; then
27068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27069    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27070  fi
27071
27072    # Output is in $new_path
27073
27074  windows_path="$new_path"
27075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27076    unix_path=`$CYGPATH -u "$windows_path"`
27077    new_path="$unix_path"
27078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27080    new_path="$unix_path"
27081  fi
27082
27083    # remove trailing .exe if any
27084    new_path="${new_path/%.exe/}"
27085
27086    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27087    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27088  fi
27089
27090  else
27091    # We're on a posix platform. Hooray! :)
27092    # First separate the path from the arguments. This will split at the first
27093    # space.
27094    complete="$VS_ENV_CMD"
27095    path="${complete%% *}"
27096    tmp="$complete EOL"
27097    arguments="${tmp#* }"
27098
27099    # Cannot rely on the command "which" here since it doesn't always work.
27100    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27101    if test -z "$is_absolute_path"; then
27102      # Path to executable is not absolute. Find it.
27103      IFS_save="$IFS"
27104      IFS=:
27105      for p in $PATH; do
27106        if test -f "$p/$path" && test -x "$p/$path"; then
27107          new_path="$p/$path"
27108          break
27109        fi
27110      done
27111      IFS="$IFS_save"
27112    else
27113      # This is an absolute path, we can use it without further modifications.
27114      new_path="$path"
27115    fi
27116
27117    if test "x$new_path" = x; then
27118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27119$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27120      has_space=`$ECHO "$complete" | $GREP " "`
27121      if test "x$has_space" != x; then
27122        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27123$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27124      fi
27125      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27126    fi
27127  fi
27128
27129  # Now join together the path and the arguments once again
27130  if test "x$arguments" != xEOL; then
27131    new_complete="$new_path ${arguments% *}"
27132  else
27133    new_complete="$new_path"
27134  fi
27135
27136  if test "x$complete" != "x$new_complete"; then
27137    VS_ENV_CMD="$new_complete"
27138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27139$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27140  fi
27141
27142
27143    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27144    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27145$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27146    cd $OUTPUT_ROOT
27147    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
27148    # to autoconf standards.
27149
27150    #----
27151
27152    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
27153    # but calculate the difference in Cygwin environment before/after running it and then
27154    # apply the diff.
27155
27156    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
27157      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
27158      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
27159      _dosbash=`cygpath -a -w -s \`which bash\`.*`
27160    else
27161      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
27162      _dosbash=`cmd //c echo \`which bash\``
27163    fi
27164
27165    # generate the set of exported vars before/after the vs10 setup
27166    $ECHO "@echo off"                                           >  localdevenvtmp.bat
27167    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
27168    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
27169    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
27170
27171    # Now execute the newly created bat file.
27172    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
27173    cmd /c localdevenvtmp.bat | cat
27174
27175    # apply the diff (less some non-vs10 vars named by "!")
27176    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
27177    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
27178    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
27179
27180    # cleanup
27181    $RM localdevenvtmp*
27182    #----
27183    cd $CURDIR
27184    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
27185      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27186$as_echo "no" >&6; }
27187      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27188$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27189      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27190$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27191      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27192$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27193      as_fn_error $? "Cannot continue" "$LINENO" 5
27194    fi
27195
27196    # Now set all paths and other env variables. This will allow the rest of
27197    # the configure script to find and run the compiler in the proper way.
27198    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27199$as_echo "$as_me: Setting extracted environment variables" >&6;}
27200    . $OUTPUT_ROOT/localdevenv.sh
27201  else
27202    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27203    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27204$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27205  fi
27206
27207  # At this point, we should have corrent variables in the environment, or we can't continue.
27208  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27209$as_echo_n "checking for Visual Studio variables... " >&6; }
27210
27211  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27212    if test "x$INCLUDE" = x || test "x$LIB" = x; then
27213      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27214$as_echo "present but broken" >&6; }
27215      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27216    else
27217      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27218$as_echo "ok" >&6; }
27219      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
27220      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
27221      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
27222      # Remove any paths containing # (typically F#) as that messes up make
27223      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
27224      VS_PATH="$PATH"
27225
27226
27227
27228    fi
27229  else
27230    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27231$as_echo "not found" >&6; }
27232
27233    if test "x$VS_ENV_CMD" = x; then
27234      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27235$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27236      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27237$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27238    else
27239      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27240$as_echo "$as_me: Running the extraction script failed." >&6;}
27241    fi
27242    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27243$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27244    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27245$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27246    as_fn_error $? "Cannot continue" "$LINENO" 5
27247  fi
27248
27249  fi
27250
27251  # autoconf magic only relies on PATH, so update it if tools dir is specified
27252  OLD_PATH="$PATH"
27253
27254  # For solaris we really need solaris tools, and not the GNU equivalent.
27255  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27256  # so add that to path before starting to probe.
27257  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27258  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27259    PATH="/usr/ccs/bin:$PATH"
27260  fi
27261
27262  # Finally add TOOLS_DIR at the beginning, to allow --with-tools-dir to
27263  # override all other locations.
27264  if test "x$TOOLS_DIR" != x; then
27265    PATH=$TOOLS_DIR:$PATH
27266  fi
27267
27268  # If a devkit is found on the builddeps server, then prepend its path to the
27269  # PATH variable. If there are cross compilers available in the devkit, these
27270  # will be found by AC_PROG_CC et al.
27271  DEVKIT=
27272
27273
27274  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
27275    # Source the builddeps file again, to make sure it uses the latest variables!
27276    . $builddepsfile
27277    # Look for a target and build machine specific resource!
27278    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
27279    if test "x$resource" = x; then
27280      # Ok, lets instead look for a target specific resource
27281      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
27282    fi
27283    if test "x$resource" = x; then
27284      # Ok, lets instead look for a build specific resource
27285      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
27286    fi
27287    if test "x$resource" = x; then
27288      # Ok, lets instead look for a generic resource
27289      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
27290      resource=${builddep_devkit}
27291    fi
27292    if test "x$resource" != x; then
27293      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
27294$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
27295      # If the resource in the builddeps.conf file is an existing directory,
27296      # for example /java/linux/cups
27297      if test -d ${resource}; then
27298        depdir=${resource}
27299      else
27300
27301  # devkit is for example mymodule
27302  # $resource is for example libs/general/libmymod_1_2_3.zip
27303  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
27304  # $with_builddeps_dir is for example /localhome/builddeps
27305  # depdir is the name of the variable into which we store the depdir, eg MYMOD
27306  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
27307  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
27308  filename=`basename $resource`
27309  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
27310  filebase=${filename%%.*}
27311  extension=${filename#*.}
27312  installdir=$with_builddeps_dir/$filebase
27313  if test ! -f $installdir/$filename.unpacked; then
27314    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
27315$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
27316    if test ! -d $installdir; then
27317      mkdir -p $installdir
27318    fi
27319    if test ! -d $installdir; then
27320      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
27321    fi
27322    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
27323    touch $tmpfile
27324    if test ! -f $tmpfile; then
27325      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
27326    fi
27327
27328  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
27329  # $tmpfile is the local file name for the downloaded file.
27330  VALID_TOOL=no
27331  if test "x$BDEPS_FTP" = xwget; then
27332    VALID_TOOL=yes
27333    wget -O $tmpfile $with_builddeps_server/$resource
27334  fi
27335  if test "x$BDEPS_FTP" = xlftp; then
27336    VALID_TOOL=yes
27337    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
27338  fi
27339  if test "x$BDEPS_FTP" = xftp; then
27340    VALID_TOOL=yes
27341    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
27342    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
27343    FTPUSERPWD=${FTPSERVER%%@*}
27344    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
27345      FTPUSER=${userpwd%%:*}
27346      FTPPWD=${userpwd#*@}
27347      FTPSERVER=${FTPSERVER#*@}
27348    else
27349      FTPUSER=ftp
27350      FTPPWD=ftp
27351    fi
27352    # the "pass" command does not work on some
27353    # ftp clients (read ftp.exe) but if it works,
27354    # passive mode is better!
27355    ( \
27356        echo "user $FTPUSER $FTPPWD"        ; \
27357        echo "pass"                         ; \
27358        echo "bin"                          ; \
27359        echo "get $FTPPATH $tmpfile"              ; \
27360    ) | ftp -in $FTPSERVER
27361  fi
27362  if test "x$VALID_TOOL" != xyes; then
27363    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
27364  fi
27365
27366    mv $tmpfile $installdir/$filename
27367    if test ! -s $installdir/$filename; then
27368      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
27369    fi
27370    case "$extension" in
27371      zip)  echo "Unzipping $installdir/$filename..."
27372        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
27373        ;;
27374      tar.gz) echo "Untaring $installdir/$filename..."
27375        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
27376        ;;
27377      tgz) echo "Untaring $installdir/$filename..."
27378        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
27379        ;;
27380      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
27381        ;;
27382    esac
27383  fi
27384  if test -f $installdir/$filename.unpacked; then
27385    depdir=$installdir
27386  fi
27387
27388      fi
27389      # Source the builddeps file again, because in the previous command, the depdir
27390      # was updated to point at the current build dependency install directory.
27391      . $builddepsfile
27392      # Now extract variables from the builddeps.conf files.
27393      theroot=${builddep_devkit_ROOT}
27394      thecflags=${builddep_devkit_CFLAGS}
27395      thelibs=${builddep_devkit_LIBS}
27396      if test "x$depdir" = x; then
27397        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
27398      fi
27399      DEVKIT=$depdir
27400      if test "x$theroot" != x; then
27401        DEVKIT="$theroot"
27402      fi
27403      if test "x$thecflags" != x; then
27404        DEVKIT_CFLAGS="$thecflags"
27405      fi
27406      if test "x$thelibs" != x; then
27407        DEVKIT_LIBS="$thelibs"
27408      fi
27409
27410        # Found devkit
27411        PATH="$DEVKIT/bin:$PATH"
27412        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
27413        if test "x$x_includes" = "xNONE"; then
27414          x_includes="$SYS_ROOT/usr/include/X11"
27415        fi
27416        if test "x$x_libraries" = "xNONE"; then
27417          x_libraries="$SYS_ROOT/usr/lib"
27418        fi
27419
27420
27421    fi
27422
27423  fi
27424
27425
27426
27427  #
27428  # Setup the compilers (CC and CXX)
27429  #
27430
27431  COMPILER_NAME=C
27432  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27433
27434  if test "x$CC" != x; then
27435    # User has supplied compiler name already, always let that override.
27436    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27437$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27438    if test "x`basename $CC`" = "x$CC"; then
27439      # A command without a complete path is provided, search $PATH.
27440
27441      for ac_prog in $CC
27442do
27443  # Extract the first word of "$ac_prog", so it can be a program name with args.
27444set dummy $ac_prog; ac_word=$2
27445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27446$as_echo_n "checking for $ac_word... " >&6; }
27447if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27448  $as_echo_n "(cached) " >&6
27449else
27450  case $POTENTIAL_CC in
27451  [\\/]* | ?:[\\/]*)
27452  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27453  ;;
27454  *)
27455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27456for as_dir in $PATH
27457do
27458  IFS=$as_save_IFS
27459  test -z "$as_dir" && as_dir=.
27460    for ac_exec_ext in '' $ac_executable_extensions; do
27461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27462    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27464    break 2
27465  fi
27466done
27467  done
27468IFS=$as_save_IFS
27469
27470  ;;
27471esac
27472fi
27473POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27474if test -n "$POTENTIAL_CC"; then
27475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27476$as_echo "$POTENTIAL_CC" >&6; }
27477else
27478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27479$as_echo "no" >&6; }
27480fi
27481
27482
27483  test -n "$POTENTIAL_CC" && break
27484done
27485
27486      if test "x$POTENTIAL_CC" != x; then
27487        CC=$POTENTIAL_CC
27488      else
27489        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27490      fi
27491    else
27492      # Otherwise it might already be a complete path
27493      if test ! -x "$CC"; then
27494        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27495      fi
27496    fi
27497  else
27498    # No user supplied value. Locate compiler ourselves.
27499
27500    # If we are cross compiling, assume cross compilation tools follows the
27501    # cross compilation standard where they are prefixed with the autoconf
27502    # standard name for the target. For example the binary
27503    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27504    # If we are not cross compiling, then the default compiler name will be
27505    # used.
27506
27507    CC=
27508    # If TOOLS_DIR is set, check for all compiler names in there first
27509    # before checking the rest of the PATH.
27510    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27511    # step, this should not be necessary.
27512    if test -n "$TOOLS_DIR"; then
27513      PATH_save="$PATH"
27514      PATH="$TOOLS_DIR"
27515      for ac_prog in $SEARCH_LIST
27516do
27517  # Extract the first word of "$ac_prog", so it can be a program name with args.
27518set dummy $ac_prog; ac_word=$2
27519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27520$as_echo_n "checking for $ac_word... " >&6; }
27521if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
27522  $as_echo_n "(cached) " >&6
27523else
27524  case $TOOLS_DIR_CC in
27525  [\\/]* | ?:[\\/]*)
27526  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
27527  ;;
27528  *)
27529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27530for as_dir in $PATH
27531do
27532  IFS=$as_save_IFS
27533  test -z "$as_dir" && as_dir=.
27534    for ac_exec_ext in '' $ac_executable_extensions; do
27535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27536    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
27537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27538    break 2
27539  fi
27540done
27541  done
27542IFS=$as_save_IFS
27543
27544  ;;
27545esac
27546fi
27547TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
27548if test -n "$TOOLS_DIR_CC"; then
27549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
27550$as_echo "$TOOLS_DIR_CC" >&6; }
27551else
27552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27553$as_echo "no" >&6; }
27554fi
27555
27556
27557  test -n "$TOOLS_DIR_CC" && break
27558done
27559
27560      CC=$TOOLS_DIR_CC
27561      PATH="$PATH_save"
27562    fi
27563
27564    # AC_PATH_PROGS can't be run multiple times with the same variable,
27565    # so create a new name for this run.
27566    if test "x$CC" = x; then
27567      for ac_prog in $SEARCH_LIST
27568do
27569  # Extract the first word of "$ac_prog", so it can be a program name with args.
27570set dummy $ac_prog; ac_word=$2
27571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27572$as_echo_n "checking for $ac_word... " >&6; }
27573if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27574  $as_echo_n "(cached) " >&6
27575else
27576  case $POTENTIAL_CC in
27577  [\\/]* | ?:[\\/]*)
27578  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27579  ;;
27580  *)
27581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27582for as_dir in $PATH
27583do
27584  IFS=$as_save_IFS
27585  test -z "$as_dir" && as_dir=.
27586    for ac_exec_ext in '' $ac_executable_extensions; do
27587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27588    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27590    break 2
27591  fi
27592done
27593  done
27594IFS=$as_save_IFS
27595
27596  ;;
27597esac
27598fi
27599POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27600if test -n "$POTENTIAL_CC"; then
27601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27602$as_echo "$POTENTIAL_CC" >&6; }
27603else
27604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27605$as_echo "no" >&6; }
27606fi
27607
27608
27609  test -n "$POTENTIAL_CC" && break
27610done
27611
27612      CC=$POTENTIAL_CC
27613    fi
27614
27615    if test "x$CC" = x; then
27616
27617  # Print a helpful message on how to acquire the necessary build dependency.
27618  # devkit is the help tag: freetype, cups, pulse, alsa etc
27619  MISSING_DEPENDENCY=devkit
27620
27621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27622    cygwin_help $MISSING_DEPENDENCY
27623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27624    msys_help $MISSING_DEPENDENCY
27625  else
27626    PKGHANDLER_COMMAND=
27627
27628    case $PKGHANDLER in
27629      apt-get)
27630        apt_help     $MISSING_DEPENDENCY ;;
27631      yum)
27632        yum_help     $MISSING_DEPENDENCY ;;
27633      port)
27634        port_help    $MISSING_DEPENDENCY ;;
27635      pkgutil)
27636        pkgutil_help $MISSING_DEPENDENCY ;;
27637      pkgadd)
27638        pkgadd_help  $MISSING_DEPENDENCY ;;
27639    esac
27640
27641    if test "x$PKGHANDLER_COMMAND" != x; then
27642      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27643    fi
27644  fi
27645
27646      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27647    fi
27648  fi
27649
27650  # Now we have a compiler binary in CC. Make sure it's okay.
27651
27652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27653
27654  # First separate the path from the arguments. This will split at the first
27655  # space.
27656  complete="$CC"
27657  path="${complete%% *}"
27658  tmp="$complete EOL"
27659  arguments="${tmp#* }"
27660
27661  # Input might be given as Windows format, start by converting to
27662  # unix format.
27663  new_path=`$CYGPATH -u "$path"`
27664
27665  # Now try to locate executable using which
27666  new_path=`$WHICH "$new_path" 2> /dev/null`
27667  # bat and cmd files are not always considered executable in cygwin causing which
27668  # to not find them
27669  if test "x$new_path" = x \
27670      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27671      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27672    new_path=`$CYGPATH -u "$path"`
27673  fi
27674  if test "x$new_path" = x; then
27675    # Oops. Which didn't find the executable.
27676    # The splitting of arguments from the executable at a space might have been incorrect,
27677    # since paths with space are more likely in Windows. Give it another try with the whole
27678    # argument.
27679    path="$complete"
27680    arguments="EOL"
27681    new_path=`$CYGPATH -u "$path"`
27682    new_path=`$WHICH "$new_path" 2> /dev/null`
27683    # bat and cmd files are not always considered executable in cygwin causing which
27684    # to not find them
27685    if test "x$new_path" = x \
27686        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27687        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27688      new_path=`$CYGPATH -u "$path"`
27689    fi
27690    if test "x$new_path" = x; then
27691      # It's still not found. Now this is an unrecoverable error.
27692      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27693$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27694      has_space=`$ECHO "$complete" | $GREP " "`
27695      if test "x$has_space" != x; then
27696        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27697$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27698      fi
27699      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27700    fi
27701  fi
27702
27703  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27704  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27705  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27706  # "foo.exe" is OK but "foo" is an error.
27707  #
27708  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27709  # It is also a way to make sure we got the proper file name for the real test later on.
27710  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27711  if test "x$test_shortpath" = x; then
27712    # Short path failed, file does not exist as specified.
27713    # Try adding .exe or .cmd
27714    if test -f "${new_path}.exe"; then
27715      input_to_shortpath="${new_path}.exe"
27716    elif test -f "${new_path}.cmd"; then
27717      input_to_shortpath="${new_path}.cmd"
27718    else
27719      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27720$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27721      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27722$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27723      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27724    fi
27725  else
27726    input_to_shortpath="$new_path"
27727  fi
27728
27729  # Call helper function which possibly converts this using DOS-style short mode.
27730  # If so, the updated path is stored in $new_path.
27731  new_path="$input_to_shortpath"
27732
27733  input_path="$input_to_shortpath"
27734  # Check if we need to convert this using DOS-style short mode. If the path
27735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27736  # take no chances and rewrite it.
27737  # Note: m4 eats our [], so we need to use [ and ] instead.
27738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27739  if test "x$has_forbidden_chars" != x; then
27740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27741    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27742    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27743    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27744      # Going to short mode and back again did indeed matter. Since short mode is
27745      # case insensitive, let's make it lowercase to improve readability.
27746      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27747      # Now convert it back to Unix-stile (cygpath)
27748      input_path=`$CYGPATH -u "$shortmode_path"`
27749      new_path="$input_path"
27750    fi
27751  fi
27752
27753  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27754  if test "x$test_cygdrive_prefix" = x; then
27755    # As a simple fix, exclude /usr/bin since it's not a real path.
27756    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27757      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27758      # a path prefixed by /cygdrive for fixpath to work.
27759      new_path="$CYGWIN_ROOT_PATH$input_path"
27760    fi
27761  fi
27762
27763  # remove trailing .exe if any
27764  new_path="${new_path/%.exe/}"
27765
27766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27767
27768  # First separate the path from the arguments. This will split at the first
27769  # space.
27770  complete="$CC"
27771  path="${complete%% *}"
27772  tmp="$complete EOL"
27773  arguments="${tmp#* }"
27774
27775  # Input might be given as Windows format, start by converting to
27776  # unix format.
27777  new_path="$path"
27778
27779  windows_path="$new_path"
27780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27781    unix_path=`$CYGPATH -u "$windows_path"`
27782    new_path="$unix_path"
27783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27785    new_path="$unix_path"
27786  fi
27787
27788
27789  # Now try to locate executable using which
27790  new_path=`$WHICH "$new_path" 2> /dev/null`
27791
27792  if test "x$new_path" = x; then
27793    # Oops. Which didn't find the executable.
27794    # The splitting of arguments from the executable at a space might have been incorrect,
27795    # since paths with space are more likely in Windows. Give it another try with the whole
27796    # argument.
27797    path="$complete"
27798    arguments="EOL"
27799    new_path="$path"
27800
27801  windows_path="$new_path"
27802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27803    unix_path=`$CYGPATH -u "$windows_path"`
27804    new_path="$unix_path"
27805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27807    new_path="$unix_path"
27808  fi
27809
27810
27811    new_path=`$WHICH "$new_path" 2> /dev/null`
27812
27813    if test "x$new_path" = x; then
27814      # It's still not found. Now this is an unrecoverable error.
27815      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27816$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27817      has_space=`$ECHO "$complete" | $GREP " "`
27818      if test "x$has_space" != x; then
27819        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27820$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27821      fi
27822      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27823    fi
27824  fi
27825
27826  # Now new_path has a complete unix path to the binary
27827  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27828    # Keep paths in /bin as-is, but remove trailing .exe if any
27829    new_path="${new_path/%.exe/}"
27830    # Do not save /bin paths to all_fixpath_prefixes!
27831  else
27832    # Not in mixed or Windows style, start by that.
27833    new_path=`cmd //c echo $new_path`
27834
27835  input_path="$new_path"
27836  # Check if we need to convert this using DOS-style short mode. If the path
27837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27838  # take no chances and rewrite it.
27839  # Note: m4 eats our [], so we need to use [ and ] instead.
27840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27841  if test "x$has_forbidden_chars" != x; then
27842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27843    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27844  fi
27845
27846    # Output is in $new_path
27847
27848  windows_path="$new_path"
27849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27850    unix_path=`$CYGPATH -u "$windows_path"`
27851    new_path="$unix_path"
27852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27854    new_path="$unix_path"
27855  fi
27856
27857    # remove trailing .exe if any
27858    new_path="${new_path/%.exe/}"
27859
27860    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27861    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27862  fi
27863
27864  else
27865    # We're on a posix platform. Hooray! :)
27866    # First separate the path from the arguments. This will split at the first
27867    # space.
27868    complete="$CC"
27869    path="${complete%% *}"
27870    tmp="$complete EOL"
27871    arguments="${tmp#* }"
27872
27873    # Cannot rely on the command "which" here since it doesn't always work.
27874    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27875    if test -z "$is_absolute_path"; then
27876      # Path to executable is not absolute. Find it.
27877      IFS_save="$IFS"
27878      IFS=:
27879      for p in $PATH; do
27880        if test -f "$p/$path" && test -x "$p/$path"; then
27881          new_path="$p/$path"
27882          break
27883        fi
27884      done
27885      IFS="$IFS_save"
27886    else
27887      # This is an absolute path, we can use it without further modifications.
27888      new_path="$path"
27889    fi
27890
27891    if test "x$new_path" = x; then
27892      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27893$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27894      has_space=`$ECHO "$complete" | $GREP " "`
27895      if test "x$has_space" != x; then
27896        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27897$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27898      fi
27899      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27900    fi
27901  fi
27902
27903  # Now join together the path and the arguments once again
27904  if test "x$arguments" != xEOL; then
27905    new_complete="$new_path ${arguments% *}"
27906  else
27907    new_complete="$new_path"
27908  fi
27909
27910  if test "x$complete" != "x$new_complete"; then
27911    CC="$new_complete"
27912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
27913$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
27914  fi
27915
27916  TEST_COMPILER="$CC"
27917  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
27918  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
27919  if test "x$OPENJDK_BUILD_OS" != xaix; then
27920    # FIXME: This test should not be needed anymore; we don't do that for any platform.
27921    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
27922$as_echo_n "checking resolved symbolic links for CC... " >&6; }
27923
27924  if test "x$OPENJDK_BUILD_OS" != xwindows; then
27925    # Follow a chain of symbolic links. Use readlink
27926    # where it exists, else fall back to horribly
27927    # complicated shell code.
27928    if test "x$READLINK_TESTED" != yes; then
27929      # On MacOSX there is a readlink tool with a different
27930      # purpose than the GNU readlink tool. Check the found readlink.
27931      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27932      if test "x$ISGNU" = x; then
27933        # A readlink that we do not know how to use.
27934        # Are there other non-GNU readlinks out there?
27935        READLINK_TESTED=yes
27936        READLINK=
27937      fi
27938    fi
27939
27940    if test "x$READLINK" != x; then
27941      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
27942    else
27943      # Save the current directory for restoring afterwards
27944      STARTDIR=$PWD
27945      COUNTER=0
27946      sym_link_dir=`$DIRNAME $TEST_COMPILER`
27947      sym_link_file=`$BASENAME $TEST_COMPILER`
27948      cd $sym_link_dir
27949      # Use -P flag to resolve symlinks in directories.
27950      cd `$THEPWDCMD -P`
27951      sym_link_dir=`$THEPWDCMD -P`
27952      # Resolve file symlinks
27953      while test $COUNTER -lt 20; do
27954        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27955        if test "x$ISLINK" == x; then
27956          # This is not a symbolic link! We are done!
27957          break
27958        fi
27959        # Again resolve directory symlinks since the target of the just found
27960        # link could be in a different directory
27961        cd `$DIRNAME $ISLINK`
27962        sym_link_dir=`$THEPWDCMD -P`
27963        sym_link_file=`$BASENAME $ISLINK`
27964        let COUNTER=COUNTER+1
27965      done
27966      cd $STARTDIR
27967      TEST_COMPILER=$sym_link_dir/$sym_link_file
27968    fi
27969  fi
27970
27971    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
27972$as_echo "$TEST_COMPILER" >&6; }
27973  fi
27974  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
27975$as_echo_n "checking if CC is disguised ccache... " >&6; }
27976
27977  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
27978  if test "x$COMPILER_BASENAME" = "xccache"; then
27979    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
27980$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
27981    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
27982    # We want to control ccache invocation ourselves, so ignore this cc and try
27983    # searching again.
27984
27985    # Remove the path to the fake ccache cc from the PATH
27986    RETRY_COMPILER_SAVED_PATH="$PATH"
27987    COMPILER_DIRNAME=`$DIRNAME $CC`
27988    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
27989
27990    # Try again looking for our compiler
27991    if test -n "$ac_tool_prefix"; then
27992  for ac_prog in $TOOLCHAIN_CC_BINARY
27993  do
27994    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27995set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27997$as_echo_n "checking for $ac_word... " >&6; }
27998if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
27999  $as_echo_n "(cached) " >&6
28000else
28001  if test -n "$PROPER_COMPILER_CC"; then
28002  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28003else
28004as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28005for as_dir in $PATH
28006do
28007  IFS=$as_save_IFS
28008  test -z "$as_dir" && as_dir=.
28009    for ac_exec_ext in '' $ac_executable_extensions; do
28010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28011    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28013    break 2
28014  fi
28015done
28016  done
28017IFS=$as_save_IFS
28018
28019fi
28020fi
28021PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28022if test -n "$PROPER_COMPILER_CC"; then
28023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28024$as_echo "$PROPER_COMPILER_CC" >&6; }
28025else
28026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28027$as_echo "no" >&6; }
28028fi
28029
28030
28031    test -n "$PROPER_COMPILER_CC" && break
28032  done
28033fi
28034if test -z "$PROPER_COMPILER_CC"; then
28035  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28036  for ac_prog in $TOOLCHAIN_CC_BINARY
28037do
28038  # Extract the first word of "$ac_prog", so it can be a program name with args.
28039set dummy $ac_prog; ac_word=$2
28040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28041$as_echo_n "checking for $ac_word... " >&6; }
28042if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28043  $as_echo_n "(cached) " >&6
28044else
28045  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28046  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28047else
28048as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28049for as_dir in $PATH
28050do
28051  IFS=$as_save_IFS
28052  test -z "$as_dir" && as_dir=.
28053    for ac_exec_ext in '' $ac_executable_extensions; do
28054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28055    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28057    break 2
28058  fi
28059done
28060  done
28061IFS=$as_save_IFS
28062
28063fi
28064fi
28065ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28066if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28068$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28069else
28070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28071$as_echo "no" >&6; }
28072fi
28073
28074
28075  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28076done
28077
28078  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28079    PROPER_COMPILER_CC=""
28080  else
28081    case $cross_compiling:$ac_tool_warned in
28082yes:)
28083{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28084$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28085ac_tool_warned=yes ;;
28086esac
28087    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28088  fi
28089fi
28090
28091
28092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28093
28094  # First separate the path from the arguments. This will split at the first
28095  # space.
28096  complete="$PROPER_COMPILER_CC"
28097  path="${complete%% *}"
28098  tmp="$complete EOL"
28099  arguments="${tmp#* }"
28100
28101  # Input might be given as Windows format, start by converting to
28102  # unix format.
28103  new_path=`$CYGPATH -u "$path"`
28104
28105  # Now try to locate executable using which
28106  new_path=`$WHICH "$new_path" 2> /dev/null`
28107  # bat and cmd files are not always considered executable in cygwin causing which
28108  # to not find them
28109  if test "x$new_path" = x \
28110      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28111      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28112    new_path=`$CYGPATH -u "$path"`
28113  fi
28114  if test "x$new_path" = x; then
28115    # Oops. Which didn't find the executable.
28116    # The splitting of arguments from the executable at a space might have been incorrect,
28117    # since paths with space are more likely in Windows. Give it another try with the whole
28118    # argument.
28119    path="$complete"
28120    arguments="EOL"
28121    new_path=`$CYGPATH -u "$path"`
28122    new_path=`$WHICH "$new_path" 2> /dev/null`
28123    # bat and cmd files are not always considered executable in cygwin causing which
28124    # to not find them
28125    if test "x$new_path" = x \
28126        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28127        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28128      new_path=`$CYGPATH -u "$path"`
28129    fi
28130    if test "x$new_path" = x; then
28131      # It's still not found. Now this is an unrecoverable error.
28132      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28133$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28134      has_space=`$ECHO "$complete" | $GREP " "`
28135      if test "x$has_space" != x; then
28136        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28137$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28138      fi
28139      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28140    fi
28141  fi
28142
28143  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28144  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28145  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28146  # "foo.exe" is OK but "foo" is an error.
28147  #
28148  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28149  # It is also a way to make sure we got the proper file name for the real test later on.
28150  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28151  if test "x$test_shortpath" = x; then
28152    # Short path failed, file does not exist as specified.
28153    # Try adding .exe or .cmd
28154    if test -f "${new_path}.exe"; then
28155      input_to_shortpath="${new_path}.exe"
28156    elif test -f "${new_path}.cmd"; then
28157      input_to_shortpath="${new_path}.cmd"
28158    else
28159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28160$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28161      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28162$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28163      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28164    fi
28165  else
28166    input_to_shortpath="$new_path"
28167  fi
28168
28169  # Call helper function which possibly converts this using DOS-style short mode.
28170  # If so, the updated path is stored in $new_path.
28171  new_path="$input_to_shortpath"
28172
28173  input_path="$input_to_shortpath"
28174  # Check if we need to convert this using DOS-style short mode. If the path
28175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28176  # take no chances and rewrite it.
28177  # Note: m4 eats our [], so we need to use [ and ] instead.
28178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28179  if test "x$has_forbidden_chars" != x; then
28180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28181    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28182    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28183    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28184      # Going to short mode and back again did indeed matter. Since short mode is
28185      # case insensitive, let's make it lowercase to improve readability.
28186      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28187      # Now convert it back to Unix-stile (cygpath)
28188      input_path=`$CYGPATH -u "$shortmode_path"`
28189      new_path="$input_path"
28190    fi
28191  fi
28192
28193  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28194  if test "x$test_cygdrive_prefix" = x; then
28195    # As a simple fix, exclude /usr/bin since it's not a real path.
28196    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28197      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28198      # a path prefixed by /cygdrive for fixpath to work.
28199      new_path="$CYGWIN_ROOT_PATH$input_path"
28200    fi
28201  fi
28202
28203  # remove trailing .exe if any
28204  new_path="${new_path/%.exe/}"
28205
28206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28207
28208  # First separate the path from the arguments. This will split at the first
28209  # space.
28210  complete="$PROPER_COMPILER_CC"
28211  path="${complete%% *}"
28212  tmp="$complete EOL"
28213  arguments="${tmp#* }"
28214
28215  # Input might be given as Windows format, start by converting to
28216  # unix format.
28217  new_path="$path"
28218
28219  windows_path="$new_path"
28220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28221    unix_path=`$CYGPATH -u "$windows_path"`
28222    new_path="$unix_path"
28223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28225    new_path="$unix_path"
28226  fi
28227
28228
28229  # Now try to locate executable using which
28230  new_path=`$WHICH "$new_path" 2> /dev/null`
28231
28232  if test "x$new_path" = x; then
28233    # Oops. Which didn't find the executable.
28234    # The splitting of arguments from the executable at a space might have been incorrect,
28235    # since paths with space are more likely in Windows. Give it another try with the whole
28236    # argument.
28237    path="$complete"
28238    arguments="EOL"
28239    new_path="$path"
28240
28241  windows_path="$new_path"
28242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28243    unix_path=`$CYGPATH -u "$windows_path"`
28244    new_path="$unix_path"
28245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28247    new_path="$unix_path"
28248  fi
28249
28250
28251    new_path=`$WHICH "$new_path" 2> /dev/null`
28252
28253    if test "x$new_path" = x; then
28254      # It's still not found. Now this is an unrecoverable error.
28255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28256$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28257      has_space=`$ECHO "$complete" | $GREP " "`
28258      if test "x$has_space" != x; then
28259        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28260$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28261      fi
28262      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28263    fi
28264  fi
28265
28266  # Now new_path has a complete unix path to the binary
28267  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28268    # Keep paths in /bin as-is, but remove trailing .exe if any
28269    new_path="${new_path/%.exe/}"
28270    # Do not save /bin paths to all_fixpath_prefixes!
28271  else
28272    # Not in mixed or Windows style, start by that.
28273    new_path=`cmd //c echo $new_path`
28274
28275  input_path="$new_path"
28276  # Check if we need to convert this using DOS-style short mode. If the path
28277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28278  # take no chances and rewrite it.
28279  # Note: m4 eats our [], so we need to use [ and ] instead.
28280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28281  if test "x$has_forbidden_chars" != x; then
28282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28284  fi
28285
28286    # Output is in $new_path
28287
28288  windows_path="$new_path"
28289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28290    unix_path=`$CYGPATH -u "$windows_path"`
28291    new_path="$unix_path"
28292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28294    new_path="$unix_path"
28295  fi
28296
28297    # remove trailing .exe if any
28298    new_path="${new_path/%.exe/}"
28299
28300    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28301    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28302  fi
28303
28304  else
28305    # We're on a posix platform. Hooray! :)
28306    # First separate the path from the arguments. This will split at the first
28307    # space.
28308    complete="$PROPER_COMPILER_CC"
28309    path="${complete%% *}"
28310    tmp="$complete EOL"
28311    arguments="${tmp#* }"
28312
28313    # Cannot rely on the command "which" here since it doesn't always work.
28314    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28315    if test -z "$is_absolute_path"; then
28316      # Path to executable is not absolute. Find it.
28317      IFS_save="$IFS"
28318      IFS=:
28319      for p in $PATH; do
28320        if test -f "$p/$path" && test -x "$p/$path"; then
28321          new_path="$p/$path"
28322          break
28323        fi
28324      done
28325      IFS="$IFS_save"
28326    else
28327      # This is an absolute path, we can use it without further modifications.
28328      new_path="$path"
28329    fi
28330
28331    if test "x$new_path" = x; then
28332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28333$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28334      has_space=`$ECHO "$complete" | $GREP " "`
28335      if test "x$has_space" != x; then
28336        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28337$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28338      fi
28339      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28340    fi
28341  fi
28342
28343  # Now join together the path and the arguments once again
28344  if test "x$arguments" != xEOL; then
28345    new_complete="$new_path ${arguments% *}"
28346  else
28347    new_complete="$new_path"
28348  fi
28349
28350  if test "x$complete" != "x$new_complete"; then
28351    PROPER_COMPILER_CC="$new_complete"
28352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28353$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28354  fi
28355
28356    PATH="$RETRY_COMPILER_SAVED_PATH"
28357
28358    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28359$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28360
28361  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28362    # Follow a chain of symbolic links. Use readlink
28363    # where it exists, else fall back to horribly
28364    # complicated shell code.
28365    if test "x$READLINK_TESTED" != yes; then
28366      # On MacOSX there is a readlink tool with a different
28367      # purpose than the GNU readlink tool. Check the found readlink.
28368      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28369      if test "x$ISGNU" = x; then
28370        # A readlink that we do not know how to use.
28371        # Are there other non-GNU readlinks out there?
28372        READLINK_TESTED=yes
28373        READLINK=
28374      fi
28375    fi
28376
28377    if test "x$READLINK" != x; then
28378      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28379    else
28380      # Save the current directory for restoring afterwards
28381      STARTDIR=$PWD
28382      COUNTER=0
28383      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28384      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28385      cd $sym_link_dir
28386      # Use -P flag to resolve symlinks in directories.
28387      cd `$THEPWDCMD -P`
28388      sym_link_dir=`$THEPWDCMD -P`
28389      # Resolve file symlinks
28390      while test $COUNTER -lt 20; do
28391        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28392        if test "x$ISLINK" == x; then
28393          # This is not a symbolic link! We are done!
28394          break
28395        fi
28396        # Again resolve directory symlinks since the target of the just found
28397        # link could be in a different directory
28398        cd `$DIRNAME $ISLINK`
28399        sym_link_dir=`$THEPWDCMD -P`
28400        sym_link_file=`$BASENAME $ISLINK`
28401        let COUNTER=COUNTER+1
28402      done
28403      cd $STARTDIR
28404      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28405    fi
28406  fi
28407
28408    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28409$as_echo "$PROPER_COMPILER_CC" >&6; }
28410    CC="$PROPER_COMPILER_CC"
28411  else
28412    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28413$as_echo "no, keeping CC" >&6; }
28414  fi
28415
28416
28417  COMPILER=$CC
28418  COMPILER_NAME=$COMPILER_NAME
28419
28420  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28421    # cc -V output typically looks like
28422    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28423    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28424    # Check that this is likely to be the Solaris Studio cc.
28425    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28426    if test $? -ne 0; then
28427      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28428      { $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
28429$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28430      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28431$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28432      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28433$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28434      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28435    fi
28436    # Remove usage instructions (if present), and
28437    # collapse compiler output into a single line
28438    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28439        $SED -e 's/ *[Uu]sage:.*//'`
28440    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28441        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28442  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28443    # xlc -qversion output typically looks like
28444    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28445    #     Version: 11.01.0000.0015
28446    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28447    # Check that this is likely to be the IBM XL C compiler.
28448    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28449    if test $? -ne 0; then
28450      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28451      { $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
28452$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28453      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28454$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28455      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28456$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28457      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28458    fi
28459    # Collapse compiler output into a single line
28460    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28461    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28462        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28463  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28464    # There is no specific version flag, but all output starts with a version string.
28465    # First line typically looks something like:
28466    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28467    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28468    # Check that this is likely to be Microsoft CL.EXE.
28469    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28470    if test $? -ne 0; then
28471      { $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
28472$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28473      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28474$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28475      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28476    fi
28477    # Collapse compiler output into a single line
28478    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28479    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28480        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28481  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28482    # gcc --version output typically looks like
28483    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28484    #     Copyright (C) 2013 Free Software Foundation, Inc.
28485    #     This is free software; see the source for copying conditions.  There is NO
28486    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28487    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28488    # Check that this is likely to be GCC.
28489    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28490    if test $? -ne 0; then
28491      { $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
28492$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28493      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28494$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28495      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28496    fi
28497    # Remove Copyright and legalese from version string, and
28498    # collapse into a single line
28499    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28500        $SED -e 's/ *Copyright .*//'`
28501    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28502        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28503  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28504    # clang --version output typically looks like
28505    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28506    #    clang version 3.3 (tags/RELEASE_33/final)
28507    # or
28508    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28509    #    Target: x86_64-pc-linux-gnu
28510    #    Thread model: posix
28511    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28512    # Check that this is likely to be clang
28513    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28514    if test $? -ne 0; then
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 --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28518$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28519      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28520    fi
28521    # Collapse compiler output into a single line
28522    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28523    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28524        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28525  else
28526      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28527  fi
28528  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28529  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28530  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28531  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28532
28533  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28534$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28535
28536
28537  # Now that we have resolved CC ourself, let autoconf have its go at it
28538  ac_ext=c
28539ac_cpp='$CPP $CPPFLAGS'
28540ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28541ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28542ac_compiler_gnu=$ac_cv_c_compiler_gnu
28543if test -n "$ac_tool_prefix"; then
28544  for ac_prog in $CC
28545  do
28546    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28547set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28549$as_echo_n "checking for $ac_word... " >&6; }
28550if ${ac_cv_prog_CC+:} false; then :
28551  $as_echo_n "(cached) " >&6
28552else
28553  if test -n "$CC"; then
28554  ac_cv_prog_CC="$CC" # Let the user override the test.
28555else
28556as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28557for as_dir in $PATH
28558do
28559  IFS=$as_save_IFS
28560  test -z "$as_dir" && as_dir=.
28561    for ac_exec_ext in '' $ac_executable_extensions; do
28562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28563    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28565    break 2
28566  fi
28567done
28568  done
28569IFS=$as_save_IFS
28570
28571fi
28572fi
28573CC=$ac_cv_prog_CC
28574if test -n "$CC"; then
28575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28576$as_echo "$CC" >&6; }
28577else
28578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28579$as_echo "no" >&6; }
28580fi
28581
28582
28583    test -n "$CC" && break
28584  done
28585fi
28586if test -z "$CC"; then
28587  ac_ct_CC=$CC
28588  for ac_prog in $CC
28589do
28590  # Extract the first word of "$ac_prog", so it can be a program name with args.
28591set dummy $ac_prog; ac_word=$2
28592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28593$as_echo_n "checking for $ac_word... " >&6; }
28594if ${ac_cv_prog_ac_ct_CC+:} false; then :
28595  $as_echo_n "(cached) " >&6
28596else
28597  if test -n "$ac_ct_CC"; then
28598  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28599else
28600as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28601for as_dir in $PATH
28602do
28603  IFS=$as_save_IFS
28604  test -z "$as_dir" && as_dir=.
28605    for ac_exec_ext in '' $ac_executable_extensions; do
28606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28607    ac_cv_prog_ac_ct_CC="$ac_prog"
28608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28609    break 2
28610  fi
28611done
28612  done
28613IFS=$as_save_IFS
28614
28615fi
28616fi
28617ac_ct_CC=$ac_cv_prog_ac_ct_CC
28618if test -n "$ac_ct_CC"; then
28619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28620$as_echo "$ac_ct_CC" >&6; }
28621else
28622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28623$as_echo "no" >&6; }
28624fi
28625
28626
28627  test -n "$ac_ct_CC" && break
28628done
28629
28630  if test "x$ac_ct_CC" = x; then
28631    CC=""
28632  else
28633    case $cross_compiling:$ac_tool_warned in
28634yes:)
28635{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28636$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28637ac_tool_warned=yes ;;
28638esac
28639    CC=$ac_ct_CC
28640  fi
28641fi
28642
28643
28644test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28645$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28646as_fn_error $? "no acceptable C compiler found in \$PATH
28647See \`config.log' for more details" "$LINENO" 5; }
28648
28649# Provide some information about the compiler.
28650$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28651set X $ac_compile
28652ac_compiler=$2
28653for ac_option in --version -v -V -qversion; do
28654  { { ac_try="$ac_compiler $ac_option >&5"
28655case "(($ac_try" in
28656  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28657  *) ac_try_echo=$ac_try;;
28658esac
28659eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28660$as_echo "$ac_try_echo"; } >&5
28661  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28662  ac_status=$?
28663  if test -s conftest.err; then
28664    sed '10a\
28665... rest of stderr output deleted ...
28666         10q' conftest.err >conftest.er1
28667    cat conftest.er1 >&5
28668  fi
28669  rm -f conftest.er1 conftest.err
28670  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28671  test $ac_status = 0; }
28672done
28673
28674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28675/* end confdefs.h.  */
28676
28677int
28678main ()
28679{
28680
28681  ;
28682  return 0;
28683}
28684_ACEOF
28685ac_clean_files_save=$ac_clean_files
28686ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28687# Try to create an executable without -o first, disregard a.out.
28688# It will help us diagnose broken compilers, and finding out an intuition
28689# of exeext.
28690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28691$as_echo_n "checking whether the C compiler works... " >&6; }
28692ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28693
28694# The possible output files:
28695ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28696
28697ac_rmfiles=
28698for ac_file in $ac_files
28699do
28700  case $ac_file in
28701    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28702    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28703  esac
28704done
28705rm -f $ac_rmfiles
28706
28707if { { ac_try="$ac_link_default"
28708case "(($ac_try" in
28709  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28710  *) ac_try_echo=$ac_try;;
28711esac
28712eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28713$as_echo "$ac_try_echo"; } >&5
28714  (eval "$ac_link_default") 2>&5
28715  ac_status=$?
28716  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28717  test $ac_status = 0; }; then :
28718  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28719# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28720# in a Makefile.  We should not override ac_cv_exeext if it was cached,
28721# so that the user can short-circuit this test for compilers unknown to
28722# Autoconf.
28723for ac_file in $ac_files ''
28724do
28725  test -f "$ac_file" || continue
28726  case $ac_file in
28727    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28728	;;
28729    [ab].out )
28730	# We found the default executable, but exeext='' is most
28731	# certainly right.
28732	break;;
28733    *.* )
28734	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28735	then :; else
28736	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28737	fi
28738	# We set ac_cv_exeext here because the later test for it is not
28739	# safe: cross compilers may not add the suffix if given an `-o'
28740	# argument, so we may need to know it at that point already.
28741	# Even if this section looks crufty: it has the advantage of
28742	# actually working.
28743	break;;
28744    * )
28745	break;;
28746  esac
28747done
28748test "$ac_cv_exeext" = no && ac_cv_exeext=
28749
28750else
28751  ac_file=''
28752fi
28753if test -z "$ac_file"; then :
28754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28755$as_echo "no" >&6; }
28756$as_echo "$as_me: failed program was:" >&5
28757sed 's/^/| /' conftest.$ac_ext >&5
28758
28759{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28760$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28761as_fn_error 77 "C compiler cannot create executables
28762See \`config.log' for more details" "$LINENO" 5; }
28763else
28764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28765$as_echo "yes" >&6; }
28766fi
28767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28768$as_echo_n "checking for C compiler default output file name... " >&6; }
28769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28770$as_echo "$ac_file" >&6; }
28771ac_exeext=$ac_cv_exeext
28772
28773rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28774ac_clean_files=$ac_clean_files_save
28775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28776$as_echo_n "checking for suffix of executables... " >&6; }
28777if { { ac_try="$ac_link"
28778case "(($ac_try" in
28779  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28780  *) ac_try_echo=$ac_try;;
28781esac
28782eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28783$as_echo "$ac_try_echo"; } >&5
28784  (eval "$ac_link") 2>&5
28785  ac_status=$?
28786  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28787  test $ac_status = 0; }; then :
28788  # If both `conftest.exe' and `conftest' are `present' (well, observable)
28789# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28790# work properly (i.e., refer to `conftest.exe'), while it won't with
28791# `rm'.
28792for ac_file in conftest.exe conftest conftest.*; do
28793  test -f "$ac_file" || continue
28794  case $ac_file in
28795    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28796    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28797	  break;;
28798    * ) break;;
28799  esac
28800done
28801else
28802  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28803$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28804as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28805See \`config.log' for more details" "$LINENO" 5; }
28806fi
28807rm -f conftest conftest$ac_cv_exeext
28808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
28809$as_echo "$ac_cv_exeext" >&6; }
28810
28811rm -f conftest.$ac_ext
28812EXEEXT=$ac_cv_exeext
28813ac_exeext=$EXEEXT
28814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28815/* end confdefs.h.  */
28816#include <stdio.h>
28817int
28818main ()
28819{
28820FILE *f = fopen ("conftest.out", "w");
28821 return ferror (f) || fclose (f) != 0;
28822
28823  ;
28824  return 0;
28825}
28826_ACEOF
28827ac_clean_files="$ac_clean_files conftest.out"
28828# Check that the compiler produces executables we can run.  If not, either
28829# the compiler is broken, or we cross compile.
28830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
28831$as_echo_n "checking whether we are cross compiling... " >&6; }
28832if test "$cross_compiling" != yes; then
28833  { { ac_try="$ac_link"
28834case "(($ac_try" in
28835  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28836  *) ac_try_echo=$ac_try;;
28837esac
28838eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28839$as_echo "$ac_try_echo"; } >&5
28840  (eval "$ac_link") 2>&5
28841  ac_status=$?
28842  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28843  test $ac_status = 0; }
28844  if { ac_try='./conftest$ac_cv_exeext'
28845  { { case "(($ac_try" in
28846  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28847  *) ac_try_echo=$ac_try;;
28848esac
28849eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28850$as_echo "$ac_try_echo"; } >&5
28851  (eval "$ac_try") 2>&5
28852  ac_status=$?
28853  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28854  test $ac_status = 0; }; }; then
28855    cross_compiling=no
28856  else
28857    if test "$cross_compiling" = maybe; then
28858	cross_compiling=yes
28859    else
28860	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28861$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28862as_fn_error $? "cannot run C compiled programs.
28863If you meant to cross compile, use \`--host'.
28864See \`config.log' for more details" "$LINENO" 5; }
28865    fi
28866  fi
28867fi
28868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
28869$as_echo "$cross_compiling" >&6; }
28870
28871rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
28872ac_clean_files=$ac_clean_files_save
28873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
28874$as_echo_n "checking for suffix of object files... " >&6; }
28875if ${ac_cv_objext+:} false; then :
28876  $as_echo_n "(cached) " >&6
28877else
28878  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28879/* end confdefs.h.  */
28880
28881int
28882main ()
28883{
28884
28885  ;
28886  return 0;
28887}
28888_ACEOF
28889rm -f conftest.o conftest.obj
28890if { { ac_try="$ac_compile"
28891case "(($ac_try" in
28892  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28893  *) ac_try_echo=$ac_try;;
28894esac
28895eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28896$as_echo "$ac_try_echo"; } >&5
28897  (eval "$ac_compile") 2>&5
28898  ac_status=$?
28899  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28900  test $ac_status = 0; }; then :
28901  for ac_file in conftest.o conftest.obj conftest.*; do
28902  test -f "$ac_file" || continue;
28903  case $ac_file in
28904    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
28905    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
28906       break;;
28907  esac
28908done
28909else
28910  $as_echo "$as_me: failed program was:" >&5
28911sed 's/^/| /' conftest.$ac_ext >&5
28912
28913{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28914$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28915as_fn_error $? "cannot compute suffix of object files: cannot compile
28916See \`config.log' for more details" "$LINENO" 5; }
28917fi
28918rm -f conftest.$ac_cv_objext conftest.$ac_ext
28919fi
28920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
28921$as_echo "$ac_cv_objext" >&6; }
28922OBJEXT=$ac_cv_objext
28923ac_objext=$OBJEXT
28924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
28925$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
28926if ${ac_cv_c_compiler_gnu+:} false; then :
28927  $as_echo_n "(cached) " >&6
28928else
28929  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28930/* end confdefs.h.  */
28931
28932int
28933main ()
28934{
28935#ifndef __GNUC__
28936       choke me
28937#endif
28938
28939  ;
28940  return 0;
28941}
28942_ACEOF
28943if ac_fn_c_try_compile "$LINENO"; then :
28944  ac_compiler_gnu=yes
28945else
28946  ac_compiler_gnu=no
28947fi
28948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28949ac_cv_c_compiler_gnu=$ac_compiler_gnu
28950
28951fi
28952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
28953$as_echo "$ac_cv_c_compiler_gnu" >&6; }
28954if test $ac_compiler_gnu = yes; then
28955  GCC=yes
28956else
28957  GCC=
28958fi
28959ac_test_CFLAGS=${CFLAGS+set}
28960ac_save_CFLAGS=$CFLAGS
28961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
28962$as_echo_n "checking whether $CC accepts -g... " >&6; }
28963if ${ac_cv_prog_cc_g+:} false; then :
28964  $as_echo_n "(cached) " >&6
28965else
28966  ac_save_c_werror_flag=$ac_c_werror_flag
28967   ac_c_werror_flag=yes
28968   ac_cv_prog_cc_g=no
28969   CFLAGS="-g"
28970   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28971/* end confdefs.h.  */
28972
28973int
28974main ()
28975{
28976
28977  ;
28978  return 0;
28979}
28980_ACEOF
28981if ac_fn_c_try_compile "$LINENO"; then :
28982  ac_cv_prog_cc_g=yes
28983else
28984  CFLAGS=""
28985      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28986/* end confdefs.h.  */
28987
28988int
28989main ()
28990{
28991
28992  ;
28993  return 0;
28994}
28995_ACEOF
28996if ac_fn_c_try_compile "$LINENO"; then :
28997
28998else
28999  ac_c_werror_flag=$ac_save_c_werror_flag
29000	 CFLAGS="-g"
29001	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29002/* end confdefs.h.  */
29003
29004int
29005main ()
29006{
29007
29008  ;
29009  return 0;
29010}
29011_ACEOF
29012if ac_fn_c_try_compile "$LINENO"; then :
29013  ac_cv_prog_cc_g=yes
29014fi
29015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29016fi
29017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29018fi
29019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29020   ac_c_werror_flag=$ac_save_c_werror_flag
29021fi
29022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29023$as_echo "$ac_cv_prog_cc_g" >&6; }
29024if test "$ac_test_CFLAGS" = set; then
29025  CFLAGS=$ac_save_CFLAGS
29026elif test $ac_cv_prog_cc_g = yes; then
29027  if test "$GCC" = yes; then
29028    CFLAGS="-g -O2"
29029  else
29030    CFLAGS="-g"
29031  fi
29032else
29033  if test "$GCC" = yes; then
29034    CFLAGS="-O2"
29035  else
29036    CFLAGS=
29037  fi
29038fi
29039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29040$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29041if ${ac_cv_prog_cc_c89+:} false; then :
29042  $as_echo_n "(cached) " >&6
29043else
29044  ac_cv_prog_cc_c89=no
29045ac_save_CC=$CC
29046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29047/* end confdefs.h.  */
29048#include <stdarg.h>
29049#include <stdio.h>
29050struct stat;
29051/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29052struct buf { int x; };
29053FILE * (*rcsopen) (struct buf *, struct stat *, int);
29054static char *e (p, i)
29055     char **p;
29056     int i;
29057{
29058  return p[i];
29059}
29060static char *f (char * (*g) (char **, int), char **p, ...)
29061{
29062  char *s;
29063  va_list v;
29064  va_start (v,p);
29065  s = g (p, va_arg (v,int));
29066  va_end (v);
29067  return s;
29068}
29069
29070/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29071   function prototypes and stuff, but not '\xHH' hex character constants.
29072   These don't provoke an error unfortunately, instead are silently treated
29073   as 'x'.  The following induces an error, until -std is added to get
29074   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29075   array size at least.  It's necessary to write '\x00'==0 to get something
29076   that's true only with -std.  */
29077int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29078
29079/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29080   inside strings and character constants.  */
29081#define FOO(x) 'x'
29082int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29083
29084int test (int i, double x);
29085struct s1 {int (*f) (int a);};
29086struct s2 {int (*f) (double a);};
29087int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29088int argc;
29089char **argv;
29090int
29091main ()
29092{
29093return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29094  ;
29095  return 0;
29096}
29097_ACEOF
29098for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29099	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29100do
29101  CC="$ac_save_CC $ac_arg"
29102  if ac_fn_c_try_compile "$LINENO"; then :
29103  ac_cv_prog_cc_c89=$ac_arg
29104fi
29105rm -f core conftest.err conftest.$ac_objext
29106  test "x$ac_cv_prog_cc_c89" != "xno" && break
29107done
29108rm -f conftest.$ac_ext
29109CC=$ac_save_CC
29110
29111fi
29112# AC_CACHE_VAL
29113case "x$ac_cv_prog_cc_c89" in
29114  x)
29115    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29116$as_echo "none needed" >&6; } ;;
29117  xno)
29118    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29119$as_echo "unsupported" >&6; } ;;
29120  *)
29121    CC="$CC $ac_cv_prog_cc_c89"
29122    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29123$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29124esac
29125if test "x$ac_cv_prog_cc_c89" != xno; then :
29126
29127fi
29128
29129ac_ext=cpp
29130ac_cpp='$CXXCPP $CPPFLAGS'
29131ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29132ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29133ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29134
29135
29136
29137  COMPILER_NAME=C++
29138  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29139
29140  if test "x$CXX" != x; then
29141    # User has supplied compiler name already, always let that override.
29142    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29143$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29144    if test "x`basename $CXX`" = "x$CXX"; then
29145      # A command without a complete path is provided, search $PATH.
29146
29147      for ac_prog in $CXX
29148do
29149  # Extract the first word of "$ac_prog", so it can be a program name with args.
29150set dummy $ac_prog; ac_word=$2
29151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29152$as_echo_n "checking for $ac_word... " >&6; }
29153if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29154  $as_echo_n "(cached) " >&6
29155else
29156  case $POTENTIAL_CXX in
29157  [\\/]* | ?:[\\/]*)
29158  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29159  ;;
29160  *)
29161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29162for as_dir in $PATH
29163do
29164  IFS=$as_save_IFS
29165  test -z "$as_dir" && as_dir=.
29166    for ac_exec_ext in '' $ac_executable_extensions; do
29167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29168    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29170    break 2
29171  fi
29172done
29173  done
29174IFS=$as_save_IFS
29175
29176  ;;
29177esac
29178fi
29179POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29180if test -n "$POTENTIAL_CXX"; then
29181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29182$as_echo "$POTENTIAL_CXX" >&6; }
29183else
29184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29185$as_echo "no" >&6; }
29186fi
29187
29188
29189  test -n "$POTENTIAL_CXX" && break
29190done
29191
29192      if test "x$POTENTIAL_CXX" != x; then
29193        CXX=$POTENTIAL_CXX
29194      else
29195        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29196      fi
29197    else
29198      # Otherwise it might already be a complete path
29199      if test ! -x "$CXX"; then
29200        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29201      fi
29202    fi
29203  else
29204    # No user supplied value. Locate compiler ourselves.
29205
29206    # If we are cross compiling, assume cross compilation tools follows the
29207    # cross compilation standard where they are prefixed with the autoconf
29208    # standard name for the target. For example the binary
29209    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29210    # If we are not cross compiling, then the default compiler name will be
29211    # used.
29212
29213    CXX=
29214    # If TOOLS_DIR is set, check for all compiler names in there first
29215    # before checking the rest of the PATH.
29216    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29217    # step, this should not be necessary.
29218    if test -n "$TOOLS_DIR"; then
29219      PATH_save="$PATH"
29220      PATH="$TOOLS_DIR"
29221      for ac_prog in $SEARCH_LIST
29222do
29223  # Extract the first word of "$ac_prog", so it can be a program name with args.
29224set dummy $ac_prog; ac_word=$2
29225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29226$as_echo_n "checking for $ac_word... " >&6; }
29227if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
29228  $as_echo_n "(cached) " >&6
29229else
29230  case $TOOLS_DIR_CXX in
29231  [\\/]* | ?:[\\/]*)
29232  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
29233  ;;
29234  *)
29235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29236for as_dir in $PATH
29237do
29238  IFS=$as_save_IFS
29239  test -z "$as_dir" && as_dir=.
29240    for ac_exec_ext in '' $ac_executable_extensions; do
29241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29242    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
29243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29244    break 2
29245  fi
29246done
29247  done
29248IFS=$as_save_IFS
29249
29250  ;;
29251esac
29252fi
29253TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
29254if test -n "$TOOLS_DIR_CXX"; then
29255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
29256$as_echo "$TOOLS_DIR_CXX" >&6; }
29257else
29258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29259$as_echo "no" >&6; }
29260fi
29261
29262
29263  test -n "$TOOLS_DIR_CXX" && break
29264done
29265
29266      CXX=$TOOLS_DIR_CXX
29267      PATH="$PATH_save"
29268    fi
29269
29270    # AC_PATH_PROGS can't be run multiple times with the same variable,
29271    # so create a new name for this run.
29272    if test "x$CXX" = x; then
29273      for ac_prog in $SEARCH_LIST
29274do
29275  # Extract the first word of "$ac_prog", so it can be a program name with args.
29276set dummy $ac_prog; ac_word=$2
29277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29278$as_echo_n "checking for $ac_word... " >&6; }
29279if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29280  $as_echo_n "(cached) " >&6
29281else
29282  case $POTENTIAL_CXX in
29283  [\\/]* | ?:[\\/]*)
29284  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29285  ;;
29286  *)
29287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29288for as_dir in $PATH
29289do
29290  IFS=$as_save_IFS
29291  test -z "$as_dir" && as_dir=.
29292    for ac_exec_ext in '' $ac_executable_extensions; do
29293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29294    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29296    break 2
29297  fi
29298done
29299  done
29300IFS=$as_save_IFS
29301
29302  ;;
29303esac
29304fi
29305POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29306if test -n "$POTENTIAL_CXX"; then
29307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29308$as_echo "$POTENTIAL_CXX" >&6; }
29309else
29310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29311$as_echo "no" >&6; }
29312fi
29313
29314
29315  test -n "$POTENTIAL_CXX" && break
29316done
29317
29318      CXX=$POTENTIAL_CXX
29319    fi
29320
29321    if test "x$CXX" = x; then
29322
29323  # Print a helpful message on how to acquire the necessary build dependency.
29324  # devkit is the help tag: freetype, cups, pulse, alsa etc
29325  MISSING_DEPENDENCY=devkit
29326
29327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29328    cygwin_help $MISSING_DEPENDENCY
29329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29330    msys_help $MISSING_DEPENDENCY
29331  else
29332    PKGHANDLER_COMMAND=
29333
29334    case $PKGHANDLER in
29335      apt-get)
29336        apt_help     $MISSING_DEPENDENCY ;;
29337      yum)
29338        yum_help     $MISSING_DEPENDENCY ;;
29339      port)
29340        port_help    $MISSING_DEPENDENCY ;;
29341      pkgutil)
29342        pkgutil_help $MISSING_DEPENDENCY ;;
29343      pkgadd)
29344        pkgadd_help  $MISSING_DEPENDENCY ;;
29345    esac
29346
29347    if test "x$PKGHANDLER_COMMAND" != x; then
29348      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29349    fi
29350  fi
29351
29352      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29353    fi
29354  fi
29355
29356  # Now we have a compiler binary in CXX. Make sure it's okay.
29357
29358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29359
29360  # First separate the path from the arguments. This will split at the first
29361  # space.
29362  complete="$CXX"
29363  path="${complete%% *}"
29364  tmp="$complete EOL"
29365  arguments="${tmp#* }"
29366
29367  # Input might be given as Windows format, start by converting to
29368  # unix format.
29369  new_path=`$CYGPATH -u "$path"`
29370
29371  # Now try to locate executable using which
29372  new_path=`$WHICH "$new_path" 2> /dev/null`
29373  # bat and cmd files are not always considered executable in cygwin causing which
29374  # to not find them
29375  if test "x$new_path" = x \
29376      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29377      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29378    new_path=`$CYGPATH -u "$path"`
29379  fi
29380  if test "x$new_path" = x; then
29381    # Oops. Which didn't find the executable.
29382    # The splitting of arguments from the executable at a space might have been incorrect,
29383    # since paths with space are more likely in Windows. Give it another try with the whole
29384    # argument.
29385    path="$complete"
29386    arguments="EOL"
29387    new_path=`$CYGPATH -u "$path"`
29388    new_path=`$WHICH "$new_path" 2> /dev/null`
29389    # bat and cmd files are not always considered executable in cygwin causing which
29390    # to not find them
29391    if test "x$new_path" = x \
29392        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29393        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29394      new_path=`$CYGPATH -u "$path"`
29395    fi
29396    if test "x$new_path" = x; then
29397      # It's still not found. Now this is an unrecoverable error.
29398      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29399$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29400      has_space=`$ECHO "$complete" | $GREP " "`
29401      if test "x$has_space" != x; then
29402        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29403$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29404      fi
29405      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29406    fi
29407  fi
29408
29409  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29410  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29411  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29412  # "foo.exe" is OK but "foo" is an error.
29413  #
29414  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29415  # It is also a way to make sure we got the proper file name for the real test later on.
29416  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29417  if test "x$test_shortpath" = x; then
29418    # Short path failed, file does not exist as specified.
29419    # Try adding .exe or .cmd
29420    if test -f "${new_path}.exe"; then
29421      input_to_shortpath="${new_path}.exe"
29422    elif test -f "${new_path}.cmd"; then
29423      input_to_shortpath="${new_path}.cmd"
29424    else
29425      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29426$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29427      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29428$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29429      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29430    fi
29431  else
29432    input_to_shortpath="$new_path"
29433  fi
29434
29435  # Call helper function which possibly converts this using DOS-style short mode.
29436  # If so, the updated path is stored in $new_path.
29437  new_path="$input_to_shortpath"
29438
29439  input_path="$input_to_shortpath"
29440  # Check if we need to convert this using DOS-style short mode. If the path
29441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29442  # take no chances and rewrite it.
29443  # Note: m4 eats our [], so we need to use [ and ] instead.
29444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29445  if test "x$has_forbidden_chars" != x; then
29446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29447    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29448    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29449    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29450      # Going to short mode and back again did indeed matter. Since short mode is
29451      # case insensitive, let's make it lowercase to improve readability.
29452      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29453      # Now convert it back to Unix-stile (cygpath)
29454      input_path=`$CYGPATH -u "$shortmode_path"`
29455      new_path="$input_path"
29456    fi
29457  fi
29458
29459  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29460  if test "x$test_cygdrive_prefix" = x; then
29461    # As a simple fix, exclude /usr/bin since it's not a real path.
29462    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29463      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29464      # a path prefixed by /cygdrive for fixpath to work.
29465      new_path="$CYGWIN_ROOT_PATH$input_path"
29466    fi
29467  fi
29468
29469  # remove trailing .exe if any
29470  new_path="${new_path/%.exe/}"
29471
29472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29473
29474  # First separate the path from the arguments. This will split at the first
29475  # space.
29476  complete="$CXX"
29477  path="${complete%% *}"
29478  tmp="$complete EOL"
29479  arguments="${tmp#* }"
29480
29481  # Input might be given as Windows format, start by converting to
29482  # unix format.
29483  new_path="$path"
29484
29485  windows_path="$new_path"
29486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29487    unix_path=`$CYGPATH -u "$windows_path"`
29488    new_path="$unix_path"
29489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29491    new_path="$unix_path"
29492  fi
29493
29494
29495  # Now try to locate executable using which
29496  new_path=`$WHICH "$new_path" 2> /dev/null`
29497
29498  if test "x$new_path" = x; then
29499    # Oops. Which didn't find the executable.
29500    # The splitting of arguments from the executable at a space might have been incorrect,
29501    # since paths with space are more likely in Windows. Give it another try with the whole
29502    # argument.
29503    path="$complete"
29504    arguments="EOL"
29505    new_path="$path"
29506
29507  windows_path="$new_path"
29508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29509    unix_path=`$CYGPATH -u "$windows_path"`
29510    new_path="$unix_path"
29511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29513    new_path="$unix_path"
29514  fi
29515
29516
29517    new_path=`$WHICH "$new_path" 2> /dev/null`
29518
29519    if test "x$new_path" = x; then
29520      # It's still not found. Now this is an unrecoverable error.
29521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29522$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29523      has_space=`$ECHO "$complete" | $GREP " "`
29524      if test "x$has_space" != x; then
29525        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29526$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29527      fi
29528      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29529    fi
29530  fi
29531
29532  # Now new_path has a complete unix path to the binary
29533  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29534    # Keep paths in /bin as-is, but remove trailing .exe if any
29535    new_path="${new_path/%.exe/}"
29536    # Do not save /bin paths to all_fixpath_prefixes!
29537  else
29538    # Not in mixed or Windows style, start by that.
29539    new_path=`cmd //c echo $new_path`
29540
29541  input_path="$new_path"
29542  # Check if we need to convert this using DOS-style short mode. If the path
29543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29544  # take no chances and rewrite it.
29545  # Note: m4 eats our [], so we need to use [ and ] instead.
29546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29547  if test "x$has_forbidden_chars" != x; then
29548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29549    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29550  fi
29551
29552    # Output is in $new_path
29553
29554  windows_path="$new_path"
29555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29556    unix_path=`$CYGPATH -u "$windows_path"`
29557    new_path="$unix_path"
29558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29560    new_path="$unix_path"
29561  fi
29562
29563    # remove trailing .exe if any
29564    new_path="${new_path/%.exe/}"
29565
29566    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29567    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29568  fi
29569
29570  else
29571    # We're on a posix platform. Hooray! :)
29572    # First separate the path from the arguments. This will split at the first
29573    # space.
29574    complete="$CXX"
29575    path="${complete%% *}"
29576    tmp="$complete EOL"
29577    arguments="${tmp#* }"
29578
29579    # Cannot rely on the command "which" here since it doesn't always work.
29580    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29581    if test -z "$is_absolute_path"; then
29582      # Path to executable is not absolute. Find it.
29583      IFS_save="$IFS"
29584      IFS=:
29585      for p in $PATH; do
29586        if test -f "$p/$path" && test -x "$p/$path"; then
29587          new_path="$p/$path"
29588          break
29589        fi
29590      done
29591      IFS="$IFS_save"
29592    else
29593      # This is an absolute path, we can use it without further modifications.
29594      new_path="$path"
29595    fi
29596
29597    if test "x$new_path" = x; then
29598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29599$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29600      has_space=`$ECHO "$complete" | $GREP " "`
29601      if test "x$has_space" != x; then
29602        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29603$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29604      fi
29605      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29606    fi
29607  fi
29608
29609  # Now join together the path and the arguments once again
29610  if test "x$arguments" != xEOL; then
29611    new_complete="$new_path ${arguments% *}"
29612  else
29613    new_complete="$new_path"
29614  fi
29615
29616  if test "x$complete" != "x$new_complete"; then
29617    CXX="$new_complete"
29618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29619$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29620  fi
29621
29622  TEST_COMPILER="$CXX"
29623  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29624  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29625  if test "x$OPENJDK_BUILD_OS" != xaix; then
29626    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29627    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29628$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29629
29630  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29631    # Follow a chain of symbolic links. Use readlink
29632    # where it exists, else fall back to horribly
29633    # complicated shell code.
29634    if test "x$READLINK_TESTED" != yes; then
29635      # On MacOSX there is a readlink tool with a different
29636      # purpose than the GNU readlink tool. Check the found readlink.
29637      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29638      if test "x$ISGNU" = x; then
29639        # A readlink that we do not know how to use.
29640        # Are there other non-GNU readlinks out there?
29641        READLINK_TESTED=yes
29642        READLINK=
29643      fi
29644    fi
29645
29646    if test "x$READLINK" != x; then
29647      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29648    else
29649      # Save the current directory for restoring afterwards
29650      STARTDIR=$PWD
29651      COUNTER=0
29652      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29653      sym_link_file=`$BASENAME $TEST_COMPILER`
29654      cd $sym_link_dir
29655      # Use -P flag to resolve symlinks in directories.
29656      cd `$THEPWDCMD -P`
29657      sym_link_dir=`$THEPWDCMD -P`
29658      # Resolve file symlinks
29659      while test $COUNTER -lt 20; do
29660        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29661        if test "x$ISLINK" == x; then
29662          # This is not a symbolic link! We are done!
29663          break
29664        fi
29665        # Again resolve directory symlinks since the target of the just found
29666        # link could be in a different directory
29667        cd `$DIRNAME $ISLINK`
29668        sym_link_dir=`$THEPWDCMD -P`
29669        sym_link_file=`$BASENAME $ISLINK`
29670        let COUNTER=COUNTER+1
29671      done
29672      cd $STARTDIR
29673      TEST_COMPILER=$sym_link_dir/$sym_link_file
29674    fi
29675  fi
29676
29677    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29678$as_echo "$TEST_COMPILER" >&6; }
29679  fi
29680  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29681$as_echo_n "checking if CXX is disguised ccache... " >&6; }
29682
29683  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29684  if test "x$COMPILER_BASENAME" = "xccache"; then
29685    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29686$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29687    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29688    # We want to control ccache invocation ourselves, so ignore this cc and try
29689    # searching again.
29690
29691    # Remove the path to the fake ccache cc from the PATH
29692    RETRY_COMPILER_SAVED_PATH="$PATH"
29693    COMPILER_DIRNAME=`$DIRNAME $CXX`
29694    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29695
29696    # Try again looking for our compiler
29697    if test -n "$ac_tool_prefix"; then
29698  for ac_prog in $TOOLCHAIN_CXX_BINARY
29699  do
29700    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29701set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29703$as_echo_n "checking for $ac_word... " >&6; }
29704if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29705  $as_echo_n "(cached) " >&6
29706else
29707  if test -n "$PROPER_COMPILER_CXX"; then
29708  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29709else
29710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29711for as_dir in $PATH
29712do
29713  IFS=$as_save_IFS
29714  test -z "$as_dir" && as_dir=.
29715    for ac_exec_ext in '' $ac_executable_extensions; do
29716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29717    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29719    break 2
29720  fi
29721done
29722  done
29723IFS=$as_save_IFS
29724
29725fi
29726fi
29727PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29728if test -n "$PROPER_COMPILER_CXX"; then
29729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29730$as_echo "$PROPER_COMPILER_CXX" >&6; }
29731else
29732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29733$as_echo "no" >&6; }
29734fi
29735
29736
29737    test -n "$PROPER_COMPILER_CXX" && break
29738  done
29739fi
29740if test -z "$PROPER_COMPILER_CXX"; then
29741  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29742  for ac_prog in $TOOLCHAIN_CXX_BINARY
29743do
29744  # Extract the first word of "$ac_prog", so it can be a program name with args.
29745set dummy $ac_prog; ac_word=$2
29746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29747$as_echo_n "checking for $ac_word... " >&6; }
29748if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29749  $as_echo_n "(cached) " >&6
29750else
29751  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29752  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29753else
29754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29755for as_dir in $PATH
29756do
29757  IFS=$as_save_IFS
29758  test -z "$as_dir" && as_dir=.
29759    for ac_exec_ext in '' $ac_executable_extensions; do
29760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29761    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29763    break 2
29764  fi
29765done
29766  done
29767IFS=$as_save_IFS
29768
29769fi
29770fi
29771ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29772if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29774$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29775else
29776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29777$as_echo "no" >&6; }
29778fi
29779
29780
29781  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29782done
29783
29784  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29785    PROPER_COMPILER_CXX=""
29786  else
29787    case $cross_compiling:$ac_tool_warned in
29788yes:)
29789{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29790$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29791ac_tool_warned=yes ;;
29792esac
29793    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
29794  fi
29795fi
29796
29797
29798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29799
29800  # First separate the path from the arguments. This will split at the first
29801  # space.
29802  complete="$PROPER_COMPILER_CXX"
29803  path="${complete%% *}"
29804  tmp="$complete EOL"
29805  arguments="${tmp#* }"
29806
29807  # Input might be given as Windows format, start by converting to
29808  # unix format.
29809  new_path=`$CYGPATH -u "$path"`
29810
29811  # Now try to locate executable using which
29812  new_path=`$WHICH "$new_path" 2> /dev/null`
29813  # bat and cmd files are not always considered executable in cygwin causing which
29814  # to not find them
29815  if test "x$new_path" = x \
29816      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29817      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29818    new_path=`$CYGPATH -u "$path"`
29819  fi
29820  if test "x$new_path" = x; then
29821    # Oops. Which didn't find the executable.
29822    # The splitting of arguments from the executable at a space might have been incorrect,
29823    # since paths with space are more likely in Windows. Give it another try with the whole
29824    # argument.
29825    path="$complete"
29826    arguments="EOL"
29827    new_path=`$CYGPATH -u "$path"`
29828    new_path=`$WHICH "$new_path" 2> /dev/null`
29829    # bat and cmd files are not always considered executable in cygwin causing which
29830    # to not find them
29831    if test "x$new_path" = x \
29832        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29833        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29834      new_path=`$CYGPATH -u "$path"`
29835    fi
29836    if test "x$new_path" = x; then
29837      # It's still not found. Now this is an unrecoverable error.
29838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29839$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29840      has_space=`$ECHO "$complete" | $GREP " "`
29841      if test "x$has_space" != x; then
29842        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29843$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29844      fi
29845      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29846    fi
29847  fi
29848
29849  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29850  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29851  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29852  # "foo.exe" is OK but "foo" is an error.
29853  #
29854  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29855  # It is also a way to make sure we got the proper file name for the real test later on.
29856  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29857  if test "x$test_shortpath" = x; then
29858    # Short path failed, file does not exist as specified.
29859    # Try adding .exe or .cmd
29860    if test -f "${new_path}.exe"; then
29861      input_to_shortpath="${new_path}.exe"
29862    elif test -f "${new_path}.cmd"; then
29863      input_to_shortpath="${new_path}.cmd"
29864    else
29865      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
29866$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
29867      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29868$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29869      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29870    fi
29871  else
29872    input_to_shortpath="$new_path"
29873  fi
29874
29875  # Call helper function which possibly converts this using DOS-style short mode.
29876  # If so, the updated path is stored in $new_path.
29877  new_path="$input_to_shortpath"
29878
29879  input_path="$input_to_shortpath"
29880  # Check if we need to convert this using DOS-style short mode. If the path
29881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29882  # take no chances and rewrite it.
29883  # Note: m4 eats our [], so we need to use [ and ] instead.
29884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29885  if test "x$has_forbidden_chars" != x; then
29886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29887    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29888    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29889    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29890      # Going to short mode and back again did indeed matter. Since short mode is
29891      # case insensitive, let's make it lowercase to improve readability.
29892      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29893      # Now convert it back to Unix-stile (cygpath)
29894      input_path=`$CYGPATH -u "$shortmode_path"`
29895      new_path="$input_path"
29896    fi
29897  fi
29898
29899  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29900  if test "x$test_cygdrive_prefix" = x; then
29901    # As a simple fix, exclude /usr/bin since it's not a real path.
29902    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29903      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29904      # a path prefixed by /cygdrive for fixpath to work.
29905      new_path="$CYGWIN_ROOT_PATH$input_path"
29906    fi
29907  fi
29908
29909  # remove trailing .exe if any
29910  new_path="${new_path/%.exe/}"
29911
29912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29913
29914  # First separate the path from the arguments. This will split at the first
29915  # space.
29916  complete="$PROPER_COMPILER_CXX"
29917  path="${complete%% *}"
29918  tmp="$complete EOL"
29919  arguments="${tmp#* }"
29920
29921  # Input might be given as Windows format, start by converting to
29922  # unix format.
29923  new_path="$path"
29924
29925  windows_path="$new_path"
29926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29927    unix_path=`$CYGPATH -u "$windows_path"`
29928    new_path="$unix_path"
29929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29931    new_path="$unix_path"
29932  fi
29933
29934
29935  # Now try to locate executable using which
29936  new_path=`$WHICH "$new_path" 2> /dev/null`
29937
29938  if test "x$new_path" = x; then
29939    # Oops. Which didn't find the executable.
29940    # The splitting of arguments from the executable at a space might have been incorrect,
29941    # since paths with space are more likely in Windows. Give it another try with the whole
29942    # argument.
29943    path="$complete"
29944    arguments="EOL"
29945    new_path="$path"
29946
29947  windows_path="$new_path"
29948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29949    unix_path=`$CYGPATH -u "$windows_path"`
29950    new_path="$unix_path"
29951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29953    new_path="$unix_path"
29954  fi
29955
29956
29957    new_path=`$WHICH "$new_path" 2> /dev/null`
29958
29959    if test "x$new_path" = x; then
29960      # It's still not found. Now this is an unrecoverable error.
29961      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29962$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29963      has_space=`$ECHO "$complete" | $GREP " "`
29964      if test "x$has_space" != x; then
29965        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29966$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29967      fi
29968      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29969    fi
29970  fi
29971
29972  # Now new_path has a complete unix path to the binary
29973  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29974    # Keep paths in /bin as-is, but remove trailing .exe if any
29975    new_path="${new_path/%.exe/}"
29976    # Do not save /bin paths to all_fixpath_prefixes!
29977  else
29978    # Not in mixed or Windows style, start by that.
29979    new_path=`cmd //c echo $new_path`
29980
29981  input_path="$new_path"
29982  # Check if we need to convert this using DOS-style short mode. If the path
29983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29984  # take no chances and rewrite it.
29985  # Note: m4 eats our [], so we need to use [ and ] instead.
29986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29987  if test "x$has_forbidden_chars" != x; then
29988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29989    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29990  fi
29991
29992    # Output is in $new_path
29993
29994  windows_path="$new_path"
29995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29996    unix_path=`$CYGPATH -u "$windows_path"`
29997    new_path="$unix_path"
29998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30000    new_path="$unix_path"
30001  fi
30002
30003    # remove trailing .exe if any
30004    new_path="${new_path/%.exe/}"
30005
30006    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30007    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30008  fi
30009
30010  else
30011    # We're on a posix platform. Hooray! :)
30012    # First separate the path from the arguments. This will split at the first
30013    # space.
30014    complete="$PROPER_COMPILER_CXX"
30015    path="${complete%% *}"
30016    tmp="$complete EOL"
30017    arguments="${tmp#* }"
30018
30019    # Cannot rely on the command "which" here since it doesn't always work.
30020    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30021    if test -z "$is_absolute_path"; then
30022      # Path to executable is not absolute. Find it.
30023      IFS_save="$IFS"
30024      IFS=:
30025      for p in $PATH; do
30026        if test -f "$p/$path" && test -x "$p/$path"; then
30027          new_path="$p/$path"
30028          break
30029        fi
30030      done
30031      IFS="$IFS_save"
30032    else
30033      # This is an absolute path, we can use it without further modifications.
30034      new_path="$path"
30035    fi
30036
30037    if test "x$new_path" = x; then
30038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30039$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30040      has_space=`$ECHO "$complete" | $GREP " "`
30041      if test "x$has_space" != x; then
30042        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30043$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30044      fi
30045      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30046    fi
30047  fi
30048
30049  # Now join together the path and the arguments once again
30050  if test "x$arguments" != xEOL; then
30051    new_complete="$new_path ${arguments% *}"
30052  else
30053    new_complete="$new_path"
30054  fi
30055
30056  if test "x$complete" != "x$new_complete"; then
30057    PROPER_COMPILER_CXX="$new_complete"
30058    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30059$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30060  fi
30061
30062    PATH="$RETRY_COMPILER_SAVED_PATH"
30063
30064    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30065$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30066
30067  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30068    # Follow a chain of symbolic links. Use readlink
30069    # where it exists, else fall back to horribly
30070    # complicated shell code.
30071    if test "x$READLINK_TESTED" != yes; then
30072      # On MacOSX there is a readlink tool with a different
30073      # purpose than the GNU readlink tool. Check the found readlink.
30074      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30075      if test "x$ISGNU" = x; then
30076        # A readlink that we do not know how to use.
30077        # Are there other non-GNU readlinks out there?
30078        READLINK_TESTED=yes
30079        READLINK=
30080      fi
30081    fi
30082
30083    if test "x$READLINK" != x; then
30084      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30085    else
30086      # Save the current directory for restoring afterwards
30087      STARTDIR=$PWD
30088      COUNTER=0
30089      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30090      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30091      cd $sym_link_dir
30092      # Use -P flag to resolve symlinks in directories.
30093      cd `$THEPWDCMD -P`
30094      sym_link_dir=`$THEPWDCMD -P`
30095      # Resolve file symlinks
30096      while test $COUNTER -lt 20; do
30097        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30098        if test "x$ISLINK" == x; then
30099          # This is not a symbolic link! We are done!
30100          break
30101        fi
30102        # Again resolve directory symlinks since the target of the just found
30103        # link could be in a different directory
30104        cd `$DIRNAME $ISLINK`
30105        sym_link_dir=`$THEPWDCMD -P`
30106        sym_link_file=`$BASENAME $ISLINK`
30107        let COUNTER=COUNTER+1
30108      done
30109      cd $STARTDIR
30110      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30111    fi
30112  fi
30113
30114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30115$as_echo "$PROPER_COMPILER_CXX" >&6; }
30116    CXX="$PROPER_COMPILER_CXX"
30117  else
30118    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30119$as_echo "no, keeping CXX" >&6; }
30120  fi
30121
30122
30123  COMPILER=$CXX
30124  COMPILER_NAME=$COMPILER_NAME
30125
30126  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30127    # cc -V output typically looks like
30128    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30129    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30130    # Check that this is likely to be the Solaris Studio cc.
30131    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30132    if test $? -ne 0; then
30133      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30134      { $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
30135$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30136      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30137$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30138      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30139$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30140      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30141    fi
30142    # Remove usage instructions (if present), and
30143    # collapse compiler output into a single line
30144    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30145        $SED -e 's/ *[Uu]sage:.*//'`
30146    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30147        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30148  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30149    # xlc -qversion output typically looks like
30150    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30151    #     Version: 11.01.0000.0015
30152    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30153    # Check that this is likely to be the IBM XL C compiler.
30154    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30155    if test $? -ne 0; then
30156      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30157      { $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
30158$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30159      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30160$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30161      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30162$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30163      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30164    fi
30165    # Collapse compiler output into a single line
30166    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30167    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30168        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30169  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30170    # There is no specific version flag, but all output starts with a version string.
30171    # First line typically looks something like:
30172    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30173    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30174    # Check that this is likely to be Microsoft CL.EXE.
30175    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30176    if test $? -ne 0; then
30177      { $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
30178$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30179      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30180$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30181      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30182    fi
30183    # Collapse compiler output into a single line
30184    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30185    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30186        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30187  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30188    # gcc --version output typically looks like
30189    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30190    #     Copyright (C) 2013 Free Software Foundation, Inc.
30191    #     This is free software; see the source for copying conditions.  There is NO
30192    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30193    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30194    # Check that this is likely to be GCC.
30195    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30196    if test $? -ne 0; then
30197      { $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
30198$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30199      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30200$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30201      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30202    fi
30203    # Remove Copyright and legalese from version string, and
30204    # collapse into a single line
30205    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30206        $SED -e 's/ *Copyright .*//'`
30207    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30208        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30209  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30210    # clang --version output typically looks like
30211    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30212    #    clang version 3.3 (tags/RELEASE_33/final)
30213    # or
30214    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30215    #    Target: x86_64-pc-linux-gnu
30216    #    Thread model: posix
30217    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30218    # Check that this is likely to be clang
30219    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30220    if test $? -ne 0; then
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 --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30224$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30225      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30226    fi
30227    # Collapse compiler output into a single line
30228    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30229    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30230        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30231  else
30232      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30233  fi
30234  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30235  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30236  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30237  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30238
30239  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30240$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30241
30242
30243  # Now that we have resolved CXX ourself, let autoconf have its go at it
30244  ac_ext=cpp
30245ac_cpp='$CXXCPP $CPPFLAGS'
30246ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30247ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30248ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30249if test -z "$CXX"; then
30250  if test -n "$CCC"; then
30251    CXX=$CCC
30252  else
30253    if test -n "$ac_tool_prefix"; then
30254  for ac_prog in $CXX
30255  do
30256    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30257set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30259$as_echo_n "checking for $ac_word... " >&6; }
30260if ${ac_cv_prog_CXX+:} false; then :
30261  $as_echo_n "(cached) " >&6
30262else
30263  if test -n "$CXX"; then
30264  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30265else
30266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30267for as_dir in $PATH
30268do
30269  IFS=$as_save_IFS
30270  test -z "$as_dir" && as_dir=.
30271    for ac_exec_ext in '' $ac_executable_extensions; do
30272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30273    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30275    break 2
30276  fi
30277done
30278  done
30279IFS=$as_save_IFS
30280
30281fi
30282fi
30283CXX=$ac_cv_prog_CXX
30284if test -n "$CXX"; then
30285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30286$as_echo "$CXX" >&6; }
30287else
30288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30289$as_echo "no" >&6; }
30290fi
30291
30292
30293    test -n "$CXX" && break
30294  done
30295fi
30296if test -z "$CXX"; then
30297  ac_ct_CXX=$CXX
30298  for ac_prog in $CXX
30299do
30300  # Extract the first word of "$ac_prog", so it can be a program name with args.
30301set dummy $ac_prog; ac_word=$2
30302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30303$as_echo_n "checking for $ac_word... " >&6; }
30304if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30305  $as_echo_n "(cached) " >&6
30306else
30307  if test -n "$ac_ct_CXX"; then
30308  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30309else
30310as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30311for as_dir in $PATH
30312do
30313  IFS=$as_save_IFS
30314  test -z "$as_dir" && as_dir=.
30315    for ac_exec_ext in '' $ac_executable_extensions; do
30316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30317    ac_cv_prog_ac_ct_CXX="$ac_prog"
30318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30319    break 2
30320  fi
30321done
30322  done
30323IFS=$as_save_IFS
30324
30325fi
30326fi
30327ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30328if test -n "$ac_ct_CXX"; then
30329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30330$as_echo "$ac_ct_CXX" >&6; }
30331else
30332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30333$as_echo "no" >&6; }
30334fi
30335
30336
30337  test -n "$ac_ct_CXX" && break
30338done
30339
30340  if test "x$ac_ct_CXX" = x; then
30341    CXX="g++"
30342  else
30343    case $cross_compiling:$ac_tool_warned in
30344yes:)
30345{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30346$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30347ac_tool_warned=yes ;;
30348esac
30349    CXX=$ac_ct_CXX
30350  fi
30351fi
30352
30353  fi
30354fi
30355# Provide some information about the compiler.
30356$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30357set X $ac_compile
30358ac_compiler=$2
30359for ac_option in --version -v -V -qversion; do
30360  { { ac_try="$ac_compiler $ac_option >&5"
30361case "(($ac_try" in
30362  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30363  *) ac_try_echo=$ac_try;;
30364esac
30365eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30366$as_echo "$ac_try_echo"; } >&5
30367  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30368  ac_status=$?
30369  if test -s conftest.err; then
30370    sed '10a\
30371... rest of stderr output deleted ...
30372         10q' conftest.err >conftest.er1
30373    cat conftest.er1 >&5
30374  fi
30375  rm -f conftest.er1 conftest.err
30376  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30377  test $ac_status = 0; }
30378done
30379
30380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30381$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30382if ${ac_cv_cxx_compiler_gnu+:} false; then :
30383  $as_echo_n "(cached) " >&6
30384else
30385  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30386/* end confdefs.h.  */
30387
30388int
30389main ()
30390{
30391#ifndef __GNUC__
30392       choke me
30393#endif
30394
30395  ;
30396  return 0;
30397}
30398_ACEOF
30399if ac_fn_cxx_try_compile "$LINENO"; then :
30400  ac_compiler_gnu=yes
30401else
30402  ac_compiler_gnu=no
30403fi
30404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30405ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30406
30407fi
30408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30409$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30410if test $ac_compiler_gnu = yes; then
30411  GXX=yes
30412else
30413  GXX=
30414fi
30415ac_test_CXXFLAGS=${CXXFLAGS+set}
30416ac_save_CXXFLAGS=$CXXFLAGS
30417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30418$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30419if ${ac_cv_prog_cxx_g+:} false; then :
30420  $as_echo_n "(cached) " >&6
30421else
30422  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30423   ac_cxx_werror_flag=yes
30424   ac_cv_prog_cxx_g=no
30425   CXXFLAGS="-g"
30426   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30427/* end confdefs.h.  */
30428
30429int
30430main ()
30431{
30432
30433  ;
30434  return 0;
30435}
30436_ACEOF
30437if ac_fn_cxx_try_compile "$LINENO"; then :
30438  ac_cv_prog_cxx_g=yes
30439else
30440  CXXFLAGS=""
30441      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30442/* end confdefs.h.  */
30443
30444int
30445main ()
30446{
30447
30448  ;
30449  return 0;
30450}
30451_ACEOF
30452if ac_fn_cxx_try_compile "$LINENO"; then :
30453
30454else
30455  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30456	 CXXFLAGS="-g"
30457	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30458/* end confdefs.h.  */
30459
30460int
30461main ()
30462{
30463
30464  ;
30465  return 0;
30466}
30467_ACEOF
30468if ac_fn_cxx_try_compile "$LINENO"; then :
30469  ac_cv_prog_cxx_g=yes
30470fi
30471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30472fi
30473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30474fi
30475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30476   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30477fi
30478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30479$as_echo "$ac_cv_prog_cxx_g" >&6; }
30480if test "$ac_test_CXXFLAGS" = set; then
30481  CXXFLAGS=$ac_save_CXXFLAGS
30482elif test $ac_cv_prog_cxx_g = yes; then
30483  if test "$GXX" = yes; then
30484    CXXFLAGS="-g -O2"
30485  else
30486    CXXFLAGS="-g"
30487  fi
30488else
30489  if test "$GXX" = yes; then
30490    CXXFLAGS="-O2"
30491  else
30492    CXXFLAGS=
30493  fi
30494fi
30495ac_ext=cpp
30496ac_cpp='$CXXCPP $CPPFLAGS'
30497ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30498ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30499ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30500
30501
30502  #
30503  # Setup the preprocessor (CPP and CXXCPP)
30504  #
30505  ac_ext=c
30506ac_cpp='$CPP $CPPFLAGS'
30507ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30508ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30509ac_compiler_gnu=$ac_cv_c_compiler_gnu
30510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30511$as_echo_n "checking how to run the C preprocessor... " >&6; }
30512# On Suns, sometimes $CPP names a directory.
30513if test -n "$CPP" && test -d "$CPP"; then
30514  CPP=
30515fi
30516if test -z "$CPP"; then
30517  if ${ac_cv_prog_CPP+:} false; then :
30518  $as_echo_n "(cached) " >&6
30519else
30520      # Double quotes because CPP needs to be expanded
30521    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30522    do
30523      ac_preproc_ok=false
30524for ac_c_preproc_warn_flag in '' yes
30525do
30526  # Use a header file that comes with gcc, so configuring glibc
30527  # with a fresh cross-compiler works.
30528  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30529  # <limits.h> exists even on freestanding compilers.
30530  # On the NeXT, cc -E runs the code through the compiler's parser,
30531  # not just through cpp. "Syntax error" is here to catch this case.
30532  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30533/* end confdefs.h.  */
30534#ifdef __STDC__
30535# include <limits.h>
30536#else
30537# include <assert.h>
30538#endif
30539		     Syntax error
30540_ACEOF
30541if ac_fn_c_try_cpp "$LINENO"; then :
30542
30543else
30544  # Broken: fails on valid input.
30545continue
30546fi
30547rm -f conftest.err conftest.i conftest.$ac_ext
30548
30549  # OK, works on sane cases.  Now check whether nonexistent headers
30550  # can be detected and how.
30551  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30552/* end confdefs.h.  */
30553#include <ac_nonexistent.h>
30554_ACEOF
30555if ac_fn_c_try_cpp "$LINENO"; then :
30556  # Broken: success on invalid input.
30557continue
30558else
30559  # Passes both tests.
30560ac_preproc_ok=:
30561break
30562fi
30563rm -f conftest.err conftest.i conftest.$ac_ext
30564
30565done
30566# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30567rm -f conftest.i conftest.err conftest.$ac_ext
30568if $ac_preproc_ok; then :
30569  break
30570fi
30571
30572    done
30573    ac_cv_prog_CPP=$CPP
30574
30575fi
30576  CPP=$ac_cv_prog_CPP
30577else
30578  ac_cv_prog_CPP=$CPP
30579fi
30580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30581$as_echo "$CPP" >&6; }
30582ac_preproc_ok=false
30583for ac_c_preproc_warn_flag in '' yes
30584do
30585  # Use a header file that comes with gcc, so configuring glibc
30586  # with a fresh cross-compiler works.
30587  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30588  # <limits.h> exists even on freestanding compilers.
30589  # On the NeXT, cc -E runs the code through the compiler's parser,
30590  # not just through cpp. "Syntax error" is here to catch this case.
30591  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30592/* end confdefs.h.  */
30593#ifdef __STDC__
30594# include <limits.h>
30595#else
30596# include <assert.h>
30597#endif
30598		     Syntax error
30599_ACEOF
30600if ac_fn_c_try_cpp "$LINENO"; then :
30601
30602else
30603  # Broken: fails on valid input.
30604continue
30605fi
30606rm -f conftest.err conftest.i conftest.$ac_ext
30607
30608  # OK, works on sane cases.  Now check whether nonexistent headers
30609  # can be detected and how.
30610  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30611/* end confdefs.h.  */
30612#include <ac_nonexistent.h>
30613_ACEOF
30614if ac_fn_c_try_cpp "$LINENO"; then :
30615  # Broken: success on invalid input.
30616continue
30617else
30618  # Passes both tests.
30619ac_preproc_ok=:
30620break
30621fi
30622rm -f conftest.err conftest.i conftest.$ac_ext
30623
30624done
30625# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30626rm -f conftest.i conftest.err conftest.$ac_ext
30627if $ac_preproc_ok; then :
30628
30629else
30630  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30631$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30632as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30633See \`config.log' for more details" "$LINENO" 5; }
30634fi
30635
30636ac_ext=cpp
30637ac_cpp='$CXXCPP $CPPFLAGS'
30638ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30639ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30640ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30641
30642
30643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30644
30645  # First separate the path from the arguments. This will split at the first
30646  # space.
30647  complete="$CPP"
30648  path="${complete%% *}"
30649  tmp="$complete EOL"
30650  arguments="${tmp#* }"
30651
30652  # Input might be given as Windows format, start by converting to
30653  # unix format.
30654  new_path=`$CYGPATH -u "$path"`
30655
30656  # Now try to locate executable using which
30657  new_path=`$WHICH "$new_path" 2> /dev/null`
30658  # bat and cmd files are not always considered executable in cygwin causing which
30659  # to not find them
30660  if test "x$new_path" = x \
30661      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30662      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30663    new_path=`$CYGPATH -u "$path"`
30664  fi
30665  if test "x$new_path" = x; then
30666    # Oops. Which didn't find the executable.
30667    # The splitting of arguments from the executable at a space might have been incorrect,
30668    # since paths with space are more likely in Windows. Give it another try with the whole
30669    # argument.
30670    path="$complete"
30671    arguments="EOL"
30672    new_path=`$CYGPATH -u "$path"`
30673    new_path=`$WHICH "$new_path" 2> /dev/null`
30674    # bat and cmd files are not always considered executable in cygwin causing which
30675    # to not find them
30676    if test "x$new_path" = x \
30677        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30678        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30679      new_path=`$CYGPATH -u "$path"`
30680    fi
30681    if test "x$new_path" = x; then
30682      # It's still not found. Now this is an unrecoverable error.
30683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30684$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30685      has_space=`$ECHO "$complete" | $GREP " "`
30686      if test "x$has_space" != x; then
30687        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30688$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30689      fi
30690      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30691    fi
30692  fi
30693
30694  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30695  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30696  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30697  # "foo.exe" is OK but "foo" is an error.
30698  #
30699  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30700  # It is also a way to make sure we got the proper file name for the real test later on.
30701  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30702  if test "x$test_shortpath" = x; then
30703    # Short path failed, file does not exist as specified.
30704    # Try adding .exe or .cmd
30705    if test -f "${new_path}.exe"; then
30706      input_to_shortpath="${new_path}.exe"
30707    elif test -f "${new_path}.cmd"; then
30708      input_to_shortpath="${new_path}.cmd"
30709    else
30710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30711$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30712      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30713$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30714      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30715    fi
30716  else
30717    input_to_shortpath="$new_path"
30718  fi
30719
30720  # Call helper function which possibly converts this using DOS-style short mode.
30721  # If so, the updated path is stored in $new_path.
30722  new_path="$input_to_shortpath"
30723
30724  input_path="$input_to_shortpath"
30725  # Check if we need to convert this using DOS-style short mode. If the path
30726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30727  # take no chances and rewrite it.
30728  # Note: m4 eats our [], so we need to use [ and ] instead.
30729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30730  if test "x$has_forbidden_chars" != x; then
30731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30732    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30733    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30734    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30735      # Going to short mode and back again did indeed matter. Since short mode is
30736      # case insensitive, let's make it lowercase to improve readability.
30737      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30738      # Now convert it back to Unix-stile (cygpath)
30739      input_path=`$CYGPATH -u "$shortmode_path"`
30740      new_path="$input_path"
30741    fi
30742  fi
30743
30744  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30745  if test "x$test_cygdrive_prefix" = x; then
30746    # As a simple fix, exclude /usr/bin since it's not a real path.
30747    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30748      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30749      # a path prefixed by /cygdrive for fixpath to work.
30750      new_path="$CYGWIN_ROOT_PATH$input_path"
30751    fi
30752  fi
30753
30754  # remove trailing .exe if any
30755  new_path="${new_path/%.exe/}"
30756
30757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30758
30759  # First separate the path from the arguments. This will split at the first
30760  # space.
30761  complete="$CPP"
30762  path="${complete%% *}"
30763  tmp="$complete EOL"
30764  arguments="${tmp#* }"
30765
30766  # Input might be given as Windows format, start by converting to
30767  # unix format.
30768  new_path="$path"
30769
30770  windows_path="$new_path"
30771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30772    unix_path=`$CYGPATH -u "$windows_path"`
30773    new_path="$unix_path"
30774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30776    new_path="$unix_path"
30777  fi
30778
30779
30780  # Now try to locate executable using which
30781  new_path=`$WHICH "$new_path" 2> /dev/null`
30782
30783  if test "x$new_path" = x; then
30784    # Oops. Which didn't find the executable.
30785    # The splitting of arguments from the executable at a space might have been incorrect,
30786    # since paths with space are more likely in Windows. Give it another try with the whole
30787    # argument.
30788    path="$complete"
30789    arguments="EOL"
30790    new_path="$path"
30791
30792  windows_path="$new_path"
30793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30794    unix_path=`$CYGPATH -u "$windows_path"`
30795    new_path="$unix_path"
30796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30798    new_path="$unix_path"
30799  fi
30800
30801
30802    new_path=`$WHICH "$new_path" 2> /dev/null`
30803
30804    if test "x$new_path" = x; then
30805      # It's still not found. Now this is an unrecoverable error.
30806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30807$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30808      has_space=`$ECHO "$complete" | $GREP " "`
30809      if test "x$has_space" != x; then
30810        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30811$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30812      fi
30813      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30814    fi
30815  fi
30816
30817  # Now new_path has a complete unix path to the binary
30818  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30819    # Keep paths in /bin as-is, but remove trailing .exe if any
30820    new_path="${new_path/%.exe/}"
30821    # Do not save /bin paths to all_fixpath_prefixes!
30822  else
30823    # Not in mixed or Windows style, start by that.
30824    new_path=`cmd //c echo $new_path`
30825
30826  input_path="$new_path"
30827  # Check if we need to convert this using DOS-style short mode. If the path
30828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30829  # take no chances and rewrite it.
30830  # Note: m4 eats our [], so we need to use [ and ] instead.
30831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30832  if test "x$has_forbidden_chars" != x; then
30833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30834    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30835  fi
30836
30837    # Output is in $new_path
30838
30839  windows_path="$new_path"
30840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30841    unix_path=`$CYGPATH -u "$windows_path"`
30842    new_path="$unix_path"
30843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30845    new_path="$unix_path"
30846  fi
30847
30848    # remove trailing .exe if any
30849    new_path="${new_path/%.exe/}"
30850
30851    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30852    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30853  fi
30854
30855  else
30856    # We're on a posix platform. Hooray! :)
30857    # First separate the path from the arguments. This will split at the first
30858    # space.
30859    complete="$CPP"
30860    path="${complete%% *}"
30861    tmp="$complete EOL"
30862    arguments="${tmp#* }"
30863
30864    # Cannot rely on the command "which" here since it doesn't always work.
30865    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30866    if test -z "$is_absolute_path"; then
30867      # Path to executable is not absolute. Find it.
30868      IFS_save="$IFS"
30869      IFS=:
30870      for p in $PATH; do
30871        if test -f "$p/$path" && test -x "$p/$path"; then
30872          new_path="$p/$path"
30873          break
30874        fi
30875      done
30876      IFS="$IFS_save"
30877    else
30878      # This is an absolute path, we can use it without further modifications.
30879      new_path="$path"
30880    fi
30881
30882    if test "x$new_path" = x; then
30883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30884$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30885      has_space=`$ECHO "$complete" | $GREP " "`
30886      if test "x$has_space" != x; then
30887        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30888$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30889      fi
30890      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30891    fi
30892  fi
30893
30894  # Now join together the path and the arguments once again
30895  if test "x$arguments" != xEOL; then
30896    new_complete="$new_path ${arguments% *}"
30897  else
30898    new_complete="$new_path"
30899  fi
30900
30901  if test "x$complete" != "x$new_complete"; then
30902    CPP="$new_complete"
30903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
30904$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
30905  fi
30906
30907  ac_ext=cpp
30908ac_cpp='$CXXCPP $CPPFLAGS'
30909ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30910ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30911ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
30913$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
30914if test -z "$CXXCPP"; then
30915  if ${ac_cv_prog_CXXCPP+:} false; then :
30916  $as_echo_n "(cached) " >&6
30917else
30918      # Double quotes because CXXCPP needs to be expanded
30919    for CXXCPP in "$CXX -E" "/lib/cpp"
30920    do
30921      ac_preproc_ok=false
30922for ac_cxx_preproc_warn_flag in '' yes
30923do
30924  # Use a header file that comes with gcc, so configuring glibc
30925  # with a fresh cross-compiler works.
30926  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30927  # <limits.h> exists even on freestanding compilers.
30928  # On the NeXT, cc -E runs the code through the compiler's parser,
30929  # not just through cpp. "Syntax error" is here to catch this case.
30930  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30931/* end confdefs.h.  */
30932#ifdef __STDC__
30933# include <limits.h>
30934#else
30935# include <assert.h>
30936#endif
30937		     Syntax error
30938_ACEOF
30939if ac_fn_cxx_try_cpp "$LINENO"; then :
30940
30941else
30942  # Broken: fails on valid input.
30943continue
30944fi
30945rm -f conftest.err conftest.i conftest.$ac_ext
30946
30947  # OK, works on sane cases.  Now check whether nonexistent headers
30948  # can be detected and how.
30949  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30950/* end confdefs.h.  */
30951#include <ac_nonexistent.h>
30952_ACEOF
30953if ac_fn_cxx_try_cpp "$LINENO"; then :
30954  # Broken: success on invalid input.
30955continue
30956else
30957  # Passes both tests.
30958ac_preproc_ok=:
30959break
30960fi
30961rm -f conftest.err conftest.i conftest.$ac_ext
30962
30963done
30964# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30965rm -f conftest.i conftest.err conftest.$ac_ext
30966if $ac_preproc_ok; then :
30967  break
30968fi
30969
30970    done
30971    ac_cv_prog_CXXCPP=$CXXCPP
30972
30973fi
30974  CXXCPP=$ac_cv_prog_CXXCPP
30975else
30976  ac_cv_prog_CXXCPP=$CXXCPP
30977fi
30978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
30979$as_echo "$CXXCPP" >&6; }
30980ac_preproc_ok=false
30981for ac_cxx_preproc_warn_flag in '' yes
30982do
30983  # Use a header file that comes with gcc, so configuring glibc
30984  # with a fresh cross-compiler works.
30985  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30986  # <limits.h> exists even on freestanding compilers.
30987  # On the NeXT, cc -E runs the code through the compiler's parser,
30988  # not just through cpp. "Syntax error" is here to catch this case.
30989  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30990/* end confdefs.h.  */
30991#ifdef __STDC__
30992# include <limits.h>
30993#else
30994# include <assert.h>
30995#endif
30996		     Syntax error
30997_ACEOF
30998if ac_fn_cxx_try_cpp "$LINENO"; then :
30999
31000else
31001  # Broken: fails on valid input.
31002continue
31003fi
31004rm -f conftest.err conftest.i conftest.$ac_ext
31005
31006  # OK, works on sane cases.  Now check whether nonexistent headers
31007  # can be detected and how.
31008  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31009/* end confdefs.h.  */
31010#include <ac_nonexistent.h>
31011_ACEOF
31012if ac_fn_cxx_try_cpp "$LINENO"; then :
31013  # Broken: success on invalid input.
31014continue
31015else
31016  # Passes both tests.
31017ac_preproc_ok=:
31018break
31019fi
31020rm -f conftest.err conftest.i conftest.$ac_ext
31021
31022done
31023# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31024rm -f conftest.i conftest.err conftest.$ac_ext
31025if $ac_preproc_ok; then :
31026
31027else
31028  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31029$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31030as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31031See \`config.log' for more details" "$LINENO" 5; }
31032fi
31033
31034ac_ext=cpp
31035ac_cpp='$CXXCPP $CPPFLAGS'
31036ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31037ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31038ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31039
31040
31041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31042
31043  # First separate the path from the arguments. This will split at the first
31044  # space.
31045  complete="$CXXCPP"
31046  path="${complete%% *}"
31047  tmp="$complete EOL"
31048  arguments="${tmp#* }"
31049
31050  # Input might be given as Windows format, start by converting to
31051  # unix format.
31052  new_path=`$CYGPATH -u "$path"`
31053
31054  # Now try to locate executable using which
31055  new_path=`$WHICH "$new_path" 2> /dev/null`
31056  # bat and cmd files are not always considered executable in cygwin causing which
31057  # to not find them
31058  if test "x$new_path" = x \
31059      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31060      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31061    new_path=`$CYGPATH -u "$path"`
31062  fi
31063  if test "x$new_path" = x; then
31064    # Oops. Which didn't find the executable.
31065    # The splitting of arguments from the executable at a space might have been incorrect,
31066    # since paths with space are more likely in Windows. Give it another try with the whole
31067    # argument.
31068    path="$complete"
31069    arguments="EOL"
31070    new_path=`$CYGPATH -u "$path"`
31071    new_path=`$WHICH "$new_path" 2> /dev/null`
31072    # bat and cmd files are not always considered executable in cygwin causing which
31073    # to not find them
31074    if test "x$new_path" = x \
31075        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31076        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31077      new_path=`$CYGPATH -u "$path"`
31078    fi
31079    if test "x$new_path" = x; then
31080      # It's still not found. Now this is an unrecoverable error.
31081      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31082$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31083      has_space=`$ECHO "$complete" | $GREP " "`
31084      if test "x$has_space" != x; then
31085        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31086$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31087      fi
31088      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31089    fi
31090  fi
31091
31092  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31093  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31094  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31095  # "foo.exe" is OK but "foo" is an error.
31096  #
31097  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31098  # It is also a way to make sure we got the proper file name for the real test later on.
31099  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31100  if test "x$test_shortpath" = x; then
31101    # Short path failed, file does not exist as specified.
31102    # Try adding .exe or .cmd
31103    if test -f "${new_path}.exe"; then
31104      input_to_shortpath="${new_path}.exe"
31105    elif test -f "${new_path}.cmd"; then
31106      input_to_shortpath="${new_path}.cmd"
31107    else
31108      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31109$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31110      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31111$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31112      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31113    fi
31114  else
31115    input_to_shortpath="$new_path"
31116  fi
31117
31118  # Call helper function which possibly converts this using DOS-style short mode.
31119  # If so, the updated path is stored in $new_path.
31120  new_path="$input_to_shortpath"
31121
31122  input_path="$input_to_shortpath"
31123  # Check if we need to convert this using DOS-style short mode. If the path
31124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31125  # take no chances and rewrite it.
31126  # Note: m4 eats our [], so we need to use [ and ] instead.
31127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31128  if test "x$has_forbidden_chars" != x; then
31129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31130    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31131    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31132    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31133      # Going to short mode and back again did indeed matter. Since short mode is
31134      # case insensitive, let's make it lowercase to improve readability.
31135      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31136      # Now convert it back to Unix-stile (cygpath)
31137      input_path=`$CYGPATH -u "$shortmode_path"`
31138      new_path="$input_path"
31139    fi
31140  fi
31141
31142  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31143  if test "x$test_cygdrive_prefix" = x; then
31144    # As a simple fix, exclude /usr/bin since it's not a real path.
31145    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31146      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31147      # a path prefixed by /cygdrive for fixpath to work.
31148      new_path="$CYGWIN_ROOT_PATH$input_path"
31149    fi
31150  fi
31151
31152  # remove trailing .exe if any
31153  new_path="${new_path/%.exe/}"
31154
31155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31156
31157  # First separate the path from the arguments. This will split at the first
31158  # space.
31159  complete="$CXXCPP"
31160  path="${complete%% *}"
31161  tmp="$complete EOL"
31162  arguments="${tmp#* }"
31163
31164  # Input might be given as Windows format, start by converting to
31165  # unix format.
31166  new_path="$path"
31167
31168  windows_path="$new_path"
31169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31170    unix_path=`$CYGPATH -u "$windows_path"`
31171    new_path="$unix_path"
31172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31174    new_path="$unix_path"
31175  fi
31176
31177
31178  # Now try to locate executable using which
31179  new_path=`$WHICH "$new_path" 2> /dev/null`
31180
31181  if test "x$new_path" = x; then
31182    # Oops. Which didn't find the executable.
31183    # The splitting of arguments from the executable at a space might have been incorrect,
31184    # since paths with space are more likely in Windows. Give it another try with the whole
31185    # argument.
31186    path="$complete"
31187    arguments="EOL"
31188    new_path="$path"
31189
31190  windows_path="$new_path"
31191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31192    unix_path=`$CYGPATH -u "$windows_path"`
31193    new_path="$unix_path"
31194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31196    new_path="$unix_path"
31197  fi
31198
31199
31200    new_path=`$WHICH "$new_path" 2> /dev/null`
31201
31202    if test "x$new_path" = x; then
31203      # It's still not found. Now this is an unrecoverable error.
31204      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31205$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31206      has_space=`$ECHO "$complete" | $GREP " "`
31207      if test "x$has_space" != x; then
31208        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31209$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31210      fi
31211      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31212    fi
31213  fi
31214
31215  # Now new_path has a complete unix path to the binary
31216  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31217    # Keep paths in /bin as-is, but remove trailing .exe if any
31218    new_path="${new_path/%.exe/}"
31219    # Do not save /bin paths to all_fixpath_prefixes!
31220  else
31221    # Not in mixed or Windows style, start by that.
31222    new_path=`cmd //c echo $new_path`
31223
31224  input_path="$new_path"
31225  # Check if we need to convert this using DOS-style short mode. If the path
31226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31227  # take no chances and rewrite it.
31228  # Note: m4 eats our [], so we need to use [ and ] instead.
31229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31230  if test "x$has_forbidden_chars" != x; then
31231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31232    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31233  fi
31234
31235    # Output is in $new_path
31236
31237  windows_path="$new_path"
31238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31239    unix_path=`$CYGPATH -u "$windows_path"`
31240    new_path="$unix_path"
31241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31243    new_path="$unix_path"
31244  fi
31245
31246    # remove trailing .exe if any
31247    new_path="${new_path/%.exe/}"
31248
31249    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31250    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31251  fi
31252
31253  else
31254    # We're on a posix platform. Hooray! :)
31255    # First separate the path from the arguments. This will split at the first
31256    # space.
31257    complete="$CXXCPP"
31258    path="${complete%% *}"
31259    tmp="$complete EOL"
31260    arguments="${tmp#* }"
31261
31262    # Cannot rely on the command "which" here since it doesn't always work.
31263    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31264    if test -z "$is_absolute_path"; then
31265      # Path to executable is not absolute. Find it.
31266      IFS_save="$IFS"
31267      IFS=:
31268      for p in $PATH; do
31269        if test -f "$p/$path" && test -x "$p/$path"; then
31270          new_path="$p/$path"
31271          break
31272        fi
31273      done
31274      IFS="$IFS_save"
31275    else
31276      # This is an absolute path, we can use it without further modifications.
31277      new_path="$path"
31278    fi
31279
31280    if test "x$new_path" = x; then
31281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31282$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31283      has_space=`$ECHO "$complete" | $GREP " "`
31284      if test "x$has_space" != x; then
31285        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31286$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31287      fi
31288      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31289    fi
31290  fi
31291
31292  # Now join together the path and the arguments once again
31293  if test "x$arguments" != xEOL; then
31294    new_complete="$new_path ${arguments% *}"
31295  else
31296    new_complete="$new_path"
31297  fi
31298
31299  if test "x$complete" != "x$new_complete"; then
31300    CXXCPP="$new_complete"
31301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31302$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31303  fi
31304
31305
31306  #
31307  # Setup the linker (LD)
31308  #
31309  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31310    # In the Microsoft toolchain we have a separate LD command "link".
31311    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31312    # a cygwin program for something completely different.
31313    # Extract the first word of "link", so it can be a program name with args.
31314set dummy link; ac_word=$2
31315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31316$as_echo_n "checking for $ac_word... " >&6; }
31317if ${ac_cv_prog_LD+:} false; then :
31318  $as_echo_n "(cached) " >&6
31319else
31320  if test -n "$LD"; then
31321  ac_cv_prog_LD="$LD" # Let the user override the test.
31322else
31323  ac_prog_rejected=no
31324as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31325for as_dir in $PATH
31326do
31327  IFS=$as_save_IFS
31328  test -z "$as_dir" && as_dir=.
31329    for ac_exec_ext in '' $ac_executable_extensions; do
31330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31331    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31332       ac_prog_rejected=yes
31333       continue
31334     fi
31335    ac_cv_prog_LD="link"
31336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31337    break 2
31338  fi
31339done
31340  done
31341IFS=$as_save_IFS
31342
31343if test $ac_prog_rejected = yes; then
31344  # We found a bogon in the path, so make sure we never use it.
31345  set dummy $ac_cv_prog_LD
31346  shift
31347  if test $# != 0; then
31348    # We chose a different compiler from the bogus one.
31349    # However, it has the same basename, so the bogon will be chosen
31350    # first if we set LD to just the basename; use the full file name.
31351    shift
31352    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31353  fi
31354fi
31355fi
31356fi
31357LD=$ac_cv_prog_LD
31358if test -n "$LD"; then
31359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31360$as_echo "$LD" >&6; }
31361else
31362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31363$as_echo "no" >&6; }
31364fi
31365
31366
31367
31368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31369
31370  # First separate the path from the arguments. This will split at the first
31371  # space.
31372  complete="$LD"
31373  path="${complete%% *}"
31374  tmp="$complete EOL"
31375  arguments="${tmp#* }"
31376
31377  # Input might be given as Windows format, start by converting to
31378  # unix format.
31379  new_path=`$CYGPATH -u "$path"`
31380
31381  # Now try to locate executable using which
31382  new_path=`$WHICH "$new_path" 2> /dev/null`
31383  # bat and cmd files are not always considered executable in cygwin causing which
31384  # to not find them
31385  if test "x$new_path" = x \
31386      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31387      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31388    new_path=`$CYGPATH -u "$path"`
31389  fi
31390  if test "x$new_path" = x; then
31391    # Oops. Which didn't find the executable.
31392    # The splitting of arguments from the executable at a space might have been incorrect,
31393    # since paths with space are more likely in Windows. Give it another try with the whole
31394    # argument.
31395    path="$complete"
31396    arguments="EOL"
31397    new_path=`$CYGPATH -u "$path"`
31398    new_path=`$WHICH "$new_path" 2> /dev/null`
31399    # bat and cmd files are not always considered executable in cygwin causing which
31400    # to not find them
31401    if test "x$new_path" = x \
31402        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31403        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31404      new_path=`$CYGPATH -u "$path"`
31405    fi
31406    if test "x$new_path" = x; then
31407      # It's still not found. Now this is an unrecoverable error.
31408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31409$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31410      has_space=`$ECHO "$complete" | $GREP " "`
31411      if test "x$has_space" != x; then
31412        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31413$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31414      fi
31415      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31416    fi
31417  fi
31418
31419  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31420  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31421  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31422  # "foo.exe" is OK but "foo" is an error.
31423  #
31424  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31425  # It is also a way to make sure we got the proper file name for the real test later on.
31426  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31427  if test "x$test_shortpath" = x; then
31428    # Short path failed, file does not exist as specified.
31429    # Try adding .exe or .cmd
31430    if test -f "${new_path}.exe"; then
31431      input_to_shortpath="${new_path}.exe"
31432    elif test -f "${new_path}.cmd"; then
31433      input_to_shortpath="${new_path}.cmd"
31434    else
31435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31436$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31437      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31438$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31439      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31440    fi
31441  else
31442    input_to_shortpath="$new_path"
31443  fi
31444
31445  # Call helper function which possibly converts this using DOS-style short mode.
31446  # If so, the updated path is stored in $new_path.
31447  new_path="$input_to_shortpath"
31448
31449  input_path="$input_to_shortpath"
31450  # Check if we need to convert this using DOS-style short mode. If the path
31451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31452  # take no chances and rewrite it.
31453  # Note: m4 eats our [], so we need to use [ and ] instead.
31454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31455  if test "x$has_forbidden_chars" != x; then
31456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31457    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31458    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31459    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31460      # Going to short mode and back again did indeed matter. Since short mode is
31461      # case insensitive, let's make it lowercase to improve readability.
31462      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31463      # Now convert it back to Unix-stile (cygpath)
31464      input_path=`$CYGPATH -u "$shortmode_path"`
31465      new_path="$input_path"
31466    fi
31467  fi
31468
31469  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31470  if test "x$test_cygdrive_prefix" = x; then
31471    # As a simple fix, exclude /usr/bin since it's not a real path.
31472    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31473      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31474      # a path prefixed by /cygdrive for fixpath to work.
31475      new_path="$CYGWIN_ROOT_PATH$input_path"
31476    fi
31477  fi
31478
31479  # remove trailing .exe if any
31480  new_path="${new_path/%.exe/}"
31481
31482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31483
31484  # First separate the path from the arguments. This will split at the first
31485  # space.
31486  complete="$LD"
31487  path="${complete%% *}"
31488  tmp="$complete EOL"
31489  arguments="${tmp#* }"
31490
31491  # Input might be given as Windows format, start by converting to
31492  # unix format.
31493  new_path="$path"
31494
31495  windows_path="$new_path"
31496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31497    unix_path=`$CYGPATH -u "$windows_path"`
31498    new_path="$unix_path"
31499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31501    new_path="$unix_path"
31502  fi
31503
31504
31505  # Now try to locate executable using which
31506  new_path=`$WHICH "$new_path" 2> /dev/null`
31507
31508  if test "x$new_path" = x; then
31509    # Oops. Which didn't find the executable.
31510    # The splitting of arguments from the executable at a space might have been incorrect,
31511    # since paths with space are more likely in Windows. Give it another try with the whole
31512    # argument.
31513    path="$complete"
31514    arguments="EOL"
31515    new_path="$path"
31516
31517  windows_path="$new_path"
31518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31519    unix_path=`$CYGPATH -u "$windows_path"`
31520    new_path="$unix_path"
31521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31523    new_path="$unix_path"
31524  fi
31525
31526
31527    new_path=`$WHICH "$new_path" 2> /dev/null`
31528
31529    if test "x$new_path" = x; then
31530      # It's still not found. Now this is an unrecoverable error.
31531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31532$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31533      has_space=`$ECHO "$complete" | $GREP " "`
31534      if test "x$has_space" != x; then
31535        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31536$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31537      fi
31538      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31539    fi
31540  fi
31541
31542  # Now new_path has a complete unix path to the binary
31543  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31544    # Keep paths in /bin as-is, but remove trailing .exe if any
31545    new_path="${new_path/%.exe/}"
31546    # Do not save /bin paths to all_fixpath_prefixes!
31547  else
31548    # Not in mixed or Windows style, start by that.
31549    new_path=`cmd //c echo $new_path`
31550
31551  input_path="$new_path"
31552  # Check if we need to convert this using DOS-style short mode. If the path
31553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31554  # take no chances and rewrite it.
31555  # Note: m4 eats our [], so we need to use [ and ] instead.
31556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31557  if test "x$has_forbidden_chars" != x; then
31558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31559    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31560  fi
31561
31562    # Output is in $new_path
31563
31564  windows_path="$new_path"
31565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31566    unix_path=`$CYGPATH -u "$windows_path"`
31567    new_path="$unix_path"
31568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31570    new_path="$unix_path"
31571  fi
31572
31573    # remove trailing .exe if any
31574    new_path="${new_path/%.exe/}"
31575
31576    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31577    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31578  fi
31579
31580  else
31581    # We're on a posix platform. Hooray! :)
31582    # First separate the path from the arguments. This will split at the first
31583    # space.
31584    complete="$LD"
31585    path="${complete%% *}"
31586    tmp="$complete EOL"
31587    arguments="${tmp#* }"
31588
31589    # Cannot rely on the command "which" here since it doesn't always work.
31590    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31591    if test -z "$is_absolute_path"; then
31592      # Path to executable is not absolute. Find it.
31593      IFS_save="$IFS"
31594      IFS=:
31595      for p in $PATH; do
31596        if test -f "$p/$path" && test -x "$p/$path"; then
31597          new_path="$p/$path"
31598          break
31599        fi
31600      done
31601      IFS="$IFS_save"
31602    else
31603      # This is an absolute path, we can use it without further modifications.
31604      new_path="$path"
31605    fi
31606
31607    if test "x$new_path" = x; then
31608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31609$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31610      has_space=`$ECHO "$complete" | $GREP " "`
31611      if test "x$has_space" != x; then
31612        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31613$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31614      fi
31615      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31616    fi
31617  fi
31618
31619  # Now join together the path and the arguments once again
31620  if test "x$arguments" != xEOL; then
31621    new_complete="$new_path ${arguments% *}"
31622  else
31623    new_complete="$new_path"
31624  fi
31625
31626  if test "x$complete" != "x$new_complete"; then
31627    LD="$new_complete"
31628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31629$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31630  fi
31631
31632    # Verify that we indeed succeeded with this trick.
31633    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31634$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31635    "$LD" --version > /dev/null
31636    if test $? -eq 0 ; then
31637      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31638$as_echo "no" >&6; }
31639      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31640    else
31641      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31642$as_echo "yes" >&6; }
31643    fi
31644    LDCXX="$LD"
31645  else
31646    # All other toolchains use the compiler to link.
31647    LD="$CC"
31648    LDCXX="$CXX"
31649  fi
31650
31651  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31652
31653
31654  #
31655  # Setup the assembler (AS)
31656  #
31657  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31658    # FIXME: should this really be solaris, or solstudio?
31659
31660
31661  # Publish this variable in the help.
31662
31663
31664  if test "x$AS" = x; then
31665    # The variable is not set by user, try to locate tool using the code snippet
31666    for ac_prog in as
31667do
31668  # Extract the first word of "$ac_prog", so it can be a program name with args.
31669set dummy $ac_prog; ac_word=$2
31670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31671$as_echo_n "checking for $ac_word... " >&6; }
31672if ${ac_cv_path_AS+:} false; then :
31673  $as_echo_n "(cached) " >&6
31674else
31675  case $AS in
31676  [\\/]* | ?:[\\/]*)
31677  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31678  ;;
31679  *)
31680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31681for as_dir in $PATH
31682do
31683  IFS=$as_save_IFS
31684  test -z "$as_dir" && as_dir=.
31685    for ac_exec_ext in '' $ac_executable_extensions; do
31686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31687    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31689    break 2
31690  fi
31691done
31692  done
31693IFS=$as_save_IFS
31694
31695  ;;
31696esac
31697fi
31698AS=$ac_cv_path_AS
31699if test -n "$AS"; then
31700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31701$as_echo "$AS" >&6; }
31702else
31703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31704$as_echo "no" >&6; }
31705fi
31706
31707
31708  test -n "$AS" && break
31709done
31710
31711  else
31712    # The variable is set, but is it from the command line or the environment?
31713
31714    # Try to remove the string !AS! from our list.
31715    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31716    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31717      # If it failed, the variable was not from the command line. Ignore it,
31718      # but warn the user (except for BASH, which is always set by the calling BASH).
31719      if test "xAS" != xBASH; then
31720        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
31721$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
31722      fi
31723      # Try to locate tool using the code snippet
31724      for ac_prog in as
31725do
31726  # Extract the first word of "$ac_prog", so it can be a program name with args.
31727set dummy $ac_prog; ac_word=$2
31728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31729$as_echo_n "checking for $ac_word... " >&6; }
31730if ${ac_cv_path_AS+:} false; then :
31731  $as_echo_n "(cached) " >&6
31732else
31733  case $AS in
31734  [\\/]* | ?:[\\/]*)
31735  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31736  ;;
31737  *)
31738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31739for as_dir in $PATH
31740do
31741  IFS=$as_save_IFS
31742  test -z "$as_dir" && as_dir=.
31743    for ac_exec_ext in '' $ac_executable_extensions; do
31744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31745    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31747    break 2
31748  fi
31749done
31750  done
31751IFS=$as_save_IFS
31752
31753  ;;
31754esac
31755fi
31756AS=$ac_cv_path_AS
31757if test -n "$AS"; then
31758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31759$as_echo "$AS" >&6; }
31760else
31761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31762$as_echo "no" >&6; }
31763fi
31764
31765
31766  test -n "$AS" && break
31767done
31768
31769    else
31770      # If it succeeded, then it was overridden by the user. We will use it
31771      # for the tool.
31772
31773      # First remove it from the list of overridden variables, so we can test
31774      # for unknown variables in the end.
31775      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31776
31777      # Check if the provided tool contains a complete path.
31778      tool_specified="$AS"
31779      tool_basename="${tool_specified##*/}"
31780      if test "x$tool_basename" = "x$tool_specified"; then
31781        # A command without a complete path is provided, search $PATH.
31782        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
31783$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
31784        # Extract the first word of "$tool_basename", so it can be a program name with args.
31785set dummy $tool_basename; ac_word=$2
31786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31787$as_echo_n "checking for $ac_word... " >&6; }
31788if ${ac_cv_path_AS+:} false; then :
31789  $as_echo_n "(cached) " >&6
31790else
31791  case $AS in
31792  [\\/]* | ?:[\\/]*)
31793  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31794  ;;
31795  *)
31796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31797for as_dir in $PATH
31798do
31799  IFS=$as_save_IFS
31800  test -z "$as_dir" && as_dir=.
31801    for ac_exec_ext in '' $ac_executable_extensions; do
31802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31803    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31805    break 2
31806  fi
31807done
31808  done
31809IFS=$as_save_IFS
31810
31811  ;;
31812esac
31813fi
31814AS=$ac_cv_path_AS
31815if test -n "$AS"; then
31816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31817$as_echo "$AS" >&6; }
31818else
31819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31820$as_echo "no" >&6; }
31821fi
31822
31823
31824        if test "x$AS" = x; then
31825          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31826        fi
31827      else
31828        # Otherwise we believe it is a complete path. Use it as it is.
31829        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
31830$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
31831        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
31832$as_echo_n "checking for AS... " >&6; }
31833        if test ! -x "$tool_specified"; then
31834          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31835$as_echo "not found" >&6; }
31836          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
31837        fi
31838        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31839$as_echo "$tool_specified" >&6; }
31840      fi
31841    fi
31842  fi
31843
31844
31845
31846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31847
31848  # First separate the path from the arguments. This will split at the first
31849  # space.
31850  complete="$AS"
31851  path="${complete%% *}"
31852  tmp="$complete EOL"
31853  arguments="${tmp#* }"
31854
31855  # Input might be given as Windows format, start by converting to
31856  # unix format.
31857  new_path=`$CYGPATH -u "$path"`
31858
31859  # Now try to locate executable using which
31860  new_path=`$WHICH "$new_path" 2> /dev/null`
31861  # bat and cmd files are not always considered executable in cygwin causing which
31862  # to not find them
31863  if test "x$new_path" = x \
31864      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31865      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31866    new_path=`$CYGPATH -u "$path"`
31867  fi
31868  if test "x$new_path" = x; then
31869    # Oops. Which didn't find the executable.
31870    # The splitting of arguments from the executable at a space might have been incorrect,
31871    # since paths with space are more likely in Windows. Give it another try with the whole
31872    # argument.
31873    path="$complete"
31874    arguments="EOL"
31875    new_path=`$CYGPATH -u "$path"`
31876    new_path=`$WHICH "$new_path" 2> /dev/null`
31877    # bat and cmd files are not always considered executable in cygwin causing which
31878    # to not find them
31879    if test "x$new_path" = x \
31880        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31881        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31882      new_path=`$CYGPATH -u "$path"`
31883    fi
31884    if test "x$new_path" = x; then
31885      # It's still not found. Now this is an unrecoverable error.
31886      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31887$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31888      has_space=`$ECHO "$complete" | $GREP " "`
31889      if test "x$has_space" != x; then
31890        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31891$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31892      fi
31893      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31894    fi
31895  fi
31896
31897  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31898  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31899  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31900  # "foo.exe" is OK but "foo" is an error.
31901  #
31902  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31903  # It is also a way to make sure we got the proper file name for the real test later on.
31904  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31905  if test "x$test_shortpath" = x; then
31906    # Short path failed, file does not exist as specified.
31907    # Try adding .exe or .cmd
31908    if test -f "${new_path}.exe"; then
31909      input_to_shortpath="${new_path}.exe"
31910    elif test -f "${new_path}.cmd"; then
31911      input_to_shortpath="${new_path}.cmd"
31912    else
31913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
31914$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
31915      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31916$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31917      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31918    fi
31919  else
31920    input_to_shortpath="$new_path"
31921  fi
31922
31923  # Call helper function which possibly converts this using DOS-style short mode.
31924  # If so, the updated path is stored in $new_path.
31925  new_path="$input_to_shortpath"
31926
31927  input_path="$input_to_shortpath"
31928  # Check if we need to convert this using DOS-style short mode. If the path
31929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31930  # take no chances and rewrite it.
31931  # Note: m4 eats our [], so we need to use [ and ] instead.
31932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31933  if test "x$has_forbidden_chars" != x; then
31934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31935    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31936    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31937    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31938      # Going to short mode and back again did indeed matter. Since short mode is
31939      # case insensitive, let's make it lowercase to improve readability.
31940      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31941      # Now convert it back to Unix-stile (cygpath)
31942      input_path=`$CYGPATH -u "$shortmode_path"`
31943      new_path="$input_path"
31944    fi
31945  fi
31946
31947  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31948  if test "x$test_cygdrive_prefix" = x; then
31949    # As a simple fix, exclude /usr/bin since it's not a real path.
31950    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31951      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31952      # a path prefixed by /cygdrive for fixpath to work.
31953      new_path="$CYGWIN_ROOT_PATH$input_path"
31954    fi
31955  fi
31956
31957  # remove trailing .exe if any
31958  new_path="${new_path/%.exe/}"
31959
31960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31961
31962  # First separate the path from the arguments. This will split at the first
31963  # space.
31964  complete="$AS"
31965  path="${complete%% *}"
31966  tmp="$complete EOL"
31967  arguments="${tmp#* }"
31968
31969  # Input might be given as Windows format, start by converting to
31970  # unix format.
31971  new_path="$path"
31972
31973  windows_path="$new_path"
31974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31975    unix_path=`$CYGPATH -u "$windows_path"`
31976    new_path="$unix_path"
31977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31979    new_path="$unix_path"
31980  fi
31981
31982
31983  # Now try to locate executable using which
31984  new_path=`$WHICH "$new_path" 2> /dev/null`
31985
31986  if test "x$new_path" = x; then
31987    # Oops. Which didn't find the executable.
31988    # The splitting of arguments from the executable at a space might have been incorrect,
31989    # since paths with space are more likely in Windows. Give it another try with the whole
31990    # argument.
31991    path="$complete"
31992    arguments="EOL"
31993    new_path="$path"
31994
31995  windows_path="$new_path"
31996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31997    unix_path=`$CYGPATH -u "$windows_path"`
31998    new_path="$unix_path"
31999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32001    new_path="$unix_path"
32002  fi
32003
32004
32005    new_path=`$WHICH "$new_path" 2> /dev/null`
32006
32007    if test "x$new_path" = x; then
32008      # It's still not found. Now this is an unrecoverable error.
32009      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32010$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32011      has_space=`$ECHO "$complete" | $GREP " "`
32012      if test "x$has_space" != x; then
32013        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32014$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32015      fi
32016      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32017    fi
32018  fi
32019
32020  # Now new_path has a complete unix path to the binary
32021  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32022    # Keep paths in /bin as-is, but remove trailing .exe if any
32023    new_path="${new_path/%.exe/}"
32024    # Do not save /bin paths to all_fixpath_prefixes!
32025  else
32026    # Not in mixed or Windows style, start by that.
32027    new_path=`cmd //c echo $new_path`
32028
32029  input_path="$new_path"
32030  # Check if we need to convert this using DOS-style short mode. If the path
32031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32032  # take no chances and rewrite it.
32033  # Note: m4 eats our [], so we need to use [ and ] instead.
32034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32035  if test "x$has_forbidden_chars" != x; then
32036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32037    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32038  fi
32039
32040    # Output is in $new_path
32041
32042  windows_path="$new_path"
32043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32044    unix_path=`$CYGPATH -u "$windows_path"`
32045    new_path="$unix_path"
32046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32048    new_path="$unix_path"
32049  fi
32050
32051    # remove trailing .exe if any
32052    new_path="${new_path/%.exe/}"
32053
32054    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32055    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32056  fi
32057
32058  else
32059    # We're on a posix platform. Hooray! :)
32060    # First separate the path from the arguments. This will split at the first
32061    # space.
32062    complete="$AS"
32063    path="${complete%% *}"
32064    tmp="$complete EOL"
32065    arguments="${tmp#* }"
32066
32067    # Cannot rely on the command "which" here since it doesn't always work.
32068    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32069    if test -z "$is_absolute_path"; then
32070      # Path to executable is not absolute. Find it.
32071      IFS_save="$IFS"
32072      IFS=:
32073      for p in $PATH; do
32074        if test -f "$p/$path" && test -x "$p/$path"; then
32075          new_path="$p/$path"
32076          break
32077        fi
32078      done
32079      IFS="$IFS_save"
32080    else
32081      # This is an absolute path, we can use it without further modifications.
32082      new_path="$path"
32083    fi
32084
32085    if test "x$new_path" = x; then
32086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32087$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32088      has_space=`$ECHO "$complete" | $GREP " "`
32089      if test "x$has_space" != x; then
32090        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32091$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32092      fi
32093      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32094    fi
32095  fi
32096
32097  # Now join together the path and the arguments once again
32098  if test "x$arguments" != xEOL; then
32099    new_complete="$new_path ${arguments% *}"
32100  else
32101    new_complete="$new_path"
32102  fi
32103
32104  if test "x$complete" != "x$new_complete"; then
32105    AS="$new_complete"
32106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32107$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32108  fi
32109
32110  else
32111    # FIXME: is this correct for microsoft?
32112    AS="$CC -c"
32113  fi
32114
32115
32116  #
32117  # Setup the archiver (AR)
32118  #
32119  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32120    # The corresponding ar tool is lib.exe (used to create static libraries)
32121    # Extract the first word of "lib", so it can be a program name with args.
32122set dummy lib; ac_word=$2
32123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32124$as_echo_n "checking for $ac_word... " >&6; }
32125if ${ac_cv_prog_AR+:} false; then :
32126  $as_echo_n "(cached) " >&6
32127else
32128  if test -n "$AR"; then
32129  ac_cv_prog_AR="$AR" # Let the user override the test.
32130else
32131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32132for as_dir in $PATH
32133do
32134  IFS=$as_save_IFS
32135  test -z "$as_dir" && as_dir=.
32136    for ac_exec_ext in '' $ac_executable_extensions; do
32137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32138    ac_cv_prog_AR="lib"
32139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32140    break 2
32141  fi
32142done
32143  done
32144IFS=$as_save_IFS
32145
32146fi
32147fi
32148AR=$ac_cv_prog_AR
32149if test -n "$AR"; then
32150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32151$as_echo "$AR" >&6; }
32152else
32153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32154$as_echo "no" >&6; }
32155fi
32156
32157
32158  else
32159
32160
32161  # Publish this variable in the help.
32162
32163
32164  if test "x$AR" = x; then
32165    # The variable is not set by user, try to locate tool using the code snippet
32166    if test -n "$ac_tool_prefix"; then
32167  for ac_prog in ar
32168  do
32169    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32170set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32172$as_echo_n "checking for $ac_word... " >&6; }
32173if ${ac_cv_prog_AR+:} false; then :
32174  $as_echo_n "(cached) " >&6
32175else
32176  if test -n "$AR"; then
32177  ac_cv_prog_AR="$AR" # Let the user override the test.
32178else
32179as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32180for as_dir in $PATH
32181do
32182  IFS=$as_save_IFS
32183  test -z "$as_dir" && as_dir=.
32184    for ac_exec_ext in '' $ac_executable_extensions; do
32185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32186    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32188    break 2
32189  fi
32190done
32191  done
32192IFS=$as_save_IFS
32193
32194fi
32195fi
32196AR=$ac_cv_prog_AR
32197if test -n "$AR"; then
32198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32199$as_echo "$AR" >&6; }
32200else
32201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32202$as_echo "no" >&6; }
32203fi
32204
32205
32206    test -n "$AR" && break
32207  done
32208fi
32209if test -z "$AR"; then
32210  ac_ct_AR=$AR
32211  for ac_prog in ar
32212do
32213  # Extract the first word of "$ac_prog", so it can be a program name with args.
32214set dummy $ac_prog; ac_word=$2
32215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32216$as_echo_n "checking for $ac_word... " >&6; }
32217if ${ac_cv_prog_ac_ct_AR+:} false; then :
32218  $as_echo_n "(cached) " >&6
32219else
32220  if test -n "$ac_ct_AR"; then
32221  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32222else
32223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32224for as_dir in $PATH
32225do
32226  IFS=$as_save_IFS
32227  test -z "$as_dir" && as_dir=.
32228    for ac_exec_ext in '' $ac_executable_extensions; do
32229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32230    ac_cv_prog_ac_ct_AR="$ac_prog"
32231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32232    break 2
32233  fi
32234done
32235  done
32236IFS=$as_save_IFS
32237
32238fi
32239fi
32240ac_ct_AR=$ac_cv_prog_ac_ct_AR
32241if test -n "$ac_ct_AR"; then
32242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32243$as_echo "$ac_ct_AR" >&6; }
32244else
32245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32246$as_echo "no" >&6; }
32247fi
32248
32249
32250  test -n "$ac_ct_AR" && break
32251done
32252
32253  if test "x$ac_ct_AR" = x; then
32254    AR=""
32255  else
32256    case $cross_compiling:$ac_tool_warned in
32257yes:)
32258{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32259$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32260ac_tool_warned=yes ;;
32261esac
32262    AR=$ac_ct_AR
32263  fi
32264fi
32265
32266  else
32267    # The variable is set, but is it from the command line or the environment?
32268
32269    # Try to remove the string !AR! from our list.
32270    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32271    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32272      # If it failed, the variable was not from the command line. Ignore it,
32273      # but warn the user (except for BASH, which is always set by the calling BASH).
32274      if test "xAR" != xBASH; then
32275        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32276$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32277      fi
32278      # Try to locate tool using the code snippet
32279      if test -n "$ac_tool_prefix"; then
32280  for ac_prog in ar
32281  do
32282    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32283set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32285$as_echo_n "checking for $ac_word... " >&6; }
32286if ${ac_cv_prog_AR+:} false; then :
32287  $as_echo_n "(cached) " >&6
32288else
32289  if test -n "$AR"; then
32290  ac_cv_prog_AR="$AR" # Let the user override the test.
32291else
32292as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32293for as_dir in $PATH
32294do
32295  IFS=$as_save_IFS
32296  test -z "$as_dir" && as_dir=.
32297    for ac_exec_ext in '' $ac_executable_extensions; do
32298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32299    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32301    break 2
32302  fi
32303done
32304  done
32305IFS=$as_save_IFS
32306
32307fi
32308fi
32309AR=$ac_cv_prog_AR
32310if test -n "$AR"; then
32311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32312$as_echo "$AR" >&6; }
32313else
32314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32315$as_echo "no" >&6; }
32316fi
32317
32318
32319    test -n "$AR" && break
32320  done
32321fi
32322if test -z "$AR"; then
32323  ac_ct_AR=$AR
32324  for ac_prog in ar
32325do
32326  # Extract the first word of "$ac_prog", so it can be a program name with args.
32327set dummy $ac_prog; ac_word=$2
32328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32329$as_echo_n "checking for $ac_word... " >&6; }
32330if ${ac_cv_prog_ac_ct_AR+:} false; then :
32331  $as_echo_n "(cached) " >&6
32332else
32333  if test -n "$ac_ct_AR"; then
32334  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32335else
32336as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32337for as_dir in $PATH
32338do
32339  IFS=$as_save_IFS
32340  test -z "$as_dir" && as_dir=.
32341    for ac_exec_ext in '' $ac_executable_extensions; do
32342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32343    ac_cv_prog_ac_ct_AR="$ac_prog"
32344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32345    break 2
32346  fi
32347done
32348  done
32349IFS=$as_save_IFS
32350
32351fi
32352fi
32353ac_ct_AR=$ac_cv_prog_ac_ct_AR
32354if test -n "$ac_ct_AR"; then
32355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32356$as_echo "$ac_ct_AR" >&6; }
32357else
32358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32359$as_echo "no" >&6; }
32360fi
32361
32362
32363  test -n "$ac_ct_AR" && break
32364done
32365
32366  if test "x$ac_ct_AR" = x; then
32367    AR=""
32368  else
32369    case $cross_compiling:$ac_tool_warned in
32370yes:)
32371{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32372$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32373ac_tool_warned=yes ;;
32374esac
32375    AR=$ac_ct_AR
32376  fi
32377fi
32378
32379    else
32380      # If it succeeded, then it was overridden by the user. We will use it
32381      # for the tool.
32382
32383      # First remove it from the list of overridden variables, so we can test
32384      # for unknown variables in the end.
32385      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32386
32387      # Check if the provided tool contains a complete path.
32388      tool_specified="$AR"
32389      tool_basename="${tool_specified##*/}"
32390      if test "x$tool_basename" = "x$tool_specified"; then
32391        # A command without a complete path is provided, search $PATH.
32392        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32393$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32394        # Extract the first word of "$tool_basename", so it can be a program name with args.
32395set dummy $tool_basename; ac_word=$2
32396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32397$as_echo_n "checking for $ac_word... " >&6; }
32398if ${ac_cv_path_AR+:} false; then :
32399  $as_echo_n "(cached) " >&6
32400else
32401  case $AR in
32402  [\\/]* | ?:[\\/]*)
32403  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32404  ;;
32405  *)
32406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32407for as_dir in $PATH
32408do
32409  IFS=$as_save_IFS
32410  test -z "$as_dir" && as_dir=.
32411    for ac_exec_ext in '' $ac_executable_extensions; do
32412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32413    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32415    break 2
32416  fi
32417done
32418  done
32419IFS=$as_save_IFS
32420
32421  ;;
32422esac
32423fi
32424AR=$ac_cv_path_AR
32425if test -n "$AR"; then
32426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32427$as_echo "$AR" >&6; }
32428else
32429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32430$as_echo "no" >&6; }
32431fi
32432
32433
32434        if test "x$AR" = x; then
32435          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32436        fi
32437      else
32438        # Otherwise we believe it is a complete path. Use it as it is.
32439        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32440$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32441        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32442$as_echo_n "checking for AR... " >&6; }
32443        if test ! -x "$tool_specified"; then
32444          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32445$as_echo "not found" >&6; }
32446          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32447        fi
32448        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32449$as_echo "$tool_specified" >&6; }
32450      fi
32451    fi
32452  fi
32453
32454
32455  fi
32456
32457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32458
32459  # First separate the path from the arguments. This will split at the first
32460  # space.
32461  complete="$AR"
32462  path="${complete%% *}"
32463  tmp="$complete EOL"
32464  arguments="${tmp#* }"
32465
32466  # Input might be given as Windows format, start by converting to
32467  # unix format.
32468  new_path=`$CYGPATH -u "$path"`
32469
32470  # Now try to locate executable using which
32471  new_path=`$WHICH "$new_path" 2> /dev/null`
32472  # bat and cmd files are not always considered executable in cygwin causing which
32473  # to not find them
32474  if test "x$new_path" = x \
32475      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32476      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32477    new_path=`$CYGPATH -u "$path"`
32478  fi
32479  if test "x$new_path" = x; then
32480    # Oops. Which didn't find the executable.
32481    # The splitting of arguments from the executable at a space might have been incorrect,
32482    # since paths with space are more likely in Windows. Give it another try with the whole
32483    # argument.
32484    path="$complete"
32485    arguments="EOL"
32486    new_path=`$CYGPATH -u "$path"`
32487    new_path=`$WHICH "$new_path" 2> /dev/null`
32488    # bat and cmd files are not always considered executable in cygwin causing which
32489    # to not find them
32490    if test "x$new_path" = x \
32491        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32492        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32493      new_path=`$CYGPATH -u "$path"`
32494    fi
32495    if test "x$new_path" = x; then
32496      # It's still not found. Now this is an unrecoverable error.
32497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32498$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32499      has_space=`$ECHO "$complete" | $GREP " "`
32500      if test "x$has_space" != x; then
32501        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32502$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32503      fi
32504      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32505    fi
32506  fi
32507
32508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32511  # "foo.exe" is OK but "foo" is an error.
32512  #
32513  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32514  # It is also a way to make sure we got the proper file name for the real test later on.
32515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32516  if test "x$test_shortpath" = x; then
32517    # Short path failed, file does not exist as specified.
32518    # Try adding .exe or .cmd
32519    if test -f "${new_path}.exe"; then
32520      input_to_shortpath="${new_path}.exe"
32521    elif test -f "${new_path}.cmd"; then
32522      input_to_shortpath="${new_path}.cmd"
32523    else
32524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32525$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32526      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32527$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32528      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32529    fi
32530  else
32531    input_to_shortpath="$new_path"
32532  fi
32533
32534  # Call helper function which possibly converts this using DOS-style short mode.
32535  # If so, the updated path is stored in $new_path.
32536  new_path="$input_to_shortpath"
32537
32538  input_path="$input_to_shortpath"
32539  # Check if we need to convert this using DOS-style short mode. If the path
32540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32541  # take no chances and rewrite it.
32542  # Note: m4 eats our [], so we need to use [ and ] instead.
32543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32544  if test "x$has_forbidden_chars" != x; then
32545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32549      # Going to short mode and back again did indeed matter. Since short mode is
32550      # case insensitive, let's make it lowercase to improve readability.
32551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32552      # Now convert it back to Unix-stile (cygpath)
32553      input_path=`$CYGPATH -u "$shortmode_path"`
32554      new_path="$input_path"
32555    fi
32556  fi
32557
32558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32559  if test "x$test_cygdrive_prefix" = x; then
32560    # As a simple fix, exclude /usr/bin since it's not a real path.
32561    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32563      # a path prefixed by /cygdrive for fixpath to work.
32564      new_path="$CYGWIN_ROOT_PATH$input_path"
32565    fi
32566  fi
32567
32568  # remove trailing .exe if any
32569  new_path="${new_path/%.exe/}"
32570
32571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32572
32573  # First separate the path from the arguments. This will split at the first
32574  # space.
32575  complete="$AR"
32576  path="${complete%% *}"
32577  tmp="$complete EOL"
32578  arguments="${tmp#* }"
32579
32580  # Input might be given as Windows format, start by converting to
32581  # unix format.
32582  new_path="$path"
32583
32584  windows_path="$new_path"
32585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32586    unix_path=`$CYGPATH -u "$windows_path"`
32587    new_path="$unix_path"
32588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32590    new_path="$unix_path"
32591  fi
32592
32593
32594  # Now try to locate executable using which
32595  new_path=`$WHICH "$new_path" 2> /dev/null`
32596
32597  if test "x$new_path" = x; then
32598    # Oops. Which didn't find the executable.
32599    # The splitting of arguments from the executable at a space might have been incorrect,
32600    # since paths with space are more likely in Windows. Give it another try with the whole
32601    # argument.
32602    path="$complete"
32603    arguments="EOL"
32604    new_path="$path"
32605
32606  windows_path="$new_path"
32607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32608    unix_path=`$CYGPATH -u "$windows_path"`
32609    new_path="$unix_path"
32610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32612    new_path="$unix_path"
32613  fi
32614
32615
32616    new_path=`$WHICH "$new_path" 2> /dev/null`
32617
32618    if test "x$new_path" = x; then
32619      # It's still not found. Now this is an unrecoverable error.
32620      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32621$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32622      has_space=`$ECHO "$complete" | $GREP " "`
32623      if test "x$has_space" != x; then
32624        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32625$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32626      fi
32627      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32628    fi
32629  fi
32630
32631  # Now new_path has a complete unix path to the binary
32632  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32633    # Keep paths in /bin as-is, but remove trailing .exe if any
32634    new_path="${new_path/%.exe/}"
32635    # Do not save /bin paths to all_fixpath_prefixes!
32636  else
32637    # Not in mixed or Windows style, start by that.
32638    new_path=`cmd //c echo $new_path`
32639
32640  input_path="$new_path"
32641  # Check if we need to convert this using DOS-style short mode. If the path
32642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32643  # take no chances and rewrite it.
32644  # Note: m4 eats our [], so we need to use [ and ] instead.
32645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32646  if test "x$has_forbidden_chars" != x; then
32647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32648    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32649  fi
32650
32651    # Output is in $new_path
32652
32653  windows_path="$new_path"
32654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32655    unix_path=`$CYGPATH -u "$windows_path"`
32656    new_path="$unix_path"
32657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32659    new_path="$unix_path"
32660  fi
32661
32662    # remove trailing .exe if any
32663    new_path="${new_path/%.exe/}"
32664
32665    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32666    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32667  fi
32668
32669  else
32670    # We're on a posix platform. Hooray! :)
32671    # First separate the path from the arguments. This will split at the first
32672    # space.
32673    complete="$AR"
32674    path="${complete%% *}"
32675    tmp="$complete EOL"
32676    arguments="${tmp#* }"
32677
32678    # Cannot rely on the command "which" here since it doesn't always work.
32679    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32680    if test -z "$is_absolute_path"; then
32681      # Path to executable is not absolute. Find it.
32682      IFS_save="$IFS"
32683      IFS=:
32684      for p in $PATH; do
32685        if test -f "$p/$path" && test -x "$p/$path"; then
32686          new_path="$p/$path"
32687          break
32688        fi
32689      done
32690      IFS="$IFS_save"
32691    else
32692      # This is an absolute path, we can use it without further modifications.
32693      new_path="$path"
32694    fi
32695
32696    if test "x$new_path" = x; then
32697      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32698$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32699      has_space=`$ECHO "$complete" | $GREP " "`
32700      if test "x$has_space" != x; then
32701        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32702$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32703      fi
32704      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32705    fi
32706  fi
32707
32708  # Now join together the path and the arguments once again
32709  if test "x$arguments" != xEOL; then
32710    new_complete="$new_path ${arguments% *}"
32711  else
32712    new_complete="$new_path"
32713  fi
32714
32715  if test "x$complete" != "x$new_complete"; then
32716    AR="$new_complete"
32717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32718$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32719  fi
32720
32721
32722
32723  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
32724    ac_ext=m
32725ac_cpp='$OBJCPP $CPPFLAGS'
32726ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32727ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32728ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32729if test -n "$ac_tool_prefix"; then
32730  for ac_prog in gcc objcc objc cc CC
32731  do
32732    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32733set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32735$as_echo_n "checking for $ac_word... " >&6; }
32736if ${ac_cv_prog_OBJC+:} false; then :
32737  $as_echo_n "(cached) " >&6
32738else
32739  if test -n "$OBJC"; then
32740  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32741else
32742as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32743for as_dir in $PATH
32744do
32745  IFS=$as_save_IFS
32746  test -z "$as_dir" && as_dir=.
32747    for ac_exec_ext in '' $ac_executable_extensions; do
32748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32749    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32751    break 2
32752  fi
32753done
32754  done
32755IFS=$as_save_IFS
32756
32757fi
32758fi
32759OBJC=$ac_cv_prog_OBJC
32760if test -n "$OBJC"; then
32761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
32762$as_echo "$OBJC" >&6; }
32763else
32764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32765$as_echo "no" >&6; }
32766fi
32767
32768
32769    test -n "$OBJC" && break
32770  done
32771fi
32772if test -z "$OBJC"; then
32773  ac_ct_OBJC=$OBJC
32774  for ac_prog in gcc objcc objc cc CC
32775do
32776  # Extract the first word of "$ac_prog", so it can be a program name with args.
32777set dummy $ac_prog; ac_word=$2
32778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32779$as_echo_n "checking for $ac_word... " >&6; }
32780if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
32781  $as_echo_n "(cached) " >&6
32782else
32783  if test -n "$ac_ct_OBJC"; then
32784  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
32785else
32786as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32787for as_dir in $PATH
32788do
32789  IFS=$as_save_IFS
32790  test -z "$as_dir" && as_dir=.
32791    for ac_exec_ext in '' $ac_executable_extensions; do
32792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32793    ac_cv_prog_ac_ct_OBJC="$ac_prog"
32794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32795    break 2
32796  fi
32797done
32798  done
32799IFS=$as_save_IFS
32800
32801fi
32802fi
32803ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
32804if test -n "$ac_ct_OBJC"; then
32805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
32806$as_echo "$ac_ct_OBJC" >&6; }
32807else
32808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32809$as_echo "no" >&6; }
32810fi
32811
32812
32813  test -n "$ac_ct_OBJC" && break
32814done
32815
32816  if test "x$ac_ct_OBJC" = x; then
32817    OBJC="gcc"
32818  else
32819    case $cross_compiling:$ac_tool_warned in
32820yes:)
32821{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32822$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32823ac_tool_warned=yes ;;
32824esac
32825    OBJC=$ac_ct_OBJC
32826  fi
32827fi
32828
32829# Provide some information about the compiler.
32830$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
32831set X $ac_compile
32832ac_compiler=$2
32833for ac_option in --version -v -V -qversion; do
32834  { { ac_try="$ac_compiler $ac_option >&5"
32835case "(($ac_try" in
32836  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32837  *) ac_try_echo=$ac_try;;
32838esac
32839eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32840$as_echo "$ac_try_echo"; } >&5
32841  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32842  ac_status=$?
32843  if test -s conftest.err; then
32844    sed '10a\
32845... rest of stderr output deleted ...
32846         10q' conftest.err >conftest.er1
32847    cat conftest.er1 >&5
32848  fi
32849  rm -f conftest.er1 conftest.err
32850  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32851  test $ac_status = 0; }
32852done
32853
32854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
32855$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
32856if ${ac_cv_objc_compiler_gnu+:} false; then :
32857  $as_echo_n "(cached) " >&6
32858else
32859  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32860/* end confdefs.h.  */
32861
32862int
32863main ()
32864{
32865#ifndef __GNUC__
32866       choke me
32867#endif
32868
32869  ;
32870  return 0;
32871}
32872_ACEOF
32873if ac_fn_objc_try_compile "$LINENO"; then :
32874  ac_compiler_gnu=yes
32875else
32876  ac_compiler_gnu=no
32877fi
32878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32879ac_cv_objc_compiler_gnu=$ac_compiler_gnu
32880
32881fi
32882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
32883$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
32884if test $ac_compiler_gnu = yes; then
32885  GOBJC=yes
32886else
32887  GOBJC=
32888fi
32889ac_test_OBJCFLAGS=${OBJCFLAGS+set}
32890ac_save_OBJCFLAGS=$OBJCFLAGS
32891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
32892$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
32893if ${ac_cv_prog_objc_g+:} false; then :
32894  $as_echo_n "(cached) " >&6
32895else
32896  ac_save_objc_werror_flag=$ac_objc_werror_flag
32897   ac_objc_werror_flag=yes
32898   ac_cv_prog_objc_g=no
32899   OBJCFLAGS="-g"
32900   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32901/* end confdefs.h.  */
32902
32903int
32904main ()
32905{
32906
32907  ;
32908  return 0;
32909}
32910_ACEOF
32911if ac_fn_objc_try_compile "$LINENO"; then :
32912  ac_cv_prog_objc_g=yes
32913else
32914  OBJCFLAGS=""
32915      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32916/* end confdefs.h.  */
32917
32918int
32919main ()
32920{
32921
32922  ;
32923  return 0;
32924}
32925_ACEOF
32926if ac_fn_objc_try_compile "$LINENO"; then :
32927
32928else
32929  ac_objc_werror_flag=$ac_save_objc_werror_flag
32930	 OBJCFLAGS="-g"
32931	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32932/* end confdefs.h.  */
32933
32934int
32935main ()
32936{
32937
32938  ;
32939  return 0;
32940}
32941_ACEOF
32942if ac_fn_objc_try_compile "$LINENO"; then :
32943  ac_cv_prog_objc_g=yes
32944fi
32945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32946fi
32947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32948fi
32949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32950   ac_objc_werror_flag=$ac_save_objc_werror_flag
32951fi
32952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
32953$as_echo "$ac_cv_prog_objc_g" >&6; }
32954if test "$ac_test_OBJCFLAGS" = set; then
32955  OBJCFLAGS=$ac_save_OBJCFLAGS
32956elif test $ac_cv_prog_objc_g = yes; then
32957  if test "$GOBJC" = yes; then
32958    OBJCFLAGS="-g -O2"
32959  else
32960    OBJCFLAGS="-g"
32961  fi
32962else
32963  if test "$GOBJC" = yes; then
32964    OBJCFLAGS="-O2"
32965  else
32966    OBJCFLAGS=
32967  fi
32968fi
32969ac_ext=cpp
32970ac_cpp='$CXXCPP $CPPFLAGS'
32971ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32972ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32973ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32974
32975
32976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32977
32978  # First separate the path from the arguments. This will split at the first
32979  # space.
32980  complete="$OBJC"
32981  path="${complete%% *}"
32982  tmp="$complete EOL"
32983  arguments="${tmp#* }"
32984
32985  # Input might be given as Windows format, start by converting to
32986  # unix format.
32987  new_path=`$CYGPATH -u "$path"`
32988
32989  # Now try to locate executable using which
32990  new_path=`$WHICH "$new_path" 2> /dev/null`
32991  # bat and cmd files are not always considered executable in cygwin causing which
32992  # to not find them
32993  if test "x$new_path" = x \
32994      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32995      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32996    new_path=`$CYGPATH -u "$path"`
32997  fi
32998  if test "x$new_path" = x; then
32999    # Oops. Which didn't find the executable.
33000    # The splitting of arguments from the executable at a space might have been incorrect,
33001    # since paths with space are more likely in Windows. Give it another try with the whole
33002    # argument.
33003    path="$complete"
33004    arguments="EOL"
33005    new_path=`$CYGPATH -u "$path"`
33006    new_path=`$WHICH "$new_path" 2> /dev/null`
33007    # bat and cmd files are not always considered executable in cygwin causing which
33008    # to not find them
33009    if test "x$new_path" = x \
33010        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33011        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33012      new_path=`$CYGPATH -u "$path"`
33013    fi
33014    if test "x$new_path" = x; then
33015      # It's still not found. Now this is an unrecoverable error.
33016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33017$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33018      has_space=`$ECHO "$complete" | $GREP " "`
33019      if test "x$has_space" != x; then
33020        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33021$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33022      fi
33023      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33024    fi
33025  fi
33026
33027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33030  # "foo.exe" is OK but "foo" is an error.
33031  #
33032  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33033  # It is also a way to make sure we got the proper file name for the real test later on.
33034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33035  if test "x$test_shortpath" = x; then
33036    # Short path failed, file does not exist as specified.
33037    # Try adding .exe or .cmd
33038    if test -f "${new_path}.exe"; then
33039      input_to_shortpath="${new_path}.exe"
33040    elif test -f "${new_path}.cmd"; then
33041      input_to_shortpath="${new_path}.cmd"
33042    else
33043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33044$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33045      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33046$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33047      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33048    fi
33049  else
33050    input_to_shortpath="$new_path"
33051  fi
33052
33053  # Call helper function which possibly converts this using DOS-style short mode.
33054  # If so, the updated path is stored in $new_path.
33055  new_path="$input_to_shortpath"
33056
33057  input_path="$input_to_shortpath"
33058  # Check if we need to convert this using DOS-style short mode. If the path
33059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33060  # take no chances and rewrite it.
33061  # Note: m4 eats our [], so we need to use [ and ] instead.
33062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33063  if test "x$has_forbidden_chars" != x; then
33064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33065    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33066    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33067    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33068      # Going to short mode and back again did indeed matter. Since short mode is
33069      # case insensitive, let's make it lowercase to improve readability.
33070      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33071      # Now convert it back to Unix-stile (cygpath)
33072      input_path=`$CYGPATH -u "$shortmode_path"`
33073      new_path="$input_path"
33074    fi
33075  fi
33076
33077  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33078  if test "x$test_cygdrive_prefix" = x; then
33079    # As a simple fix, exclude /usr/bin since it's not a real path.
33080    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33081      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33082      # a path prefixed by /cygdrive for fixpath to work.
33083      new_path="$CYGWIN_ROOT_PATH$input_path"
33084    fi
33085  fi
33086
33087  # remove trailing .exe if any
33088  new_path="${new_path/%.exe/}"
33089
33090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33091
33092  # First separate the path from the arguments. This will split at the first
33093  # space.
33094  complete="$OBJC"
33095  path="${complete%% *}"
33096  tmp="$complete EOL"
33097  arguments="${tmp#* }"
33098
33099  # Input might be given as Windows format, start by converting to
33100  # unix format.
33101  new_path="$path"
33102
33103  windows_path="$new_path"
33104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33105    unix_path=`$CYGPATH -u "$windows_path"`
33106    new_path="$unix_path"
33107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33109    new_path="$unix_path"
33110  fi
33111
33112
33113  # Now try to locate executable using which
33114  new_path=`$WHICH "$new_path" 2> /dev/null`
33115
33116  if test "x$new_path" = x; then
33117    # Oops. Which didn't find the executable.
33118    # The splitting of arguments from the executable at a space might have been incorrect,
33119    # since paths with space are more likely in Windows. Give it another try with the whole
33120    # argument.
33121    path="$complete"
33122    arguments="EOL"
33123    new_path="$path"
33124
33125  windows_path="$new_path"
33126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33127    unix_path=`$CYGPATH -u "$windows_path"`
33128    new_path="$unix_path"
33129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33131    new_path="$unix_path"
33132  fi
33133
33134
33135    new_path=`$WHICH "$new_path" 2> /dev/null`
33136
33137    if test "x$new_path" = x; then
33138      # It's still not found. Now this is an unrecoverable error.
33139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33140$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33141      has_space=`$ECHO "$complete" | $GREP " "`
33142      if test "x$has_space" != x; then
33143        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33144$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33145      fi
33146      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33147    fi
33148  fi
33149
33150  # Now new_path has a complete unix path to the binary
33151  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33152    # Keep paths in /bin as-is, but remove trailing .exe if any
33153    new_path="${new_path/%.exe/}"
33154    # Do not save /bin paths to all_fixpath_prefixes!
33155  else
33156    # Not in mixed or Windows style, start by that.
33157    new_path=`cmd //c echo $new_path`
33158
33159  input_path="$new_path"
33160  # Check if we need to convert this using DOS-style short mode. If the path
33161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33162  # take no chances and rewrite it.
33163  # Note: m4 eats our [], so we need to use [ and ] instead.
33164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33165  if test "x$has_forbidden_chars" != x; then
33166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33167    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33168  fi
33169
33170    # Output is in $new_path
33171
33172  windows_path="$new_path"
33173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33174    unix_path=`$CYGPATH -u "$windows_path"`
33175    new_path="$unix_path"
33176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33178    new_path="$unix_path"
33179  fi
33180
33181    # remove trailing .exe if any
33182    new_path="${new_path/%.exe/}"
33183
33184    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33185    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33186  fi
33187
33188  else
33189    # We're on a posix platform. Hooray! :)
33190    # First separate the path from the arguments. This will split at the first
33191    # space.
33192    complete="$OBJC"
33193    path="${complete%% *}"
33194    tmp="$complete EOL"
33195    arguments="${tmp#* }"
33196
33197    # Cannot rely on the command "which" here since it doesn't always work.
33198    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33199    if test -z "$is_absolute_path"; then
33200      # Path to executable is not absolute. Find it.
33201      IFS_save="$IFS"
33202      IFS=:
33203      for p in $PATH; do
33204        if test -f "$p/$path" && test -x "$p/$path"; then
33205          new_path="$p/$path"
33206          break
33207        fi
33208      done
33209      IFS="$IFS_save"
33210    else
33211      # This is an absolute path, we can use it without further modifications.
33212      new_path="$path"
33213    fi
33214
33215    if test "x$new_path" = x; then
33216      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33217$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33218      has_space=`$ECHO "$complete" | $GREP " "`
33219      if test "x$has_space" != x; then
33220        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33221$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33222      fi
33223      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33224    fi
33225  fi
33226
33227  # Now join together the path and the arguments once again
33228  if test "x$arguments" != xEOL; then
33229    new_complete="$new_path ${arguments% *}"
33230  else
33231    new_complete="$new_path"
33232  fi
33233
33234  if test "x$complete" != "x$new_complete"; then
33235    OBJC="$new_complete"
33236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33237$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33238  fi
33239
33240
33241
33242  # Publish this variable in the help.
33243
33244
33245  if test "x$LIPO" = x; then
33246    # The variable is not set by user, try to locate tool using the code snippet
33247    for ac_prog in lipo
33248do
33249  # Extract the first word of "$ac_prog", so it can be a program name with args.
33250set dummy $ac_prog; ac_word=$2
33251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33252$as_echo_n "checking for $ac_word... " >&6; }
33253if ${ac_cv_path_LIPO+:} false; then :
33254  $as_echo_n "(cached) " >&6
33255else
33256  case $LIPO in
33257  [\\/]* | ?:[\\/]*)
33258  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33259  ;;
33260  *)
33261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33262for as_dir in $PATH
33263do
33264  IFS=$as_save_IFS
33265  test -z "$as_dir" && as_dir=.
33266    for ac_exec_ext in '' $ac_executable_extensions; do
33267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33268    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33270    break 2
33271  fi
33272done
33273  done
33274IFS=$as_save_IFS
33275
33276  ;;
33277esac
33278fi
33279LIPO=$ac_cv_path_LIPO
33280if test -n "$LIPO"; then
33281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33282$as_echo "$LIPO" >&6; }
33283else
33284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33285$as_echo "no" >&6; }
33286fi
33287
33288
33289  test -n "$LIPO" && break
33290done
33291
33292  else
33293    # The variable is set, but is it from the command line or the environment?
33294
33295    # Try to remove the string !LIPO! from our list.
33296    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33297    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33298      # If it failed, the variable was not from the command line. Ignore it,
33299      # but warn the user (except for BASH, which is always set by the calling BASH).
33300      if test "xLIPO" != xBASH; then
33301        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33302$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33303      fi
33304      # Try to locate tool using the code snippet
33305      for ac_prog in lipo
33306do
33307  # Extract the first word of "$ac_prog", so it can be a program name with args.
33308set dummy $ac_prog; ac_word=$2
33309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33310$as_echo_n "checking for $ac_word... " >&6; }
33311if ${ac_cv_path_LIPO+:} false; then :
33312  $as_echo_n "(cached) " >&6
33313else
33314  case $LIPO in
33315  [\\/]* | ?:[\\/]*)
33316  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33317  ;;
33318  *)
33319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33320for as_dir in $PATH
33321do
33322  IFS=$as_save_IFS
33323  test -z "$as_dir" && as_dir=.
33324    for ac_exec_ext in '' $ac_executable_extensions; do
33325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33326    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33328    break 2
33329  fi
33330done
33331  done
33332IFS=$as_save_IFS
33333
33334  ;;
33335esac
33336fi
33337LIPO=$ac_cv_path_LIPO
33338if test -n "$LIPO"; then
33339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33340$as_echo "$LIPO" >&6; }
33341else
33342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33343$as_echo "no" >&6; }
33344fi
33345
33346
33347  test -n "$LIPO" && break
33348done
33349
33350    else
33351      # If it succeeded, then it was overridden by the user. We will use it
33352      # for the tool.
33353
33354      # First remove it from the list of overridden variables, so we can test
33355      # for unknown variables in the end.
33356      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33357
33358      # Check if the provided tool contains a complete path.
33359      tool_specified="$LIPO"
33360      tool_basename="${tool_specified##*/}"
33361      if test "x$tool_basename" = "x$tool_specified"; then
33362        # A command without a complete path is provided, search $PATH.
33363        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33364$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33365        # Extract the first word of "$tool_basename", so it can be a program name with args.
33366set dummy $tool_basename; ac_word=$2
33367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33368$as_echo_n "checking for $ac_word... " >&6; }
33369if ${ac_cv_path_LIPO+:} false; then :
33370  $as_echo_n "(cached) " >&6
33371else
33372  case $LIPO in
33373  [\\/]* | ?:[\\/]*)
33374  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33375  ;;
33376  *)
33377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33378for as_dir in $PATH
33379do
33380  IFS=$as_save_IFS
33381  test -z "$as_dir" && as_dir=.
33382    for ac_exec_ext in '' $ac_executable_extensions; do
33383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33384    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33386    break 2
33387  fi
33388done
33389  done
33390IFS=$as_save_IFS
33391
33392  ;;
33393esac
33394fi
33395LIPO=$ac_cv_path_LIPO
33396if test -n "$LIPO"; then
33397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33398$as_echo "$LIPO" >&6; }
33399else
33400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33401$as_echo "no" >&6; }
33402fi
33403
33404
33405        if test "x$LIPO" = x; then
33406          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33407        fi
33408      else
33409        # Otherwise we believe it is a complete path. Use it as it is.
33410        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33411$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33412        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33413$as_echo_n "checking for LIPO... " >&6; }
33414        if test ! -x "$tool_specified"; then
33415          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33416$as_echo "not found" >&6; }
33417          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33418        fi
33419        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33420$as_echo "$tool_specified" >&6; }
33421      fi
33422    fi
33423  fi
33424
33425
33426
33427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33428
33429  # First separate the path from the arguments. This will split at the first
33430  # space.
33431  complete="$LIPO"
33432  path="${complete%% *}"
33433  tmp="$complete EOL"
33434  arguments="${tmp#* }"
33435
33436  # Input might be given as Windows format, start by converting to
33437  # unix format.
33438  new_path=`$CYGPATH -u "$path"`
33439
33440  # Now try to locate executable using which
33441  new_path=`$WHICH "$new_path" 2> /dev/null`
33442  # bat and cmd files are not always considered executable in cygwin causing which
33443  # to not find them
33444  if test "x$new_path" = x \
33445      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33446      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33447    new_path=`$CYGPATH -u "$path"`
33448  fi
33449  if test "x$new_path" = x; then
33450    # Oops. Which didn't find the executable.
33451    # The splitting of arguments from the executable at a space might have been incorrect,
33452    # since paths with space are more likely in Windows. Give it another try with the whole
33453    # argument.
33454    path="$complete"
33455    arguments="EOL"
33456    new_path=`$CYGPATH -u "$path"`
33457    new_path=`$WHICH "$new_path" 2> /dev/null`
33458    # bat and cmd files are not always considered executable in cygwin causing which
33459    # to not find them
33460    if test "x$new_path" = x \
33461        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33462        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33463      new_path=`$CYGPATH -u "$path"`
33464    fi
33465    if test "x$new_path" = x; then
33466      # It's still not found. Now this is an unrecoverable error.
33467      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33468$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33469      has_space=`$ECHO "$complete" | $GREP " "`
33470      if test "x$has_space" != x; then
33471        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33472$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33473      fi
33474      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33475    fi
33476  fi
33477
33478  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33479  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33480  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33481  # "foo.exe" is OK but "foo" is an error.
33482  #
33483  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33484  # It is also a way to make sure we got the proper file name for the real test later on.
33485  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33486  if test "x$test_shortpath" = x; then
33487    # Short path failed, file does not exist as specified.
33488    # Try adding .exe or .cmd
33489    if test -f "${new_path}.exe"; then
33490      input_to_shortpath="${new_path}.exe"
33491    elif test -f "${new_path}.cmd"; then
33492      input_to_shortpath="${new_path}.cmd"
33493    else
33494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33495$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33496      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33497$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33498      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33499    fi
33500  else
33501    input_to_shortpath="$new_path"
33502  fi
33503
33504  # Call helper function which possibly converts this using DOS-style short mode.
33505  # If so, the updated path is stored in $new_path.
33506  new_path="$input_to_shortpath"
33507
33508  input_path="$input_to_shortpath"
33509  # Check if we need to convert this using DOS-style short mode. If the path
33510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33511  # take no chances and rewrite it.
33512  # Note: m4 eats our [], so we need to use [ and ] instead.
33513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33514  if test "x$has_forbidden_chars" != x; then
33515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33516    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33517    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33518    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33519      # Going to short mode and back again did indeed matter. Since short mode is
33520      # case insensitive, let's make it lowercase to improve readability.
33521      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33522      # Now convert it back to Unix-stile (cygpath)
33523      input_path=`$CYGPATH -u "$shortmode_path"`
33524      new_path="$input_path"
33525    fi
33526  fi
33527
33528  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33529  if test "x$test_cygdrive_prefix" = x; then
33530    # As a simple fix, exclude /usr/bin since it's not a real path.
33531    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33532      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33533      # a path prefixed by /cygdrive for fixpath to work.
33534      new_path="$CYGWIN_ROOT_PATH$input_path"
33535    fi
33536  fi
33537
33538  # remove trailing .exe if any
33539  new_path="${new_path/%.exe/}"
33540
33541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33542
33543  # First separate the path from the arguments. This will split at the first
33544  # space.
33545  complete="$LIPO"
33546  path="${complete%% *}"
33547  tmp="$complete EOL"
33548  arguments="${tmp#* }"
33549
33550  # Input might be given as Windows format, start by converting to
33551  # unix format.
33552  new_path="$path"
33553
33554  windows_path="$new_path"
33555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33556    unix_path=`$CYGPATH -u "$windows_path"`
33557    new_path="$unix_path"
33558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33560    new_path="$unix_path"
33561  fi
33562
33563
33564  # Now try to locate executable using which
33565  new_path=`$WHICH "$new_path" 2> /dev/null`
33566
33567  if test "x$new_path" = x; then
33568    # Oops. Which didn't find the executable.
33569    # The splitting of arguments from the executable at a space might have been incorrect,
33570    # since paths with space are more likely in Windows. Give it another try with the whole
33571    # argument.
33572    path="$complete"
33573    arguments="EOL"
33574    new_path="$path"
33575
33576  windows_path="$new_path"
33577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33578    unix_path=`$CYGPATH -u "$windows_path"`
33579    new_path="$unix_path"
33580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33582    new_path="$unix_path"
33583  fi
33584
33585
33586    new_path=`$WHICH "$new_path" 2> /dev/null`
33587
33588    if test "x$new_path" = x; then
33589      # It's still not found. Now this is an unrecoverable error.
33590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33591$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33592      has_space=`$ECHO "$complete" | $GREP " "`
33593      if test "x$has_space" != x; then
33594        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33595$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33596      fi
33597      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33598    fi
33599  fi
33600
33601  # Now new_path has a complete unix path to the binary
33602  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33603    # Keep paths in /bin as-is, but remove trailing .exe if any
33604    new_path="${new_path/%.exe/}"
33605    # Do not save /bin paths to all_fixpath_prefixes!
33606  else
33607    # Not in mixed or Windows style, start by that.
33608    new_path=`cmd //c echo $new_path`
33609
33610  input_path="$new_path"
33611  # Check if we need to convert this using DOS-style short mode. If the path
33612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33613  # take no chances and rewrite it.
33614  # Note: m4 eats our [], so we need to use [ and ] instead.
33615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33616  if test "x$has_forbidden_chars" != x; then
33617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33618    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33619  fi
33620
33621    # Output is in $new_path
33622
33623  windows_path="$new_path"
33624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33625    unix_path=`$CYGPATH -u "$windows_path"`
33626    new_path="$unix_path"
33627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33629    new_path="$unix_path"
33630  fi
33631
33632    # remove trailing .exe if any
33633    new_path="${new_path/%.exe/}"
33634
33635    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33636    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33637  fi
33638
33639  else
33640    # We're on a posix platform. Hooray! :)
33641    # First separate the path from the arguments. This will split at the first
33642    # space.
33643    complete="$LIPO"
33644    path="${complete%% *}"
33645    tmp="$complete EOL"
33646    arguments="${tmp#* }"
33647
33648    # Cannot rely on the command "which" here since it doesn't always work.
33649    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33650    if test -z "$is_absolute_path"; then
33651      # Path to executable is not absolute. Find it.
33652      IFS_save="$IFS"
33653      IFS=:
33654      for p in $PATH; do
33655        if test -f "$p/$path" && test -x "$p/$path"; then
33656          new_path="$p/$path"
33657          break
33658        fi
33659      done
33660      IFS="$IFS_save"
33661    else
33662      # This is an absolute path, we can use it without further modifications.
33663      new_path="$path"
33664    fi
33665
33666    if test "x$new_path" = x; then
33667      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33668$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33669      has_space=`$ECHO "$complete" | $GREP " "`
33670      if test "x$has_space" != x; then
33671        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33672$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33673      fi
33674      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33675    fi
33676  fi
33677
33678  # Now join together the path and the arguments once again
33679  if test "x$arguments" != xEOL; then
33680    new_complete="$new_path ${arguments% *}"
33681  else
33682    new_complete="$new_path"
33683  fi
33684
33685  if test "x$complete" != "x$new_complete"; then
33686    LIPO="$new_complete"
33687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33688$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33689  fi
33690
33691  else
33692    OBJC=
33693  fi
33694
33695  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33696    # Extract the first word of "mt", so it can be a program name with args.
33697set dummy mt; ac_word=$2
33698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33699$as_echo_n "checking for $ac_word... " >&6; }
33700if ${ac_cv_prog_MT+:} false; then :
33701  $as_echo_n "(cached) " >&6
33702else
33703  if test -n "$MT"; then
33704  ac_cv_prog_MT="$MT" # Let the user override the test.
33705else
33706  ac_prog_rejected=no
33707as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33708for as_dir in $PATH
33709do
33710  IFS=$as_save_IFS
33711  test -z "$as_dir" && as_dir=.
33712    for ac_exec_ext in '' $ac_executable_extensions; do
33713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33714    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33715       ac_prog_rejected=yes
33716       continue
33717     fi
33718    ac_cv_prog_MT="mt"
33719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33720    break 2
33721  fi
33722done
33723  done
33724IFS=$as_save_IFS
33725
33726if test $ac_prog_rejected = yes; then
33727  # We found a bogon in the path, so make sure we never use it.
33728  set dummy $ac_cv_prog_MT
33729  shift
33730  if test $# != 0; then
33731    # We chose a different compiler from the bogus one.
33732    # However, it has the same basename, so the bogon will be chosen
33733    # first if we set MT to just the basename; use the full file name.
33734    shift
33735    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
33736  fi
33737fi
33738fi
33739fi
33740MT=$ac_cv_prog_MT
33741if test -n "$MT"; then
33742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
33743$as_echo "$MT" >&6; }
33744else
33745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33746$as_echo "no" >&6; }
33747fi
33748
33749
33750
33751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33752
33753  # First separate the path from the arguments. This will split at the first
33754  # space.
33755  complete="$MT"
33756  path="${complete%% *}"
33757  tmp="$complete EOL"
33758  arguments="${tmp#* }"
33759
33760  # Input might be given as Windows format, start by converting to
33761  # unix format.
33762  new_path=`$CYGPATH -u "$path"`
33763
33764  # Now try to locate executable using which
33765  new_path=`$WHICH "$new_path" 2> /dev/null`
33766  # bat and cmd files are not always considered executable in cygwin causing which
33767  # to not find them
33768  if test "x$new_path" = x \
33769      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33770      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33771    new_path=`$CYGPATH -u "$path"`
33772  fi
33773  if test "x$new_path" = x; then
33774    # Oops. Which didn't find the executable.
33775    # The splitting of arguments from the executable at a space might have been incorrect,
33776    # since paths with space are more likely in Windows. Give it another try with the whole
33777    # argument.
33778    path="$complete"
33779    arguments="EOL"
33780    new_path=`$CYGPATH -u "$path"`
33781    new_path=`$WHICH "$new_path" 2> /dev/null`
33782    # bat and cmd files are not always considered executable in cygwin causing which
33783    # to not find them
33784    if test "x$new_path" = x \
33785        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33786        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33787      new_path=`$CYGPATH -u "$path"`
33788    fi
33789    if test "x$new_path" = x; then
33790      # It's still not found. Now this is an unrecoverable error.
33791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33792$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33793      has_space=`$ECHO "$complete" | $GREP " "`
33794      if test "x$has_space" != x; then
33795        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33796$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33797      fi
33798      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33799    fi
33800  fi
33801
33802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33805  # "foo.exe" is OK but "foo" is an error.
33806  #
33807  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33808  # It is also a way to make sure we got the proper file name for the real test later on.
33809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33810  if test "x$test_shortpath" = x; then
33811    # Short path failed, file does not exist as specified.
33812    # Try adding .exe or .cmd
33813    if test -f "${new_path}.exe"; then
33814      input_to_shortpath="${new_path}.exe"
33815    elif test -f "${new_path}.cmd"; then
33816      input_to_shortpath="${new_path}.cmd"
33817    else
33818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
33819$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
33820      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33821$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33822      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33823    fi
33824  else
33825    input_to_shortpath="$new_path"
33826  fi
33827
33828  # Call helper function which possibly converts this using DOS-style short mode.
33829  # If so, the updated path is stored in $new_path.
33830  new_path="$input_to_shortpath"
33831
33832  input_path="$input_to_shortpath"
33833  # Check if we need to convert this using DOS-style short mode. If the path
33834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33835  # take no chances and rewrite it.
33836  # Note: m4 eats our [], so we need to use [ and ] instead.
33837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33838  if test "x$has_forbidden_chars" != x; then
33839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33840    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33841    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33842    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33843      # Going to short mode and back again did indeed matter. Since short mode is
33844      # case insensitive, let's make it lowercase to improve readability.
33845      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33846      # Now convert it back to Unix-stile (cygpath)
33847      input_path=`$CYGPATH -u "$shortmode_path"`
33848      new_path="$input_path"
33849    fi
33850  fi
33851
33852  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33853  if test "x$test_cygdrive_prefix" = x; then
33854    # As a simple fix, exclude /usr/bin since it's not a real path.
33855    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33856      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33857      # a path prefixed by /cygdrive for fixpath to work.
33858      new_path="$CYGWIN_ROOT_PATH$input_path"
33859    fi
33860  fi
33861
33862  # remove trailing .exe if any
33863  new_path="${new_path/%.exe/}"
33864
33865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33866
33867  # First separate the path from the arguments. This will split at the first
33868  # space.
33869  complete="$MT"
33870  path="${complete%% *}"
33871  tmp="$complete EOL"
33872  arguments="${tmp#* }"
33873
33874  # Input might be given as Windows format, start by converting to
33875  # unix format.
33876  new_path="$path"
33877
33878  windows_path="$new_path"
33879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33880    unix_path=`$CYGPATH -u "$windows_path"`
33881    new_path="$unix_path"
33882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33884    new_path="$unix_path"
33885  fi
33886
33887
33888  # Now try to locate executable using which
33889  new_path=`$WHICH "$new_path" 2> /dev/null`
33890
33891  if test "x$new_path" = x; then
33892    # Oops. Which didn't find the executable.
33893    # The splitting of arguments from the executable at a space might have been incorrect,
33894    # since paths with space are more likely in Windows. Give it another try with the whole
33895    # argument.
33896    path="$complete"
33897    arguments="EOL"
33898    new_path="$path"
33899
33900  windows_path="$new_path"
33901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33902    unix_path=`$CYGPATH -u "$windows_path"`
33903    new_path="$unix_path"
33904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33906    new_path="$unix_path"
33907  fi
33908
33909
33910    new_path=`$WHICH "$new_path" 2> /dev/null`
33911
33912    if test "x$new_path" = x; then
33913      # It's still not found. Now this is an unrecoverable error.
33914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33915$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33916      has_space=`$ECHO "$complete" | $GREP " "`
33917      if test "x$has_space" != x; then
33918        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33919$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33920      fi
33921      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33922    fi
33923  fi
33924
33925  # Now new_path has a complete unix path to the binary
33926  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33927    # Keep paths in /bin as-is, but remove trailing .exe if any
33928    new_path="${new_path/%.exe/}"
33929    # Do not save /bin paths to all_fixpath_prefixes!
33930  else
33931    # Not in mixed or Windows style, start by that.
33932    new_path=`cmd //c echo $new_path`
33933
33934  input_path="$new_path"
33935  # Check if we need to convert this using DOS-style short mode. If the path
33936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33937  # take no chances and rewrite it.
33938  # Note: m4 eats our [], so we need to use [ and ] instead.
33939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33940  if test "x$has_forbidden_chars" != x; then
33941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33943  fi
33944
33945    # Output is in $new_path
33946
33947  windows_path="$new_path"
33948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33949    unix_path=`$CYGPATH -u "$windows_path"`
33950    new_path="$unix_path"
33951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33953    new_path="$unix_path"
33954  fi
33955
33956    # remove trailing .exe if any
33957    new_path="${new_path/%.exe/}"
33958
33959    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33960    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33961  fi
33962
33963  else
33964    # We're on a posix platform. Hooray! :)
33965    # First separate the path from the arguments. This will split at the first
33966    # space.
33967    complete="$MT"
33968    path="${complete%% *}"
33969    tmp="$complete EOL"
33970    arguments="${tmp#* }"
33971
33972    # Cannot rely on the command "which" here since it doesn't always work.
33973    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33974    if test -z "$is_absolute_path"; then
33975      # Path to executable is not absolute. Find it.
33976      IFS_save="$IFS"
33977      IFS=:
33978      for p in $PATH; do
33979        if test -f "$p/$path" && test -x "$p/$path"; then
33980          new_path="$p/$path"
33981          break
33982        fi
33983      done
33984      IFS="$IFS_save"
33985    else
33986      # This is an absolute path, we can use it without further modifications.
33987      new_path="$path"
33988    fi
33989
33990    if test "x$new_path" = x; then
33991      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33992$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33993      has_space=`$ECHO "$complete" | $GREP " "`
33994      if test "x$has_space" != x; then
33995        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33996$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33997      fi
33998      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33999    fi
34000  fi
34001
34002  # Now join together the path and the arguments once again
34003  if test "x$arguments" != xEOL; then
34004    new_complete="$new_path ${arguments% *}"
34005  else
34006    new_complete="$new_path"
34007  fi
34008
34009  if test "x$complete" != "x$new_complete"; then
34010    MT="$new_complete"
34011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34012$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34013  fi
34014
34015    # Setup the resource compiler (RC)
34016    # Extract the first word of "rc", so it can be a program name with args.
34017set dummy rc; ac_word=$2
34018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34019$as_echo_n "checking for $ac_word... " >&6; }
34020if ${ac_cv_prog_RC+:} false; then :
34021  $as_echo_n "(cached) " >&6
34022else
34023  if test -n "$RC"; then
34024  ac_cv_prog_RC="$RC" # Let the user override the test.
34025else
34026  ac_prog_rejected=no
34027as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34028for as_dir in $PATH
34029do
34030  IFS=$as_save_IFS
34031  test -z "$as_dir" && as_dir=.
34032    for ac_exec_ext in '' $ac_executable_extensions; do
34033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34034    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34035       ac_prog_rejected=yes
34036       continue
34037     fi
34038    ac_cv_prog_RC="rc"
34039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34040    break 2
34041  fi
34042done
34043  done
34044IFS=$as_save_IFS
34045
34046if test $ac_prog_rejected = yes; then
34047  # We found a bogon in the path, so make sure we never use it.
34048  set dummy $ac_cv_prog_RC
34049  shift
34050  if test $# != 0; then
34051    # We chose a different compiler from the bogus one.
34052    # However, it has the same basename, so the bogon will be chosen
34053    # first if we set RC to just the basename; use the full file name.
34054    shift
34055    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34056  fi
34057fi
34058fi
34059fi
34060RC=$ac_cv_prog_RC
34061if test -n "$RC"; then
34062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34063$as_echo "$RC" >&6; }
34064else
34065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34066$as_echo "no" >&6; }
34067fi
34068
34069
34070
34071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34072
34073  # First separate the path from the arguments. This will split at the first
34074  # space.
34075  complete="$RC"
34076  path="${complete%% *}"
34077  tmp="$complete EOL"
34078  arguments="${tmp#* }"
34079
34080  # Input might be given as Windows format, start by converting to
34081  # unix format.
34082  new_path=`$CYGPATH -u "$path"`
34083
34084  # Now try to locate executable using which
34085  new_path=`$WHICH "$new_path" 2> /dev/null`
34086  # bat and cmd files are not always considered executable in cygwin causing which
34087  # to not find them
34088  if test "x$new_path" = x \
34089      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34090      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34091    new_path=`$CYGPATH -u "$path"`
34092  fi
34093  if test "x$new_path" = x; then
34094    # Oops. Which didn't find the executable.
34095    # The splitting of arguments from the executable at a space might have been incorrect,
34096    # since paths with space are more likely in Windows. Give it another try with the whole
34097    # argument.
34098    path="$complete"
34099    arguments="EOL"
34100    new_path=`$CYGPATH -u "$path"`
34101    new_path=`$WHICH "$new_path" 2> /dev/null`
34102    # bat and cmd files are not always considered executable in cygwin causing which
34103    # to not find them
34104    if test "x$new_path" = x \
34105        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34106        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34107      new_path=`$CYGPATH -u "$path"`
34108    fi
34109    if test "x$new_path" = x; then
34110      # It's still not found. Now this is an unrecoverable error.
34111      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34112$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34113      has_space=`$ECHO "$complete" | $GREP " "`
34114      if test "x$has_space" != x; then
34115        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34116$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34117      fi
34118      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34119    fi
34120  fi
34121
34122  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34123  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34124  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34125  # "foo.exe" is OK but "foo" is an error.
34126  #
34127  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34128  # It is also a way to make sure we got the proper file name for the real test later on.
34129  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34130  if test "x$test_shortpath" = x; then
34131    # Short path failed, file does not exist as specified.
34132    # Try adding .exe or .cmd
34133    if test -f "${new_path}.exe"; then
34134      input_to_shortpath="${new_path}.exe"
34135    elif test -f "${new_path}.cmd"; then
34136      input_to_shortpath="${new_path}.cmd"
34137    else
34138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34139$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34140      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34141$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34142      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34143    fi
34144  else
34145    input_to_shortpath="$new_path"
34146  fi
34147
34148  # Call helper function which possibly converts this using DOS-style short mode.
34149  # If so, the updated path is stored in $new_path.
34150  new_path="$input_to_shortpath"
34151
34152  input_path="$input_to_shortpath"
34153  # Check if we need to convert this using DOS-style short mode. If the path
34154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34155  # take no chances and rewrite it.
34156  # Note: m4 eats our [], so we need to use [ and ] instead.
34157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34158  if test "x$has_forbidden_chars" != x; then
34159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34160    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34161    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34162    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34163      # Going to short mode and back again did indeed matter. Since short mode is
34164      # case insensitive, let's make it lowercase to improve readability.
34165      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34166      # Now convert it back to Unix-stile (cygpath)
34167      input_path=`$CYGPATH -u "$shortmode_path"`
34168      new_path="$input_path"
34169    fi
34170  fi
34171
34172  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34173  if test "x$test_cygdrive_prefix" = x; then
34174    # As a simple fix, exclude /usr/bin since it's not a real path.
34175    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34176      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34177      # a path prefixed by /cygdrive for fixpath to work.
34178      new_path="$CYGWIN_ROOT_PATH$input_path"
34179    fi
34180  fi
34181
34182  # remove trailing .exe if any
34183  new_path="${new_path/%.exe/}"
34184
34185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34186
34187  # First separate the path from the arguments. This will split at the first
34188  # space.
34189  complete="$RC"
34190  path="${complete%% *}"
34191  tmp="$complete EOL"
34192  arguments="${tmp#* }"
34193
34194  # Input might be given as Windows format, start by converting to
34195  # unix format.
34196  new_path="$path"
34197
34198  windows_path="$new_path"
34199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34200    unix_path=`$CYGPATH -u "$windows_path"`
34201    new_path="$unix_path"
34202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34204    new_path="$unix_path"
34205  fi
34206
34207
34208  # Now try to locate executable using which
34209  new_path=`$WHICH "$new_path" 2> /dev/null`
34210
34211  if test "x$new_path" = x; then
34212    # Oops. Which didn't find the executable.
34213    # The splitting of arguments from the executable at a space might have been incorrect,
34214    # since paths with space are more likely in Windows. Give it another try with the whole
34215    # argument.
34216    path="$complete"
34217    arguments="EOL"
34218    new_path="$path"
34219
34220  windows_path="$new_path"
34221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34222    unix_path=`$CYGPATH -u "$windows_path"`
34223    new_path="$unix_path"
34224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34226    new_path="$unix_path"
34227  fi
34228
34229
34230    new_path=`$WHICH "$new_path" 2> /dev/null`
34231
34232    if test "x$new_path" = x; then
34233      # It's still not found. Now this is an unrecoverable error.
34234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34235$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34236      has_space=`$ECHO "$complete" | $GREP " "`
34237      if test "x$has_space" != x; then
34238        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34239$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34240      fi
34241      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34242    fi
34243  fi
34244
34245  # Now new_path has a complete unix path to the binary
34246  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34247    # Keep paths in /bin as-is, but remove trailing .exe if any
34248    new_path="${new_path/%.exe/}"
34249    # Do not save /bin paths to all_fixpath_prefixes!
34250  else
34251    # Not in mixed or Windows style, start by that.
34252    new_path=`cmd //c echo $new_path`
34253
34254  input_path="$new_path"
34255  # Check if we need to convert this using DOS-style short mode. If the path
34256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34257  # take no chances and rewrite it.
34258  # Note: m4 eats our [], so we need to use [ and ] instead.
34259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34260  if test "x$has_forbidden_chars" != x; then
34261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34262    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34263  fi
34264
34265    # Output is in $new_path
34266
34267  windows_path="$new_path"
34268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34269    unix_path=`$CYGPATH -u "$windows_path"`
34270    new_path="$unix_path"
34271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34273    new_path="$unix_path"
34274  fi
34275
34276    # remove trailing .exe if any
34277    new_path="${new_path/%.exe/}"
34278
34279    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34280    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34281  fi
34282
34283  else
34284    # We're on a posix platform. Hooray! :)
34285    # First separate the path from the arguments. This will split at the first
34286    # space.
34287    complete="$RC"
34288    path="${complete%% *}"
34289    tmp="$complete EOL"
34290    arguments="${tmp#* }"
34291
34292    # Cannot rely on the command "which" here since it doesn't always work.
34293    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34294    if test -z "$is_absolute_path"; then
34295      # Path to executable is not absolute. Find it.
34296      IFS_save="$IFS"
34297      IFS=:
34298      for p in $PATH; do
34299        if test -f "$p/$path" && test -x "$p/$path"; then
34300          new_path="$p/$path"
34301          break
34302        fi
34303      done
34304      IFS="$IFS_save"
34305    else
34306      # This is an absolute path, we can use it without further modifications.
34307      new_path="$path"
34308    fi
34309
34310    if test "x$new_path" = x; then
34311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34312$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34313      has_space=`$ECHO "$complete" | $GREP " "`
34314      if test "x$has_space" != x; then
34315        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34316$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34317      fi
34318      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34319    fi
34320  fi
34321
34322  # Now join together the path and the arguments once again
34323  if test "x$arguments" != xEOL; then
34324    new_complete="$new_path ${arguments% *}"
34325  else
34326    new_complete="$new_path"
34327  fi
34328
34329  if test "x$complete" != "x$new_complete"; then
34330    RC="$new_complete"
34331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34332$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34333  fi
34334
34335    # Extract the first word of "dumpbin", so it can be a program name with args.
34336set dummy dumpbin; ac_word=$2
34337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34338$as_echo_n "checking for $ac_word... " >&6; }
34339if ${ac_cv_prog_DUMPBIN+:} false; then :
34340  $as_echo_n "(cached) " >&6
34341else
34342  if test -n "$DUMPBIN"; then
34343  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34344else
34345as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34346for as_dir in $PATH
34347do
34348  IFS=$as_save_IFS
34349  test -z "$as_dir" && as_dir=.
34350    for ac_exec_ext in '' $ac_executable_extensions; do
34351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34352    ac_cv_prog_DUMPBIN="dumpbin"
34353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34354    break 2
34355  fi
34356done
34357  done
34358IFS=$as_save_IFS
34359
34360fi
34361fi
34362DUMPBIN=$ac_cv_prog_DUMPBIN
34363if test -n "$DUMPBIN"; then
34364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34365$as_echo "$DUMPBIN" >&6; }
34366else
34367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34368$as_echo "no" >&6; }
34369fi
34370
34371
34372
34373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34374
34375  # First separate the path from the arguments. This will split at the first
34376  # space.
34377  complete="$DUMPBIN"
34378  path="${complete%% *}"
34379  tmp="$complete EOL"
34380  arguments="${tmp#* }"
34381
34382  # Input might be given as Windows format, start by converting to
34383  # unix format.
34384  new_path=`$CYGPATH -u "$path"`
34385
34386  # Now try to locate executable using which
34387  new_path=`$WHICH "$new_path" 2> /dev/null`
34388  # bat and cmd files are not always considered executable in cygwin causing which
34389  # to not find them
34390  if test "x$new_path" = x \
34391      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34392      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34393    new_path=`$CYGPATH -u "$path"`
34394  fi
34395  if test "x$new_path" = x; then
34396    # Oops. Which didn't find the executable.
34397    # The splitting of arguments from the executable at a space might have been incorrect,
34398    # since paths with space are more likely in Windows. Give it another try with the whole
34399    # argument.
34400    path="$complete"
34401    arguments="EOL"
34402    new_path=`$CYGPATH -u "$path"`
34403    new_path=`$WHICH "$new_path" 2> /dev/null`
34404    # bat and cmd files are not always considered executable in cygwin causing which
34405    # to not find them
34406    if test "x$new_path" = x \
34407        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34408        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34409      new_path=`$CYGPATH -u "$path"`
34410    fi
34411    if test "x$new_path" = x; then
34412      # It's still not found. Now this is an unrecoverable error.
34413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34414$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34415      has_space=`$ECHO "$complete" | $GREP " "`
34416      if test "x$has_space" != x; then
34417        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34418$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34419      fi
34420      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34421    fi
34422  fi
34423
34424  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34425  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34426  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34427  # "foo.exe" is OK but "foo" is an error.
34428  #
34429  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34430  # It is also a way to make sure we got the proper file name for the real test later on.
34431  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34432  if test "x$test_shortpath" = x; then
34433    # Short path failed, file does not exist as specified.
34434    # Try adding .exe or .cmd
34435    if test -f "${new_path}.exe"; then
34436      input_to_shortpath="${new_path}.exe"
34437    elif test -f "${new_path}.cmd"; then
34438      input_to_shortpath="${new_path}.cmd"
34439    else
34440      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34441$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34442      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34443$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34444      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34445    fi
34446  else
34447    input_to_shortpath="$new_path"
34448  fi
34449
34450  # Call helper function which possibly converts this using DOS-style short mode.
34451  # If so, the updated path is stored in $new_path.
34452  new_path="$input_to_shortpath"
34453
34454  input_path="$input_to_shortpath"
34455  # Check if we need to convert this using DOS-style short mode. If the path
34456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34457  # take no chances and rewrite it.
34458  # Note: m4 eats our [], so we need to use [ and ] instead.
34459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34460  if test "x$has_forbidden_chars" != x; then
34461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34462    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34463    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34464    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34465      # Going to short mode and back again did indeed matter. Since short mode is
34466      # case insensitive, let's make it lowercase to improve readability.
34467      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34468      # Now convert it back to Unix-stile (cygpath)
34469      input_path=`$CYGPATH -u "$shortmode_path"`
34470      new_path="$input_path"
34471    fi
34472  fi
34473
34474  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34475  if test "x$test_cygdrive_prefix" = x; then
34476    # As a simple fix, exclude /usr/bin since it's not a real path.
34477    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34478      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34479      # a path prefixed by /cygdrive for fixpath to work.
34480      new_path="$CYGWIN_ROOT_PATH$input_path"
34481    fi
34482  fi
34483
34484  # remove trailing .exe if any
34485  new_path="${new_path/%.exe/}"
34486
34487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34488
34489  # First separate the path from the arguments. This will split at the first
34490  # space.
34491  complete="$DUMPBIN"
34492  path="${complete%% *}"
34493  tmp="$complete EOL"
34494  arguments="${tmp#* }"
34495
34496  # Input might be given as Windows format, start by converting to
34497  # unix format.
34498  new_path="$path"
34499
34500  windows_path="$new_path"
34501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34502    unix_path=`$CYGPATH -u "$windows_path"`
34503    new_path="$unix_path"
34504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34506    new_path="$unix_path"
34507  fi
34508
34509
34510  # Now try to locate executable using which
34511  new_path=`$WHICH "$new_path" 2> /dev/null`
34512
34513  if test "x$new_path" = x; then
34514    # Oops. Which didn't find the executable.
34515    # The splitting of arguments from the executable at a space might have been incorrect,
34516    # since paths with space are more likely in Windows. Give it another try with the whole
34517    # argument.
34518    path="$complete"
34519    arguments="EOL"
34520    new_path="$path"
34521
34522  windows_path="$new_path"
34523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34524    unix_path=`$CYGPATH -u "$windows_path"`
34525    new_path="$unix_path"
34526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34528    new_path="$unix_path"
34529  fi
34530
34531
34532    new_path=`$WHICH "$new_path" 2> /dev/null`
34533
34534    if test "x$new_path" = x; then
34535      # It's still not found. Now this is an unrecoverable error.
34536      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34537$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34538      has_space=`$ECHO "$complete" | $GREP " "`
34539      if test "x$has_space" != x; then
34540        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34541$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34542      fi
34543      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34544    fi
34545  fi
34546
34547  # Now new_path has a complete unix path to the binary
34548  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34549    # Keep paths in /bin as-is, but remove trailing .exe if any
34550    new_path="${new_path/%.exe/}"
34551    # Do not save /bin paths to all_fixpath_prefixes!
34552  else
34553    # Not in mixed or Windows style, start by that.
34554    new_path=`cmd //c echo $new_path`
34555
34556  input_path="$new_path"
34557  # Check if we need to convert this using DOS-style short mode. If the path
34558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34559  # take no chances and rewrite it.
34560  # Note: m4 eats our [], so we need to use [ and ] instead.
34561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34562  if test "x$has_forbidden_chars" != x; then
34563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34564    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34565  fi
34566
34567    # Output is in $new_path
34568
34569  windows_path="$new_path"
34570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34571    unix_path=`$CYGPATH -u "$windows_path"`
34572    new_path="$unix_path"
34573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34575    new_path="$unix_path"
34576  fi
34577
34578    # remove trailing .exe if any
34579    new_path="${new_path/%.exe/}"
34580
34581    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34582    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34583  fi
34584
34585  else
34586    # We're on a posix platform. Hooray! :)
34587    # First separate the path from the arguments. This will split at the first
34588    # space.
34589    complete="$DUMPBIN"
34590    path="${complete%% *}"
34591    tmp="$complete EOL"
34592    arguments="${tmp#* }"
34593
34594    # Cannot rely on the command "which" here since it doesn't always work.
34595    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34596    if test -z "$is_absolute_path"; then
34597      # Path to executable is not absolute. Find it.
34598      IFS_save="$IFS"
34599      IFS=:
34600      for p in $PATH; do
34601        if test -f "$p/$path" && test -x "$p/$path"; then
34602          new_path="$p/$path"
34603          break
34604        fi
34605      done
34606      IFS="$IFS_save"
34607    else
34608      # This is an absolute path, we can use it without further modifications.
34609      new_path="$path"
34610    fi
34611
34612    if test "x$new_path" = x; then
34613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34614$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34615      has_space=`$ECHO "$complete" | $GREP " "`
34616      if test "x$has_space" != x; then
34617        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34618$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34619      fi
34620      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34621    fi
34622  fi
34623
34624  # Now join together the path and the arguments once again
34625  if test "x$arguments" != xEOL; then
34626    new_complete="$new_path ${arguments% *}"
34627  else
34628    new_complete="$new_path"
34629  fi
34630
34631  if test "x$complete" != "x$new_complete"; then
34632    DUMPBIN="$new_complete"
34633    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34634$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34635  fi
34636
34637  fi
34638
34639  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34640
34641
34642  # Publish this variable in the help.
34643
34644
34645  if test "x$STRIP" = x; then
34646    # The variable is not set by user, try to locate tool using the code snippet
34647    for ac_prog in strip
34648do
34649  # Extract the first word of "$ac_prog", so it can be a program name with args.
34650set dummy $ac_prog; ac_word=$2
34651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34652$as_echo_n "checking for $ac_word... " >&6; }
34653if ${ac_cv_path_STRIP+:} false; then :
34654  $as_echo_n "(cached) " >&6
34655else
34656  case $STRIP in
34657  [\\/]* | ?:[\\/]*)
34658  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34659  ;;
34660  *)
34661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34662for as_dir in $PATH
34663do
34664  IFS=$as_save_IFS
34665  test -z "$as_dir" && as_dir=.
34666    for ac_exec_ext in '' $ac_executable_extensions; do
34667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34668    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34670    break 2
34671  fi
34672done
34673  done
34674IFS=$as_save_IFS
34675
34676  ;;
34677esac
34678fi
34679STRIP=$ac_cv_path_STRIP
34680if test -n "$STRIP"; then
34681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34682$as_echo "$STRIP" >&6; }
34683else
34684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34685$as_echo "no" >&6; }
34686fi
34687
34688
34689  test -n "$STRIP" && break
34690done
34691
34692  else
34693    # The variable is set, but is it from the command line or the environment?
34694
34695    # Try to remove the string !STRIP! from our list.
34696    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
34697    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34698      # If it failed, the variable was not from the command line. Ignore it,
34699      # but warn the user (except for BASH, which is always set by the calling BASH).
34700      if test "xSTRIP" != xBASH; then
34701        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
34702$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
34703      fi
34704      # Try to locate tool using the code snippet
34705      for ac_prog in strip
34706do
34707  # Extract the first word of "$ac_prog", so it can be a program name with args.
34708set dummy $ac_prog; ac_word=$2
34709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34710$as_echo_n "checking for $ac_word... " >&6; }
34711if ${ac_cv_path_STRIP+:} false; then :
34712  $as_echo_n "(cached) " >&6
34713else
34714  case $STRIP in
34715  [\\/]* | ?:[\\/]*)
34716  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34717  ;;
34718  *)
34719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34720for as_dir in $PATH
34721do
34722  IFS=$as_save_IFS
34723  test -z "$as_dir" && as_dir=.
34724    for ac_exec_ext in '' $ac_executable_extensions; do
34725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34726    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34728    break 2
34729  fi
34730done
34731  done
34732IFS=$as_save_IFS
34733
34734  ;;
34735esac
34736fi
34737STRIP=$ac_cv_path_STRIP
34738if test -n "$STRIP"; then
34739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34740$as_echo "$STRIP" >&6; }
34741else
34742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34743$as_echo "no" >&6; }
34744fi
34745
34746
34747  test -n "$STRIP" && break
34748done
34749
34750    else
34751      # If it succeeded, then it was overridden by the user. We will use it
34752      # for the tool.
34753
34754      # First remove it from the list of overridden variables, so we can test
34755      # for unknown variables in the end.
34756      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34757
34758      # Check if the provided tool contains a complete path.
34759      tool_specified="$STRIP"
34760      tool_basename="${tool_specified##*/}"
34761      if test "x$tool_basename" = "x$tool_specified"; then
34762        # A command without a complete path is provided, search $PATH.
34763        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
34764$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
34765        # Extract the first word of "$tool_basename", so it can be a program name with args.
34766set dummy $tool_basename; ac_word=$2
34767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34768$as_echo_n "checking for $ac_word... " >&6; }
34769if ${ac_cv_path_STRIP+:} false; then :
34770  $as_echo_n "(cached) " >&6
34771else
34772  case $STRIP in
34773  [\\/]* | ?:[\\/]*)
34774  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34775  ;;
34776  *)
34777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34778for as_dir in $PATH
34779do
34780  IFS=$as_save_IFS
34781  test -z "$as_dir" && as_dir=.
34782    for ac_exec_ext in '' $ac_executable_extensions; do
34783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34784    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34786    break 2
34787  fi
34788done
34789  done
34790IFS=$as_save_IFS
34791
34792  ;;
34793esac
34794fi
34795STRIP=$ac_cv_path_STRIP
34796if test -n "$STRIP"; then
34797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34798$as_echo "$STRIP" >&6; }
34799else
34800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34801$as_echo "no" >&6; }
34802fi
34803
34804
34805        if test "x$STRIP" = x; then
34806          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34807        fi
34808      else
34809        # Otherwise we believe it is a complete path. Use it as it is.
34810        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
34811$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
34812        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
34813$as_echo_n "checking for STRIP... " >&6; }
34814        if test ! -x "$tool_specified"; then
34815          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34816$as_echo "not found" >&6; }
34817          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
34818        fi
34819        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34820$as_echo "$tool_specified" >&6; }
34821      fi
34822    fi
34823  fi
34824
34825
34826
34827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34828
34829  # First separate the path from the arguments. This will split at the first
34830  # space.
34831  complete="$STRIP"
34832  path="${complete%% *}"
34833  tmp="$complete EOL"
34834  arguments="${tmp#* }"
34835
34836  # Input might be given as Windows format, start by converting to
34837  # unix format.
34838  new_path=`$CYGPATH -u "$path"`
34839
34840  # Now try to locate executable using which
34841  new_path=`$WHICH "$new_path" 2> /dev/null`
34842  # bat and cmd files are not always considered executable in cygwin causing which
34843  # to not find them
34844  if test "x$new_path" = x \
34845      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34846      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34847    new_path=`$CYGPATH -u "$path"`
34848  fi
34849  if test "x$new_path" = x; then
34850    # Oops. Which didn't find the executable.
34851    # The splitting of arguments from the executable at a space might have been incorrect,
34852    # since paths with space are more likely in Windows. Give it another try with the whole
34853    # argument.
34854    path="$complete"
34855    arguments="EOL"
34856    new_path=`$CYGPATH -u "$path"`
34857    new_path=`$WHICH "$new_path" 2> /dev/null`
34858    # bat and cmd files are not always considered executable in cygwin causing which
34859    # to not find them
34860    if test "x$new_path" = x \
34861        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34862        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34863      new_path=`$CYGPATH -u "$path"`
34864    fi
34865    if test "x$new_path" = x; then
34866      # It's still not found. Now this is an unrecoverable error.
34867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34868$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34869      has_space=`$ECHO "$complete" | $GREP " "`
34870      if test "x$has_space" != x; then
34871        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34872$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34873      fi
34874      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34875    fi
34876  fi
34877
34878  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34879  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34880  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34881  # "foo.exe" is OK but "foo" is an error.
34882  #
34883  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34884  # It is also a way to make sure we got the proper file name for the real test later on.
34885  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34886  if test "x$test_shortpath" = x; then
34887    # Short path failed, file does not exist as specified.
34888    # Try adding .exe or .cmd
34889    if test -f "${new_path}.exe"; then
34890      input_to_shortpath="${new_path}.exe"
34891    elif test -f "${new_path}.cmd"; then
34892      input_to_shortpath="${new_path}.cmd"
34893    else
34894      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
34895$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
34896      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34897$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34898      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34899    fi
34900  else
34901    input_to_shortpath="$new_path"
34902  fi
34903
34904  # Call helper function which possibly converts this using DOS-style short mode.
34905  # If so, the updated path is stored in $new_path.
34906  new_path="$input_to_shortpath"
34907
34908  input_path="$input_to_shortpath"
34909  # Check if we need to convert this using DOS-style short mode. If the path
34910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34911  # take no chances and rewrite it.
34912  # Note: m4 eats our [], so we need to use [ and ] instead.
34913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34914  if test "x$has_forbidden_chars" != x; then
34915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34916    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34917    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34918    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34919      # Going to short mode and back again did indeed matter. Since short mode is
34920      # case insensitive, let's make it lowercase to improve readability.
34921      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34922      # Now convert it back to Unix-stile (cygpath)
34923      input_path=`$CYGPATH -u "$shortmode_path"`
34924      new_path="$input_path"
34925    fi
34926  fi
34927
34928  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34929  if test "x$test_cygdrive_prefix" = x; then
34930    # As a simple fix, exclude /usr/bin since it's not a real path.
34931    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34932      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34933      # a path prefixed by /cygdrive for fixpath to work.
34934      new_path="$CYGWIN_ROOT_PATH$input_path"
34935    fi
34936  fi
34937
34938  # remove trailing .exe if any
34939  new_path="${new_path/%.exe/}"
34940
34941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34942
34943  # First separate the path from the arguments. This will split at the first
34944  # space.
34945  complete="$STRIP"
34946  path="${complete%% *}"
34947  tmp="$complete EOL"
34948  arguments="${tmp#* }"
34949
34950  # Input might be given as Windows format, start by converting to
34951  # unix format.
34952  new_path="$path"
34953
34954  windows_path="$new_path"
34955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34956    unix_path=`$CYGPATH -u "$windows_path"`
34957    new_path="$unix_path"
34958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34960    new_path="$unix_path"
34961  fi
34962
34963
34964  # Now try to locate executable using which
34965  new_path=`$WHICH "$new_path" 2> /dev/null`
34966
34967  if test "x$new_path" = x; then
34968    # Oops. Which didn't find the executable.
34969    # The splitting of arguments from the executable at a space might have been incorrect,
34970    # since paths with space are more likely in Windows. Give it another try with the whole
34971    # argument.
34972    path="$complete"
34973    arguments="EOL"
34974    new_path="$path"
34975
34976  windows_path="$new_path"
34977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34978    unix_path=`$CYGPATH -u "$windows_path"`
34979    new_path="$unix_path"
34980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34982    new_path="$unix_path"
34983  fi
34984
34985
34986    new_path=`$WHICH "$new_path" 2> /dev/null`
34987
34988    if test "x$new_path" = x; then
34989      # It's still not found. Now this is an unrecoverable error.
34990      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34991$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34992      has_space=`$ECHO "$complete" | $GREP " "`
34993      if test "x$has_space" != x; then
34994        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34995$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34996      fi
34997      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34998    fi
34999  fi
35000
35001  # Now new_path has a complete unix path to the binary
35002  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35003    # Keep paths in /bin as-is, but remove trailing .exe if any
35004    new_path="${new_path/%.exe/}"
35005    # Do not save /bin paths to all_fixpath_prefixes!
35006  else
35007    # Not in mixed or Windows style, start by that.
35008    new_path=`cmd //c echo $new_path`
35009
35010  input_path="$new_path"
35011  # Check if we need to convert this using DOS-style short mode. If the path
35012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35013  # take no chances and rewrite it.
35014  # Note: m4 eats our [], so we need to use [ and ] instead.
35015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35016  if test "x$has_forbidden_chars" != x; then
35017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35018    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35019  fi
35020
35021    # Output is in $new_path
35022
35023  windows_path="$new_path"
35024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35025    unix_path=`$CYGPATH -u "$windows_path"`
35026    new_path="$unix_path"
35027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35029    new_path="$unix_path"
35030  fi
35031
35032    # remove trailing .exe if any
35033    new_path="${new_path/%.exe/}"
35034
35035    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35036    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35037  fi
35038
35039  else
35040    # We're on a posix platform. Hooray! :)
35041    # First separate the path from the arguments. This will split at the first
35042    # space.
35043    complete="$STRIP"
35044    path="${complete%% *}"
35045    tmp="$complete EOL"
35046    arguments="${tmp#* }"
35047
35048    # Cannot rely on the command "which" here since it doesn't always work.
35049    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35050    if test -z "$is_absolute_path"; then
35051      # Path to executable is not absolute. Find it.
35052      IFS_save="$IFS"
35053      IFS=:
35054      for p in $PATH; do
35055        if test -f "$p/$path" && test -x "$p/$path"; then
35056          new_path="$p/$path"
35057          break
35058        fi
35059      done
35060      IFS="$IFS_save"
35061    else
35062      # This is an absolute path, we can use it without further modifications.
35063      new_path="$path"
35064    fi
35065
35066    if test "x$new_path" = x; then
35067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35068$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35069      has_space=`$ECHO "$complete" | $GREP " "`
35070      if test "x$has_space" != x; then
35071        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35072$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35073      fi
35074      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35075    fi
35076  fi
35077
35078  # Now join together the path and the arguments once again
35079  if test "x$arguments" != xEOL; then
35080    new_complete="$new_path ${arguments% *}"
35081  else
35082    new_complete="$new_path"
35083  fi
35084
35085  if test "x$complete" != "x$new_complete"; then
35086    STRIP="$new_complete"
35087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35088$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35089  fi
35090
35091
35092
35093  # Publish this variable in the help.
35094
35095
35096  if test "x$NM" = x; then
35097    # The variable is not set by user, try to locate tool using the code snippet
35098    for ac_prog in nm
35099do
35100  # Extract the first word of "$ac_prog", so it can be a program name with args.
35101set dummy $ac_prog; ac_word=$2
35102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35103$as_echo_n "checking for $ac_word... " >&6; }
35104if ${ac_cv_path_NM+:} false; then :
35105  $as_echo_n "(cached) " >&6
35106else
35107  case $NM in
35108  [\\/]* | ?:[\\/]*)
35109  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35110  ;;
35111  *)
35112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35113for as_dir in $PATH
35114do
35115  IFS=$as_save_IFS
35116  test -z "$as_dir" && as_dir=.
35117    for ac_exec_ext in '' $ac_executable_extensions; do
35118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35119    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35121    break 2
35122  fi
35123done
35124  done
35125IFS=$as_save_IFS
35126
35127  ;;
35128esac
35129fi
35130NM=$ac_cv_path_NM
35131if test -n "$NM"; then
35132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35133$as_echo "$NM" >&6; }
35134else
35135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35136$as_echo "no" >&6; }
35137fi
35138
35139
35140  test -n "$NM" && break
35141done
35142
35143  else
35144    # The variable is set, but is it from the command line or the environment?
35145
35146    # Try to remove the string !NM! from our list.
35147    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35148    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35149      # If it failed, the variable was not from the command line. Ignore it,
35150      # but warn the user (except for BASH, which is always set by the calling BASH).
35151      if test "xNM" != xBASH; then
35152        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35153$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35154      fi
35155      # Try to locate tool using the code snippet
35156      for ac_prog in nm
35157do
35158  # Extract the first word of "$ac_prog", so it can be a program name with args.
35159set dummy $ac_prog; ac_word=$2
35160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35161$as_echo_n "checking for $ac_word... " >&6; }
35162if ${ac_cv_path_NM+:} false; then :
35163  $as_echo_n "(cached) " >&6
35164else
35165  case $NM in
35166  [\\/]* | ?:[\\/]*)
35167  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35168  ;;
35169  *)
35170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35171for as_dir in $PATH
35172do
35173  IFS=$as_save_IFS
35174  test -z "$as_dir" && as_dir=.
35175    for ac_exec_ext in '' $ac_executable_extensions; do
35176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35177    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35179    break 2
35180  fi
35181done
35182  done
35183IFS=$as_save_IFS
35184
35185  ;;
35186esac
35187fi
35188NM=$ac_cv_path_NM
35189if test -n "$NM"; then
35190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35191$as_echo "$NM" >&6; }
35192else
35193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35194$as_echo "no" >&6; }
35195fi
35196
35197
35198  test -n "$NM" && break
35199done
35200
35201    else
35202      # If it succeeded, then it was overridden by the user. We will use it
35203      # for the tool.
35204
35205      # First remove it from the list of overridden variables, so we can test
35206      # for unknown variables in the end.
35207      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35208
35209      # Check if the provided tool contains a complete path.
35210      tool_specified="$NM"
35211      tool_basename="${tool_specified##*/}"
35212      if test "x$tool_basename" = "x$tool_specified"; then
35213        # A command without a complete path is provided, search $PATH.
35214        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35215$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35216        # Extract the first word of "$tool_basename", so it can be a program name with args.
35217set dummy $tool_basename; ac_word=$2
35218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35219$as_echo_n "checking for $ac_word... " >&6; }
35220if ${ac_cv_path_NM+:} false; then :
35221  $as_echo_n "(cached) " >&6
35222else
35223  case $NM in
35224  [\\/]* | ?:[\\/]*)
35225  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35226  ;;
35227  *)
35228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35229for as_dir in $PATH
35230do
35231  IFS=$as_save_IFS
35232  test -z "$as_dir" && as_dir=.
35233    for ac_exec_ext in '' $ac_executable_extensions; do
35234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35235    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35237    break 2
35238  fi
35239done
35240  done
35241IFS=$as_save_IFS
35242
35243  ;;
35244esac
35245fi
35246NM=$ac_cv_path_NM
35247if test -n "$NM"; then
35248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35249$as_echo "$NM" >&6; }
35250else
35251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35252$as_echo "no" >&6; }
35253fi
35254
35255
35256        if test "x$NM" = x; then
35257          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35258        fi
35259      else
35260        # Otherwise we believe it is a complete path. Use it as it is.
35261        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35262$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35263        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35264$as_echo_n "checking for NM... " >&6; }
35265        if test ! -x "$tool_specified"; then
35266          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35267$as_echo "not found" >&6; }
35268          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35269        fi
35270        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35271$as_echo "$tool_specified" >&6; }
35272      fi
35273    fi
35274  fi
35275
35276
35277
35278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35279
35280  # First separate the path from the arguments. This will split at the first
35281  # space.
35282  complete="$NM"
35283  path="${complete%% *}"
35284  tmp="$complete EOL"
35285  arguments="${tmp#* }"
35286
35287  # Input might be given as Windows format, start by converting to
35288  # unix format.
35289  new_path=`$CYGPATH -u "$path"`
35290
35291  # Now try to locate executable using which
35292  new_path=`$WHICH "$new_path" 2> /dev/null`
35293  # bat and cmd files are not always considered executable in cygwin causing which
35294  # to not find them
35295  if test "x$new_path" = x \
35296      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35297      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35298    new_path=`$CYGPATH -u "$path"`
35299  fi
35300  if test "x$new_path" = x; then
35301    # Oops. Which didn't find the executable.
35302    # The splitting of arguments from the executable at a space might have been incorrect,
35303    # since paths with space are more likely in Windows. Give it another try with the whole
35304    # argument.
35305    path="$complete"
35306    arguments="EOL"
35307    new_path=`$CYGPATH -u "$path"`
35308    new_path=`$WHICH "$new_path" 2> /dev/null`
35309    # bat and cmd files are not always considered executable in cygwin causing which
35310    # to not find them
35311    if test "x$new_path" = x \
35312        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35313        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35314      new_path=`$CYGPATH -u "$path"`
35315    fi
35316    if test "x$new_path" = x; then
35317      # It's still not found. Now this is an unrecoverable error.
35318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35319$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35320      has_space=`$ECHO "$complete" | $GREP " "`
35321      if test "x$has_space" != x; then
35322        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35323$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35324      fi
35325      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35326    fi
35327  fi
35328
35329  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35330  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35331  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35332  # "foo.exe" is OK but "foo" is an error.
35333  #
35334  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35335  # It is also a way to make sure we got the proper file name for the real test later on.
35336  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35337  if test "x$test_shortpath" = x; then
35338    # Short path failed, file does not exist as specified.
35339    # Try adding .exe or .cmd
35340    if test -f "${new_path}.exe"; then
35341      input_to_shortpath="${new_path}.exe"
35342    elif test -f "${new_path}.cmd"; then
35343      input_to_shortpath="${new_path}.cmd"
35344    else
35345      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35346$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35347      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35348$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35349      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35350    fi
35351  else
35352    input_to_shortpath="$new_path"
35353  fi
35354
35355  # Call helper function which possibly converts this using DOS-style short mode.
35356  # If so, the updated path is stored in $new_path.
35357  new_path="$input_to_shortpath"
35358
35359  input_path="$input_to_shortpath"
35360  # Check if we need to convert this using DOS-style short mode. If the path
35361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35362  # take no chances and rewrite it.
35363  # Note: m4 eats our [], so we need to use [ and ] instead.
35364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35365  if test "x$has_forbidden_chars" != x; then
35366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35367    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35368    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35369    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35370      # Going to short mode and back again did indeed matter. Since short mode is
35371      # case insensitive, let's make it lowercase to improve readability.
35372      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35373      # Now convert it back to Unix-stile (cygpath)
35374      input_path=`$CYGPATH -u "$shortmode_path"`
35375      new_path="$input_path"
35376    fi
35377  fi
35378
35379  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35380  if test "x$test_cygdrive_prefix" = x; then
35381    # As a simple fix, exclude /usr/bin since it's not a real path.
35382    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35383      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35384      # a path prefixed by /cygdrive for fixpath to work.
35385      new_path="$CYGWIN_ROOT_PATH$input_path"
35386    fi
35387  fi
35388
35389  # remove trailing .exe if any
35390  new_path="${new_path/%.exe/}"
35391
35392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35393
35394  # First separate the path from the arguments. This will split at the first
35395  # space.
35396  complete="$NM"
35397  path="${complete%% *}"
35398  tmp="$complete EOL"
35399  arguments="${tmp#* }"
35400
35401  # Input might be given as Windows format, start by converting to
35402  # unix format.
35403  new_path="$path"
35404
35405  windows_path="$new_path"
35406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35407    unix_path=`$CYGPATH -u "$windows_path"`
35408    new_path="$unix_path"
35409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35411    new_path="$unix_path"
35412  fi
35413
35414
35415  # Now try to locate executable using which
35416  new_path=`$WHICH "$new_path" 2> /dev/null`
35417
35418  if test "x$new_path" = x; then
35419    # Oops. Which didn't find the executable.
35420    # The splitting of arguments from the executable at a space might have been incorrect,
35421    # since paths with space are more likely in Windows. Give it another try with the whole
35422    # argument.
35423    path="$complete"
35424    arguments="EOL"
35425    new_path="$path"
35426
35427  windows_path="$new_path"
35428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35429    unix_path=`$CYGPATH -u "$windows_path"`
35430    new_path="$unix_path"
35431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35433    new_path="$unix_path"
35434  fi
35435
35436
35437    new_path=`$WHICH "$new_path" 2> /dev/null`
35438
35439    if test "x$new_path" = x; then
35440      # It's still not found. Now this is an unrecoverable error.
35441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35442$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35443      has_space=`$ECHO "$complete" | $GREP " "`
35444      if test "x$has_space" != x; then
35445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35447      fi
35448      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35449    fi
35450  fi
35451
35452  # Now new_path has a complete unix path to the binary
35453  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35454    # Keep paths in /bin as-is, but remove trailing .exe if any
35455    new_path="${new_path/%.exe/}"
35456    # Do not save /bin paths to all_fixpath_prefixes!
35457  else
35458    # Not in mixed or Windows style, start by that.
35459    new_path=`cmd //c echo $new_path`
35460
35461  input_path="$new_path"
35462  # Check if we need to convert this using DOS-style short mode. If the path
35463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35464  # take no chances and rewrite it.
35465  # Note: m4 eats our [], so we need to use [ and ] instead.
35466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35467  if test "x$has_forbidden_chars" != x; then
35468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35470  fi
35471
35472    # Output is in $new_path
35473
35474  windows_path="$new_path"
35475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35476    unix_path=`$CYGPATH -u "$windows_path"`
35477    new_path="$unix_path"
35478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35480    new_path="$unix_path"
35481  fi
35482
35483    # remove trailing .exe if any
35484    new_path="${new_path/%.exe/}"
35485
35486    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35487    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35488  fi
35489
35490  else
35491    # We're on a posix platform. Hooray! :)
35492    # First separate the path from the arguments. This will split at the first
35493    # space.
35494    complete="$NM"
35495    path="${complete%% *}"
35496    tmp="$complete EOL"
35497    arguments="${tmp#* }"
35498
35499    # Cannot rely on the command "which" here since it doesn't always work.
35500    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35501    if test -z "$is_absolute_path"; then
35502      # Path to executable is not absolute. Find it.
35503      IFS_save="$IFS"
35504      IFS=:
35505      for p in $PATH; do
35506        if test -f "$p/$path" && test -x "$p/$path"; then
35507          new_path="$p/$path"
35508          break
35509        fi
35510      done
35511      IFS="$IFS_save"
35512    else
35513      # This is an absolute path, we can use it without further modifications.
35514      new_path="$path"
35515    fi
35516
35517    if test "x$new_path" = x; then
35518      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35519$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35520      has_space=`$ECHO "$complete" | $GREP " "`
35521      if test "x$has_space" != x; then
35522        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35523$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35524      fi
35525      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35526    fi
35527  fi
35528
35529  # Now join together the path and the arguments once again
35530  if test "x$arguments" != xEOL; then
35531    new_complete="$new_path ${arguments% *}"
35532  else
35533    new_complete="$new_path"
35534  fi
35535
35536  if test "x$complete" != "x$new_complete"; then
35537    NM="$new_complete"
35538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35539$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35540  fi
35541
35542
35543
35544  # Publish this variable in the help.
35545
35546
35547  if test "x$GNM" = x; then
35548    # The variable is not set by user, try to locate tool using the code snippet
35549    for ac_prog in gnm
35550do
35551  # Extract the first word of "$ac_prog", so it can be a program name with args.
35552set dummy $ac_prog; ac_word=$2
35553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35554$as_echo_n "checking for $ac_word... " >&6; }
35555if ${ac_cv_path_GNM+:} false; then :
35556  $as_echo_n "(cached) " >&6
35557else
35558  case $GNM in
35559  [\\/]* | ?:[\\/]*)
35560  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35561  ;;
35562  *)
35563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35564for as_dir in $PATH
35565do
35566  IFS=$as_save_IFS
35567  test -z "$as_dir" && as_dir=.
35568    for ac_exec_ext in '' $ac_executable_extensions; do
35569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35570    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35572    break 2
35573  fi
35574done
35575  done
35576IFS=$as_save_IFS
35577
35578  ;;
35579esac
35580fi
35581GNM=$ac_cv_path_GNM
35582if test -n "$GNM"; then
35583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35584$as_echo "$GNM" >&6; }
35585else
35586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35587$as_echo "no" >&6; }
35588fi
35589
35590
35591  test -n "$GNM" && break
35592done
35593
35594  else
35595    # The variable is set, but is it from the command line or the environment?
35596
35597    # Try to remove the string !GNM! from our list.
35598    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
35599    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35600      # If it failed, the variable was not from the command line. Ignore it,
35601      # but warn the user (except for BASH, which is always set by the calling BASH).
35602      if test "xGNM" != xBASH; then
35603        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
35604$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
35605      fi
35606      # Try to locate tool using the code snippet
35607      for ac_prog in gnm
35608do
35609  # Extract the first word of "$ac_prog", so it can be a program name with args.
35610set dummy $ac_prog; ac_word=$2
35611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35612$as_echo_n "checking for $ac_word... " >&6; }
35613if ${ac_cv_path_GNM+:} false; then :
35614  $as_echo_n "(cached) " >&6
35615else
35616  case $GNM in
35617  [\\/]* | ?:[\\/]*)
35618  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35619  ;;
35620  *)
35621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35622for as_dir in $PATH
35623do
35624  IFS=$as_save_IFS
35625  test -z "$as_dir" && as_dir=.
35626    for ac_exec_ext in '' $ac_executable_extensions; do
35627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35628    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35630    break 2
35631  fi
35632done
35633  done
35634IFS=$as_save_IFS
35635
35636  ;;
35637esac
35638fi
35639GNM=$ac_cv_path_GNM
35640if test -n "$GNM"; then
35641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35642$as_echo "$GNM" >&6; }
35643else
35644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35645$as_echo "no" >&6; }
35646fi
35647
35648
35649  test -n "$GNM" && break
35650done
35651
35652    else
35653      # If it succeeded, then it was overridden by the user. We will use it
35654      # for the tool.
35655
35656      # First remove it from the list of overridden variables, so we can test
35657      # for unknown variables in the end.
35658      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35659
35660      # Check if the provided tool contains a complete path.
35661      tool_specified="$GNM"
35662      tool_basename="${tool_specified##*/}"
35663      if test "x$tool_basename" = "x$tool_specified"; then
35664        # A command without a complete path is provided, search $PATH.
35665        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
35666$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
35667        # Extract the first word of "$tool_basename", so it can be a program name with args.
35668set dummy $tool_basename; ac_word=$2
35669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35670$as_echo_n "checking for $ac_word... " >&6; }
35671if ${ac_cv_path_GNM+:} false; then :
35672  $as_echo_n "(cached) " >&6
35673else
35674  case $GNM in
35675  [\\/]* | ?:[\\/]*)
35676  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35677  ;;
35678  *)
35679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35680for as_dir in $PATH
35681do
35682  IFS=$as_save_IFS
35683  test -z "$as_dir" && as_dir=.
35684    for ac_exec_ext in '' $ac_executable_extensions; do
35685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35686    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35688    break 2
35689  fi
35690done
35691  done
35692IFS=$as_save_IFS
35693
35694  ;;
35695esac
35696fi
35697GNM=$ac_cv_path_GNM
35698if test -n "$GNM"; then
35699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35700$as_echo "$GNM" >&6; }
35701else
35702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35703$as_echo "no" >&6; }
35704fi
35705
35706
35707        if test "x$GNM" = x; then
35708          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35709        fi
35710      else
35711        # Otherwise we believe it is a complete path. Use it as it is.
35712        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
35713$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
35714        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
35715$as_echo_n "checking for GNM... " >&6; }
35716        if test ! -x "$tool_specified"; then
35717          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35718$as_echo "not found" >&6; }
35719          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
35720        fi
35721        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35722$as_echo "$tool_specified" >&6; }
35723      fi
35724    fi
35725  fi
35726
35727
35728
35729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35730
35731  # First separate the path from the arguments. This will split at the first
35732  # space.
35733  complete="$GNM"
35734  path="${complete%% *}"
35735  tmp="$complete EOL"
35736  arguments="${tmp#* }"
35737
35738  # Input might be given as Windows format, start by converting to
35739  # unix format.
35740  new_path=`$CYGPATH -u "$path"`
35741
35742  # Now try to locate executable using which
35743  new_path=`$WHICH "$new_path" 2> /dev/null`
35744  # bat and cmd files are not always considered executable in cygwin causing which
35745  # to not find them
35746  if test "x$new_path" = x \
35747      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35748      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35749    new_path=`$CYGPATH -u "$path"`
35750  fi
35751  if test "x$new_path" = x; then
35752    # Oops. Which didn't find the executable.
35753    # The splitting of arguments from the executable at a space might have been incorrect,
35754    # since paths with space are more likely in Windows. Give it another try with the whole
35755    # argument.
35756    path="$complete"
35757    arguments="EOL"
35758    new_path=`$CYGPATH -u "$path"`
35759    new_path=`$WHICH "$new_path" 2> /dev/null`
35760    # bat and cmd files are not always considered executable in cygwin causing which
35761    # to not find them
35762    if test "x$new_path" = x \
35763        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35764        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35765      new_path=`$CYGPATH -u "$path"`
35766    fi
35767    if test "x$new_path" = x; then
35768      # It's still not found. Now this is an unrecoverable error.
35769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35770$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35771      has_space=`$ECHO "$complete" | $GREP " "`
35772      if test "x$has_space" != x; then
35773        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35774$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35775      fi
35776      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35777    fi
35778  fi
35779
35780  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35781  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35782  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35783  # "foo.exe" is OK but "foo" is an error.
35784  #
35785  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35786  # It is also a way to make sure we got the proper file name for the real test later on.
35787  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35788  if test "x$test_shortpath" = x; then
35789    # Short path failed, file does not exist as specified.
35790    # Try adding .exe or .cmd
35791    if test -f "${new_path}.exe"; then
35792      input_to_shortpath="${new_path}.exe"
35793    elif test -f "${new_path}.cmd"; then
35794      input_to_shortpath="${new_path}.cmd"
35795    else
35796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
35797$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
35798      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35799$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35800      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35801    fi
35802  else
35803    input_to_shortpath="$new_path"
35804  fi
35805
35806  # Call helper function which possibly converts this using DOS-style short mode.
35807  # If so, the updated path is stored in $new_path.
35808  new_path="$input_to_shortpath"
35809
35810  input_path="$input_to_shortpath"
35811  # Check if we need to convert this using DOS-style short mode. If the path
35812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35813  # take no chances and rewrite it.
35814  # Note: m4 eats our [], so we need to use [ and ] instead.
35815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35816  if test "x$has_forbidden_chars" != x; then
35817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35818    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35819    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35820    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35821      # Going to short mode and back again did indeed matter. Since short mode is
35822      # case insensitive, let's make it lowercase to improve readability.
35823      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35824      # Now convert it back to Unix-stile (cygpath)
35825      input_path=`$CYGPATH -u "$shortmode_path"`
35826      new_path="$input_path"
35827    fi
35828  fi
35829
35830  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35831  if test "x$test_cygdrive_prefix" = x; then
35832    # As a simple fix, exclude /usr/bin since it's not a real path.
35833    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35834      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35835      # a path prefixed by /cygdrive for fixpath to work.
35836      new_path="$CYGWIN_ROOT_PATH$input_path"
35837    fi
35838  fi
35839
35840  # remove trailing .exe if any
35841  new_path="${new_path/%.exe/}"
35842
35843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35844
35845  # First separate the path from the arguments. This will split at the first
35846  # space.
35847  complete="$GNM"
35848  path="${complete%% *}"
35849  tmp="$complete EOL"
35850  arguments="${tmp#* }"
35851
35852  # Input might be given as Windows format, start by converting to
35853  # unix format.
35854  new_path="$path"
35855
35856  windows_path="$new_path"
35857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35858    unix_path=`$CYGPATH -u "$windows_path"`
35859    new_path="$unix_path"
35860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35862    new_path="$unix_path"
35863  fi
35864
35865
35866  # Now try to locate executable using which
35867  new_path=`$WHICH "$new_path" 2> /dev/null`
35868
35869  if test "x$new_path" = x; then
35870    # Oops. Which didn't find the executable.
35871    # The splitting of arguments from the executable at a space might have been incorrect,
35872    # since paths with space are more likely in Windows. Give it another try with the whole
35873    # argument.
35874    path="$complete"
35875    arguments="EOL"
35876    new_path="$path"
35877
35878  windows_path="$new_path"
35879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35880    unix_path=`$CYGPATH -u "$windows_path"`
35881    new_path="$unix_path"
35882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35884    new_path="$unix_path"
35885  fi
35886
35887
35888    new_path=`$WHICH "$new_path" 2> /dev/null`
35889
35890    if test "x$new_path" = x; then
35891      # It's still not found. Now this is an unrecoverable error.
35892      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35893$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35894      has_space=`$ECHO "$complete" | $GREP " "`
35895      if test "x$has_space" != x; then
35896        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35897$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35898      fi
35899      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35900    fi
35901  fi
35902
35903  # Now new_path has a complete unix path to the binary
35904  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35905    # Keep paths in /bin as-is, but remove trailing .exe if any
35906    new_path="${new_path/%.exe/}"
35907    # Do not save /bin paths to all_fixpath_prefixes!
35908  else
35909    # Not in mixed or Windows style, start by that.
35910    new_path=`cmd //c echo $new_path`
35911
35912  input_path="$new_path"
35913  # Check if we need to convert this using DOS-style short mode. If the path
35914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35915  # take no chances and rewrite it.
35916  # Note: m4 eats our [], so we need to use [ and ] instead.
35917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35918  if test "x$has_forbidden_chars" != x; then
35919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35920    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35921  fi
35922
35923    # Output is in $new_path
35924
35925  windows_path="$new_path"
35926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35927    unix_path=`$CYGPATH -u "$windows_path"`
35928    new_path="$unix_path"
35929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35931    new_path="$unix_path"
35932  fi
35933
35934    # remove trailing .exe if any
35935    new_path="${new_path/%.exe/}"
35936
35937    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35938    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35939  fi
35940
35941  else
35942    # We're on a posix platform. Hooray! :)
35943    # First separate the path from the arguments. This will split at the first
35944    # space.
35945    complete="$GNM"
35946    path="${complete%% *}"
35947    tmp="$complete EOL"
35948    arguments="${tmp#* }"
35949
35950    # Cannot rely on the command "which" here since it doesn't always work.
35951    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35952    if test -z "$is_absolute_path"; then
35953      # Path to executable is not absolute. Find it.
35954      IFS_save="$IFS"
35955      IFS=:
35956      for p in $PATH; do
35957        if test -f "$p/$path" && test -x "$p/$path"; then
35958          new_path="$p/$path"
35959          break
35960        fi
35961      done
35962      IFS="$IFS_save"
35963    else
35964      # This is an absolute path, we can use it without further modifications.
35965      new_path="$path"
35966    fi
35967
35968    if test "x$new_path" = x; then
35969      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35970$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35971      has_space=`$ECHO "$complete" | $GREP " "`
35972      if test "x$has_space" != x; then
35973        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35974$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35975      fi
35976      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35977    fi
35978  fi
35979
35980  # Now join together the path and the arguments once again
35981  if test "x$arguments" != xEOL; then
35982    new_complete="$new_path ${arguments% *}"
35983  else
35984    new_complete="$new_path"
35985  fi
35986
35987  if test "x$complete" != "x$new_complete"; then
35988    GNM="$new_complete"
35989    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
35990$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
35991  fi
35992
35993
35994
35995
35996  # Publish this variable in the help.
35997
35998
35999  if test "x$MCS" = x; then
36000    # The variable is not set by user, try to locate tool using the code snippet
36001    for ac_prog in mcs
36002do
36003  # Extract the first word of "$ac_prog", so it can be a program name with args.
36004set dummy $ac_prog; ac_word=$2
36005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36006$as_echo_n "checking for $ac_word... " >&6; }
36007if ${ac_cv_path_MCS+:} false; then :
36008  $as_echo_n "(cached) " >&6
36009else
36010  case $MCS in
36011  [\\/]* | ?:[\\/]*)
36012  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36013  ;;
36014  *)
36015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36016for as_dir in $PATH
36017do
36018  IFS=$as_save_IFS
36019  test -z "$as_dir" && as_dir=.
36020    for ac_exec_ext in '' $ac_executable_extensions; do
36021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36022    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36024    break 2
36025  fi
36026done
36027  done
36028IFS=$as_save_IFS
36029
36030  ;;
36031esac
36032fi
36033MCS=$ac_cv_path_MCS
36034if test -n "$MCS"; then
36035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36036$as_echo "$MCS" >&6; }
36037else
36038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36039$as_echo "no" >&6; }
36040fi
36041
36042
36043  test -n "$MCS" && break
36044done
36045
36046  else
36047    # The variable is set, but is it from the command line or the environment?
36048
36049    # Try to remove the string !MCS! from our list.
36050    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36051    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36052      # If it failed, the variable was not from the command line. Ignore it,
36053      # but warn the user (except for BASH, which is always set by the calling BASH).
36054      if test "xMCS" != xBASH; then
36055        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36056$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36057      fi
36058      # Try to locate tool using the code snippet
36059      for ac_prog in mcs
36060do
36061  # Extract the first word of "$ac_prog", so it can be a program name with args.
36062set dummy $ac_prog; ac_word=$2
36063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36064$as_echo_n "checking for $ac_word... " >&6; }
36065if ${ac_cv_path_MCS+:} false; then :
36066  $as_echo_n "(cached) " >&6
36067else
36068  case $MCS in
36069  [\\/]* | ?:[\\/]*)
36070  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36071  ;;
36072  *)
36073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36074for as_dir in $PATH
36075do
36076  IFS=$as_save_IFS
36077  test -z "$as_dir" && as_dir=.
36078    for ac_exec_ext in '' $ac_executable_extensions; do
36079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36080    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36082    break 2
36083  fi
36084done
36085  done
36086IFS=$as_save_IFS
36087
36088  ;;
36089esac
36090fi
36091MCS=$ac_cv_path_MCS
36092if test -n "$MCS"; then
36093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36094$as_echo "$MCS" >&6; }
36095else
36096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36097$as_echo "no" >&6; }
36098fi
36099
36100
36101  test -n "$MCS" && break
36102done
36103
36104    else
36105      # If it succeeded, then it was overridden by the user. We will use it
36106      # for the tool.
36107
36108      # First remove it from the list of overridden variables, so we can test
36109      # for unknown variables in the end.
36110      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36111
36112      # Check if the provided tool contains a complete path.
36113      tool_specified="$MCS"
36114      tool_basename="${tool_specified##*/}"
36115      if test "x$tool_basename" = "x$tool_specified"; then
36116        # A command without a complete path is provided, search $PATH.
36117        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36118$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36119        # Extract the first word of "$tool_basename", so it can be a program name with args.
36120set dummy $tool_basename; ac_word=$2
36121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36122$as_echo_n "checking for $ac_word... " >&6; }
36123if ${ac_cv_path_MCS+:} false; then :
36124  $as_echo_n "(cached) " >&6
36125else
36126  case $MCS in
36127  [\\/]* | ?:[\\/]*)
36128  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36129  ;;
36130  *)
36131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36132for as_dir in $PATH
36133do
36134  IFS=$as_save_IFS
36135  test -z "$as_dir" && as_dir=.
36136    for ac_exec_ext in '' $ac_executable_extensions; do
36137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36138    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36140    break 2
36141  fi
36142done
36143  done
36144IFS=$as_save_IFS
36145
36146  ;;
36147esac
36148fi
36149MCS=$ac_cv_path_MCS
36150if test -n "$MCS"; then
36151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36152$as_echo "$MCS" >&6; }
36153else
36154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36155$as_echo "no" >&6; }
36156fi
36157
36158
36159        if test "x$MCS" = x; then
36160          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36161        fi
36162      else
36163        # Otherwise we believe it is a complete path. Use it as it is.
36164        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36165$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36166        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36167$as_echo_n "checking for MCS... " >&6; }
36168        if test ! -x "$tool_specified"; then
36169          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36170$as_echo "not found" >&6; }
36171          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36172        fi
36173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36174$as_echo "$tool_specified" >&6; }
36175      fi
36176    fi
36177  fi
36178
36179
36180
36181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36182
36183  # First separate the path from the arguments. This will split at the first
36184  # space.
36185  complete="$MCS"
36186  path="${complete%% *}"
36187  tmp="$complete EOL"
36188  arguments="${tmp#* }"
36189
36190  # Input might be given as Windows format, start by converting to
36191  # unix format.
36192  new_path=`$CYGPATH -u "$path"`
36193
36194  # Now try to locate executable using which
36195  new_path=`$WHICH "$new_path" 2> /dev/null`
36196  # bat and cmd files are not always considered executable in cygwin causing which
36197  # to not find them
36198  if test "x$new_path" = x \
36199      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36200      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36201    new_path=`$CYGPATH -u "$path"`
36202  fi
36203  if test "x$new_path" = x; then
36204    # Oops. Which didn't find the executable.
36205    # The splitting of arguments from the executable at a space might have been incorrect,
36206    # since paths with space are more likely in Windows. Give it another try with the whole
36207    # argument.
36208    path="$complete"
36209    arguments="EOL"
36210    new_path=`$CYGPATH -u "$path"`
36211    new_path=`$WHICH "$new_path" 2> /dev/null`
36212    # bat and cmd files are not always considered executable in cygwin causing which
36213    # to not find them
36214    if test "x$new_path" = x \
36215        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36216        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36217      new_path=`$CYGPATH -u "$path"`
36218    fi
36219    if test "x$new_path" = x; then
36220      # It's still not found. Now this is an unrecoverable error.
36221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36222$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36223      has_space=`$ECHO "$complete" | $GREP " "`
36224      if test "x$has_space" != x; then
36225        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36226$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36227      fi
36228      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36229    fi
36230  fi
36231
36232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36235  # "foo.exe" is OK but "foo" is an error.
36236  #
36237  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36238  # It is also a way to make sure we got the proper file name for the real test later on.
36239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36240  if test "x$test_shortpath" = x; then
36241    # Short path failed, file does not exist as specified.
36242    # Try adding .exe or .cmd
36243    if test -f "${new_path}.exe"; then
36244      input_to_shortpath="${new_path}.exe"
36245    elif test -f "${new_path}.cmd"; then
36246      input_to_shortpath="${new_path}.cmd"
36247    else
36248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36249$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36250      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36251$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36252      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36253    fi
36254  else
36255    input_to_shortpath="$new_path"
36256  fi
36257
36258  # Call helper function which possibly converts this using DOS-style short mode.
36259  # If so, the updated path is stored in $new_path.
36260  new_path="$input_to_shortpath"
36261
36262  input_path="$input_to_shortpath"
36263  # Check if we need to convert this using DOS-style short mode. If the path
36264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36265  # take no chances and rewrite it.
36266  # Note: m4 eats our [], so we need to use [ and ] instead.
36267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36268  if test "x$has_forbidden_chars" != x; then
36269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36270    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36271    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36272    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36273      # Going to short mode and back again did indeed matter. Since short mode is
36274      # case insensitive, let's make it lowercase to improve readability.
36275      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36276      # Now convert it back to Unix-stile (cygpath)
36277      input_path=`$CYGPATH -u "$shortmode_path"`
36278      new_path="$input_path"
36279    fi
36280  fi
36281
36282  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36283  if test "x$test_cygdrive_prefix" = x; then
36284    # As a simple fix, exclude /usr/bin since it's not a real path.
36285    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36286      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36287      # a path prefixed by /cygdrive for fixpath to work.
36288      new_path="$CYGWIN_ROOT_PATH$input_path"
36289    fi
36290  fi
36291
36292  # remove trailing .exe if any
36293  new_path="${new_path/%.exe/}"
36294
36295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36296
36297  # First separate the path from the arguments. This will split at the first
36298  # space.
36299  complete="$MCS"
36300  path="${complete%% *}"
36301  tmp="$complete EOL"
36302  arguments="${tmp#* }"
36303
36304  # Input might be given as Windows format, start by converting to
36305  # unix format.
36306  new_path="$path"
36307
36308  windows_path="$new_path"
36309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36310    unix_path=`$CYGPATH -u "$windows_path"`
36311    new_path="$unix_path"
36312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36314    new_path="$unix_path"
36315  fi
36316
36317
36318  # Now try to locate executable using which
36319  new_path=`$WHICH "$new_path" 2> /dev/null`
36320
36321  if test "x$new_path" = x; then
36322    # Oops. Which didn't find the executable.
36323    # The splitting of arguments from the executable at a space might have been incorrect,
36324    # since paths with space are more likely in Windows. Give it another try with the whole
36325    # argument.
36326    path="$complete"
36327    arguments="EOL"
36328    new_path="$path"
36329
36330  windows_path="$new_path"
36331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36332    unix_path=`$CYGPATH -u "$windows_path"`
36333    new_path="$unix_path"
36334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36336    new_path="$unix_path"
36337  fi
36338
36339
36340    new_path=`$WHICH "$new_path" 2> /dev/null`
36341
36342    if test "x$new_path" = x; then
36343      # It's still not found. Now this is an unrecoverable error.
36344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36345$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36346      has_space=`$ECHO "$complete" | $GREP " "`
36347      if test "x$has_space" != x; then
36348        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36349$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36350      fi
36351      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36352    fi
36353  fi
36354
36355  # Now new_path has a complete unix path to the binary
36356  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36357    # Keep paths in /bin as-is, but remove trailing .exe if any
36358    new_path="${new_path/%.exe/}"
36359    # Do not save /bin paths to all_fixpath_prefixes!
36360  else
36361    # Not in mixed or Windows style, start by that.
36362    new_path=`cmd //c echo $new_path`
36363
36364  input_path="$new_path"
36365  # Check if we need to convert this using DOS-style short mode. If the path
36366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36367  # take no chances and rewrite it.
36368  # Note: m4 eats our [], so we need to use [ and ] instead.
36369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36370  if test "x$has_forbidden_chars" != x; then
36371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36372    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36373  fi
36374
36375    # Output is in $new_path
36376
36377  windows_path="$new_path"
36378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36379    unix_path=`$CYGPATH -u "$windows_path"`
36380    new_path="$unix_path"
36381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36383    new_path="$unix_path"
36384  fi
36385
36386    # remove trailing .exe if any
36387    new_path="${new_path/%.exe/}"
36388
36389    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36390    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36391  fi
36392
36393  else
36394    # We're on a posix platform. Hooray! :)
36395    # First separate the path from the arguments. This will split at the first
36396    # space.
36397    complete="$MCS"
36398    path="${complete%% *}"
36399    tmp="$complete EOL"
36400    arguments="${tmp#* }"
36401
36402    # Cannot rely on the command "which" here since it doesn't always work.
36403    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36404    if test -z "$is_absolute_path"; then
36405      # Path to executable is not absolute. Find it.
36406      IFS_save="$IFS"
36407      IFS=:
36408      for p in $PATH; do
36409        if test -f "$p/$path" && test -x "$p/$path"; then
36410          new_path="$p/$path"
36411          break
36412        fi
36413      done
36414      IFS="$IFS_save"
36415    else
36416      # This is an absolute path, we can use it without further modifications.
36417      new_path="$path"
36418    fi
36419
36420    if test "x$new_path" = x; then
36421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36422$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36423      has_space=`$ECHO "$complete" | $GREP " "`
36424      if test "x$has_space" != x; then
36425        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36426$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36427      fi
36428      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36429    fi
36430  fi
36431
36432  # Now join together the path and the arguments once again
36433  if test "x$arguments" != xEOL; then
36434    new_complete="$new_path ${arguments% *}"
36435  else
36436    new_complete="$new_path"
36437  fi
36438
36439  if test "x$complete" != "x$new_complete"; then
36440    MCS="$new_complete"
36441    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36442$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36443  fi
36444
36445  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36446    # FIXME: we should unify this with the solaris case above.
36447
36448
36449  # Publish this variable in the help.
36450
36451
36452  if test "x$STRIP" = x; then
36453    # The variable is not set by user, try to locate tool using the code snippet
36454    if test -n "$ac_tool_prefix"; then
36455  for ac_prog in strip
36456  do
36457    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36458set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36460$as_echo_n "checking for $ac_word... " >&6; }
36461if ${ac_cv_prog_STRIP+:} false; then :
36462  $as_echo_n "(cached) " >&6
36463else
36464  if test -n "$STRIP"; then
36465  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36466else
36467as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36468for as_dir in $PATH
36469do
36470  IFS=$as_save_IFS
36471  test -z "$as_dir" && as_dir=.
36472    for ac_exec_ext in '' $ac_executable_extensions; do
36473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36474    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36476    break 2
36477  fi
36478done
36479  done
36480IFS=$as_save_IFS
36481
36482fi
36483fi
36484STRIP=$ac_cv_prog_STRIP
36485if test -n "$STRIP"; then
36486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36487$as_echo "$STRIP" >&6; }
36488else
36489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36490$as_echo "no" >&6; }
36491fi
36492
36493
36494    test -n "$STRIP" && break
36495  done
36496fi
36497if test -z "$STRIP"; then
36498  ac_ct_STRIP=$STRIP
36499  for ac_prog in strip
36500do
36501  # Extract the first word of "$ac_prog", so it can be a program name with args.
36502set dummy $ac_prog; ac_word=$2
36503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36504$as_echo_n "checking for $ac_word... " >&6; }
36505if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36506  $as_echo_n "(cached) " >&6
36507else
36508  if test -n "$ac_ct_STRIP"; then
36509  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36510else
36511as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36512for as_dir in $PATH
36513do
36514  IFS=$as_save_IFS
36515  test -z "$as_dir" && as_dir=.
36516    for ac_exec_ext in '' $ac_executable_extensions; do
36517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36518    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36520    break 2
36521  fi
36522done
36523  done
36524IFS=$as_save_IFS
36525
36526fi
36527fi
36528ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36529if test -n "$ac_ct_STRIP"; then
36530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36531$as_echo "$ac_ct_STRIP" >&6; }
36532else
36533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36534$as_echo "no" >&6; }
36535fi
36536
36537
36538  test -n "$ac_ct_STRIP" && break
36539done
36540
36541  if test "x$ac_ct_STRIP" = x; then
36542    STRIP=""
36543  else
36544    case $cross_compiling:$ac_tool_warned in
36545yes:)
36546{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36547$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36548ac_tool_warned=yes ;;
36549esac
36550    STRIP=$ac_ct_STRIP
36551  fi
36552fi
36553
36554  else
36555    # The variable is set, but is it from the command line or the environment?
36556
36557    # Try to remove the string !STRIP! from our list.
36558    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36559    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36560      # If it failed, the variable was not from the command line. Ignore it,
36561      # but warn the user (except for BASH, which is always set by the calling BASH).
36562      if test "xSTRIP" != xBASH; then
36563        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36564$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36565      fi
36566      # Try to locate tool using the code snippet
36567      if test -n "$ac_tool_prefix"; then
36568  for ac_prog in strip
36569  do
36570    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36571set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36573$as_echo_n "checking for $ac_word... " >&6; }
36574if ${ac_cv_prog_STRIP+:} false; then :
36575  $as_echo_n "(cached) " >&6
36576else
36577  if test -n "$STRIP"; then
36578  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36579else
36580as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36581for as_dir in $PATH
36582do
36583  IFS=$as_save_IFS
36584  test -z "$as_dir" && as_dir=.
36585    for ac_exec_ext in '' $ac_executable_extensions; do
36586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36587    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36589    break 2
36590  fi
36591done
36592  done
36593IFS=$as_save_IFS
36594
36595fi
36596fi
36597STRIP=$ac_cv_prog_STRIP
36598if test -n "$STRIP"; then
36599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36600$as_echo "$STRIP" >&6; }
36601else
36602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36603$as_echo "no" >&6; }
36604fi
36605
36606
36607    test -n "$STRIP" && break
36608  done
36609fi
36610if test -z "$STRIP"; then
36611  ac_ct_STRIP=$STRIP
36612  for ac_prog in strip
36613do
36614  # Extract the first word of "$ac_prog", so it can be a program name with args.
36615set dummy $ac_prog; ac_word=$2
36616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36617$as_echo_n "checking for $ac_word... " >&6; }
36618if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36619  $as_echo_n "(cached) " >&6
36620else
36621  if test -n "$ac_ct_STRIP"; then
36622  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36623else
36624as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36625for as_dir in $PATH
36626do
36627  IFS=$as_save_IFS
36628  test -z "$as_dir" && as_dir=.
36629    for ac_exec_ext in '' $ac_executable_extensions; do
36630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36631    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36633    break 2
36634  fi
36635done
36636  done
36637IFS=$as_save_IFS
36638
36639fi
36640fi
36641ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36642if test -n "$ac_ct_STRIP"; then
36643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36644$as_echo "$ac_ct_STRIP" >&6; }
36645else
36646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36647$as_echo "no" >&6; }
36648fi
36649
36650
36651  test -n "$ac_ct_STRIP" && break
36652done
36653
36654  if test "x$ac_ct_STRIP" = x; then
36655    STRIP=""
36656  else
36657    case $cross_compiling:$ac_tool_warned in
36658yes:)
36659{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36660$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36661ac_tool_warned=yes ;;
36662esac
36663    STRIP=$ac_ct_STRIP
36664  fi
36665fi
36666
36667    else
36668      # If it succeeded, then it was overridden by the user. We will use it
36669      # for the tool.
36670
36671      # First remove it from the list of overridden variables, so we can test
36672      # for unknown variables in the end.
36673      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36674
36675      # Check if the provided tool contains a complete path.
36676      tool_specified="$STRIP"
36677      tool_basename="${tool_specified##*/}"
36678      if test "x$tool_basename" = "x$tool_specified"; then
36679        # A command without a complete path is provided, search $PATH.
36680        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36681$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36682        # Extract the first word of "$tool_basename", so it can be a program name with args.
36683set dummy $tool_basename; ac_word=$2
36684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36685$as_echo_n "checking for $ac_word... " >&6; }
36686if ${ac_cv_path_STRIP+:} false; then :
36687  $as_echo_n "(cached) " >&6
36688else
36689  case $STRIP in
36690  [\\/]* | ?:[\\/]*)
36691  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36692  ;;
36693  *)
36694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36695for as_dir in $PATH
36696do
36697  IFS=$as_save_IFS
36698  test -z "$as_dir" && as_dir=.
36699    for ac_exec_ext in '' $ac_executable_extensions; do
36700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36701    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36703    break 2
36704  fi
36705done
36706  done
36707IFS=$as_save_IFS
36708
36709  ;;
36710esac
36711fi
36712STRIP=$ac_cv_path_STRIP
36713if test -n "$STRIP"; then
36714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36715$as_echo "$STRIP" >&6; }
36716else
36717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36718$as_echo "no" >&6; }
36719fi
36720
36721
36722        if test "x$STRIP" = x; then
36723          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36724        fi
36725      else
36726        # Otherwise we believe it is a complete path. Use it as it is.
36727        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36728$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36729        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36730$as_echo_n "checking for STRIP... " >&6; }
36731        if test ! -x "$tool_specified"; then
36732          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36733$as_echo "not found" >&6; }
36734          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36735        fi
36736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36737$as_echo "$tool_specified" >&6; }
36738      fi
36739    fi
36740  fi
36741
36742
36743
36744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36745
36746  # First separate the path from the arguments. This will split at the first
36747  # space.
36748  complete="$STRIP"
36749  path="${complete%% *}"
36750  tmp="$complete EOL"
36751  arguments="${tmp#* }"
36752
36753  # Input might be given as Windows format, start by converting to
36754  # unix format.
36755  new_path=`$CYGPATH -u "$path"`
36756
36757  # Now try to locate executable using which
36758  new_path=`$WHICH "$new_path" 2> /dev/null`
36759  # bat and cmd files are not always considered executable in cygwin causing which
36760  # to not find them
36761  if test "x$new_path" = x \
36762      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36763      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36764    new_path=`$CYGPATH -u "$path"`
36765  fi
36766  if test "x$new_path" = x; then
36767    # Oops. Which didn't find the executable.
36768    # The splitting of arguments from the executable at a space might have been incorrect,
36769    # since paths with space are more likely in Windows. Give it another try with the whole
36770    # argument.
36771    path="$complete"
36772    arguments="EOL"
36773    new_path=`$CYGPATH -u "$path"`
36774    new_path=`$WHICH "$new_path" 2> /dev/null`
36775    # bat and cmd files are not always considered executable in cygwin causing which
36776    # to not find them
36777    if test "x$new_path" = x \
36778        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36779        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36780      new_path=`$CYGPATH -u "$path"`
36781    fi
36782    if test "x$new_path" = x; then
36783      # It's still not found. Now this is an unrecoverable error.
36784      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36785$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36786      has_space=`$ECHO "$complete" | $GREP " "`
36787      if test "x$has_space" != x; then
36788        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36789$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36790      fi
36791      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36792    fi
36793  fi
36794
36795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36798  # "foo.exe" is OK but "foo" is an error.
36799  #
36800  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36801  # It is also a way to make sure we got the proper file name for the real test later on.
36802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36803  if test "x$test_shortpath" = x; then
36804    # Short path failed, file does not exist as specified.
36805    # Try adding .exe or .cmd
36806    if test -f "${new_path}.exe"; then
36807      input_to_shortpath="${new_path}.exe"
36808    elif test -f "${new_path}.cmd"; then
36809      input_to_shortpath="${new_path}.cmd"
36810    else
36811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36812$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36813      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36814$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36815      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36816    fi
36817  else
36818    input_to_shortpath="$new_path"
36819  fi
36820
36821  # Call helper function which possibly converts this using DOS-style short mode.
36822  # If so, the updated path is stored in $new_path.
36823  new_path="$input_to_shortpath"
36824
36825  input_path="$input_to_shortpath"
36826  # Check if we need to convert this using DOS-style short mode. If the path
36827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36828  # take no chances and rewrite it.
36829  # Note: m4 eats our [], so we need to use [ and ] instead.
36830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36831  if test "x$has_forbidden_chars" != x; then
36832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36836      # Going to short mode and back again did indeed matter. Since short mode is
36837      # case insensitive, let's make it lowercase to improve readability.
36838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36839      # Now convert it back to Unix-stile (cygpath)
36840      input_path=`$CYGPATH -u "$shortmode_path"`
36841      new_path="$input_path"
36842    fi
36843  fi
36844
36845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36846  if test "x$test_cygdrive_prefix" = x; then
36847    # As a simple fix, exclude /usr/bin since it's not a real path.
36848    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36850      # a path prefixed by /cygdrive for fixpath to work.
36851      new_path="$CYGWIN_ROOT_PATH$input_path"
36852    fi
36853  fi
36854
36855  # remove trailing .exe if any
36856  new_path="${new_path/%.exe/}"
36857
36858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36859
36860  # First separate the path from the arguments. This will split at the first
36861  # space.
36862  complete="$STRIP"
36863  path="${complete%% *}"
36864  tmp="$complete EOL"
36865  arguments="${tmp#* }"
36866
36867  # Input might be given as Windows format, start by converting to
36868  # unix format.
36869  new_path="$path"
36870
36871  windows_path="$new_path"
36872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36873    unix_path=`$CYGPATH -u "$windows_path"`
36874    new_path="$unix_path"
36875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36877    new_path="$unix_path"
36878  fi
36879
36880
36881  # Now try to locate executable using which
36882  new_path=`$WHICH "$new_path" 2> /dev/null`
36883
36884  if test "x$new_path" = x; then
36885    # Oops. Which didn't find the executable.
36886    # The splitting of arguments from the executable at a space might have been incorrect,
36887    # since paths with space are more likely in Windows. Give it another try with the whole
36888    # argument.
36889    path="$complete"
36890    arguments="EOL"
36891    new_path="$path"
36892
36893  windows_path="$new_path"
36894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36895    unix_path=`$CYGPATH -u "$windows_path"`
36896    new_path="$unix_path"
36897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36899    new_path="$unix_path"
36900  fi
36901
36902
36903    new_path=`$WHICH "$new_path" 2> /dev/null`
36904
36905    if test "x$new_path" = x; then
36906      # It's still not found. Now this is an unrecoverable error.
36907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36908$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36909      has_space=`$ECHO "$complete" | $GREP " "`
36910      if test "x$has_space" != x; then
36911        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36912$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36913      fi
36914      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36915    fi
36916  fi
36917
36918  # Now new_path has a complete unix path to the binary
36919  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36920    # Keep paths in /bin as-is, but remove trailing .exe if any
36921    new_path="${new_path/%.exe/}"
36922    # Do not save /bin paths to all_fixpath_prefixes!
36923  else
36924    # Not in mixed or Windows style, start by that.
36925    new_path=`cmd //c echo $new_path`
36926
36927  input_path="$new_path"
36928  # Check if we need to convert this using DOS-style short mode. If the path
36929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36930  # take no chances and rewrite it.
36931  # Note: m4 eats our [], so we need to use [ and ] instead.
36932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36933  if test "x$has_forbidden_chars" != x; then
36934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36935    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36936  fi
36937
36938    # Output is in $new_path
36939
36940  windows_path="$new_path"
36941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36942    unix_path=`$CYGPATH -u "$windows_path"`
36943    new_path="$unix_path"
36944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36946    new_path="$unix_path"
36947  fi
36948
36949    # remove trailing .exe if any
36950    new_path="${new_path/%.exe/}"
36951
36952    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36953    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36954  fi
36955
36956  else
36957    # We're on a posix platform. Hooray! :)
36958    # First separate the path from the arguments. This will split at the first
36959    # space.
36960    complete="$STRIP"
36961    path="${complete%% *}"
36962    tmp="$complete EOL"
36963    arguments="${tmp#* }"
36964
36965    # Cannot rely on the command "which" here since it doesn't always work.
36966    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36967    if test -z "$is_absolute_path"; then
36968      # Path to executable is not absolute. Find it.
36969      IFS_save="$IFS"
36970      IFS=:
36971      for p in $PATH; do
36972        if test -f "$p/$path" && test -x "$p/$path"; then
36973          new_path="$p/$path"
36974          break
36975        fi
36976      done
36977      IFS="$IFS_save"
36978    else
36979      # This is an absolute path, we can use it without further modifications.
36980      new_path="$path"
36981    fi
36982
36983    if test "x$new_path" = x; then
36984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36985$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36986      has_space=`$ECHO "$complete" | $GREP " "`
36987      if test "x$has_space" != x; then
36988        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36989$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36990      fi
36991      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36992    fi
36993  fi
36994
36995  # Now join together the path and the arguments once again
36996  if test "x$arguments" != xEOL; then
36997    new_complete="$new_path ${arguments% *}"
36998  else
36999    new_complete="$new_path"
37000  fi
37001
37002  if test "x$complete" != "x$new_complete"; then
37003    STRIP="$new_complete"
37004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37005$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37006  fi
37007
37008
37009
37010  # Publish this variable in the help.
37011
37012
37013  if test "x$NM" = x; then
37014    # The variable is not set by user, try to locate tool using the code snippet
37015    if test -n "$ac_tool_prefix"; then
37016  for ac_prog in nm
37017  do
37018    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37019set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37021$as_echo_n "checking for $ac_word... " >&6; }
37022if ${ac_cv_prog_NM+:} false; then :
37023  $as_echo_n "(cached) " >&6
37024else
37025  if test -n "$NM"; then
37026  ac_cv_prog_NM="$NM" # Let the user override the test.
37027else
37028as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37029for as_dir in $PATH
37030do
37031  IFS=$as_save_IFS
37032  test -z "$as_dir" && as_dir=.
37033    for ac_exec_ext in '' $ac_executable_extensions; do
37034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37035    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37037    break 2
37038  fi
37039done
37040  done
37041IFS=$as_save_IFS
37042
37043fi
37044fi
37045NM=$ac_cv_prog_NM
37046if test -n "$NM"; then
37047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37048$as_echo "$NM" >&6; }
37049else
37050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37051$as_echo "no" >&6; }
37052fi
37053
37054
37055    test -n "$NM" && break
37056  done
37057fi
37058if test -z "$NM"; then
37059  ac_ct_NM=$NM
37060  for ac_prog in nm
37061do
37062  # Extract the first word of "$ac_prog", so it can be a program name with args.
37063set dummy $ac_prog; ac_word=$2
37064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37065$as_echo_n "checking for $ac_word... " >&6; }
37066if ${ac_cv_prog_ac_ct_NM+:} false; then :
37067  $as_echo_n "(cached) " >&6
37068else
37069  if test -n "$ac_ct_NM"; then
37070  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37071else
37072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37073for as_dir in $PATH
37074do
37075  IFS=$as_save_IFS
37076  test -z "$as_dir" && as_dir=.
37077    for ac_exec_ext in '' $ac_executable_extensions; do
37078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37079    ac_cv_prog_ac_ct_NM="$ac_prog"
37080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37081    break 2
37082  fi
37083done
37084  done
37085IFS=$as_save_IFS
37086
37087fi
37088fi
37089ac_ct_NM=$ac_cv_prog_ac_ct_NM
37090if test -n "$ac_ct_NM"; then
37091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37092$as_echo "$ac_ct_NM" >&6; }
37093else
37094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37095$as_echo "no" >&6; }
37096fi
37097
37098
37099  test -n "$ac_ct_NM" && break
37100done
37101
37102  if test "x$ac_ct_NM" = x; then
37103    NM=""
37104  else
37105    case $cross_compiling:$ac_tool_warned in
37106yes:)
37107{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37108$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37109ac_tool_warned=yes ;;
37110esac
37111    NM=$ac_ct_NM
37112  fi
37113fi
37114
37115  else
37116    # The variable is set, but is it from the command line or the environment?
37117
37118    # Try to remove the string !NM! from our list.
37119    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37120    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37121      # If it failed, the variable was not from the command line. Ignore it,
37122      # but warn the user (except for BASH, which is always set by the calling BASH).
37123      if test "xNM" != xBASH; then
37124        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37125$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37126      fi
37127      # Try to locate tool using the code snippet
37128      if test -n "$ac_tool_prefix"; then
37129  for ac_prog in nm
37130  do
37131    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37132set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37134$as_echo_n "checking for $ac_word... " >&6; }
37135if ${ac_cv_prog_NM+:} false; then :
37136  $as_echo_n "(cached) " >&6
37137else
37138  if test -n "$NM"; then
37139  ac_cv_prog_NM="$NM" # Let the user override the test.
37140else
37141as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37142for as_dir in $PATH
37143do
37144  IFS=$as_save_IFS
37145  test -z "$as_dir" && as_dir=.
37146    for ac_exec_ext in '' $ac_executable_extensions; do
37147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37148    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37150    break 2
37151  fi
37152done
37153  done
37154IFS=$as_save_IFS
37155
37156fi
37157fi
37158NM=$ac_cv_prog_NM
37159if test -n "$NM"; then
37160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37161$as_echo "$NM" >&6; }
37162else
37163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37164$as_echo "no" >&6; }
37165fi
37166
37167
37168    test -n "$NM" && break
37169  done
37170fi
37171if test -z "$NM"; then
37172  ac_ct_NM=$NM
37173  for ac_prog in nm
37174do
37175  # Extract the first word of "$ac_prog", so it can be a program name with args.
37176set dummy $ac_prog; ac_word=$2
37177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37178$as_echo_n "checking for $ac_word... " >&6; }
37179if ${ac_cv_prog_ac_ct_NM+:} false; then :
37180  $as_echo_n "(cached) " >&6
37181else
37182  if test -n "$ac_ct_NM"; then
37183  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37184else
37185as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37186for as_dir in $PATH
37187do
37188  IFS=$as_save_IFS
37189  test -z "$as_dir" && as_dir=.
37190    for ac_exec_ext in '' $ac_executable_extensions; do
37191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37192    ac_cv_prog_ac_ct_NM="$ac_prog"
37193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37194    break 2
37195  fi
37196done
37197  done
37198IFS=$as_save_IFS
37199
37200fi
37201fi
37202ac_ct_NM=$ac_cv_prog_ac_ct_NM
37203if test -n "$ac_ct_NM"; then
37204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37205$as_echo "$ac_ct_NM" >&6; }
37206else
37207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37208$as_echo "no" >&6; }
37209fi
37210
37211
37212  test -n "$ac_ct_NM" && break
37213done
37214
37215  if test "x$ac_ct_NM" = x; then
37216    NM=""
37217  else
37218    case $cross_compiling:$ac_tool_warned in
37219yes:)
37220{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37221$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37222ac_tool_warned=yes ;;
37223esac
37224    NM=$ac_ct_NM
37225  fi
37226fi
37227
37228    else
37229      # If it succeeded, then it was overridden by the user. We will use it
37230      # for the tool.
37231
37232      # First remove it from the list of overridden variables, so we can test
37233      # for unknown variables in the end.
37234      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37235
37236      # Check if the provided tool contains a complete path.
37237      tool_specified="$NM"
37238      tool_basename="${tool_specified##*/}"
37239      if test "x$tool_basename" = "x$tool_specified"; then
37240        # A command without a complete path is provided, search $PATH.
37241        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37242$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37243        # Extract the first word of "$tool_basename", so it can be a program name with args.
37244set dummy $tool_basename; ac_word=$2
37245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37246$as_echo_n "checking for $ac_word... " >&6; }
37247if ${ac_cv_path_NM+:} false; then :
37248  $as_echo_n "(cached) " >&6
37249else
37250  case $NM in
37251  [\\/]* | ?:[\\/]*)
37252  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37253  ;;
37254  *)
37255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37256for as_dir in $PATH
37257do
37258  IFS=$as_save_IFS
37259  test -z "$as_dir" && as_dir=.
37260    for ac_exec_ext in '' $ac_executable_extensions; do
37261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37262    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37264    break 2
37265  fi
37266done
37267  done
37268IFS=$as_save_IFS
37269
37270  ;;
37271esac
37272fi
37273NM=$ac_cv_path_NM
37274if test -n "$NM"; then
37275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37276$as_echo "$NM" >&6; }
37277else
37278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37279$as_echo "no" >&6; }
37280fi
37281
37282
37283        if test "x$NM" = x; then
37284          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37285        fi
37286      else
37287        # Otherwise we believe it is a complete path. Use it as it is.
37288        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37289$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37290        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37291$as_echo_n "checking for NM... " >&6; }
37292        if test ! -x "$tool_specified"; then
37293          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37294$as_echo "not found" >&6; }
37295          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37296        fi
37297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37298$as_echo "$tool_specified" >&6; }
37299      fi
37300    fi
37301  fi
37302
37303
37304
37305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37306
37307  # First separate the path from the arguments. This will split at the first
37308  # space.
37309  complete="$NM"
37310  path="${complete%% *}"
37311  tmp="$complete EOL"
37312  arguments="${tmp#* }"
37313
37314  # Input might be given as Windows format, start by converting to
37315  # unix format.
37316  new_path=`$CYGPATH -u "$path"`
37317
37318  # Now try to locate executable using which
37319  new_path=`$WHICH "$new_path" 2> /dev/null`
37320  # bat and cmd files are not always considered executable in cygwin causing which
37321  # to not find them
37322  if test "x$new_path" = x \
37323      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37324      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37325    new_path=`$CYGPATH -u "$path"`
37326  fi
37327  if test "x$new_path" = x; then
37328    # Oops. Which didn't find the executable.
37329    # The splitting of arguments from the executable at a space might have been incorrect,
37330    # since paths with space are more likely in Windows. Give it another try with the whole
37331    # argument.
37332    path="$complete"
37333    arguments="EOL"
37334    new_path=`$CYGPATH -u "$path"`
37335    new_path=`$WHICH "$new_path" 2> /dev/null`
37336    # bat and cmd files are not always considered executable in cygwin causing which
37337    # to not find them
37338    if test "x$new_path" = x \
37339        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37340        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37341      new_path=`$CYGPATH -u "$path"`
37342    fi
37343    if test "x$new_path" = x; then
37344      # It's still not found. Now this is an unrecoverable error.
37345      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37346$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37347      has_space=`$ECHO "$complete" | $GREP " "`
37348      if test "x$has_space" != x; then
37349        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37350$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37351      fi
37352      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37353    fi
37354  fi
37355
37356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37359  # "foo.exe" is OK but "foo" is an error.
37360  #
37361  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37362  # It is also a way to make sure we got the proper file name for the real test later on.
37363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37364  if test "x$test_shortpath" = x; then
37365    # Short path failed, file does not exist as specified.
37366    # Try adding .exe or .cmd
37367    if test -f "${new_path}.exe"; then
37368      input_to_shortpath="${new_path}.exe"
37369    elif test -f "${new_path}.cmd"; then
37370      input_to_shortpath="${new_path}.cmd"
37371    else
37372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37373$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37374      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37375$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37376      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37377    fi
37378  else
37379    input_to_shortpath="$new_path"
37380  fi
37381
37382  # Call helper function which possibly converts this using DOS-style short mode.
37383  # If so, the updated path is stored in $new_path.
37384  new_path="$input_to_shortpath"
37385
37386  input_path="$input_to_shortpath"
37387  # Check if we need to convert this using DOS-style short mode. If the path
37388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37389  # take no chances and rewrite it.
37390  # Note: m4 eats our [], so we need to use [ and ] instead.
37391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37392  if test "x$has_forbidden_chars" != x; then
37393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37397      # Going to short mode and back again did indeed matter. Since short mode is
37398      # case insensitive, let's make it lowercase to improve readability.
37399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37400      # Now convert it back to Unix-stile (cygpath)
37401      input_path=`$CYGPATH -u "$shortmode_path"`
37402      new_path="$input_path"
37403    fi
37404  fi
37405
37406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37407  if test "x$test_cygdrive_prefix" = x; then
37408    # As a simple fix, exclude /usr/bin since it's not a real path.
37409    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37411      # a path prefixed by /cygdrive for fixpath to work.
37412      new_path="$CYGWIN_ROOT_PATH$input_path"
37413    fi
37414  fi
37415
37416  # remove trailing .exe if any
37417  new_path="${new_path/%.exe/}"
37418
37419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37420
37421  # First separate the path from the arguments. This will split at the first
37422  # space.
37423  complete="$NM"
37424  path="${complete%% *}"
37425  tmp="$complete EOL"
37426  arguments="${tmp#* }"
37427
37428  # Input might be given as Windows format, start by converting to
37429  # unix format.
37430  new_path="$path"
37431
37432  windows_path="$new_path"
37433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37434    unix_path=`$CYGPATH -u "$windows_path"`
37435    new_path="$unix_path"
37436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37438    new_path="$unix_path"
37439  fi
37440
37441
37442  # Now try to locate executable using which
37443  new_path=`$WHICH "$new_path" 2> /dev/null`
37444
37445  if test "x$new_path" = x; then
37446    # Oops. Which didn't find the executable.
37447    # The splitting of arguments from the executable at a space might have been incorrect,
37448    # since paths with space are more likely in Windows. Give it another try with the whole
37449    # argument.
37450    path="$complete"
37451    arguments="EOL"
37452    new_path="$path"
37453
37454  windows_path="$new_path"
37455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37456    unix_path=`$CYGPATH -u "$windows_path"`
37457    new_path="$unix_path"
37458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37460    new_path="$unix_path"
37461  fi
37462
37463
37464    new_path=`$WHICH "$new_path" 2> /dev/null`
37465
37466    if test "x$new_path" = x; then
37467      # It's still not found. Now this is an unrecoverable error.
37468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37469$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37470      has_space=`$ECHO "$complete" | $GREP " "`
37471      if test "x$has_space" != x; then
37472        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37473$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37474      fi
37475      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37476    fi
37477  fi
37478
37479  # Now new_path has a complete unix path to the binary
37480  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37481    # Keep paths in /bin as-is, but remove trailing .exe if any
37482    new_path="${new_path/%.exe/}"
37483    # Do not save /bin paths to all_fixpath_prefixes!
37484  else
37485    # Not in mixed or Windows style, start by that.
37486    new_path=`cmd //c echo $new_path`
37487
37488  input_path="$new_path"
37489  # Check if we need to convert this using DOS-style short mode. If the path
37490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37491  # take no chances and rewrite it.
37492  # Note: m4 eats our [], so we need to use [ and ] instead.
37493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37494  if test "x$has_forbidden_chars" != x; then
37495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37496    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37497  fi
37498
37499    # Output is in $new_path
37500
37501  windows_path="$new_path"
37502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37503    unix_path=`$CYGPATH -u "$windows_path"`
37504    new_path="$unix_path"
37505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37507    new_path="$unix_path"
37508  fi
37509
37510    # remove trailing .exe if any
37511    new_path="${new_path/%.exe/}"
37512
37513    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37514    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37515  fi
37516
37517  else
37518    # We're on a posix platform. Hooray! :)
37519    # First separate the path from the arguments. This will split at the first
37520    # space.
37521    complete="$NM"
37522    path="${complete%% *}"
37523    tmp="$complete EOL"
37524    arguments="${tmp#* }"
37525
37526    # Cannot rely on the command "which" here since it doesn't always work.
37527    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37528    if test -z "$is_absolute_path"; then
37529      # Path to executable is not absolute. Find it.
37530      IFS_save="$IFS"
37531      IFS=:
37532      for p in $PATH; do
37533        if test -f "$p/$path" && test -x "$p/$path"; then
37534          new_path="$p/$path"
37535          break
37536        fi
37537      done
37538      IFS="$IFS_save"
37539    else
37540      # This is an absolute path, we can use it without further modifications.
37541      new_path="$path"
37542    fi
37543
37544    if test "x$new_path" = x; then
37545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37546$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37547      has_space=`$ECHO "$complete" | $GREP " "`
37548      if test "x$has_space" != x; then
37549        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37550$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37551      fi
37552      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37553    fi
37554  fi
37555
37556  # Now join together the path and the arguments once again
37557  if test "x$arguments" != xEOL; then
37558    new_complete="$new_path ${arguments% *}"
37559  else
37560    new_complete="$new_path"
37561  fi
37562
37563  if test "x$complete" != "x$new_complete"; then
37564    NM="$new_complete"
37565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37566$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37567  fi
37568
37569    GNM="$NM"
37570
37571  fi
37572
37573  # objcopy is used for moving debug symbols to separate files when
37574  # full debug symbols are enabled.
37575  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37576
37577
37578  # Publish this variable in the help.
37579
37580
37581  if test "x$OBJCOPY" = x; then
37582    # The variable is not set by user, try to locate tool using the code snippet
37583    if test -n "$ac_tool_prefix"; then
37584  for ac_prog in gobjcopy objcopy
37585  do
37586    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37587set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37589$as_echo_n "checking for $ac_word... " >&6; }
37590if ${ac_cv_prog_OBJCOPY+:} false; then :
37591  $as_echo_n "(cached) " >&6
37592else
37593  if test -n "$OBJCOPY"; then
37594  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37595else
37596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37597for as_dir in $PATH
37598do
37599  IFS=$as_save_IFS
37600  test -z "$as_dir" && as_dir=.
37601    for ac_exec_ext in '' $ac_executable_extensions; do
37602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37603    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37605    break 2
37606  fi
37607done
37608  done
37609IFS=$as_save_IFS
37610
37611fi
37612fi
37613OBJCOPY=$ac_cv_prog_OBJCOPY
37614if test -n "$OBJCOPY"; then
37615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37616$as_echo "$OBJCOPY" >&6; }
37617else
37618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37619$as_echo "no" >&6; }
37620fi
37621
37622
37623    test -n "$OBJCOPY" && break
37624  done
37625fi
37626if test -z "$OBJCOPY"; then
37627  ac_ct_OBJCOPY=$OBJCOPY
37628  for ac_prog in gobjcopy objcopy
37629do
37630  # Extract the first word of "$ac_prog", so it can be a program name with args.
37631set dummy $ac_prog; ac_word=$2
37632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37633$as_echo_n "checking for $ac_word... " >&6; }
37634if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37635  $as_echo_n "(cached) " >&6
37636else
37637  if test -n "$ac_ct_OBJCOPY"; then
37638  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37639else
37640as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37641for as_dir in $PATH
37642do
37643  IFS=$as_save_IFS
37644  test -z "$as_dir" && as_dir=.
37645    for ac_exec_ext in '' $ac_executable_extensions; do
37646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37647    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37649    break 2
37650  fi
37651done
37652  done
37653IFS=$as_save_IFS
37654
37655fi
37656fi
37657ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37658if test -n "$ac_ct_OBJCOPY"; then
37659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37660$as_echo "$ac_ct_OBJCOPY" >&6; }
37661else
37662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37663$as_echo "no" >&6; }
37664fi
37665
37666
37667  test -n "$ac_ct_OBJCOPY" && break
37668done
37669
37670  if test "x$ac_ct_OBJCOPY" = x; then
37671    OBJCOPY=""
37672  else
37673    case $cross_compiling:$ac_tool_warned in
37674yes:)
37675{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37676$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37677ac_tool_warned=yes ;;
37678esac
37679    OBJCOPY=$ac_ct_OBJCOPY
37680  fi
37681fi
37682
37683  else
37684    # The variable is set, but is it from the command line or the environment?
37685
37686    # Try to remove the string !OBJCOPY! from our list.
37687    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37688    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37689      # If it failed, the variable was not from the command line. Ignore it,
37690      # but warn the user (except for BASH, which is always set by the calling BASH).
37691      if test "xOBJCOPY" != xBASH; then
37692        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37693$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37694      fi
37695      # Try to locate tool using the code snippet
37696      if test -n "$ac_tool_prefix"; then
37697  for ac_prog in gobjcopy objcopy
37698  do
37699    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37700set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37702$as_echo_n "checking for $ac_word... " >&6; }
37703if ${ac_cv_prog_OBJCOPY+:} false; then :
37704  $as_echo_n "(cached) " >&6
37705else
37706  if test -n "$OBJCOPY"; then
37707  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37708else
37709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37710for as_dir in $PATH
37711do
37712  IFS=$as_save_IFS
37713  test -z "$as_dir" && as_dir=.
37714    for ac_exec_ext in '' $ac_executable_extensions; do
37715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37716    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37718    break 2
37719  fi
37720done
37721  done
37722IFS=$as_save_IFS
37723
37724fi
37725fi
37726OBJCOPY=$ac_cv_prog_OBJCOPY
37727if test -n "$OBJCOPY"; then
37728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37729$as_echo "$OBJCOPY" >&6; }
37730else
37731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37732$as_echo "no" >&6; }
37733fi
37734
37735
37736    test -n "$OBJCOPY" && break
37737  done
37738fi
37739if test -z "$OBJCOPY"; then
37740  ac_ct_OBJCOPY=$OBJCOPY
37741  for ac_prog in gobjcopy objcopy
37742do
37743  # Extract the first word of "$ac_prog", so it can be a program name with args.
37744set dummy $ac_prog; ac_word=$2
37745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37746$as_echo_n "checking for $ac_word... " >&6; }
37747if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37748  $as_echo_n "(cached) " >&6
37749else
37750  if test -n "$ac_ct_OBJCOPY"; then
37751  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37752else
37753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37754for as_dir in $PATH
37755do
37756  IFS=$as_save_IFS
37757  test -z "$as_dir" && as_dir=.
37758    for ac_exec_ext in '' $ac_executable_extensions; do
37759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37760    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37762    break 2
37763  fi
37764done
37765  done
37766IFS=$as_save_IFS
37767
37768fi
37769fi
37770ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37771if test -n "$ac_ct_OBJCOPY"; then
37772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37773$as_echo "$ac_ct_OBJCOPY" >&6; }
37774else
37775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37776$as_echo "no" >&6; }
37777fi
37778
37779
37780  test -n "$ac_ct_OBJCOPY" && break
37781done
37782
37783  if test "x$ac_ct_OBJCOPY" = x; then
37784    OBJCOPY=""
37785  else
37786    case $cross_compiling:$ac_tool_warned in
37787yes:)
37788{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37789$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37790ac_tool_warned=yes ;;
37791esac
37792    OBJCOPY=$ac_ct_OBJCOPY
37793  fi
37794fi
37795
37796    else
37797      # If it succeeded, then it was overridden by the user. We will use it
37798      # for the tool.
37799
37800      # First remove it from the list of overridden variables, so we can test
37801      # for unknown variables in the end.
37802      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37803
37804      # Check if the provided tool contains a complete path.
37805      tool_specified="$OBJCOPY"
37806      tool_basename="${tool_specified##*/}"
37807      if test "x$tool_basename" = "x$tool_specified"; then
37808        # A command without a complete path is provided, search $PATH.
37809        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37810$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37811        # Extract the first word of "$tool_basename", so it can be a program name with args.
37812set dummy $tool_basename; ac_word=$2
37813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37814$as_echo_n "checking for $ac_word... " >&6; }
37815if ${ac_cv_path_OBJCOPY+:} false; then :
37816  $as_echo_n "(cached) " >&6
37817else
37818  case $OBJCOPY in
37819  [\\/]* | ?:[\\/]*)
37820  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37821  ;;
37822  *)
37823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37824for as_dir in $PATH
37825do
37826  IFS=$as_save_IFS
37827  test -z "$as_dir" && as_dir=.
37828    for ac_exec_ext in '' $ac_executable_extensions; do
37829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37830    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37832    break 2
37833  fi
37834done
37835  done
37836IFS=$as_save_IFS
37837
37838  ;;
37839esac
37840fi
37841OBJCOPY=$ac_cv_path_OBJCOPY
37842if test -n "$OBJCOPY"; then
37843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37844$as_echo "$OBJCOPY" >&6; }
37845else
37846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37847$as_echo "no" >&6; }
37848fi
37849
37850
37851        if test "x$OBJCOPY" = x; then
37852          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37853        fi
37854      else
37855        # Otherwise we believe it is a complete path. Use it as it is.
37856        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
37857$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
37858        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
37859$as_echo_n "checking for OBJCOPY... " >&6; }
37860        if test ! -x "$tool_specified"; then
37861          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37862$as_echo "not found" >&6; }
37863          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
37864        fi
37865        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37866$as_echo "$tool_specified" >&6; }
37867      fi
37868    fi
37869  fi
37870
37871
37872    # Only call fixup if objcopy was found.
37873    if test -n "$OBJCOPY"; then
37874
37875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37876
37877  # First separate the path from the arguments. This will split at the first
37878  # space.
37879  complete="$OBJCOPY"
37880  path="${complete%% *}"
37881  tmp="$complete EOL"
37882  arguments="${tmp#* }"
37883
37884  # Input might be given as Windows format, start by converting to
37885  # unix format.
37886  new_path=`$CYGPATH -u "$path"`
37887
37888  # Now try to locate executable using which
37889  new_path=`$WHICH "$new_path" 2> /dev/null`
37890  # bat and cmd files are not always considered executable in cygwin causing which
37891  # to not find them
37892  if test "x$new_path" = x \
37893      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37894      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37895    new_path=`$CYGPATH -u "$path"`
37896  fi
37897  if test "x$new_path" = x; then
37898    # Oops. Which didn't find the executable.
37899    # The splitting of arguments from the executable at a space might have been incorrect,
37900    # since paths with space are more likely in Windows. Give it another try with the whole
37901    # argument.
37902    path="$complete"
37903    arguments="EOL"
37904    new_path=`$CYGPATH -u "$path"`
37905    new_path=`$WHICH "$new_path" 2> /dev/null`
37906    # bat and cmd files are not always considered executable in cygwin causing which
37907    # to not find them
37908    if test "x$new_path" = x \
37909        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37910        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37911      new_path=`$CYGPATH -u "$path"`
37912    fi
37913    if test "x$new_path" = x; then
37914      # It's still not found. Now this is an unrecoverable error.
37915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
37916$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
37917      has_space=`$ECHO "$complete" | $GREP " "`
37918      if test "x$has_space" != x; then
37919        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37920$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37921      fi
37922      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37923    fi
37924  fi
37925
37926  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37927  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37928  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37929  # "foo.exe" is OK but "foo" is an error.
37930  #
37931  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37932  # It is also a way to make sure we got the proper file name for the real test later on.
37933  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37934  if test "x$test_shortpath" = x; then
37935    # Short path failed, file does not exist as specified.
37936    # Try adding .exe or .cmd
37937    if test -f "${new_path}.exe"; then
37938      input_to_shortpath="${new_path}.exe"
37939    elif test -f "${new_path}.cmd"; then
37940      input_to_shortpath="${new_path}.cmd"
37941    else
37942      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
37943$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
37944      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37945$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37946      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37947    fi
37948  else
37949    input_to_shortpath="$new_path"
37950  fi
37951
37952  # Call helper function which possibly converts this using DOS-style short mode.
37953  # If so, the updated path is stored in $new_path.
37954  new_path="$input_to_shortpath"
37955
37956  input_path="$input_to_shortpath"
37957  # Check if we need to convert this using DOS-style short mode. If the path
37958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37959  # take no chances and rewrite it.
37960  # Note: m4 eats our [], so we need to use [ and ] instead.
37961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37962  if test "x$has_forbidden_chars" != x; then
37963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37964    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37965    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37966    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37967      # Going to short mode and back again did indeed matter. Since short mode is
37968      # case insensitive, let's make it lowercase to improve readability.
37969      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37970      # Now convert it back to Unix-stile (cygpath)
37971      input_path=`$CYGPATH -u "$shortmode_path"`
37972      new_path="$input_path"
37973    fi
37974  fi
37975
37976  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37977  if test "x$test_cygdrive_prefix" = x; then
37978    # As a simple fix, exclude /usr/bin since it's not a real path.
37979    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37980      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37981      # a path prefixed by /cygdrive for fixpath to work.
37982      new_path="$CYGWIN_ROOT_PATH$input_path"
37983    fi
37984  fi
37985
37986  # remove trailing .exe if any
37987  new_path="${new_path/%.exe/}"
37988
37989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37990
37991  # First separate the path from the arguments. This will split at the first
37992  # space.
37993  complete="$OBJCOPY"
37994  path="${complete%% *}"
37995  tmp="$complete EOL"
37996  arguments="${tmp#* }"
37997
37998  # Input might be given as Windows format, start by converting to
37999  # unix format.
38000  new_path="$path"
38001
38002  windows_path="$new_path"
38003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38004    unix_path=`$CYGPATH -u "$windows_path"`
38005    new_path="$unix_path"
38006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38008    new_path="$unix_path"
38009  fi
38010
38011
38012  # Now try to locate executable using which
38013  new_path=`$WHICH "$new_path" 2> /dev/null`
38014
38015  if test "x$new_path" = x; then
38016    # Oops. Which didn't find the executable.
38017    # The splitting of arguments from the executable at a space might have been incorrect,
38018    # since paths with space are more likely in Windows. Give it another try with the whole
38019    # argument.
38020    path="$complete"
38021    arguments="EOL"
38022    new_path="$path"
38023
38024  windows_path="$new_path"
38025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38026    unix_path=`$CYGPATH -u "$windows_path"`
38027    new_path="$unix_path"
38028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38030    new_path="$unix_path"
38031  fi
38032
38033
38034    new_path=`$WHICH "$new_path" 2> /dev/null`
38035
38036    if test "x$new_path" = x; then
38037      # It's still not found. Now this is an unrecoverable error.
38038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38039$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38040      has_space=`$ECHO "$complete" | $GREP " "`
38041      if test "x$has_space" != x; then
38042        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38043$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38044      fi
38045      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38046    fi
38047  fi
38048
38049  # Now new_path has a complete unix path to the binary
38050  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38051    # Keep paths in /bin as-is, but remove trailing .exe if any
38052    new_path="${new_path/%.exe/}"
38053    # Do not save /bin paths to all_fixpath_prefixes!
38054  else
38055    # Not in mixed or Windows style, start by that.
38056    new_path=`cmd //c echo $new_path`
38057
38058  input_path="$new_path"
38059  # Check if we need to convert this using DOS-style short mode. If the path
38060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38061  # take no chances and rewrite it.
38062  # Note: m4 eats our [], so we need to use [ and ] instead.
38063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38064  if test "x$has_forbidden_chars" != x; then
38065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38066    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38067  fi
38068
38069    # Output is in $new_path
38070
38071  windows_path="$new_path"
38072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38073    unix_path=`$CYGPATH -u "$windows_path"`
38074    new_path="$unix_path"
38075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38077    new_path="$unix_path"
38078  fi
38079
38080    # remove trailing .exe if any
38081    new_path="${new_path/%.exe/}"
38082
38083    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38084    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38085  fi
38086
38087  else
38088    # We're on a posix platform. Hooray! :)
38089    # First separate the path from the arguments. This will split at the first
38090    # space.
38091    complete="$OBJCOPY"
38092    path="${complete%% *}"
38093    tmp="$complete EOL"
38094    arguments="${tmp#* }"
38095
38096    # Cannot rely on the command "which" here since it doesn't always work.
38097    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38098    if test -z "$is_absolute_path"; then
38099      # Path to executable is not absolute. Find it.
38100      IFS_save="$IFS"
38101      IFS=:
38102      for p in $PATH; do
38103        if test -f "$p/$path" && test -x "$p/$path"; then
38104          new_path="$p/$path"
38105          break
38106        fi
38107      done
38108      IFS="$IFS_save"
38109    else
38110      # This is an absolute path, we can use it without further modifications.
38111      new_path="$path"
38112    fi
38113
38114    if test "x$new_path" = x; then
38115      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38116$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38117      has_space=`$ECHO "$complete" | $GREP " "`
38118      if test "x$has_space" != x; then
38119        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38120$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38121      fi
38122      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38123    fi
38124  fi
38125
38126  # Now join together the path and the arguments once again
38127  if test "x$arguments" != xEOL; then
38128    new_complete="$new_path ${arguments% *}"
38129  else
38130    new_complete="$new_path"
38131  fi
38132
38133  if test "x$complete" != "x$new_complete"; then
38134    OBJCOPY="$new_complete"
38135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38136$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38137  fi
38138
38139    fi
38140  fi
38141
38142
38143
38144  # Publish this variable in the help.
38145
38146
38147  if test "x$OBJDUMP" = x; then
38148    # The variable is not set by user, try to locate tool using the code snippet
38149    if test -n "$ac_tool_prefix"; then
38150  for ac_prog in gobjdump objdump
38151  do
38152    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38153set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38155$as_echo_n "checking for $ac_word... " >&6; }
38156if ${ac_cv_prog_OBJDUMP+:} false; then :
38157  $as_echo_n "(cached) " >&6
38158else
38159  if test -n "$OBJDUMP"; then
38160  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38161else
38162as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38163for as_dir in $PATH
38164do
38165  IFS=$as_save_IFS
38166  test -z "$as_dir" && as_dir=.
38167    for ac_exec_ext in '' $ac_executable_extensions; do
38168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38169    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38171    break 2
38172  fi
38173done
38174  done
38175IFS=$as_save_IFS
38176
38177fi
38178fi
38179OBJDUMP=$ac_cv_prog_OBJDUMP
38180if test -n "$OBJDUMP"; then
38181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38182$as_echo "$OBJDUMP" >&6; }
38183else
38184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38185$as_echo "no" >&6; }
38186fi
38187
38188
38189    test -n "$OBJDUMP" && break
38190  done
38191fi
38192if test -z "$OBJDUMP"; then
38193  ac_ct_OBJDUMP=$OBJDUMP
38194  for ac_prog in gobjdump objdump
38195do
38196  # Extract the first word of "$ac_prog", so it can be a program name with args.
38197set dummy $ac_prog; ac_word=$2
38198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38199$as_echo_n "checking for $ac_word... " >&6; }
38200if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38201  $as_echo_n "(cached) " >&6
38202else
38203  if test -n "$ac_ct_OBJDUMP"; then
38204  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38205else
38206as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38207for as_dir in $PATH
38208do
38209  IFS=$as_save_IFS
38210  test -z "$as_dir" && as_dir=.
38211    for ac_exec_ext in '' $ac_executable_extensions; do
38212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38213    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38215    break 2
38216  fi
38217done
38218  done
38219IFS=$as_save_IFS
38220
38221fi
38222fi
38223ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38224if test -n "$ac_ct_OBJDUMP"; then
38225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38226$as_echo "$ac_ct_OBJDUMP" >&6; }
38227else
38228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38229$as_echo "no" >&6; }
38230fi
38231
38232
38233  test -n "$ac_ct_OBJDUMP" && break
38234done
38235
38236  if test "x$ac_ct_OBJDUMP" = x; then
38237    OBJDUMP=""
38238  else
38239    case $cross_compiling:$ac_tool_warned in
38240yes:)
38241{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38242$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38243ac_tool_warned=yes ;;
38244esac
38245    OBJDUMP=$ac_ct_OBJDUMP
38246  fi
38247fi
38248
38249  else
38250    # The variable is set, but is it from the command line or the environment?
38251
38252    # Try to remove the string !OBJDUMP! from our list.
38253    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38254    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38255      # If it failed, the variable was not from the command line. Ignore it,
38256      # but warn the user (except for BASH, which is always set by the calling BASH).
38257      if test "xOBJDUMP" != xBASH; then
38258        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38259$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38260      fi
38261      # Try to locate tool using the code snippet
38262      if test -n "$ac_tool_prefix"; then
38263  for ac_prog in gobjdump objdump
38264  do
38265    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38266set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38268$as_echo_n "checking for $ac_word... " >&6; }
38269if ${ac_cv_prog_OBJDUMP+:} false; then :
38270  $as_echo_n "(cached) " >&6
38271else
38272  if test -n "$OBJDUMP"; then
38273  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38274else
38275as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38276for as_dir in $PATH
38277do
38278  IFS=$as_save_IFS
38279  test -z "$as_dir" && as_dir=.
38280    for ac_exec_ext in '' $ac_executable_extensions; do
38281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38282    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38284    break 2
38285  fi
38286done
38287  done
38288IFS=$as_save_IFS
38289
38290fi
38291fi
38292OBJDUMP=$ac_cv_prog_OBJDUMP
38293if test -n "$OBJDUMP"; then
38294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38295$as_echo "$OBJDUMP" >&6; }
38296else
38297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38298$as_echo "no" >&6; }
38299fi
38300
38301
38302    test -n "$OBJDUMP" && break
38303  done
38304fi
38305if test -z "$OBJDUMP"; then
38306  ac_ct_OBJDUMP=$OBJDUMP
38307  for ac_prog in gobjdump objdump
38308do
38309  # Extract the first word of "$ac_prog", so it can be a program name with args.
38310set dummy $ac_prog; ac_word=$2
38311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38312$as_echo_n "checking for $ac_word... " >&6; }
38313if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38314  $as_echo_n "(cached) " >&6
38315else
38316  if test -n "$ac_ct_OBJDUMP"; then
38317  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38318else
38319as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38320for as_dir in $PATH
38321do
38322  IFS=$as_save_IFS
38323  test -z "$as_dir" && as_dir=.
38324    for ac_exec_ext in '' $ac_executable_extensions; do
38325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38326    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38328    break 2
38329  fi
38330done
38331  done
38332IFS=$as_save_IFS
38333
38334fi
38335fi
38336ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38337if test -n "$ac_ct_OBJDUMP"; then
38338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38339$as_echo "$ac_ct_OBJDUMP" >&6; }
38340else
38341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38342$as_echo "no" >&6; }
38343fi
38344
38345
38346  test -n "$ac_ct_OBJDUMP" && break
38347done
38348
38349  if test "x$ac_ct_OBJDUMP" = x; then
38350    OBJDUMP=""
38351  else
38352    case $cross_compiling:$ac_tool_warned in
38353yes:)
38354{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38355$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38356ac_tool_warned=yes ;;
38357esac
38358    OBJDUMP=$ac_ct_OBJDUMP
38359  fi
38360fi
38361
38362    else
38363      # If it succeeded, then it was overridden by the user. We will use it
38364      # for the tool.
38365
38366      # First remove it from the list of overridden variables, so we can test
38367      # for unknown variables in the end.
38368      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38369
38370      # Check if the provided tool contains a complete path.
38371      tool_specified="$OBJDUMP"
38372      tool_basename="${tool_specified##*/}"
38373      if test "x$tool_basename" = "x$tool_specified"; then
38374        # A command without a complete path is provided, search $PATH.
38375        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38376$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38377        # Extract the first word of "$tool_basename", so it can be a program name with args.
38378set dummy $tool_basename; ac_word=$2
38379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38380$as_echo_n "checking for $ac_word... " >&6; }
38381if ${ac_cv_path_OBJDUMP+:} false; then :
38382  $as_echo_n "(cached) " >&6
38383else
38384  case $OBJDUMP in
38385  [\\/]* | ?:[\\/]*)
38386  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38387  ;;
38388  *)
38389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38390for as_dir in $PATH
38391do
38392  IFS=$as_save_IFS
38393  test -z "$as_dir" && as_dir=.
38394    for ac_exec_ext in '' $ac_executable_extensions; do
38395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38396    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38398    break 2
38399  fi
38400done
38401  done
38402IFS=$as_save_IFS
38403
38404  ;;
38405esac
38406fi
38407OBJDUMP=$ac_cv_path_OBJDUMP
38408if test -n "$OBJDUMP"; then
38409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38410$as_echo "$OBJDUMP" >&6; }
38411else
38412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38413$as_echo "no" >&6; }
38414fi
38415
38416
38417        if test "x$OBJDUMP" = x; then
38418          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38419        fi
38420      else
38421        # Otherwise we believe it is a complete path. Use it as it is.
38422        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38423$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38424        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38425$as_echo_n "checking for OBJDUMP... " >&6; }
38426        if test ! -x "$tool_specified"; then
38427          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38428$as_echo "not found" >&6; }
38429          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38430        fi
38431        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38432$as_echo "$tool_specified" >&6; }
38433      fi
38434    fi
38435  fi
38436
38437
38438  if test "x$OBJDUMP" != x; then
38439    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38440    # bails if argument is missing.
38441
38442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38443
38444  # First separate the path from the arguments. This will split at the first
38445  # space.
38446  complete="$OBJDUMP"
38447  path="${complete%% *}"
38448  tmp="$complete EOL"
38449  arguments="${tmp#* }"
38450
38451  # Input might be given as Windows format, start by converting to
38452  # unix format.
38453  new_path=`$CYGPATH -u "$path"`
38454
38455  # Now try to locate executable using which
38456  new_path=`$WHICH "$new_path" 2> /dev/null`
38457  # bat and cmd files are not always considered executable in cygwin causing which
38458  # to not find them
38459  if test "x$new_path" = x \
38460      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38461      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38462    new_path=`$CYGPATH -u "$path"`
38463  fi
38464  if test "x$new_path" = x; then
38465    # Oops. Which didn't find the executable.
38466    # The splitting of arguments from the executable at a space might have been incorrect,
38467    # since paths with space are more likely in Windows. Give it another try with the whole
38468    # argument.
38469    path="$complete"
38470    arguments="EOL"
38471    new_path=`$CYGPATH -u "$path"`
38472    new_path=`$WHICH "$new_path" 2> /dev/null`
38473    # bat and cmd files are not always considered executable in cygwin causing which
38474    # to not find them
38475    if test "x$new_path" = x \
38476        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38477        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38478      new_path=`$CYGPATH -u "$path"`
38479    fi
38480    if test "x$new_path" = x; then
38481      # It's still not found. Now this is an unrecoverable error.
38482      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38483$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38484      has_space=`$ECHO "$complete" | $GREP " "`
38485      if test "x$has_space" != x; then
38486        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38487$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38488      fi
38489      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38490    fi
38491  fi
38492
38493  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38494  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38495  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38496  # "foo.exe" is OK but "foo" is an error.
38497  #
38498  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38499  # It is also a way to make sure we got the proper file name for the real test later on.
38500  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38501  if test "x$test_shortpath" = x; then
38502    # Short path failed, file does not exist as specified.
38503    # Try adding .exe or .cmd
38504    if test -f "${new_path}.exe"; then
38505      input_to_shortpath="${new_path}.exe"
38506    elif test -f "${new_path}.cmd"; then
38507      input_to_shortpath="${new_path}.cmd"
38508    else
38509      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38510$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38511      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38512$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38513      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38514    fi
38515  else
38516    input_to_shortpath="$new_path"
38517  fi
38518
38519  # Call helper function which possibly converts this using DOS-style short mode.
38520  # If so, the updated path is stored in $new_path.
38521  new_path="$input_to_shortpath"
38522
38523  input_path="$input_to_shortpath"
38524  # Check if we need to convert this using DOS-style short mode. If the path
38525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38526  # take no chances and rewrite it.
38527  # Note: m4 eats our [], so we need to use [ and ] instead.
38528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38529  if test "x$has_forbidden_chars" != x; then
38530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38531    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38532    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38533    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38534      # Going to short mode and back again did indeed matter. Since short mode is
38535      # case insensitive, let's make it lowercase to improve readability.
38536      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38537      # Now convert it back to Unix-stile (cygpath)
38538      input_path=`$CYGPATH -u "$shortmode_path"`
38539      new_path="$input_path"
38540    fi
38541  fi
38542
38543  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38544  if test "x$test_cygdrive_prefix" = x; then
38545    # As a simple fix, exclude /usr/bin since it's not a real path.
38546    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38547      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38548      # a path prefixed by /cygdrive for fixpath to work.
38549      new_path="$CYGWIN_ROOT_PATH$input_path"
38550    fi
38551  fi
38552
38553  # remove trailing .exe if any
38554  new_path="${new_path/%.exe/}"
38555
38556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38557
38558  # First separate the path from the arguments. This will split at the first
38559  # space.
38560  complete="$OBJDUMP"
38561  path="${complete%% *}"
38562  tmp="$complete EOL"
38563  arguments="${tmp#* }"
38564
38565  # Input might be given as Windows format, start by converting to
38566  # unix format.
38567  new_path="$path"
38568
38569  windows_path="$new_path"
38570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38571    unix_path=`$CYGPATH -u "$windows_path"`
38572    new_path="$unix_path"
38573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38575    new_path="$unix_path"
38576  fi
38577
38578
38579  # Now try to locate executable using which
38580  new_path=`$WHICH "$new_path" 2> /dev/null`
38581
38582  if test "x$new_path" = x; then
38583    # Oops. Which didn't find the executable.
38584    # The splitting of arguments from the executable at a space might have been incorrect,
38585    # since paths with space are more likely in Windows. Give it another try with the whole
38586    # argument.
38587    path="$complete"
38588    arguments="EOL"
38589    new_path="$path"
38590
38591  windows_path="$new_path"
38592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38593    unix_path=`$CYGPATH -u "$windows_path"`
38594    new_path="$unix_path"
38595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38597    new_path="$unix_path"
38598  fi
38599
38600
38601    new_path=`$WHICH "$new_path" 2> /dev/null`
38602
38603    if test "x$new_path" = x; then
38604      # It's still not found. Now this is an unrecoverable error.
38605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38606$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38607      has_space=`$ECHO "$complete" | $GREP " "`
38608      if test "x$has_space" != x; then
38609        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38610$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38611      fi
38612      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38613    fi
38614  fi
38615
38616  # Now new_path has a complete unix path to the binary
38617  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38618    # Keep paths in /bin as-is, but remove trailing .exe if any
38619    new_path="${new_path/%.exe/}"
38620    # Do not save /bin paths to all_fixpath_prefixes!
38621  else
38622    # Not in mixed or Windows style, start by that.
38623    new_path=`cmd //c echo $new_path`
38624
38625  input_path="$new_path"
38626  # Check if we need to convert this using DOS-style short mode. If the path
38627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38628  # take no chances and rewrite it.
38629  # Note: m4 eats our [], so we need to use [ and ] instead.
38630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38631  if test "x$has_forbidden_chars" != x; then
38632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38633    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38634  fi
38635
38636    # Output is in $new_path
38637
38638  windows_path="$new_path"
38639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38640    unix_path=`$CYGPATH -u "$windows_path"`
38641    new_path="$unix_path"
38642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38644    new_path="$unix_path"
38645  fi
38646
38647    # remove trailing .exe if any
38648    new_path="${new_path/%.exe/}"
38649
38650    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38651    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38652  fi
38653
38654  else
38655    # We're on a posix platform. Hooray! :)
38656    # First separate the path from the arguments. This will split at the first
38657    # space.
38658    complete="$OBJDUMP"
38659    path="${complete%% *}"
38660    tmp="$complete EOL"
38661    arguments="${tmp#* }"
38662
38663    # Cannot rely on the command "which" here since it doesn't always work.
38664    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38665    if test -z "$is_absolute_path"; then
38666      # Path to executable is not absolute. Find it.
38667      IFS_save="$IFS"
38668      IFS=:
38669      for p in $PATH; do
38670        if test -f "$p/$path" && test -x "$p/$path"; then
38671          new_path="$p/$path"
38672          break
38673        fi
38674      done
38675      IFS="$IFS_save"
38676    else
38677      # This is an absolute path, we can use it without further modifications.
38678      new_path="$path"
38679    fi
38680
38681    if test "x$new_path" = x; then
38682      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38683$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38684      has_space=`$ECHO "$complete" | $GREP " "`
38685      if test "x$has_space" != x; then
38686        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38687$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38688      fi
38689      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38690    fi
38691  fi
38692
38693  # Now join together the path and the arguments once again
38694  if test "x$arguments" != xEOL; then
38695    new_complete="$new_path ${arguments% *}"
38696  else
38697    new_complete="$new_path"
38698  fi
38699
38700  if test "x$complete" != "x$new_complete"; then
38701    OBJDUMP="$new_complete"
38702    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38703$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38704  fi
38705
38706  fi
38707
38708
38709  # Restore old path.
38710  PATH="$OLD_PATH"
38711
38712  # Restore the flags to the user specified values.
38713  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38714  CFLAGS="$ORG_CFLAGS"
38715  CXXFLAGS="$ORG_CXXFLAGS"
38716  OBJCFLAGS="$ORG_OBJCFLAGS"
38717
38718
38719# Finally do some processing after the detection phase
38720
38721  if test "x$COMPILE_TYPE" = "xcross"; then
38722    # Now we need to find a C/C++ compiler that can build executables for the
38723    # build platform. We can't use the AC_PROG_CC macro, since it can only be
38724    # used once. Also, we need to do this without adding a tools dir to the
38725    # path, otherwise we might pick up cross-compilers which don't use standard
38726    # naming.
38727
38728    # FIXME: we should list the discovered compilers as an exclude pattern!
38729    # If we do that, we can do this detection before POST_DETECTION, and still
38730    # find the build compilers in the tools dir, if needed.
38731
38732
38733  # Publish this variable in the help.
38734
38735
38736  if test "x$BUILD_CC" = x; then
38737    # The variable is not set by user, try to locate tool using the code snippet
38738    for ac_prog in cl cc gcc
38739do
38740  # Extract the first word of "$ac_prog", so it can be a program name with args.
38741set dummy $ac_prog; ac_word=$2
38742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38743$as_echo_n "checking for $ac_word... " >&6; }
38744if ${ac_cv_path_BUILD_CC+:} false; then :
38745  $as_echo_n "(cached) " >&6
38746else
38747  case $BUILD_CC in
38748  [\\/]* | ?:[\\/]*)
38749  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38750  ;;
38751  *)
38752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38753for as_dir in $PATH
38754do
38755  IFS=$as_save_IFS
38756  test -z "$as_dir" && as_dir=.
38757    for ac_exec_ext in '' $ac_executable_extensions; do
38758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38759    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38761    break 2
38762  fi
38763done
38764  done
38765IFS=$as_save_IFS
38766
38767  ;;
38768esac
38769fi
38770BUILD_CC=$ac_cv_path_BUILD_CC
38771if test -n "$BUILD_CC"; then
38772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38773$as_echo "$BUILD_CC" >&6; }
38774else
38775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38776$as_echo "no" >&6; }
38777fi
38778
38779
38780  test -n "$BUILD_CC" && break
38781done
38782
38783  else
38784    # The variable is set, but is it from the command line or the environment?
38785
38786    # Try to remove the string !BUILD_CC! from our list.
38787    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
38788    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38789      # If it failed, the variable was not from the command line. Ignore it,
38790      # but warn the user (except for BASH, which is always set by the calling BASH).
38791      if test "xBUILD_CC" != xBASH; then
38792        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
38793$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
38794      fi
38795      # Try to locate tool using the code snippet
38796      for ac_prog in cl cc gcc
38797do
38798  # Extract the first word of "$ac_prog", so it can be a program name with args.
38799set dummy $ac_prog; ac_word=$2
38800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38801$as_echo_n "checking for $ac_word... " >&6; }
38802if ${ac_cv_path_BUILD_CC+:} false; then :
38803  $as_echo_n "(cached) " >&6
38804else
38805  case $BUILD_CC in
38806  [\\/]* | ?:[\\/]*)
38807  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38808  ;;
38809  *)
38810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38811for as_dir in $PATH
38812do
38813  IFS=$as_save_IFS
38814  test -z "$as_dir" && as_dir=.
38815    for ac_exec_ext in '' $ac_executable_extensions; do
38816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38817    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38819    break 2
38820  fi
38821done
38822  done
38823IFS=$as_save_IFS
38824
38825  ;;
38826esac
38827fi
38828BUILD_CC=$ac_cv_path_BUILD_CC
38829if test -n "$BUILD_CC"; then
38830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38831$as_echo "$BUILD_CC" >&6; }
38832else
38833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38834$as_echo "no" >&6; }
38835fi
38836
38837
38838  test -n "$BUILD_CC" && break
38839done
38840
38841    else
38842      # If it succeeded, then it was overridden by the user. We will use it
38843      # for the tool.
38844
38845      # First remove it from the list of overridden variables, so we can test
38846      # for unknown variables in the end.
38847      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38848
38849      # Check if the provided tool contains a complete path.
38850      tool_specified="$BUILD_CC"
38851      tool_basename="${tool_specified##*/}"
38852      if test "x$tool_basename" = "x$tool_specified"; then
38853        # A command without a complete path is provided, search $PATH.
38854        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
38855$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
38856        # Extract the first word of "$tool_basename", so it can be a program name with args.
38857set dummy $tool_basename; ac_word=$2
38858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38859$as_echo_n "checking for $ac_word... " >&6; }
38860if ${ac_cv_path_BUILD_CC+:} false; then :
38861  $as_echo_n "(cached) " >&6
38862else
38863  case $BUILD_CC in
38864  [\\/]* | ?:[\\/]*)
38865  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38866  ;;
38867  *)
38868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38869for as_dir in $PATH
38870do
38871  IFS=$as_save_IFS
38872  test -z "$as_dir" && as_dir=.
38873    for ac_exec_ext in '' $ac_executable_extensions; do
38874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38875    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38877    break 2
38878  fi
38879done
38880  done
38881IFS=$as_save_IFS
38882
38883  ;;
38884esac
38885fi
38886BUILD_CC=$ac_cv_path_BUILD_CC
38887if test -n "$BUILD_CC"; then
38888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38889$as_echo "$BUILD_CC" >&6; }
38890else
38891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38892$as_echo "no" >&6; }
38893fi
38894
38895
38896        if test "x$BUILD_CC" = x; then
38897          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38898        fi
38899      else
38900        # Otherwise we believe it is a complete path. Use it as it is.
38901        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
38902$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
38903        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
38904$as_echo_n "checking for BUILD_CC... " >&6; }
38905        if test ! -x "$tool_specified"; then
38906          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38907$as_echo "not found" >&6; }
38908          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
38909        fi
38910        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38911$as_echo "$tool_specified" >&6; }
38912      fi
38913    fi
38914  fi
38915
38916
38917
38918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38919
38920  # First separate the path from the arguments. This will split at the first
38921  # space.
38922  complete="$BUILD_CC"
38923  path="${complete%% *}"
38924  tmp="$complete EOL"
38925  arguments="${tmp#* }"
38926
38927  # Input might be given as Windows format, start by converting to
38928  # unix format.
38929  new_path=`$CYGPATH -u "$path"`
38930
38931  # Now try to locate executable using which
38932  new_path=`$WHICH "$new_path" 2> /dev/null`
38933  # bat and cmd files are not always considered executable in cygwin causing which
38934  # to not find them
38935  if test "x$new_path" = x \
38936      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38937      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38938    new_path=`$CYGPATH -u "$path"`
38939  fi
38940  if test "x$new_path" = x; then
38941    # Oops. Which didn't find the executable.
38942    # The splitting of arguments from the executable at a space might have been incorrect,
38943    # since paths with space are more likely in Windows. Give it another try with the whole
38944    # argument.
38945    path="$complete"
38946    arguments="EOL"
38947    new_path=`$CYGPATH -u "$path"`
38948    new_path=`$WHICH "$new_path" 2> /dev/null`
38949    # bat and cmd files are not always considered executable in cygwin causing which
38950    # to not find them
38951    if test "x$new_path" = x \
38952        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38953        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38954      new_path=`$CYGPATH -u "$path"`
38955    fi
38956    if test "x$new_path" = x; then
38957      # It's still not found. Now this is an unrecoverable error.
38958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
38959$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
38960      has_space=`$ECHO "$complete" | $GREP " "`
38961      if test "x$has_space" != x; then
38962        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38963$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38964      fi
38965      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
38966    fi
38967  fi
38968
38969  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38970  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38971  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38972  # "foo.exe" is OK but "foo" is an error.
38973  #
38974  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38975  # It is also a way to make sure we got the proper file name for the real test later on.
38976  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38977  if test "x$test_shortpath" = x; then
38978    # Short path failed, file does not exist as specified.
38979    # Try adding .exe or .cmd
38980    if test -f "${new_path}.exe"; then
38981      input_to_shortpath="${new_path}.exe"
38982    elif test -f "${new_path}.cmd"; then
38983      input_to_shortpath="${new_path}.cmd"
38984    else
38985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
38986$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
38987      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38988$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38989      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
38990    fi
38991  else
38992    input_to_shortpath="$new_path"
38993  fi
38994
38995  # Call helper function which possibly converts this using DOS-style short mode.
38996  # If so, the updated path is stored in $new_path.
38997  new_path="$input_to_shortpath"
38998
38999  input_path="$input_to_shortpath"
39000  # Check if we need to convert this using DOS-style short mode. If the path
39001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39002  # take no chances and rewrite it.
39003  # Note: m4 eats our [], so we need to use [ and ] instead.
39004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39005  if test "x$has_forbidden_chars" != x; then
39006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39007    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39008    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39009    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39010      # Going to short mode and back again did indeed matter. Since short mode is
39011      # case insensitive, let's make it lowercase to improve readability.
39012      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39013      # Now convert it back to Unix-stile (cygpath)
39014      input_path=`$CYGPATH -u "$shortmode_path"`
39015      new_path="$input_path"
39016    fi
39017  fi
39018
39019  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39020  if test "x$test_cygdrive_prefix" = x; then
39021    # As a simple fix, exclude /usr/bin since it's not a real path.
39022    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39023      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39024      # a path prefixed by /cygdrive for fixpath to work.
39025      new_path="$CYGWIN_ROOT_PATH$input_path"
39026    fi
39027  fi
39028
39029  # remove trailing .exe if any
39030  new_path="${new_path/%.exe/}"
39031
39032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39033
39034  # First separate the path from the arguments. This will split at the first
39035  # space.
39036  complete="$BUILD_CC"
39037  path="${complete%% *}"
39038  tmp="$complete EOL"
39039  arguments="${tmp#* }"
39040
39041  # Input might be given as Windows format, start by converting to
39042  # unix format.
39043  new_path="$path"
39044
39045  windows_path="$new_path"
39046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39047    unix_path=`$CYGPATH -u "$windows_path"`
39048    new_path="$unix_path"
39049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39051    new_path="$unix_path"
39052  fi
39053
39054
39055  # Now try to locate executable using which
39056  new_path=`$WHICH "$new_path" 2> /dev/null`
39057
39058  if test "x$new_path" = x; then
39059    # Oops. Which didn't find the executable.
39060    # The splitting of arguments from the executable at a space might have been incorrect,
39061    # since paths with space are more likely in Windows. Give it another try with the whole
39062    # argument.
39063    path="$complete"
39064    arguments="EOL"
39065    new_path="$path"
39066
39067  windows_path="$new_path"
39068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39069    unix_path=`$CYGPATH -u "$windows_path"`
39070    new_path="$unix_path"
39071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39073    new_path="$unix_path"
39074  fi
39075
39076
39077    new_path=`$WHICH "$new_path" 2> /dev/null`
39078
39079    if test "x$new_path" = x; then
39080      # It's still not found. Now this is an unrecoverable error.
39081      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39082$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39083      has_space=`$ECHO "$complete" | $GREP " "`
39084      if test "x$has_space" != x; then
39085        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39086$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39087      fi
39088      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39089    fi
39090  fi
39091
39092  # Now new_path has a complete unix path to the binary
39093  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39094    # Keep paths in /bin as-is, but remove trailing .exe if any
39095    new_path="${new_path/%.exe/}"
39096    # Do not save /bin paths to all_fixpath_prefixes!
39097  else
39098    # Not in mixed or Windows style, start by that.
39099    new_path=`cmd //c echo $new_path`
39100
39101  input_path="$new_path"
39102  # Check if we need to convert this using DOS-style short mode. If the path
39103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39104  # take no chances and rewrite it.
39105  # Note: m4 eats our [], so we need to use [ and ] instead.
39106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39107  if test "x$has_forbidden_chars" != x; then
39108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39109    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39110  fi
39111
39112    # Output is in $new_path
39113
39114  windows_path="$new_path"
39115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39116    unix_path=`$CYGPATH -u "$windows_path"`
39117    new_path="$unix_path"
39118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39120    new_path="$unix_path"
39121  fi
39122
39123    # remove trailing .exe if any
39124    new_path="${new_path/%.exe/}"
39125
39126    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39127    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39128  fi
39129
39130  else
39131    # We're on a posix platform. Hooray! :)
39132    # First separate the path from the arguments. This will split at the first
39133    # space.
39134    complete="$BUILD_CC"
39135    path="${complete%% *}"
39136    tmp="$complete EOL"
39137    arguments="${tmp#* }"
39138
39139    # Cannot rely on the command "which" here since it doesn't always work.
39140    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39141    if test -z "$is_absolute_path"; then
39142      # Path to executable is not absolute. Find it.
39143      IFS_save="$IFS"
39144      IFS=:
39145      for p in $PATH; do
39146        if test -f "$p/$path" && test -x "$p/$path"; then
39147          new_path="$p/$path"
39148          break
39149        fi
39150      done
39151      IFS="$IFS_save"
39152    else
39153      # This is an absolute path, we can use it without further modifications.
39154      new_path="$path"
39155    fi
39156
39157    if test "x$new_path" = x; then
39158      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39159$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39160      has_space=`$ECHO "$complete" | $GREP " "`
39161      if test "x$has_space" != x; then
39162        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39163$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39164      fi
39165      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39166    fi
39167  fi
39168
39169  # Now join together the path and the arguments once again
39170  if test "x$arguments" != xEOL; then
39171    new_complete="$new_path ${arguments% *}"
39172  else
39173    new_complete="$new_path"
39174  fi
39175
39176  if test "x$complete" != "x$new_complete"; then
39177    BUILD_CC="$new_complete"
39178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39179$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39180  fi
39181
39182
39183
39184  # Publish this variable in the help.
39185
39186
39187  if test "x$BUILD_CXX" = x; then
39188    # The variable is not set by user, try to locate tool using the code snippet
39189    for ac_prog in cl CC g++
39190do
39191  # Extract the first word of "$ac_prog", so it can be a program name with args.
39192set dummy $ac_prog; ac_word=$2
39193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39194$as_echo_n "checking for $ac_word... " >&6; }
39195if ${ac_cv_path_BUILD_CXX+:} false; then :
39196  $as_echo_n "(cached) " >&6
39197else
39198  case $BUILD_CXX in
39199  [\\/]* | ?:[\\/]*)
39200  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39201  ;;
39202  *)
39203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39204for as_dir in $PATH
39205do
39206  IFS=$as_save_IFS
39207  test -z "$as_dir" && as_dir=.
39208    for ac_exec_ext in '' $ac_executable_extensions; do
39209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39210    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39212    break 2
39213  fi
39214done
39215  done
39216IFS=$as_save_IFS
39217
39218  ;;
39219esac
39220fi
39221BUILD_CXX=$ac_cv_path_BUILD_CXX
39222if test -n "$BUILD_CXX"; then
39223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39224$as_echo "$BUILD_CXX" >&6; }
39225else
39226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39227$as_echo "no" >&6; }
39228fi
39229
39230
39231  test -n "$BUILD_CXX" && break
39232done
39233
39234  else
39235    # The variable is set, but is it from the command line or the environment?
39236
39237    # Try to remove the string !BUILD_CXX! from our list.
39238    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39239    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39240      # If it failed, the variable was not from the command line. Ignore it,
39241      # but warn the user (except for BASH, which is always set by the calling BASH).
39242      if test "xBUILD_CXX" != xBASH; then
39243        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39244$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39245      fi
39246      # Try to locate tool using the code snippet
39247      for ac_prog in cl CC g++
39248do
39249  # Extract the first word of "$ac_prog", so it can be a program name with args.
39250set dummy $ac_prog; ac_word=$2
39251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39252$as_echo_n "checking for $ac_word... " >&6; }
39253if ${ac_cv_path_BUILD_CXX+:} false; then :
39254  $as_echo_n "(cached) " >&6
39255else
39256  case $BUILD_CXX in
39257  [\\/]* | ?:[\\/]*)
39258  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39259  ;;
39260  *)
39261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39262for as_dir in $PATH
39263do
39264  IFS=$as_save_IFS
39265  test -z "$as_dir" && as_dir=.
39266    for ac_exec_ext in '' $ac_executable_extensions; do
39267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39268    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39270    break 2
39271  fi
39272done
39273  done
39274IFS=$as_save_IFS
39275
39276  ;;
39277esac
39278fi
39279BUILD_CXX=$ac_cv_path_BUILD_CXX
39280if test -n "$BUILD_CXX"; then
39281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39282$as_echo "$BUILD_CXX" >&6; }
39283else
39284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39285$as_echo "no" >&6; }
39286fi
39287
39288
39289  test -n "$BUILD_CXX" && break
39290done
39291
39292    else
39293      # If it succeeded, then it was overridden by the user. We will use it
39294      # for the tool.
39295
39296      # First remove it from the list of overridden variables, so we can test
39297      # for unknown variables in the end.
39298      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39299
39300      # Check if the provided tool contains a complete path.
39301      tool_specified="$BUILD_CXX"
39302      tool_basename="${tool_specified##*/}"
39303      if test "x$tool_basename" = "x$tool_specified"; then
39304        # A command without a complete path is provided, search $PATH.
39305        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39306$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39307        # Extract the first word of "$tool_basename", so it can be a program name with args.
39308set dummy $tool_basename; ac_word=$2
39309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39310$as_echo_n "checking for $ac_word... " >&6; }
39311if ${ac_cv_path_BUILD_CXX+:} false; then :
39312  $as_echo_n "(cached) " >&6
39313else
39314  case $BUILD_CXX in
39315  [\\/]* | ?:[\\/]*)
39316  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39317  ;;
39318  *)
39319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39320for as_dir in $PATH
39321do
39322  IFS=$as_save_IFS
39323  test -z "$as_dir" && as_dir=.
39324    for ac_exec_ext in '' $ac_executable_extensions; do
39325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39326    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39328    break 2
39329  fi
39330done
39331  done
39332IFS=$as_save_IFS
39333
39334  ;;
39335esac
39336fi
39337BUILD_CXX=$ac_cv_path_BUILD_CXX
39338if test -n "$BUILD_CXX"; then
39339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39340$as_echo "$BUILD_CXX" >&6; }
39341else
39342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39343$as_echo "no" >&6; }
39344fi
39345
39346
39347        if test "x$BUILD_CXX" = x; then
39348          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39349        fi
39350      else
39351        # Otherwise we believe it is a complete path. Use it as it is.
39352        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39353$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39354        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39355$as_echo_n "checking for BUILD_CXX... " >&6; }
39356        if test ! -x "$tool_specified"; then
39357          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39358$as_echo "not found" >&6; }
39359          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39360        fi
39361        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39362$as_echo "$tool_specified" >&6; }
39363      fi
39364    fi
39365  fi
39366
39367
39368
39369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39370
39371  # First separate the path from the arguments. This will split at the first
39372  # space.
39373  complete="$BUILD_CXX"
39374  path="${complete%% *}"
39375  tmp="$complete EOL"
39376  arguments="${tmp#* }"
39377
39378  # Input might be given as Windows format, start by converting to
39379  # unix format.
39380  new_path=`$CYGPATH -u "$path"`
39381
39382  # Now try to locate executable using which
39383  new_path=`$WHICH "$new_path" 2> /dev/null`
39384  # bat and cmd files are not always considered executable in cygwin causing which
39385  # to not find them
39386  if test "x$new_path" = x \
39387      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39388      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39389    new_path=`$CYGPATH -u "$path"`
39390  fi
39391  if test "x$new_path" = x; then
39392    # Oops. Which didn't find the executable.
39393    # The splitting of arguments from the executable at a space might have been incorrect,
39394    # since paths with space are more likely in Windows. Give it another try with the whole
39395    # argument.
39396    path="$complete"
39397    arguments="EOL"
39398    new_path=`$CYGPATH -u "$path"`
39399    new_path=`$WHICH "$new_path" 2> /dev/null`
39400    # bat and cmd files are not always considered executable in cygwin causing which
39401    # to not find them
39402    if test "x$new_path" = x \
39403        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39404        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39405      new_path=`$CYGPATH -u "$path"`
39406    fi
39407    if test "x$new_path" = x; then
39408      # It's still not found. Now this is an unrecoverable error.
39409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39410$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39411      has_space=`$ECHO "$complete" | $GREP " "`
39412      if test "x$has_space" != x; then
39413        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39414$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39415      fi
39416      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39417    fi
39418  fi
39419
39420  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39421  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39422  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39423  # "foo.exe" is OK but "foo" is an error.
39424  #
39425  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39426  # It is also a way to make sure we got the proper file name for the real test later on.
39427  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39428  if test "x$test_shortpath" = x; then
39429    # Short path failed, file does not exist as specified.
39430    # Try adding .exe or .cmd
39431    if test -f "${new_path}.exe"; then
39432      input_to_shortpath="${new_path}.exe"
39433    elif test -f "${new_path}.cmd"; then
39434      input_to_shortpath="${new_path}.cmd"
39435    else
39436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39437$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39438      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39439$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39440      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39441    fi
39442  else
39443    input_to_shortpath="$new_path"
39444  fi
39445
39446  # Call helper function which possibly converts this using DOS-style short mode.
39447  # If so, the updated path is stored in $new_path.
39448  new_path="$input_to_shortpath"
39449
39450  input_path="$input_to_shortpath"
39451  # Check if we need to convert this using DOS-style short mode. If the path
39452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39453  # take no chances and rewrite it.
39454  # Note: m4 eats our [], so we need to use [ and ] instead.
39455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39456  if test "x$has_forbidden_chars" != x; then
39457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39461      # Going to short mode and back again did indeed matter. Since short mode is
39462      # case insensitive, let's make it lowercase to improve readability.
39463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39464      # Now convert it back to Unix-stile (cygpath)
39465      input_path=`$CYGPATH -u "$shortmode_path"`
39466      new_path="$input_path"
39467    fi
39468  fi
39469
39470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39471  if test "x$test_cygdrive_prefix" = x; then
39472    # As a simple fix, exclude /usr/bin since it's not a real path.
39473    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39475      # a path prefixed by /cygdrive for fixpath to work.
39476      new_path="$CYGWIN_ROOT_PATH$input_path"
39477    fi
39478  fi
39479
39480  # remove trailing .exe if any
39481  new_path="${new_path/%.exe/}"
39482
39483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39484
39485  # First separate the path from the arguments. This will split at the first
39486  # space.
39487  complete="$BUILD_CXX"
39488  path="${complete%% *}"
39489  tmp="$complete EOL"
39490  arguments="${tmp#* }"
39491
39492  # Input might be given as Windows format, start by converting to
39493  # unix format.
39494  new_path="$path"
39495
39496  windows_path="$new_path"
39497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39498    unix_path=`$CYGPATH -u "$windows_path"`
39499    new_path="$unix_path"
39500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39502    new_path="$unix_path"
39503  fi
39504
39505
39506  # Now try to locate executable using which
39507  new_path=`$WHICH "$new_path" 2> /dev/null`
39508
39509  if test "x$new_path" = x; then
39510    # Oops. Which didn't find the executable.
39511    # The splitting of arguments from the executable at a space might have been incorrect,
39512    # since paths with space are more likely in Windows. Give it another try with the whole
39513    # argument.
39514    path="$complete"
39515    arguments="EOL"
39516    new_path="$path"
39517
39518  windows_path="$new_path"
39519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39520    unix_path=`$CYGPATH -u "$windows_path"`
39521    new_path="$unix_path"
39522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39524    new_path="$unix_path"
39525  fi
39526
39527
39528    new_path=`$WHICH "$new_path" 2> /dev/null`
39529
39530    if test "x$new_path" = x; then
39531      # It's still not found. Now this is an unrecoverable error.
39532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39533$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39534      has_space=`$ECHO "$complete" | $GREP " "`
39535      if test "x$has_space" != x; then
39536        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39537$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39538      fi
39539      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39540    fi
39541  fi
39542
39543  # Now new_path has a complete unix path to the binary
39544  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39545    # Keep paths in /bin as-is, but remove trailing .exe if any
39546    new_path="${new_path/%.exe/}"
39547    # Do not save /bin paths to all_fixpath_prefixes!
39548  else
39549    # Not in mixed or Windows style, start by that.
39550    new_path=`cmd //c echo $new_path`
39551
39552  input_path="$new_path"
39553  # Check if we need to convert this using DOS-style short mode. If the path
39554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39555  # take no chances and rewrite it.
39556  # Note: m4 eats our [], so we need to use [ and ] instead.
39557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39558  if test "x$has_forbidden_chars" != x; then
39559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39560    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39561  fi
39562
39563    # Output is in $new_path
39564
39565  windows_path="$new_path"
39566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39567    unix_path=`$CYGPATH -u "$windows_path"`
39568    new_path="$unix_path"
39569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39571    new_path="$unix_path"
39572  fi
39573
39574    # remove trailing .exe if any
39575    new_path="${new_path/%.exe/}"
39576
39577    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39578    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39579  fi
39580
39581  else
39582    # We're on a posix platform. Hooray! :)
39583    # First separate the path from the arguments. This will split at the first
39584    # space.
39585    complete="$BUILD_CXX"
39586    path="${complete%% *}"
39587    tmp="$complete EOL"
39588    arguments="${tmp#* }"
39589
39590    # Cannot rely on the command "which" here since it doesn't always work.
39591    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39592    if test -z "$is_absolute_path"; then
39593      # Path to executable is not absolute. Find it.
39594      IFS_save="$IFS"
39595      IFS=:
39596      for p in $PATH; do
39597        if test -f "$p/$path" && test -x "$p/$path"; then
39598          new_path="$p/$path"
39599          break
39600        fi
39601      done
39602      IFS="$IFS_save"
39603    else
39604      # This is an absolute path, we can use it without further modifications.
39605      new_path="$path"
39606    fi
39607
39608    if test "x$new_path" = x; then
39609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39610$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39611      has_space=`$ECHO "$complete" | $GREP " "`
39612      if test "x$has_space" != x; then
39613        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39614$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39615      fi
39616      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39617    fi
39618  fi
39619
39620  # Now join together the path and the arguments once again
39621  if test "x$arguments" != xEOL; then
39622    new_complete="$new_path ${arguments% *}"
39623  else
39624    new_complete="$new_path"
39625  fi
39626
39627  if test "x$complete" != "x$new_complete"; then
39628    BUILD_CXX="$new_complete"
39629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39630$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39631  fi
39632
39633
39634
39635  # Publish this variable in the help.
39636
39637
39638  if test "x$BUILD_LD" = x; then
39639    # The variable is not set by user, try to locate tool using the code snippet
39640    for ac_prog in ld
39641do
39642  # Extract the first word of "$ac_prog", so it can be a program name with args.
39643set dummy $ac_prog; ac_word=$2
39644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39645$as_echo_n "checking for $ac_word... " >&6; }
39646if ${ac_cv_path_BUILD_LD+:} false; then :
39647  $as_echo_n "(cached) " >&6
39648else
39649  case $BUILD_LD in
39650  [\\/]* | ?:[\\/]*)
39651  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39652  ;;
39653  *)
39654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39655for as_dir in $PATH
39656do
39657  IFS=$as_save_IFS
39658  test -z "$as_dir" && as_dir=.
39659    for ac_exec_ext in '' $ac_executable_extensions; do
39660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39661    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39663    break 2
39664  fi
39665done
39666  done
39667IFS=$as_save_IFS
39668
39669  ;;
39670esac
39671fi
39672BUILD_LD=$ac_cv_path_BUILD_LD
39673if test -n "$BUILD_LD"; then
39674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39675$as_echo "$BUILD_LD" >&6; }
39676else
39677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39678$as_echo "no" >&6; }
39679fi
39680
39681
39682  test -n "$BUILD_LD" && break
39683done
39684
39685  else
39686    # The variable is set, but is it from the command line or the environment?
39687
39688    # Try to remove the string !BUILD_LD! from our list.
39689    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39690    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39691      # If it failed, the variable was not from the command line. Ignore it,
39692      # but warn the user (except for BASH, which is always set by the calling BASH).
39693      if test "xBUILD_LD" != xBASH; then
39694        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39695$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39696      fi
39697      # Try to locate tool using the code snippet
39698      for ac_prog in ld
39699do
39700  # Extract the first word of "$ac_prog", so it can be a program name with args.
39701set dummy $ac_prog; ac_word=$2
39702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39703$as_echo_n "checking for $ac_word... " >&6; }
39704if ${ac_cv_path_BUILD_LD+:} false; then :
39705  $as_echo_n "(cached) " >&6
39706else
39707  case $BUILD_LD in
39708  [\\/]* | ?:[\\/]*)
39709  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39710  ;;
39711  *)
39712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39713for as_dir in $PATH
39714do
39715  IFS=$as_save_IFS
39716  test -z "$as_dir" && as_dir=.
39717    for ac_exec_ext in '' $ac_executable_extensions; do
39718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39719    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39721    break 2
39722  fi
39723done
39724  done
39725IFS=$as_save_IFS
39726
39727  ;;
39728esac
39729fi
39730BUILD_LD=$ac_cv_path_BUILD_LD
39731if test -n "$BUILD_LD"; then
39732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39733$as_echo "$BUILD_LD" >&6; }
39734else
39735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39736$as_echo "no" >&6; }
39737fi
39738
39739
39740  test -n "$BUILD_LD" && break
39741done
39742
39743    else
39744      # If it succeeded, then it was overridden by the user. We will use it
39745      # for the tool.
39746
39747      # First remove it from the list of overridden variables, so we can test
39748      # for unknown variables in the end.
39749      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39750
39751      # Check if the provided tool contains a complete path.
39752      tool_specified="$BUILD_LD"
39753      tool_basename="${tool_specified##*/}"
39754      if test "x$tool_basename" = "x$tool_specified"; then
39755        # A command without a complete path is provided, search $PATH.
39756        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
39757$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
39758        # Extract the first word of "$tool_basename", so it can be a program name with args.
39759set dummy $tool_basename; ac_word=$2
39760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39761$as_echo_n "checking for $ac_word... " >&6; }
39762if ${ac_cv_path_BUILD_LD+:} false; then :
39763  $as_echo_n "(cached) " >&6
39764else
39765  case $BUILD_LD in
39766  [\\/]* | ?:[\\/]*)
39767  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39768  ;;
39769  *)
39770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39771for as_dir in $PATH
39772do
39773  IFS=$as_save_IFS
39774  test -z "$as_dir" && as_dir=.
39775    for ac_exec_ext in '' $ac_executable_extensions; do
39776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39777    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39779    break 2
39780  fi
39781done
39782  done
39783IFS=$as_save_IFS
39784
39785  ;;
39786esac
39787fi
39788BUILD_LD=$ac_cv_path_BUILD_LD
39789if test -n "$BUILD_LD"; then
39790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39791$as_echo "$BUILD_LD" >&6; }
39792else
39793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39794$as_echo "no" >&6; }
39795fi
39796
39797
39798        if test "x$BUILD_LD" = x; then
39799          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39800        fi
39801      else
39802        # Otherwise we believe it is a complete path. Use it as it is.
39803        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
39804$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
39805        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
39806$as_echo_n "checking for BUILD_LD... " >&6; }
39807        if test ! -x "$tool_specified"; then
39808          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39809$as_echo "not found" >&6; }
39810          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
39811        fi
39812        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39813$as_echo "$tool_specified" >&6; }
39814      fi
39815    fi
39816  fi
39817
39818
39819
39820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39821
39822  # First separate the path from the arguments. This will split at the first
39823  # space.
39824  complete="$BUILD_LD"
39825  path="${complete%% *}"
39826  tmp="$complete EOL"
39827  arguments="${tmp#* }"
39828
39829  # Input might be given as Windows format, start by converting to
39830  # unix format.
39831  new_path=`$CYGPATH -u "$path"`
39832
39833  # Now try to locate executable using which
39834  new_path=`$WHICH "$new_path" 2> /dev/null`
39835  # bat and cmd files are not always considered executable in cygwin causing which
39836  # to not find them
39837  if test "x$new_path" = x \
39838      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39839      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39840    new_path=`$CYGPATH -u "$path"`
39841  fi
39842  if test "x$new_path" = x; then
39843    # Oops. Which didn't find the executable.
39844    # The splitting of arguments from the executable at a space might have been incorrect,
39845    # since paths with space are more likely in Windows. Give it another try with the whole
39846    # argument.
39847    path="$complete"
39848    arguments="EOL"
39849    new_path=`$CYGPATH -u "$path"`
39850    new_path=`$WHICH "$new_path" 2> /dev/null`
39851    # bat and cmd files are not always considered executable in cygwin causing which
39852    # to not find them
39853    if test "x$new_path" = x \
39854        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39855        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39856      new_path=`$CYGPATH -u "$path"`
39857    fi
39858    if test "x$new_path" = x; then
39859      # It's still not found. Now this is an unrecoverable error.
39860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39861$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39862      has_space=`$ECHO "$complete" | $GREP " "`
39863      if test "x$has_space" != x; then
39864        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39865$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39866      fi
39867      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39868    fi
39869  fi
39870
39871  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39872  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39873  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39874  # "foo.exe" is OK but "foo" is an error.
39875  #
39876  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39877  # It is also a way to make sure we got the proper file name for the real test later on.
39878  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39879  if test "x$test_shortpath" = x; then
39880    # Short path failed, file does not exist as specified.
39881    # Try adding .exe or .cmd
39882    if test -f "${new_path}.exe"; then
39883      input_to_shortpath="${new_path}.exe"
39884    elif test -f "${new_path}.cmd"; then
39885      input_to_shortpath="${new_path}.cmd"
39886    else
39887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
39888$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
39889      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39890$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39891      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39892    fi
39893  else
39894    input_to_shortpath="$new_path"
39895  fi
39896
39897  # Call helper function which possibly converts this using DOS-style short mode.
39898  # If so, the updated path is stored in $new_path.
39899  new_path="$input_to_shortpath"
39900
39901  input_path="$input_to_shortpath"
39902  # Check if we need to convert this using DOS-style short mode. If the path
39903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39904  # take no chances and rewrite it.
39905  # Note: m4 eats our [], so we need to use [ and ] instead.
39906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39907  if test "x$has_forbidden_chars" != x; then
39908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39912      # Going to short mode and back again did indeed matter. Since short mode is
39913      # case insensitive, let's make it lowercase to improve readability.
39914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39915      # Now convert it back to Unix-stile (cygpath)
39916      input_path=`$CYGPATH -u "$shortmode_path"`
39917      new_path="$input_path"
39918    fi
39919  fi
39920
39921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39922  if test "x$test_cygdrive_prefix" = x; then
39923    # As a simple fix, exclude /usr/bin since it's not a real path.
39924    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39926      # a path prefixed by /cygdrive for fixpath to work.
39927      new_path="$CYGWIN_ROOT_PATH$input_path"
39928    fi
39929  fi
39930
39931  # remove trailing .exe if any
39932  new_path="${new_path/%.exe/}"
39933
39934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39935
39936  # First separate the path from the arguments. This will split at the first
39937  # space.
39938  complete="$BUILD_LD"
39939  path="${complete%% *}"
39940  tmp="$complete EOL"
39941  arguments="${tmp#* }"
39942
39943  # Input might be given as Windows format, start by converting to
39944  # unix format.
39945  new_path="$path"
39946
39947  windows_path="$new_path"
39948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39949    unix_path=`$CYGPATH -u "$windows_path"`
39950    new_path="$unix_path"
39951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39953    new_path="$unix_path"
39954  fi
39955
39956
39957  # Now try to locate executable using which
39958  new_path=`$WHICH "$new_path" 2> /dev/null`
39959
39960  if test "x$new_path" = x; then
39961    # Oops. Which didn't find the executable.
39962    # The splitting of arguments from the executable at a space might have been incorrect,
39963    # since paths with space are more likely in Windows. Give it another try with the whole
39964    # argument.
39965    path="$complete"
39966    arguments="EOL"
39967    new_path="$path"
39968
39969  windows_path="$new_path"
39970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39971    unix_path=`$CYGPATH -u "$windows_path"`
39972    new_path="$unix_path"
39973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39975    new_path="$unix_path"
39976  fi
39977
39978
39979    new_path=`$WHICH "$new_path" 2> /dev/null`
39980
39981    if test "x$new_path" = x; then
39982      # It's still not found. Now this is an unrecoverable error.
39983      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39984$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39985      has_space=`$ECHO "$complete" | $GREP " "`
39986      if test "x$has_space" != x; then
39987        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39988$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39989      fi
39990      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39991    fi
39992  fi
39993
39994  # Now new_path has a complete unix path to the binary
39995  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39996    # Keep paths in /bin as-is, but remove trailing .exe if any
39997    new_path="${new_path/%.exe/}"
39998    # Do not save /bin paths to all_fixpath_prefixes!
39999  else
40000    # Not in mixed or Windows style, start by that.
40001    new_path=`cmd //c echo $new_path`
40002
40003  input_path="$new_path"
40004  # Check if we need to convert this using DOS-style short mode. If the path
40005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40006  # take no chances and rewrite it.
40007  # Note: m4 eats our [], so we need to use [ and ] instead.
40008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40009  if test "x$has_forbidden_chars" != x; then
40010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40011    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40012  fi
40013
40014    # Output is in $new_path
40015
40016  windows_path="$new_path"
40017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40018    unix_path=`$CYGPATH -u "$windows_path"`
40019    new_path="$unix_path"
40020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40022    new_path="$unix_path"
40023  fi
40024
40025    # remove trailing .exe if any
40026    new_path="${new_path/%.exe/}"
40027
40028    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40029    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40030  fi
40031
40032  else
40033    # We're on a posix platform. Hooray! :)
40034    # First separate the path from the arguments. This will split at the first
40035    # space.
40036    complete="$BUILD_LD"
40037    path="${complete%% *}"
40038    tmp="$complete EOL"
40039    arguments="${tmp#* }"
40040
40041    # Cannot rely on the command "which" here since it doesn't always work.
40042    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40043    if test -z "$is_absolute_path"; then
40044      # Path to executable is not absolute. Find it.
40045      IFS_save="$IFS"
40046      IFS=:
40047      for p in $PATH; do
40048        if test -f "$p/$path" && test -x "$p/$path"; then
40049          new_path="$p/$path"
40050          break
40051        fi
40052      done
40053      IFS="$IFS_save"
40054    else
40055      # This is an absolute path, we can use it without further modifications.
40056      new_path="$path"
40057    fi
40058
40059    if test "x$new_path" = x; then
40060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40061$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40062      has_space=`$ECHO "$complete" | $GREP " "`
40063      if test "x$has_space" != x; then
40064        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40065$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40066      fi
40067      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40068    fi
40069  fi
40070
40071  # Now join together the path and the arguments once again
40072  if test "x$arguments" != xEOL; then
40073    new_complete="$new_path ${arguments% *}"
40074  else
40075    new_complete="$new_path"
40076  fi
40077
40078  if test "x$complete" != "x$new_complete"; then
40079    BUILD_LD="$new_complete"
40080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40081$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40082  fi
40083
40084  else
40085    # If we are not cross compiling, use the normal target compilers for
40086    # building the build platform executables.
40087    BUILD_CC="$CC"
40088    BUILD_CXX="$CXX"
40089    BUILD_LD="$LD"
40090  fi
40091
40092
40093
40094
40095
40096
40097  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40098    # For hotspot, we need these in Windows mixed path,
40099    # so rewrite them all. Need added .exe suffix.
40100    HOTSPOT_CXX="$CXX.exe"
40101    HOTSPOT_LD="$LD.exe"
40102    HOTSPOT_MT="$MT.exe"
40103    HOTSPOT_RC="$RC.exe"
40104
40105  unix_path="$HOTSPOT_CXX"
40106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40107    windows_path=`$CYGPATH -m "$unix_path"`
40108    HOTSPOT_CXX="$windows_path"
40109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40110    windows_path=`cmd //c echo $unix_path`
40111    HOTSPOT_CXX="$windows_path"
40112  fi
40113
40114
40115  unix_path="$HOTSPOT_LD"
40116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40117    windows_path=`$CYGPATH -m "$unix_path"`
40118    HOTSPOT_LD="$windows_path"
40119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40120    windows_path=`cmd //c echo $unix_path`
40121    HOTSPOT_LD="$windows_path"
40122  fi
40123
40124
40125  unix_path="$HOTSPOT_MT"
40126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40127    windows_path=`$CYGPATH -m "$unix_path"`
40128    HOTSPOT_MT="$windows_path"
40129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40130    windows_path=`cmd //c echo $unix_path`
40131    HOTSPOT_MT="$windows_path"
40132  fi
40133
40134
40135  unix_path="$HOTSPOT_RC"
40136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40137    windows_path=`$CYGPATH -m "$unix_path"`
40138    HOTSPOT_RC="$windows_path"
40139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40140    windows_path=`cmd //c echo $unix_path`
40141    HOTSPOT_RC="$windows_path"
40142  fi
40143
40144
40145
40146  else
40147    HOTSPOT_CXX="$CXX"
40148    HOTSPOT_LD="$LD"
40149  fi
40150
40151
40152
40153  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40154    USE_CLANG=true
40155  fi
40156
40157
40158  # LDEXE is the linker to use, when creating executables. Not really used.
40159  # FIXME: These should just be removed!
40160  LDEXE="$LD"
40161  LDEXECXX="$LDCXX"
40162
40163
40164
40165
40166  # The package path is used only on macosx?
40167  # FIXME: clean this up, and/or move it elsewhere.
40168  PACKAGE_PATH=/opt/local
40169
40170
40171  # Check for extra potential brokenness.
40172  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40173    # On Windows, double-check that we got the right compiler.
40174    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40175    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40176    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40177      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40178        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40179      fi
40180    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40181      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40182        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40183      fi
40184    fi
40185  fi
40186
40187  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40188    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40189    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40190    # This is later checked when setting flags.
40191  fi
40192
40193  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40194  # in executable.'
40195  USING_BROKEN_SUSE_LD=no
40196  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40197    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40198$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40199    echo "SUNWprivate_1.1 { local: *; };" > version-script.map
40200    echo "int main() { }" > main.c
40201    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40202      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40203$as_echo "no" >&6; }
40204      USING_BROKEN_SUSE_LD=no
40205    else
40206      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40207$as_echo "yes" >&6; }
40208      USING_BROKEN_SUSE_LD=yes
40209    fi
40210    rm -rf version-script.map main.c a.out
40211  fi
40212
40213
40214
40215# Setup the JTReg Regression Test Harness.
40216
40217
40218# Check whether --with-jtreg was given.
40219if test "${with_jtreg+set}" = set; then :
40220  withval=$with_jtreg;
40221else
40222  with_jtreg=no
40223fi
40224
40225
40226  if test "x$with_jtreg" = xno; then
40227    # jtreg disabled
40228    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40229$as_echo_n "checking for jtreg... " >&6; }
40230    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40231$as_echo "no" >&6; }
40232  else
40233    if test "x$with_jtreg" != xyes; then
40234      # with path specified.
40235      JT_HOME="$with_jtreg"
40236    fi
40237
40238    if test "x$JT_HOME" != x; then
40239      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40240$as_echo_n "checking for jtreg... " >&6; }
40241
40242      # use JT_HOME enviroment var.
40243
40244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40245
40246  # Input might be given as Windows format, start by converting to
40247  # unix format.
40248  path="$JT_HOME"
40249  new_path=`$CYGPATH -u "$path"`
40250
40251  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40252  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40253  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40254  # "foo.exe" is OK but "foo" is an error.
40255  #
40256  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40257  # It is also a way to make sure we got the proper file name for the real test later on.
40258  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40259  if test "x$test_shortpath" = x; then
40260    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40261$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40262    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40263  fi
40264
40265  # Call helper function which possibly converts this using DOS-style short mode.
40266  # If so, the updated path is stored in $new_path.
40267
40268  input_path="$new_path"
40269  # Check if we need to convert this using DOS-style short mode. If the path
40270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40271  # take no chances and rewrite it.
40272  # Note: m4 eats our [], so we need to use [ and ] instead.
40273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40274  if test "x$has_forbidden_chars" != x; then
40275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40276    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40277    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40278    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40279      # Going to short mode and back again did indeed matter. Since short mode is
40280      # case insensitive, let's make it lowercase to improve readability.
40281      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40282      # Now convert it back to Unix-stile (cygpath)
40283      input_path=`$CYGPATH -u "$shortmode_path"`
40284      new_path="$input_path"
40285    fi
40286  fi
40287
40288  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40289  if test "x$test_cygdrive_prefix" = x; then
40290    # As a simple fix, exclude /usr/bin since it's not a real path.
40291    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40292      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40293      # a path prefixed by /cygdrive for fixpath to work.
40294      new_path="$CYGWIN_ROOT_PATH$input_path"
40295    fi
40296  fi
40297
40298
40299  if test "x$path" != "x$new_path"; then
40300    JT_HOME="$new_path"
40301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40302$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40303  fi
40304
40305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40306
40307  path="$JT_HOME"
40308  has_colon=`$ECHO $path | $GREP ^.:`
40309  new_path="$path"
40310  if test "x$has_colon" = x; then
40311    # Not in mixed or Windows style, start by that.
40312    new_path=`cmd //c echo $path`
40313  fi
40314
40315
40316  input_path="$new_path"
40317  # Check if we need to convert this using DOS-style short mode. If the path
40318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40319  # take no chances and rewrite it.
40320  # Note: m4 eats our [], so we need to use [ and ] instead.
40321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40322  if test "x$has_forbidden_chars" != x; then
40323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40324    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40325  fi
40326
40327
40328  windows_path="$new_path"
40329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40330    unix_path=`$CYGPATH -u "$windows_path"`
40331    new_path="$unix_path"
40332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40334    new_path="$unix_path"
40335  fi
40336
40337  if test "x$path" != "x$new_path"; then
40338    JT_HOME="$new_path"
40339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40340$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40341  fi
40342
40343  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40344  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40345
40346  else
40347    # We're on a posix platform. Hooray! :)
40348    path="$JT_HOME"
40349    has_space=`$ECHO "$path" | $GREP " "`
40350    if test "x$has_space" != x; then
40351      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40352$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40353      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40354    fi
40355
40356    # Use eval to expand a potential ~
40357    eval path="$path"
40358    if test ! -f "$path" && test ! -d "$path"; then
40359      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40360    fi
40361
40362    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40363  fi
40364
40365
40366      # jtreg win32 script works for everybody
40367      JTREGEXE="$JT_HOME/win32/bin/jtreg"
40368
40369      if test ! -f "$JTREGEXE"; then
40370        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40371      fi
40372
40373      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40374$as_echo "$JTREGEXE" >&6; }
40375    else
40376      # try to find jtreg on path
40377
40378
40379
40380  # Publish this variable in the help.
40381
40382
40383  if test "x$JTREGEXE" = x; then
40384    # The variable is not set by user, try to locate tool using the code snippet
40385    for ac_prog in jtreg
40386do
40387  # Extract the first word of "$ac_prog", so it can be a program name with args.
40388set dummy $ac_prog; ac_word=$2
40389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40390$as_echo_n "checking for $ac_word... " >&6; }
40391if ${ac_cv_path_JTREGEXE+:} false; then :
40392  $as_echo_n "(cached) " >&6
40393else
40394  case $JTREGEXE in
40395  [\\/]* | ?:[\\/]*)
40396  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40397  ;;
40398  *)
40399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40400for as_dir in $PATH
40401do
40402  IFS=$as_save_IFS
40403  test -z "$as_dir" && as_dir=.
40404    for ac_exec_ext in '' $ac_executable_extensions; do
40405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40406    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40408    break 2
40409  fi
40410done
40411  done
40412IFS=$as_save_IFS
40413
40414  ;;
40415esac
40416fi
40417JTREGEXE=$ac_cv_path_JTREGEXE
40418if test -n "$JTREGEXE"; then
40419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40420$as_echo "$JTREGEXE" >&6; }
40421else
40422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40423$as_echo "no" >&6; }
40424fi
40425
40426
40427  test -n "$JTREGEXE" && break
40428done
40429
40430  else
40431    # The variable is set, but is it from the command line or the environment?
40432
40433    # Try to remove the string !JTREGEXE! from our list.
40434    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40435    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40436      # If it failed, the variable was not from the command line. Ignore it,
40437      # but warn the user (except for BASH, which is always set by the calling BASH).
40438      if test "xJTREGEXE" != xBASH; then
40439        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40440$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40441      fi
40442      # Try to locate tool using the code snippet
40443      for ac_prog in jtreg
40444do
40445  # Extract the first word of "$ac_prog", so it can be a program name with args.
40446set dummy $ac_prog; ac_word=$2
40447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40448$as_echo_n "checking for $ac_word... " >&6; }
40449if ${ac_cv_path_JTREGEXE+:} false; then :
40450  $as_echo_n "(cached) " >&6
40451else
40452  case $JTREGEXE in
40453  [\\/]* | ?:[\\/]*)
40454  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40455  ;;
40456  *)
40457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40458for as_dir in $PATH
40459do
40460  IFS=$as_save_IFS
40461  test -z "$as_dir" && as_dir=.
40462    for ac_exec_ext in '' $ac_executable_extensions; do
40463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40464    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40466    break 2
40467  fi
40468done
40469  done
40470IFS=$as_save_IFS
40471
40472  ;;
40473esac
40474fi
40475JTREGEXE=$ac_cv_path_JTREGEXE
40476if test -n "$JTREGEXE"; then
40477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40478$as_echo "$JTREGEXE" >&6; }
40479else
40480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40481$as_echo "no" >&6; }
40482fi
40483
40484
40485  test -n "$JTREGEXE" && break
40486done
40487
40488    else
40489      # If it succeeded, then it was overridden by the user. We will use it
40490      # for the tool.
40491
40492      # First remove it from the list of overridden variables, so we can test
40493      # for unknown variables in the end.
40494      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40495
40496      # Check if the provided tool contains a complete path.
40497      tool_specified="$JTREGEXE"
40498      tool_basename="${tool_specified##*/}"
40499      if test "x$tool_basename" = "x$tool_specified"; then
40500        # A command without a complete path is provided, search $PATH.
40501        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
40502$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
40503        # Extract the first word of "$tool_basename", so it can be a program name with args.
40504set dummy $tool_basename; ac_word=$2
40505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40506$as_echo_n "checking for $ac_word... " >&6; }
40507if ${ac_cv_path_JTREGEXE+:} false; then :
40508  $as_echo_n "(cached) " >&6
40509else
40510  case $JTREGEXE in
40511  [\\/]* | ?:[\\/]*)
40512  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40513  ;;
40514  *)
40515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40516for as_dir in $PATH
40517do
40518  IFS=$as_save_IFS
40519  test -z "$as_dir" && as_dir=.
40520    for ac_exec_ext in '' $ac_executable_extensions; do
40521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40522    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40524    break 2
40525  fi
40526done
40527  done
40528IFS=$as_save_IFS
40529
40530  ;;
40531esac
40532fi
40533JTREGEXE=$ac_cv_path_JTREGEXE
40534if test -n "$JTREGEXE"; then
40535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40536$as_echo "$JTREGEXE" >&6; }
40537else
40538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40539$as_echo "no" >&6; }
40540fi
40541
40542
40543        if test "x$JTREGEXE" = x; then
40544          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40545        fi
40546      else
40547        # Otherwise we believe it is a complete path. Use it as it is.
40548        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
40549$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
40550        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
40551$as_echo_n "checking for JTREGEXE... " >&6; }
40552        if test ! -x "$tool_specified"; then
40553          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40554$as_echo "not found" >&6; }
40555          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
40556        fi
40557        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40558$as_echo "$tool_specified" >&6; }
40559      fi
40560    fi
40561  fi
40562
40563
40564
40565  if test "x$JTREGEXE" = x; then
40566    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
40567  fi
40568
40569
40570      JT_HOME="`$DIRNAME $JTREGEXE`"
40571    fi
40572  fi
40573
40574
40575
40576
40577
40578
40579  # Option used to tell the compiler whether to create 32- or 64-bit executables
40580  if test "x$TOOLCHAIN_TYPE" = xxlc; then
40581    COMPILER_TARGET_BITS_FLAG="-q"
40582  else
40583    COMPILER_TARGET_BITS_FLAG="-m"
40584  fi
40585
40586
40587  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
40588  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40589    ARFLAGS="-r"
40590  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40591    ARFLAGS="-X64"
40592  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
40593    # lib.exe is used as AR to create static libraries.
40594    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
40595  else
40596    ARFLAGS=""
40597  fi
40598
40599
40600  ## Setup strip.
40601  # FIXME: should this really be per platform, or should it be per toolchain type?
40602  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
40603  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
40604  if test "x$OPENJDK_TARGET_OS" = xlinux; then
40605    STRIPFLAGS="-g"
40606  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
40607    STRIPFLAGS="-x"
40608  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
40609    STRIPFLAGS="-S"
40610  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40611    STRIPFLAGS="-X32_64"
40612  fi
40613
40614  if test "x$OPENJDK_TARGET_OS" != xwindows; then
40615    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
40616  fi
40617
40618
40619  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40620    # FIXME: break out into MCSFLAGS
40621    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
40622  fi
40623
40624
40625  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40626    CC_OUT_OPTION=-Fo
40627    EXE_OUT_OPTION=-out:
40628    LD_OUT_OPTION=-out:
40629    AR_OUT_OPTION=-out:
40630  else
40631    # The option used to specify the target .o,.a or .so file.
40632    # When compiling, how to specify the to be created object file.
40633    CC_OUT_OPTION='-o$(SPACE)'
40634    # When linking, how to specify the to be created executable.
40635    EXE_OUT_OPTION='-o$(SPACE)'
40636    # When linking, how to specify the to be created dynamically linkable library.
40637    LD_OUT_OPTION='-o$(SPACE)'
40638    # When archiving, how to specify the to be create static archive for object files.
40639    AR_OUT_OPTION='rcs$(SPACE)'
40640  fi
40641
40642
40643
40644
40645
40646  # On Windows, we need to set RC flags.
40647  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40648    RC_FLAGS="-nologo -l 0x409 -r"
40649    if test "x$VARIANT" = xOPT; then
40650      RC_FLAGS="$RC_FLAGS -d NDEBUG"
40651    fi
40652
40653    # The version variables used to create RC_FLAGS may be overridden
40654    # in a custom configure script, or possibly the command line.
40655    # Let those variables be expanded at make time in spec.gmk.
40656    # The \$ are escaped to the shell, and the $(...) variables
40657    # are evaluated by make.
40658    RC_FLAGS="$RC_FLAGS \
40659        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
40660        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
40661        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
40662        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
40663        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
40664        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
40665        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
40666  fi
40667
40668
40669  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40670    # FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX.
40671    CCXXFLAGS="$CCXXFLAGS -nologo"
40672  fi
40673
40674
40675# FIXME: Currently we must test this after toolchain but before flags. Fix!
40676
40677# Now we can test some aspects on the target using configure macros.
40678
40679
40680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
40681$as_echo_n "checking for ANSI C header files... " >&6; }
40682if ${ac_cv_header_stdc+:} false; then :
40683  $as_echo_n "(cached) " >&6
40684else
40685  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40686/* end confdefs.h.  */
40687#include <stdlib.h>
40688#include <stdarg.h>
40689#include <string.h>
40690#include <float.h>
40691
40692int
40693main ()
40694{
40695
40696  ;
40697  return 0;
40698}
40699_ACEOF
40700if ac_fn_cxx_try_compile "$LINENO"; then :
40701  ac_cv_header_stdc=yes
40702else
40703  ac_cv_header_stdc=no
40704fi
40705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40706
40707if test $ac_cv_header_stdc = yes; then
40708  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
40709  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40710/* end confdefs.h.  */
40711#include <string.h>
40712
40713_ACEOF
40714if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40715  $EGREP "memchr" >/dev/null 2>&1; then :
40716
40717else
40718  ac_cv_header_stdc=no
40719fi
40720rm -f conftest*
40721
40722fi
40723
40724if test $ac_cv_header_stdc = yes; then
40725  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
40726  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40727/* end confdefs.h.  */
40728#include <stdlib.h>
40729
40730_ACEOF
40731if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40732  $EGREP "free" >/dev/null 2>&1; then :
40733
40734else
40735  ac_cv_header_stdc=no
40736fi
40737rm -f conftest*
40738
40739fi
40740
40741if test $ac_cv_header_stdc = yes; then
40742  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
40743  if test "$cross_compiling" = yes; then :
40744  :
40745else
40746  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40747/* end confdefs.h.  */
40748#include <ctype.h>
40749#include <stdlib.h>
40750#if ((' ' & 0x0FF) == 0x020)
40751# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
40752# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
40753#else
40754# define ISLOWER(c) \
40755		   (('a' <= (c) && (c) <= 'i') \
40756		     || ('j' <= (c) && (c) <= 'r') \
40757		     || ('s' <= (c) && (c) <= 'z'))
40758# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
40759#endif
40760
40761#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
40762int
40763main ()
40764{
40765  int i;
40766  for (i = 0; i < 256; i++)
40767    if (XOR (islower (i), ISLOWER (i))
40768	|| toupper (i) != TOUPPER (i))
40769      return 2;
40770  return 0;
40771}
40772_ACEOF
40773if ac_fn_cxx_try_run "$LINENO"; then :
40774
40775else
40776  ac_cv_header_stdc=no
40777fi
40778rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40779  conftest.$ac_objext conftest.beam conftest.$ac_ext
40780fi
40781
40782fi
40783fi
40784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
40785$as_echo "$ac_cv_header_stdc" >&6; }
40786if test $ac_cv_header_stdc = yes; then
40787
40788$as_echo "#define STDC_HEADERS 1" >>confdefs.h
40789
40790fi
40791
40792# On IRIX 5.3, sys/types and inttypes.h are conflicting.
40793for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
40794		  inttypes.h stdint.h unistd.h
40795do :
40796  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
40797ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
40798"
40799if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
40800  cat >>confdefs.h <<_ACEOF
40801#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
40802_ACEOF
40803
40804fi
40805
40806done
40807
40808
40809
40810  ###############################################################################
40811  #
40812  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
40813  # (The JVM can use 32 or 64 bit Java pointers but that decision
40814  # is made at runtime.)
40815  #
40816
40817  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
40818    # Always specify -m flag on Solaris
40819    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
40820
40821  # When we add flags to the "official" CFLAGS etc, we need to
40822  # keep track of these additions in ADDED_CFLAGS etc. These
40823  # will later be checked to make sure only controlled additions
40824  # have been made to CFLAGS etc.
40825  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40826  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40827  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40828
40829  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40830  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40831  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40832
40833  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40834  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40835  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40836
40837  elif test "x$COMPILE_TYPE" = xreduced; then
40838    if test "x$OPENJDK_TARGET_OS" != xwindows; then
40839      # Specify -m if running reduced on other Posix platforms
40840
40841  # When we add flags to the "official" CFLAGS etc, we need to
40842  # keep track of these additions in ADDED_CFLAGS etc. These
40843  # will later be checked to make sure only controlled additions
40844  # have been made to CFLAGS etc.
40845  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40846  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40847  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40848
40849  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40850  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40851  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40852
40853  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40854  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40855  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40856
40857    fi
40858  fi
40859
40860  # Make compilation sanity check
40861  for ac_header in stdio.h
40862do :
40863  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
40864if test "x$ac_cv_header_stdio_h" = xyes; then :
40865  cat >>confdefs.h <<_ACEOF
40866#define HAVE_STDIO_H 1
40867_ACEOF
40868
40869else
40870
40871    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
40872$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
40873    if test "x$COMPILE_TYPE" = xreduced; then
40874      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
40875$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
40876    elif test "x$COMPILE_TYPE" = xcross; then
40877      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
40878$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
40879    fi
40880    as_fn_error $? "Cannot continue." "$LINENO" 5
40881
40882fi
40883
40884done
40885
40886
40887  # The cast to long int works around a bug in the HP C Compiler
40888# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40889# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40890# This bug is HP SR number 8606223364.
40891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
40892$as_echo_n "checking size of int *... " >&6; }
40893if ${ac_cv_sizeof_int_p+:} false; then :
40894  $as_echo_n "(cached) " >&6
40895else
40896  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
40897
40898else
40899  if test "$ac_cv_type_int_p" = yes; then
40900     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
40901$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
40902as_fn_error 77 "cannot compute sizeof (int *)
40903See \`config.log' for more details" "$LINENO" 5; }
40904   else
40905     ac_cv_sizeof_int_p=0
40906   fi
40907fi
40908
40909fi
40910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
40911$as_echo "$ac_cv_sizeof_int_p" >&6; }
40912
40913
40914
40915cat >>confdefs.h <<_ACEOF
40916#define SIZEOF_INT_P $ac_cv_sizeof_int_p
40917_ACEOF
40918
40919
40920
40921  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
40922  if test "x$ac_cv_sizeof_int_p" = x; then
40923    # The test failed, lets stick to the assumed value.
40924    { $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
40925$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
40926  else
40927    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
40928
40929    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
40930      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
40931      # Let's try to implicitely set the compilers target architecture and retry the test
40932      { $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
40933$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;}
40934      { $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
40935$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;}
40936
40937  # When we add flags to the "official" CFLAGS etc, we need to
40938  # keep track of these additions in ADDED_CFLAGS etc. These
40939  # will later be checked to make sure only controlled additions
40940  # have been made to CFLAGS etc.
40941  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40942  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40943  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40944
40945  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40946  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40947  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40948
40949  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40950  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40951  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40952
40953
40954      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
40955      unset ac_cv_sizeof_int_p
40956      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
40957      cat >>confdefs.h <<_ACEOF
40958#undef SIZEOF_INT_P
40959_ACEOF
40960
40961      # The cast to long int works around a bug in the HP C Compiler
40962# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40963# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40964# This bug is HP SR number 8606223364.
40965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
40966$as_echo_n "checking size of int *... " >&6; }
40967if ${ac_cv_sizeof_int_p+:} false; then :
40968  $as_echo_n "(cached) " >&6
40969else
40970  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
40971
40972else
40973  if test "$ac_cv_type_int_p" = yes; then
40974     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
40975$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
40976as_fn_error 77 "cannot compute sizeof (int *)
40977See \`config.log' for more details" "$LINENO" 5; }
40978   else
40979     ac_cv_sizeof_int_p=0
40980   fi
40981fi
40982
40983fi
40984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
40985$as_echo "$ac_cv_sizeof_int_p" >&6; }
40986
40987
40988
40989cat >>confdefs.h <<_ACEOF
40990#define SIZEOF_INT_P $ac_cv_sizeof_int_p
40991_ACEOF
40992
40993
40994
40995      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
40996
40997      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
40998        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
40999      fi
41000    fi
41001  fi
41002
41003  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41004$as_echo_n "checking for target address size... " >&6; }
41005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41006$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41007
41008
41009  ###############################################################################
41010  #
41011  # Is the target little of big endian?
41012  #
41013   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41014$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41015if ${ac_cv_c_bigendian+:} false; then :
41016  $as_echo_n "(cached) " >&6
41017else
41018  ac_cv_c_bigendian=unknown
41019    # See if we're dealing with a universal compiler.
41020    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41021/* end confdefs.h.  */
41022#ifndef __APPLE_CC__
41023	       not a universal capable compiler
41024	     #endif
41025	     typedef int dummy;
41026
41027_ACEOF
41028if ac_fn_cxx_try_compile "$LINENO"; then :
41029
41030	# Check for potential -arch flags.  It is not universal unless
41031	# there are at least two -arch flags with different values.
41032	ac_arch=
41033	ac_prev=
41034	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41035	 if test -n "$ac_prev"; then
41036	   case $ac_word in
41037	     i?86 | x86_64 | ppc | ppc64)
41038	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41039		 ac_arch=$ac_word
41040	       else
41041		 ac_cv_c_bigendian=universal
41042		 break
41043	       fi
41044	       ;;
41045	   esac
41046	   ac_prev=
41047	 elif test "x$ac_word" = "x-arch"; then
41048	   ac_prev=arch
41049	 fi
41050       done
41051fi
41052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41053    if test $ac_cv_c_bigendian = unknown; then
41054      # See if sys/param.h defines the BYTE_ORDER macro.
41055      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41056/* end confdefs.h.  */
41057#include <sys/types.h>
41058	     #include <sys/param.h>
41059
41060int
41061main ()
41062{
41063#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41064		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41065		     && LITTLE_ENDIAN)
41066	      bogus endian macros
41067	     #endif
41068
41069  ;
41070  return 0;
41071}
41072_ACEOF
41073if ac_fn_cxx_try_compile "$LINENO"; then :
41074  # It does; now see whether it defined to BIG_ENDIAN or not.
41075	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41076/* end confdefs.h.  */
41077#include <sys/types.h>
41078		#include <sys/param.h>
41079
41080int
41081main ()
41082{
41083#if BYTE_ORDER != BIG_ENDIAN
41084		 not big endian
41085		#endif
41086
41087  ;
41088  return 0;
41089}
41090_ACEOF
41091if ac_fn_cxx_try_compile "$LINENO"; then :
41092  ac_cv_c_bigendian=yes
41093else
41094  ac_cv_c_bigendian=no
41095fi
41096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41097fi
41098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41099    fi
41100    if test $ac_cv_c_bigendian = unknown; then
41101      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41102      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41103/* end confdefs.h.  */
41104#include <limits.h>
41105
41106int
41107main ()
41108{
41109#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41110	      bogus endian macros
41111	     #endif
41112
41113  ;
41114  return 0;
41115}
41116_ACEOF
41117if ac_fn_cxx_try_compile "$LINENO"; then :
41118  # It does; now see whether it defined to _BIG_ENDIAN or not.
41119	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41120/* end confdefs.h.  */
41121#include <limits.h>
41122
41123int
41124main ()
41125{
41126#ifndef _BIG_ENDIAN
41127		 not big endian
41128		#endif
41129
41130  ;
41131  return 0;
41132}
41133_ACEOF
41134if ac_fn_cxx_try_compile "$LINENO"; then :
41135  ac_cv_c_bigendian=yes
41136else
41137  ac_cv_c_bigendian=no
41138fi
41139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41140fi
41141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41142    fi
41143    if test $ac_cv_c_bigendian = unknown; then
41144      # Compile a test program.
41145      if test "$cross_compiling" = yes; then :
41146  # Try to guess by grepping values from an object file.
41147	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41148/* end confdefs.h.  */
41149short int ascii_mm[] =
41150		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41151		short int ascii_ii[] =
41152		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41153		int use_ascii (int i) {
41154		  return ascii_mm[i] + ascii_ii[i];
41155		}
41156		short int ebcdic_ii[] =
41157		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41158		short int ebcdic_mm[] =
41159		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41160		int use_ebcdic (int i) {
41161		  return ebcdic_mm[i] + ebcdic_ii[i];
41162		}
41163		extern int foo;
41164
41165int
41166main ()
41167{
41168return use_ascii (foo) == use_ebcdic (foo);
41169  ;
41170  return 0;
41171}
41172_ACEOF
41173if ac_fn_cxx_try_compile "$LINENO"; then :
41174  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41175	      ac_cv_c_bigendian=yes
41176	    fi
41177	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41178	      if test "$ac_cv_c_bigendian" = unknown; then
41179		ac_cv_c_bigendian=no
41180	      else
41181		# finding both strings is unlikely to happen, but who knows?
41182		ac_cv_c_bigendian=unknown
41183	      fi
41184	    fi
41185fi
41186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41187else
41188  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41189/* end confdefs.h.  */
41190$ac_includes_default
41191int
41192main ()
41193{
41194
41195	     /* Are we little or big endian?  From Harbison&Steele.  */
41196	     union
41197	     {
41198	       long int l;
41199	       char c[sizeof (long int)];
41200	     } u;
41201	     u.l = 1;
41202	     return u.c[sizeof (long int) - 1] == 1;
41203
41204  ;
41205  return 0;
41206}
41207_ACEOF
41208if ac_fn_cxx_try_run "$LINENO"; then :
41209  ac_cv_c_bigendian=no
41210else
41211  ac_cv_c_bigendian=yes
41212fi
41213rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41214  conftest.$ac_objext conftest.beam conftest.$ac_ext
41215fi
41216
41217    fi
41218fi
41219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41220$as_echo "$ac_cv_c_bigendian" >&6; }
41221 case $ac_cv_c_bigendian in #(
41222   yes)
41223     ENDIAN="big";; #(
41224   no)
41225     ENDIAN="little" ;; #(
41226   universal)
41227     ENDIAN="universal_endianness"
41228     ;; #(
41229   *)
41230     ENDIAN="unknown" ;;
41231 esac
41232
41233
41234  if test "x$ENDIAN" = xuniversal_endianness; then
41235    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41236  fi
41237  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41238    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
41239  fi
41240
41241
41242# Configure flags for the tools
41243
41244  ###############################################################################
41245  #
41246  # How to compile shared libraries.
41247  #
41248
41249  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41250    PICFLAG="-fPIC"
41251    C_FLAG_REORDER=''
41252    CXX_FLAG_REORDER=''
41253
41254    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41255      # Linking is different on MacOSX
41256      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41257      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41258      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41259      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41260      SET_SHARED_LIBRARY_MAPFILE=''
41261    else
41262      # Default works for linux, might work on other platforms as well.
41263      SHARED_LIBRARY_FLAGS='-shared'
41264      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41265      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41266      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41267      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41268    fi
41269  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41270    PICFLAG=''
41271    C_FLAG_REORDER=''
41272    CXX_FLAG_REORDER=''
41273
41274    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41275      # Linking is different on MacOSX
41276      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41277      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41278      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41279      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41280      SET_SHARED_LIBRARY_MAPFILE=''
41281    else
41282      # Default works for linux, might work on other platforms as well.
41283      SHARED_LIBRARY_FLAGS='-shared'
41284      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41285      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41286      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41287      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41288    fi
41289  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41290    PICFLAG="-KPIC"
41291    C_FLAG_REORDER='-xF'
41292    CXX_FLAG_REORDER='-xF'
41293    SHARED_LIBRARY_FLAGS="-G"
41294    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41295    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41296    SET_SHARED_LIBRARY_NAME=''
41297    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41298  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41299    PICFLAG="-qpic=large"
41300    C_FLAG_REORDER=''
41301    CXX_FLAG_REORDER=''
41302    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41303    SET_EXECUTABLE_ORIGIN=""
41304    SET_SHARED_LIBRARY_ORIGIN=''
41305    SET_SHARED_LIBRARY_NAME=''
41306    SET_SHARED_LIBRARY_MAPFILE=''
41307  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41308    PICFLAG=""
41309    C_FLAG_REORDER=''
41310    CXX_FLAG_REORDER=''
41311    SHARED_LIBRARY_FLAGS="-LD"
41312    SET_EXECUTABLE_ORIGIN=''
41313    SET_SHARED_LIBRARY_ORIGIN=''
41314    SET_SHARED_LIBRARY_NAME=''
41315    SET_SHARED_LIBRARY_MAPFILE=''
41316  fi
41317
41318
41319
41320
41321
41322
41323
41324
41325
41326  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41327    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41328    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41329    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41330  fi
41331  # The (cross) compiler is now configured, we can now test capabilities
41332  # of the target platform.
41333
41334
41335
41336  ###############################################################################
41337  #
41338  # Setup the opt flags for different compilers
41339  # and different operating systems.
41340  #
41341
41342  # FIXME: this was indirectly the old default, but just inherited.
41343  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41344  #   C_FLAG_DEPS="-MMD -MF"
41345  # fi
41346
41347  # Generate make dependency files
41348  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41349    C_FLAG_DEPS="-MMD -MF"
41350  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41351    C_FLAG_DEPS="-MMD -MF"
41352  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41353    C_FLAG_DEPS="-xMMD -xMF"
41354  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41355    C_FLAG_DEPS="-qmakedep=gcc -MF"
41356  fi
41357  CXX_FLAG_DEPS="$C_FLAG_DEPS"
41358
41359
41360
41361  # Debug symbols
41362  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41363    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41364      CFLAGS_DEBUG_SYMBOLS="-g1"
41365      CXXFLAGS_DEBUG_SYMBOLS="-g1"
41366    else
41367      CFLAGS_DEBUG_SYMBOLS="-g"
41368      CXXFLAGS_DEBUG_SYMBOLS="-g"
41369    fi
41370  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41371    CFLAGS_DEBUG_SYMBOLS="-g"
41372    CXXFLAGS_DEBUG_SYMBOLS="-g"
41373  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41374    CFLAGS_DEBUG_SYMBOLS="-g -xs"
41375    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41376  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41377    CFLAGS_DEBUG_SYMBOLS="-g"
41378    CXXFLAGS_DEBUG_SYMBOLS="-g"
41379  fi
41380
41381
41382
41383  # Optimization levels
41384  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41385    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41386
41387    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41388      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41389      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
41390      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41391      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41392      C_O_FLAG_NONE="-xregs=no%frameptr"
41393      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41394      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41395      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41396      CXX_O_FLAG_NONE="-xregs=no%frameptr"
41397      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41398        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41399        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41400      fi
41401    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41402      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
41403      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41404      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41405      C_O_FLAG_NONE=""
41406      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41407      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41408      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41409      CXX_O_FLAG_NONE=""
41410    fi
41411  else
41412    # The remaining toolchains share opt flags between CC and CXX;
41413    # setup for C and duplicate afterwards.
41414    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41415      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41416        # On MacOSX we optimize for size, something
41417        # we should do for all platforms?
41418        C_O_FLAG_HIGHEST="-Os"
41419        C_O_FLAG_HI="-Os"
41420        C_O_FLAG_NORM="-Os"
41421        C_O_FLAG_NONE=""
41422      else
41423        C_O_FLAG_HIGHEST="-O3"
41424        C_O_FLAG_HI="-O3"
41425        C_O_FLAG_NORM="-O2"
41426        C_O_FLAG_NONE="-O0"
41427      fi
41428    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41429      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41430        # On MacOSX we optimize for size, something
41431        # we should do for all platforms?
41432        C_O_FLAG_HIGHEST="-Os"
41433        C_O_FLAG_HI="-Os"
41434        C_O_FLAG_NORM="-Os"
41435        C_O_FLAG_NONE=""
41436      else
41437        C_O_FLAG_HIGHEST="-O3"
41438        C_O_FLAG_HI="-O3"
41439        C_O_FLAG_NORM="-O2"
41440        C_O_FLAG_NONE="-O0"
41441      fi
41442    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41443      C_O_FLAG_HIGHEST="-O3"
41444      C_O_FLAG_HI="-O3 -qstrict"
41445      C_O_FLAG_NORM="-O2"
41446      C_O_FLAG_NONE=""
41447    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41448      C_O_FLAG_HIGHEST="-O2"
41449      C_O_FLAG_HI="-O1"
41450      C_O_FLAG_NORM="-O1"
41451      C_O_FLAG_NONE="-Od"
41452    fi
41453    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41454    CXX_O_FLAG_HI="$C_O_FLAG_HI"
41455    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41456    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41457  fi
41458
41459
41460
41461
41462
41463
41464
41465
41466
41467
41468
41469  # Special extras...
41470  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41471    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41472      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41473      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41474    fi
41475  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41476    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
41477    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41478    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41479  fi
41480
41481  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
41482    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
41483$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
41484  fi
41485
41486  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
41487    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
41488$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
41489  fi
41490
41491  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
41492    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
41493$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
41494  fi
41495
41496
41497# Check whether --with-extra-cflags was given.
41498if test "${with_extra_cflags+set}" = set; then :
41499  withval=$with_extra_cflags;
41500fi
41501
41502
41503
41504# Check whether --with-extra-cxxflags was given.
41505if test "${with_extra_cxxflags+set}" = set; then :
41506  withval=$with_extra_cxxflags;
41507fi
41508
41509
41510
41511# Check whether --with-extra-ldflags was given.
41512if test "${with_extra_ldflags+set}" = set; then :
41513  withval=$with_extra_ldflags;
41514fi
41515
41516
41517  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
41518  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
41519  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
41520
41521  # Hotspot needs these set in their legacy form
41522  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
41523  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
41524  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
41525
41526
41527
41528
41529
41530  ###############################################################################
41531  #
41532  # Now setup the CFLAGS and LDFLAGS for the JDK build.
41533  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
41534  #
41535
41536  # Setup compiler/platform specific flags to CFLAGS_JDK,
41537  # CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?)
41538  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41539    # these options are used for both C and C++ compiles
41540    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
41541        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
41542    case $OPENJDK_TARGET_CPU_ARCH in
41543      arm )
41544        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41545        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41546        ;;
41547      ppc )
41548        # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
41549        ;;
41550      * )
41551        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
41552        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41553        ;;
41554    esac
41555  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41556    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
41557    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
41558      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
41559      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
41560    fi
41561
41562    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
41563    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
41564  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41565    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41566    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41567  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41568    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
41569    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
41570    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
41571    -DWIN32 -DIAL"
41572    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
41573      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
41574    else
41575      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
41576    fi
41577  fi
41578
41579  ###############################################################################
41580
41581  # Adjust flags according to debug level.
41582  case $DEBUG_LEVEL in
41583    fastdebug )
41584      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41585      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41586      C_O_FLAG_HI="$C_O_FLAG_NORM"
41587      C_O_FLAG_NORM="$C_O_FLAG_NORM"
41588      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41589      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
41590      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41591      ;;
41592    slowdebug )
41593      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41594      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41595      C_O_FLAG_HI="$C_O_FLAG_NONE"
41596      C_O_FLAG_NORM="$C_O_FLAG_NONE"
41597      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
41598      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
41599      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41600      ;;
41601  esac
41602
41603  # Setup LP64
41604  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
41605
41606  # Set some common defines. These works for all compilers, but assume
41607  # -D is universally accepted.
41608
41609  # Setup endianness
41610  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
41611    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
41612    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
41613    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
41614    #   Note: -Dmacro         is the same as    #define macro 1
41615    #         -Dmacro=        is the same as    #define macro
41616    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41617      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
41618    else
41619      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
41620    fi
41621  else
41622    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
41623  fi
41624
41625  # Setup target OS define. Use OS target name but in upper case.
41626  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
41627  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
41628
41629  # Setup target CPU
41630  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
41631
41632  # Setup debug/release defines
41633  if test "x$DEBUG_LEVEL" = xrelease; then
41634    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
41635    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41636      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
41637    fi
41638  else
41639    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
41640  fi
41641
41642  # Setup release name
41643  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
41644
41645
41646  # Set some additional per-OS defines.
41647  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41648    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
41649  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41650    # FIXME: PPC64 should not be here.
41651    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DPPC64"
41652  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
41653    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
41654  fi
41655
41656  # Additional macosx handling
41657  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41658    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41659      # FIXME: This needs to be exported in spec.gmk due to closed legacy code.
41660      # FIXME: clean this up, and/or move it elsewhere.
41661
41662      # Setting these parameters makes it an error to link to macosx APIs that are
41663      # newer than the given OS version and makes the linked binaries compatible
41664      # even if built on a newer version of the OS.
41665      # The expected format is X.Y.Z
41666      MACOSX_VERSION_MIN=10.7.0
41667
41668
41669      # The macro takes the version with no dots, ex: 1070
41670      # Let the flags variables get resolved in make for easier override on make
41671      # command line.
41672      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41673      LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41674    fi
41675  fi
41676
41677  # Setup some hard coded includes
41678  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
41679      -I${JDK_OUTPUTDIR}/include \
41680      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
41681      -I${JDK_TOPDIR}/src/share/javavm/export \
41682      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
41683      -I${JDK_TOPDIR}/src/share/native/common \
41684      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
41685
41686  # The shared libraries are compiled using the picflag.
41687  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
41688  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
41689
41690  # Executable flags
41691  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
41692  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
41693
41694
41695
41696
41697
41698
41699  # Setup LDFLAGS et al.
41700  #
41701  # Now this is odd. The JDK native libraries have to link against libjvm.so
41702  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
41703  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
41704  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
41705  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
41706  # libraries will link to whatever is in memory. Yuck.
41707  #
41708  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
41709  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41710    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
41711    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41712      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
41713    fi
41714    # TODO: make -debug optional "--disable-full-debug-symbols"
41715    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
41716    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
41717    LDFLAGS_JDKLIB_SUFFIX=""
41718    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
41719      LDFLAGS_STACK_SIZE=1048576
41720    else
41721      LDFLAGS_STACK_SIZE=327680
41722    fi
41723    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
41724  else
41725    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41726      # If this is a --hash-style=gnu system, use --hash-style=both, why?
41727      # We have previously set HAS_GNU_HASH if this is the case
41728      if test -n "$HAS_GNU_HASH"; then
41729        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
41730      fi
41731      if test "x$OPENJDK_TARGET_OS" = xlinux; then
41732        # And since we now know that the linker is gnu, then add -z defs, to forbid
41733        # undefined symbols in object files.
41734        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
41735        if test "x$DEBUG_LEVEL" = "xrelease"; then
41736          # When building release libraries, tell the linker optimize them.
41737          # Should this be supplied to the OSS linker as well?
41738          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
41739        fi
41740      fi
41741    fi
41742
41743    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41744      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
41745      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
41746    fi
41747
41748    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
41749        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
41750
41751    # On some platforms (mac) the linker warns about non existing -L dirs.
41752    # Add server first if available. Linking aginst client does not always produce the same results.
41753    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
41754    # Default to server for other variants.
41755    if test "x$JVM_VARIANT_SERVER" = xtrue; then
41756      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41757    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
41758      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
41759    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
41760      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
41761    else
41762      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41763    fi
41764
41765    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
41766    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41767      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
41768    fi
41769
41770    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
41771    if test "x$OPENJDK_TARGET_OS" = xlinux; then
41772      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
41773    fi
41774  fi
41775
41776
41777
41778
41779
41780
41781
41782
41783  # Some Zero and Shark settings.
41784  # ZERO_ARCHFLAG tells the compiler which mode to build for
41785  case "${OPENJDK_TARGET_CPU}" in
41786    s390)
41787      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
41788      ;;
41789    *)
41790      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41791  esac
41792
41793  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
41794$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
41795  supports=yes
41796
41797  saved_cflags="$CFLAGS"
41798  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
41799  ac_ext=c
41800ac_cpp='$CPP $CPPFLAGS'
41801ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41802ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41803ac_compiler_gnu=$ac_cv_c_compiler_gnu
41804
41805  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41806/* end confdefs.h.  */
41807int i;
41808_ACEOF
41809if ac_fn_c_try_compile "$LINENO"; then :
41810
41811else
41812  supports=no
41813fi
41814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41815  ac_ext=cpp
41816ac_cpp='$CXXCPP $CPPFLAGS'
41817ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41818ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41819ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41820
41821  CFLAGS="$saved_cflags"
41822
41823  saved_cxxflags="$CXXFLAGS"
41824  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
41825  ac_ext=cpp
41826ac_cpp='$CXXCPP $CPPFLAGS'
41827ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41828ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41829ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41830
41831  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41832/* end confdefs.h.  */
41833int i;
41834_ACEOF
41835if ac_fn_cxx_try_compile "$LINENO"; then :
41836
41837else
41838  supports=no
41839fi
41840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41841  ac_ext=cpp
41842ac_cpp='$CXXCPP $CPPFLAGS'
41843ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41844ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41845ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41846
41847  CXXFLAGS="$saved_cxxflags"
41848
41849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41850$as_echo "$supports" >&6; }
41851  if test "x$supports" = "xyes" ; then
41852    :
41853  else
41854    ZERO_ARCHFLAG=""
41855  fi
41856
41857
41858
41859  # Check that the compiler supports -mX (or -qX on AIX) flags
41860  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
41861
41862  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
41863$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
41864  supports=yes
41865
41866  saved_cflags="$CFLAGS"
41867  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41868  ac_ext=c
41869ac_cpp='$CPP $CPPFLAGS'
41870ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41871ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41872ac_compiler_gnu=$ac_cv_c_compiler_gnu
41873
41874  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41875/* end confdefs.h.  */
41876int i;
41877_ACEOF
41878if ac_fn_c_try_compile "$LINENO"; then :
41879
41880else
41881  supports=no
41882fi
41883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41884  ac_ext=cpp
41885ac_cpp='$CXXCPP $CPPFLAGS'
41886ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41887ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41888ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41889
41890  CFLAGS="$saved_cflags"
41891
41892  saved_cxxflags="$CXXFLAGS"
41893  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41894  ac_ext=cpp
41895ac_cpp='$CXXCPP $CPPFLAGS'
41896ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41897ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41898ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41899
41900  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41901/* end confdefs.h.  */
41902int i;
41903_ACEOF
41904if ac_fn_cxx_try_compile "$LINENO"; then :
41905
41906else
41907  supports=no
41908fi
41909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41910  ac_ext=cpp
41911ac_cpp='$CXXCPP $CPPFLAGS'
41912ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41913ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41914ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41915
41916  CXXFLAGS="$saved_cxxflags"
41917
41918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41919$as_echo "$supports" >&6; }
41920  if test "x$supports" = "xyes" ; then
41921    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
41922  else
41923    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
41924  fi
41925
41926
41927
41928
41929# Setup debug symbols (need objcopy from the toolchain for that)
41930
41931  #
41932  # ENABLE_DEBUG_SYMBOLS
41933  # This must be done after the toolchain is setup, since we're looking at objcopy.
41934  #
41935  # Check whether --enable-debug-symbols was given.
41936if test "${enable_debug_symbols+set}" = set; then :
41937  enableval=$enable_debug_symbols;
41938fi
41939
41940
41941  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
41942$as_echo_n "checking if we should generate debug symbols... " >&6; }
41943
41944  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
41945    # explicit enabling of enable-debug-symbols and can't find objcopy
41946    #   this is an error
41947    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
41948  fi
41949
41950  if test "x$enable_debug_symbols" = "xyes"; then
41951    ENABLE_DEBUG_SYMBOLS=true
41952  elif test "x$enable_debug_symbols" = "xno"; then
41953    ENABLE_DEBUG_SYMBOLS=false
41954  else
41955    # Default is on if objcopy is found
41956    if test "x$OBJCOPY" != x; then
41957      ENABLE_DEBUG_SYMBOLS=true
41958    # MacOS X and Windows don't use objcopy but default is on for those OSes
41959    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
41960      ENABLE_DEBUG_SYMBOLS=true
41961    else
41962      ENABLE_DEBUG_SYMBOLS=false
41963    fi
41964  fi
41965
41966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
41967$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
41968
41969  #
41970  # ZIP_DEBUGINFO_FILES
41971  #
41972  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
41973$as_echo_n "checking if we should zip debug-info files... " >&6; }
41974  # Check whether --enable-zip-debug-info was given.
41975if test "${enable_zip_debug_info+set}" = set; then :
41976  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
41977else
41978  enable_zip_debug_info="yes"
41979fi
41980
41981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
41982$as_echo "${enable_zip_debug_info}" >&6; }
41983
41984  if test "x${enable_zip_debug_info}" = "xno"; then
41985    ZIP_DEBUGINFO_FILES=false
41986  else
41987    ZIP_DEBUGINFO_FILES=true
41988  fi
41989
41990
41991
41992
41993
41994###############################################################################
41995#
41996# Check dependencies for external and internal libraries.
41997#
41998###############################################################################
41999
42000# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42001
42002  # When using cygwin or msys, we need a wrapper binary that renames
42003  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42004  # @files and rewrites these too! This wrapper binary is
42005  # called fixpath.
42006  FIXPATH=
42007  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42008    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42009$as_echo_n "checking if fixpath can be created... " >&6; }
42010    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42011    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42012    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42013      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42014      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42015      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42016      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42017    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42018      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42019      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42020
42021      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42022      # @ was chosen as separator to minimize risk of other tools messing around with it
42023      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42024      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42025
42026      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42027    fi
42028    rm -f $OUTPUT_ROOT/fixpath*
42029    cd $OUTPUT_ROOT
42030    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42031    cd $CURDIR
42032
42033    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42034      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42035$as_echo "no" >&6; }
42036      cat $OUTPUT_ROOT/fixpath1.log
42037      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42038    fi
42039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42040$as_echo "yes" >&6; }
42041    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42042$as_echo_n "checking if fixpath.exe works... " >&6; }
42043    cd $OUTPUT_ROOT
42044    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42045    cd $CURDIR
42046    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42047      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42048$as_echo "no" >&6; }
42049      cat $OUTPUT_ROOT/fixpath2.log
42050      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42051    fi
42052    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42053$as_echo "yes" >&6; }
42054    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42055  fi
42056
42057
42058
42059
42060
42061
42062  ###############################################################################
42063  #
42064  # OS specific settings that we never will need to probe.
42065  #
42066  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42067    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42068$as_echo_n "checking what is not needed on Linux?... " >&6; }
42069    PULSE_NOT_NEEDED=yes
42070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42071$as_echo "pulse" >&6; }
42072  fi
42073
42074  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42075    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42076$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42077    ALSA_NOT_NEEDED=yes
42078    PULSE_NOT_NEEDED=yes
42079    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42080$as_echo "alsa pulse" >&6; }
42081  fi
42082
42083  if test "x$OPENJDK_TARGET_OS" = xaix; then
42084    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42085$as_echo_n "checking what is not needed on AIX?... " >&6; }
42086    ALSA_NOT_NEEDED=yes
42087    PULSE_NOT_NEEDED=yes
42088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42089$as_echo "alsa pulse" >&6; }
42090  fi
42091
42092
42093  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42095$as_echo_n "checking what is not needed on Windows?... " >&6; }
42096    CUPS_NOT_NEEDED=yes
42097    ALSA_NOT_NEEDED=yes
42098    PULSE_NOT_NEEDED=yes
42099    X11_NOT_NEEDED=yes
42100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42101$as_echo "alsa cups pulse x11" >&6; }
42102  fi
42103
42104  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42105    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42106$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42107    ALSA_NOT_NEEDED=yes
42108    PULSE_NOT_NEEDED=yes
42109    X11_NOT_NEEDED=yes
42110    # If the java runtime framework is disabled, then we need X11.
42111    # This will be adjusted below.
42112    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42113$as_echo "alsa pulse x11" >&6; }
42114  fi
42115
42116  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42117    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42118$as_echo_n "checking what is not needed on bsd?... " >&6; }
42119    ALSA_NOT_NEEDED=yes
42120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42121$as_echo "alsa" >&6; }
42122  fi
42123
42124  if test "x$OPENJDK" = "xfalse"; then
42125    FREETYPE_NOT_NEEDED=yes
42126  fi
42127
42128  if test "x$SUPPORT_HEADFUL" = xno; then
42129    X11_NOT_NEEDED=yes
42130  fi
42131
42132  ###############################################################################
42133  #
42134  # Check for MacOSX support for OpenJDK.
42135  #
42136
42137
42138  # Check whether --enable-macosx-runtime-support was given.
42139if test "${enable_macosx_runtime_support+set}" = set; then :
42140  enableval=$enable_macosx_runtime_support;
42141fi
42142
42143  if test "x$enable_macosx_runtime_support" != x; then
42144    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
42145$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
42146  fi
42147
42148
42149  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
42150$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
42151  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
42152    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
42153$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
42154  else
42155    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42156$as_echo "no" >&6; }
42157  fi
42158
42159
42160
42161  ###############################################################################
42162  #
42163  # Check for X Windows
42164  #
42165
42166  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42167  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42168  # --x-libraries for the sysroot, if that seems to be correct.
42169  if test "x$SYS_ROOT" != "x/"; then
42170    if test "x$x_includes" = xNONE; then
42171      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
42172        x_includes="$SYS_ROOT/usr/X11R6/include"
42173      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
42174        x_includes="$SYS_ROOT/usr/include"
42175      fi
42176    fi
42177    if test "x$x_libraries" = xNONE; then
42178      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
42179        x_libraries="$SYS_ROOT/usr/X11R6/lib"
42180      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42181        x_libraries="$SYS_ROOT/usr/lib64"
42182      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
42183        x_libraries="$SYS_ROOT/usr/lib"
42184      fi
42185    fi
42186  fi
42187
42188  # Now let autoconf do it's magic
42189  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42190$as_echo_n "checking for X... " >&6; }
42191
42192
42193# Check whether --with-x was given.
42194if test "${with_x+set}" = set; then :
42195  withval=$with_x;
42196fi
42197
42198# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42199if test "x$with_x" = xno; then
42200  # The user explicitly disabled X.
42201  have_x=disabled
42202else
42203  case $x_includes,$x_libraries in #(
42204    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42205    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42206  $as_echo_n "(cached) " >&6
42207else
42208  # One or both of the vars are not set, and there is no cached value.
42209ac_x_includes=no ac_x_libraries=no
42210rm -f -r conftest.dir
42211if mkdir conftest.dir; then
42212  cd conftest.dir
42213  cat >Imakefile <<'_ACEOF'
42214incroot:
42215	@echo incroot='${INCROOT}'
42216usrlibdir:
42217	@echo usrlibdir='${USRLIBDIR}'
42218libdir:
42219	@echo libdir='${LIBDIR}'
42220_ACEOF
42221  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42222    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42223    for ac_var in incroot usrlibdir libdir; do
42224      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42225    done
42226    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42227    for ac_extension in a so sl dylib la dll; do
42228      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42229	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
42230	ac_im_usrlibdir=$ac_im_libdir; break
42231      fi
42232    done
42233    # Screen out bogus values from the imake configuration.  They are
42234    # bogus both because they are the default anyway, and because
42235    # using them would break gcc on systems where it needs fixed includes.
42236    case $ac_im_incroot in
42237	/usr/include) ac_x_includes= ;;
42238	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42239    esac
42240    case $ac_im_usrlibdir in
42241	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
42242	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42243    esac
42244  fi
42245  cd ..
42246  rm -f -r conftest.dir
42247fi
42248
42249# Standard set of common directories for X headers.
42250# Check X11 before X11Rn because it is often a symlink to the current release.
42251ac_x_header_dirs='
42252/usr/X11/include
42253/usr/X11R7/include
42254/usr/X11R6/include
42255/usr/X11R5/include
42256/usr/X11R4/include
42257
42258/usr/include/X11
42259/usr/include/X11R7
42260/usr/include/X11R6
42261/usr/include/X11R5
42262/usr/include/X11R4
42263
42264/usr/local/X11/include
42265/usr/local/X11R7/include
42266/usr/local/X11R6/include
42267/usr/local/X11R5/include
42268/usr/local/X11R4/include
42269
42270/usr/local/include/X11
42271/usr/local/include/X11R7
42272/usr/local/include/X11R6
42273/usr/local/include/X11R5
42274/usr/local/include/X11R4
42275
42276/usr/X386/include
42277/usr/x386/include
42278/usr/XFree86/include/X11
42279
42280/usr/include
42281/usr/local/include
42282/usr/unsupported/include
42283/usr/athena/include
42284/usr/local/x11r5/include
42285/usr/lpp/Xamples/include
42286
42287/usr/openwin/include
42288/usr/openwin/share/include'
42289
42290if test "$ac_x_includes" = no; then
42291  # Guess where to find include files, by looking for Xlib.h.
42292  # First, try using that file with no special directory specified.
42293  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42294/* end confdefs.h.  */
42295#include <X11/Xlib.h>
42296_ACEOF
42297if ac_fn_cxx_try_cpp "$LINENO"; then :
42298  # We can compile using X headers with no special include directory.
42299ac_x_includes=
42300else
42301  for ac_dir in $ac_x_header_dirs; do
42302  if test -r "$ac_dir/X11/Xlib.h"; then
42303    ac_x_includes=$ac_dir
42304    break
42305  fi
42306done
42307fi
42308rm -f conftest.err conftest.i conftest.$ac_ext
42309fi # $ac_x_includes = no
42310
42311if test "$ac_x_libraries" = no; then
42312  # Check for the libraries.
42313  # See if we find them without any special options.
42314  # Don't add to $LIBS permanently.
42315  ac_save_LIBS=$LIBS
42316  LIBS="-lX11 $LIBS"
42317  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42318/* end confdefs.h.  */
42319#include <X11/Xlib.h>
42320int
42321main ()
42322{
42323XrmInitialize ()
42324  ;
42325  return 0;
42326}
42327_ACEOF
42328if ac_fn_cxx_try_link "$LINENO"; then :
42329  LIBS=$ac_save_LIBS
42330# We can link X programs with no special library path.
42331ac_x_libraries=
42332else
42333  LIBS=$ac_save_LIBS
42334for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
42335do
42336  # Don't even attempt the hair of trying to link an X program!
42337  for ac_extension in a so sl dylib la dll; do
42338    if test -r "$ac_dir/libX11.$ac_extension"; then
42339      ac_x_libraries=$ac_dir
42340      break 2
42341    fi
42342  done
42343done
42344fi
42345rm -f core conftest.err conftest.$ac_objext \
42346    conftest$ac_exeext conftest.$ac_ext
42347fi # $ac_x_libraries = no
42348
42349case $ac_x_includes,$ac_x_libraries in #(
42350  no,* | *,no | *\'*)
42351    # Didn't find X, or a directory has "'" in its name.
42352    ac_cv_have_x="have_x=no";; #(
42353  *)
42354    # Record where we found X for the cache.
42355    ac_cv_have_x="have_x=yes\
42356	ac_x_includes='$ac_x_includes'\
42357	ac_x_libraries='$ac_x_libraries'"
42358esac
42359fi
42360;; #(
42361    *) have_x=yes;;
42362  esac
42363  eval "$ac_cv_have_x"
42364fi # $with_x != no
42365
42366if test "$have_x" != yes; then
42367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
42368$as_echo "$have_x" >&6; }
42369  no_x=yes
42370else
42371  # If each of the values was on the command line, it overrides each guess.
42372  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
42373  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
42374  # Update the cache value to reflect the command line values.
42375  ac_cv_have_x="have_x=yes\
42376	ac_x_includes='$x_includes'\
42377	ac_x_libraries='$x_libraries'"
42378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
42379$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
42380fi
42381
42382  if test "$no_x" = yes; then
42383  # Not all programs may use this symbol, but it does not hurt to define it.
42384
42385$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
42386
42387  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
42388else
42389  if test -n "$x_includes"; then
42390    X_CFLAGS="$X_CFLAGS -I$x_includes"
42391  fi
42392
42393  # It would also be nice to do this for all -L options, not just this one.
42394  if test -n "$x_libraries"; then
42395    X_LIBS="$X_LIBS -L$x_libraries"
42396    # For Solaris; some versions of Sun CC require a space after -R and
42397    # others require no space.  Words are not sufficient . . . .
42398    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
42399$as_echo_n "checking whether -R must be followed by a space... " >&6; }
42400    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
42401    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
42402    ac_cxx_werror_flag=yes
42403    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42404/* end confdefs.h.  */
42405
42406int
42407main ()
42408{
42409
42410  ;
42411  return 0;
42412}
42413_ACEOF
42414if ac_fn_cxx_try_link "$LINENO"; then :
42415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42416$as_echo "no" >&6; }
42417       X_LIBS="$X_LIBS -R$x_libraries"
42418else
42419  LIBS="$ac_xsave_LIBS -R $x_libraries"
42420       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42421/* end confdefs.h.  */
42422
42423int
42424main ()
42425{
42426
42427  ;
42428  return 0;
42429}
42430_ACEOF
42431if ac_fn_cxx_try_link "$LINENO"; then :
42432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42433$as_echo "yes" >&6; }
42434	  X_LIBS="$X_LIBS -R $x_libraries"
42435else
42436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
42437$as_echo "neither works" >&6; }
42438fi
42439rm -f core conftest.err conftest.$ac_objext \
42440    conftest$ac_exeext conftest.$ac_ext
42441fi
42442rm -f core conftest.err conftest.$ac_objext \
42443    conftest$ac_exeext conftest.$ac_ext
42444    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
42445    LIBS=$ac_xsave_LIBS
42446  fi
42447
42448  # Check for system-dependent libraries X programs must link with.
42449  # Do this before checking for the system-independent R6 libraries
42450  # (-lICE), since we may need -lsocket or whatever for X linking.
42451
42452  if test "$ISC" = yes; then
42453    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
42454  else
42455    # Martyn Johnson says this is needed for Ultrix, if the X
42456    # libraries were built with DECnet support.  And Karl Berry says
42457    # the Alpha needs dnet_stub (dnet does not exist).
42458    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
42459    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42460/* end confdefs.h.  */
42461
42462/* Override any GCC internal prototype to avoid an error.
42463   Use char because int might match the return type of a GCC
42464   builtin and then its argument prototype would still apply.  */
42465#ifdef __cplusplus
42466extern "C"
42467#endif
42468char XOpenDisplay ();
42469int
42470main ()
42471{
42472return XOpenDisplay ();
42473  ;
42474  return 0;
42475}
42476_ACEOF
42477if ac_fn_cxx_try_link "$LINENO"; then :
42478
42479else
42480  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
42481$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
42482if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
42483  $as_echo_n "(cached) " >&6
42484else
42485  ac_check_lib_save_LIBS=$LIBS
42486LIBS="-ldnet  $LIBS"
42487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42488/* end confdefs.h.  */
42489
42490/* Override any GCC internal prototype to avoid an error.
42491   Use char because int might match the return type of a GCC
42492   builtin and then its argument prototype would still apply.  */
42493#ifdef __cplusplus
42494extern "C"
42495#endif
42496char dnet_ntoa ();
42497int
42498main ()
42499{
42500return dnet_ntoa ();
42501  ;
42502  return 0;
42503}
42504_ACEOF
42505if ac_fn_cxx_try_link "$LINENO"; then :
42506  ac_cv_lib_dnet_dnet_ntoa=yes
42507else
42508  ac_cv_lib_dnet_dnet_ntoa=no
42509fi
42510rm -f core conftest.err conftest.$ac_objext \
42511    conftest$ac_exeext conftest.$ac_ext
42512LIBS=$ac_check_lib_save_LIBS
42513fi
42514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
42515$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
42516if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
42517  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
42518fi
42519
42520    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
42521      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
42522$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
42523if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
42524  $as_echo_n "(cached) " >&6
42525else
42526  ac_check_lib_save_LIBS=$LIBS
42527LIBS="-ldnet_stub  $LIBS"
42528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42529/* end confdefs.h.  */
42530
42531/* Override any GCC internal prototype to avoid an error.
42532   Use char because int might match the return type of a GCC
42533   builtin and then its argument prototype would still apply.  */
42534#ifdef __cplusplus
42535extern "C"
42536#endif
42537char dnet_ntoa ();
42538int
42539main ()
42540{
42541return dnet_ntoa ();
42542  ;
42543  return 0;
42544}
42545_ACEOF
42546if ac_fn_cxx_try_link "$LINENO"; then :
42547  ac_cv_lib_dnet_stub_dnet_ntoa=yes
42548else
42549  ac_cv_lib_dnet_stub_dnet_ntoa=no
42550fi
42551rm -f core conftest.err conftest.$ac_objext \
42552    conftest$ac_exeext conftest.$ac_ext
42553LIBS=$ac_check_lib_save_LIBS
42554fi
42555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
42556$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
42557if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
42558  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
42559fi
42560
42561    fi
42562fi
42563rm -f core conftest.err conftest.$ac_objext \
42564    conftest$ac_exeext conftest.$ac_ext
42565    LIBS="$ac_xsave_LIBS"
42566
42567    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
42568    # to get the SysV transport functions.
42569    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
42570    # needs -lnsl.
42571    # The nsl library prevents programs from opening the X display
42572    # on Irix 5.2, according to T.E. Dickey.
42573    # The functions gethostbyname, getservbyname, and inet_addr are
42574    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
42575    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
42576if test "x$ac_cv_func_gethostbyname" = xyes; then :
42577
42578fi
42579
42580    if test $ac_cv_func_gethostbyname = no; then
42581      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
42582$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
42583if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
42584  $as_echo_n "(cached) " >&6
42585else
42586  ac_check_lib_save_LIBS=$LIBS
42587LIBS="-lnsl  $LIBS"
42588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42589/* end confdefs.h.  */
42590
42591/* Override any GCC internal prototype to avoid an error.
42592   Use char because int might match the return type of a GCC
42593   builtin and then its argument prototype would still apply.  */
42594#ifdef __cplusplus
42595extern "C"
42596#endif
42597char gethostbyname ();
42598int
42599main ()
42600{
42601return gethostbyname ();
42602  ;
42603  return 0;
42604}
42605_ACEOF
42606if ac_fn_cxx_try_link "$LINENO"; then :
42607  ac_cv_lib_nsl_gethostbyname=yes
42608else
42609  ac_cv_lib_nsl_gethostbyname=no
42610fi
42611rm -f core conftest.err conftest.$ac_objext \
42612    conftest$ac_exeext conftest.$ac_ext
42613LIBS=$ac_check_lib_save_LIBS
42614fi
42615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
42616$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
42617if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
42618  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
42619fi
42620
42621      if test $ac_cv_lib_nsl_gethostbyname = no; then
42622	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
42623$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
42624if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
42625  $as_echo_n "(cached) " >&6
42626else
42627  ac_check_lib_save_LIBS=$LIBS
42628LIBS="-lbsd  $LIBS"
42629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42630/* end confdefs.h.  */
42631
42632/* Override any GCC internal prototype to avoid an error.
42633   Use char because int might match the return type of a GCC
42634   builtin and then its argument prototype would still apply.  */
42635#ifdef __cplusplus
42636extern "C"
42637#endif
42638char gethostbyname ();
42639int
42640main ()
42641{
42642return gethostbyname ();
42643  ;
42644  return 0;
42645}
42646_ACEOF
42647if ac_fn_cxx_try_link "$LINENO"; then :
42648  ac_cv_lib_bsd_gethostbyname=yes
42649else
42650  ac_cv_lib_bsd_gethostbyname=no
42651fi
42652rm -f core conftest.err conftest.$ac_objext \
42653    conftest$ac_exeext conftest.$ac_ext
42654LIBS=$ac_check_lib_save_LIBS
42655fi
42656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
42657$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
42658if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
42659  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
42660fi
42661
42662      fi
42663    fi
42664
42665    # lieder@skyler.mavd.honeywell.com says without -lsocket,
42666    # socket/setsockopt and other routines are undefined under SCO ODT
42667    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
42668    # on later versions), says Simon Leinen: it contains gethostby*
42669    # variants that don't use the name server (or something).  -lsocket
42670    # must be given before -lnsl if both are needed.  We assume that
42671    # if connect needs -lnsl, so does gethostbyname.
42672    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
42673if test "x$ac_cv_func_connect" = xyes; then :
42674
42675fi
42676
42677    if test $ac_cv_func_connect = no; then
42678      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
42679$as_echo_n "checking for connect in -lsocket... " >&6; }
42680if ${ac_cv_lib_socket_connect+:} false; then :
42681  $as_echo_n "(cached) " >&6
42682else
42683  ac_check_lib_save_LIBS=$LIBS
42684LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
42685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42686/* end confdefs.h.  */
42687
42688/* Override any GCC internal prototype to avoid an error.
42689   Use char because int might match the return type of a GCC
42690   builtin and then its argument prototype would still apply.  */
42691#ifdef __cplusplus
42692extern "C"
42693#endif
42694char connect ();
42695int
42696main ()
42697{
42698return connect ();
42699  ;
42700  return 0;
42701}
42702_ACEOF
42703if ac_fn_cxx_try_link "$LINENO"; then :
42704  ac_cv_lib_socket_connect=yes
42705else
42706  ac_cv_lib_socket_connect=no
42707fi
42708rm -f core conftest.err conftest.$ac_objext \
42709    conftest$ac_exeext conftest.$ac_ext
42710LIBS=$ac_check_lib_save_LIBS
42711fi
42712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
42713$as_echo "$ac_cv_lib_socket_connect" >&6; }
42714if test "x$ac_cv_lib_socket_connect" = xyes; then :
42715  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
42716fi
42717
42718    fi
42719
42720    # Guillermo Gomez says -lposix is necessary on A/UX.
42721    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
42722if test "x$ac_cv_func_remove" = xyes; then :
42723
42724fi
42725
42726    if test $ac_cv_func_remove = no; then
42727      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
42728$as_echo_n "checking for remove in -lposix... " >&6; }
42729if ${ac_cv_lib_posix_remove+:} false; then :
42730  $as_echo_n "(cached) " >&6
42731else
42732  ac_check_lib_save_LIBS=$LIBS
42733LIBS="-lposix  $LIBS"
42734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42735/* end confdefs.h.  */
42736
42737/* Override any GCC internal prototype to avoid an error.
42738   Use char because int might match the return type of a GCC
42739   builtin and then its argument prototype would still apply.  */
42740#ifdef __cplusplus
42741extern "C"
42742#endif
42743char remove ();
42744int
42745main ()
42746{
42747return remove ();
42748  ;
42749  return 0;
42750}
42751_ACEOF
42752if ac_fn_cxx_try_link "$LINENO"; then :
42753  ac_cv_lib_posix_remove=yes
42754else
42755  ac_cv_lib_posix_remove=no
42756fi
42757rm -f core conftest.err conftest.$ac_objext \
42758    conftest$ac_exeext conftest.$ac_ext
42759LIBS=$ac_check_lib_save_LIBS
42760fi
42761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
42762$as_echo "$ac_cv_lib_posix_remove" >&6; }
42763if test "x$ac_cv_lib_posix_remove" = xyes; then :
42764  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
42765fi
42766
42767    fi
42768
42769    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
42770    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
42771if test "x$ac_cv_func_shmat" = xyes; then :
42772
42773fi
42774
42775    if test $ac_cv_func_shmat = no; then
42776      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
42777$as_echo_n "checking for shmat in -lipc... " >&6; }
42778if ${ac_cv_lib_ipc_shmat+:} false; then :
42779  $as_echo_n "(cached) " >&6
42780else
42781  ac_check_lib_save_LIBS=$LIBS
42782LIBS="-lipc  $LIBS"
42783cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42784/* end confdefs.h.  */
42785
42786/* Override any GCC internal prototype to avoid an error.
42787   Use char because int might match the return type of a GCC
42788   builtin and then its argument prototype would still apply.  */
42789#ifdef __cplusplus
42790extern "C"
42791#endif
42792char shmat ();
42793int
42794main ()
42795{
42796return shmat ();
42797  ;
42798  return 0;
42799}
42800_ACEOF
42801if ac_fn_cxx_try_link "$LINENO"; then :
42802  ac_cv_lib_ipc_shmat=yes
42803else
42804  ac_cv_lib_ipc_shmat=no
42805fi
42806rm -f core conftest.err conftest.$ac_objext \
42807    conftest$ac_exeext conftest.$ac_ext
42808LIBS=$ac_check_lib_save_LIBS
42809fi
42810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
42811$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
42812if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
42813  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
42814fi
42815
42816    fi
42817  fi
42818
42819  # Check for libraries that X11R6 Xt/Xaw programs need.
42820  ac_save_LDFLAGS=$LDFLAGS
42821  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
42822  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
42823  # check for ICE first), but we must link in the order -lSM -lICE or
42824  # we get undefined symbols.  So assume we have SM if we have ICE.
42825  # These have to be linked with before -lX11, unlike the other
42826  # libraries we check for below, so use a different variable.
42827  # John Interrante, Karl Berry
42828  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
42829$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
42830if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
42831  $as_echo_n "(cached) " >&6
42832else
42833  ac_check_lib_save_LIBS=$LIBS
42834LIBS="-lICE $X_EXTRA_LIBS $LIBS"
42835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42836/* end confdefs.h.  */
42837
42838/* Override any GCC internal prototype to avoid an error.
42839   Use char because int might match the return type of a GCC
42840   builtin and then its argument prototype would still apply.  */
42841#ifdef __cplusplus
42842extern "C"
42843#endif
42844char IceConnectionNumber ();
42845int
42846main ()
42847{
42848return IceConnectionNumber ();
42849  ;
42850  return 0;
42851}
42852_ACEOF
42853if ac_fn_cxx_try_link "$LINENO"; then :
42854  ac_cv_lib_ICE_IceConnectionNumber=yes
42855else
42856  ac_cv_lib_ICE_IceConnectionNumber=no
42857fi
42858rm -f core conftest.err conftest.$ac_objext \
42859    conftest$ac_exeext conftest.$ac_ext
42860LIBS=$ac_check_lib_save_LIBS
42861fi
42862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
42863$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
42864if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
42865  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
42866fi
42867
42868  LDFLAGS=$ac_save_LDFLAGS
42869
42870fi
42871
42872
42873  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
42874  # this doesn't make sense so we remove it.
42875  if test "x$COMPILE_TYPE" = xcross; then
42876    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
42877  fi
42878
42879  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
42880
42881  # Print a helpful message on how to acquire the necessary build dependency.
42882  # x11 is the help tag: freetype, cups, pulse, alsa etc
42883  MISSING_DEPENDENCY=x11
42884
42885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42886    cygwin_help $MISSING_DEPENDENCY
42887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42888    msys_help $MISSING_DEPENDENCY
42889  else
42890    PKGHANDLER_COMMAND=
42891
42892    case $PKGHANDLER in
42893      apt-get)
42894        apt_help     $MISSING_DEPENDENCY ;;
42895      yum)
42896        yum_help     $MISSING_DEPENDENCY ;;
42897      port)
42898        port_help    $MISSING_DEPENDENCY ;;
42899      pkgutil)
42900        pkgutil_help $MISSING_DEPENDENCY ;;
42901      pkgadd)
42902        pkgadd_help  $MISSING_DEPENDENCY ;;
42903    esac
42904
42905    if test "x$PKGHANDLER_COMMAND" != x; then
42906      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
42907    fi
42908  fi
42909
42910    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
42911  fi
42912
42913  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42914    OPENWIN_HOME="/usr/openwin"
42915  fi
42916
42917
42918
42919  #
42920  # Weird Sol10 something check...TODO change to try compile
42921  #
42922  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
42923    if test "`uname -r`" = "5.10"; then
42924      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
42925        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
42926      fi
42927    fi
42928  fi
42929
42930  ac_ext=c
42931ac_cpp='$CPP $CPPFLAGS'
42932ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42933ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42934ac_compiler_gnu=$ac_cv_c_compiler_gnu
42935
42936  OLD_CFLAGS="$CFLAGS"
42937  CFLAGS="$CFLAGS $X_CFLAGS"
42938
42939  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
42940  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
42941do :
42942  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
42943ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
42944        # include <X11/Xlib.h>
42945        # include <X11/Xutil.h>
42946
42947
42948"
42949if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
42950  cat >>confdefs.h <<_ACEOF
42951#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
42952_ACEOF
42953 X11_A_OK=yes
42954else
42955  X11_A_OK=no; break
42956fi
42957
42958done
42959
42960
42961  CFLAGS="$OLD_CFLAGS"
42962  ac_ext=cpp
42963ac_cpp='$CXXCPP $CPPFLAGS'
42964ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42965ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42966ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42967
42968
42969  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
42970
42971  # Print a helpful message on how to acquire the necessary build dependency.
42972  # x11 is the help tag: freetype, cups, pulse, alsa etc
42973  MISSING_DEPENDENCY=x11
42974
42975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42976    cygwin_help $MISSING_DEPENDENCY
42977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42978    msys_help $MISSING_DEPENDENCY
42979  else
42980    PKGHANDLER_COMMAND=
42981
42982    case $PKGHANDLER in
42983      apt-get)
42984        apt_help     $MISSING_DEPENDENCY ;;
42985      yum)
42986        yum_help     $MISSING_DEPENDENCY ;;
42987      port)
42988        port_help    $MISSING_DEPENDENCY ;;
42989      pkgutil)
42990        pkgutil_help $MISSING_DEPENDENCY ;;
42991      pkgadd)
42992        pkgadd_help  $MISSING_DEPENDENCY ;;
42993    esac
42994
42995    if test "x$PKGHANDLER_COMMAND" != x; then
42996      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
42997    fi
42998  fi
42999
43000    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43001  fi
43002
43003
43004
43005
43006
43007
43008  ###############################################################################
43009  #
43010  # The common unix printing system cups is used to print from java.
43011  #
43012
43013# Check whether --with-cups was given.
43014if test "${with_cups+set}" = set; then :
43015  withval=$with_cups;
43016fi
43017
43018
43019# Check whether --with-cups-include was given.
43020if test "${with_cups_include+set}" = set; then :
43021  withval=$with_cups_include;
43022fi
43023
43024
43025  if test "x$CUPS_NOT_NEEDED" = xyes; then
43026    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43027      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43028$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43029    fi
43030    CUPS_CFLAGS=
43031  else
43032    CUPS_FOUND=no
43033
43034    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43035      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43036    fi
43037
43038    if test "x${with_cups}" != x; then
43039      CUPS_CFLAGS="-I${with_cups}/include"
43040      CUPS_FOUND=yes
43041    fi
43042    if test "x${with_cups_include}" != x; then
43043      CUPS_CFLAGS="-I${with_cups_include}"
43044      CUPS_FOUND=yes
43045    fi
43046    if test "x$CUPS_FOUND" = xno; then
43047
43048
43049  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43050    # Source the builddeps file again, to make sure it uses the latest variables!
43051    . $builddepsfile
43052    # Look for a target and build machine specific resource!
43053    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43054    if test "x$resource" = x; then
43055      # Ok, lets instead look for a target specific resource
43056      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43057    fi
43058    if test "x$resource" = x; then
43059      # Ok, lets instead look for a build specific resource
43060      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43061    fi
43062    if test "x$resource" = x; then
43063      # Ok, lets instead look for a generic resource
43064      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43065      resource=${builddep_cups}
43066    fi
43067    if test "x$resource" != x; then
43068      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43069$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43070      # If the resource in the builddeps.conf file is an existing directory,
43071      # for example /java/linux/cups
43072      if test -d ${resource}; then
43073        depdir=${resource}
43074      else
43075
43076  # cups is for example mymodule
43077  # $resource is for example libs/general/libmymod_1_2_3.zip
43078  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43079  # $with_builddeps_dir is for example /localhome/builddeps
43080  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43081  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43082  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43083  filename=`basename $resource`
43084  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43085  filebase=${filename%%.*}
43086  extension=${filename#*.}
43087  installdir=$with_builddeps_dir/$filebase
43088  if test ! -f $installdir/$filename.unpacked; then
43089    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43090$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43091    if test ! -d $installdir; then
43092      mkdir -p $installdir
43093    fi
43094    if test ! -d $installdir; then
43095      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43096    fi
43097    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43098    touch $tmpfile
43099    if test ! -f $tmpfile; then
43100      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43101    fi
43102
43103  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43104  # $tmpfile is the local file name for the downloaded file.
43105  VALID_TOOL=no
43106  if test "x$BDEPS_FTP" = xwget; then
43107    VALID_TOOL=yes
43108    wget -O $tmpfile $with_builddeps_server/$resource
43109  fi
43110  if test "x$BDEPS_FTP" = xlftp; then
43111    VALID_TOOL=yes
43112    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43113  fi
43114  if test "x$BDEPS_FTP" = xftp; then
43115    VALID_TOOL=yes
43116    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43117    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43118    FTPUSERPWD=${FTPSERVER%%@*}
43119    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43120      FTPUSER=${userpwd%%:*}
43121      FTPPWD=${userpwd#*@}
43122      FTPSERVER=${FTPSERVER#*@}
43123    else
43124      FTPUSER=ftp
43125      FTPPWD=ftp
43126    fi
43127    # the "pass" command does not work on some
43128    # ftp clients (read ftp.exe) but if it works,
43129    # passive mode is better!
43130    ( \
43131        echo "user $FTPUSER $FTPPWD"        ; \
43132        echo "pass"                         ; \
43133        echo "bin"                          ; \
43134        echo "get $FTPPATH $tmpfile"              ; \
43135    ) | ftp -in $FTPSERVER
43136  fi
43137  if test "x$VALID_TOOL" != xyes; then
43138    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43139  fi
43140
43141    mv $tmpfile $installdir/$filename
43142    if test ! -s $installdir/$filename; then
43143      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43144    fi
43145    case "$extension" in
43146      zip)  echo "Unzipping $installdir/$filename..."
43147        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43148        ;;
43149      tar.gz) echo "Untaring $installdir/$filename..."
43150        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43151        ;;
43152      tgz) echo "Untaring $installdir/$filename..."
43153        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43154        ;;
43155      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43156        ;;
43157    esac
43158  fi
43159  if test -f $installdir/$filename.unpacked; then
43160    depdir=$installdir
43161  fi
43162
43163      fi
43164      # Source the builddeps file again, because in the previous command, the depdir
43165      # was updated to point at the current build dependency install directory.
43166      . $builddepsfile
43167      # Now extract variables from the builddeps.conf files.
43168      theroot=${builddep_cups_ROOT}
43169      thecflags=${builddep_cups_CFLAGS}
43170      thelibs=${builddep_cups_LIBS}
43171      if test "x$depdir" = x; then
43172        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43173      fi
43174      CUPS=$depdir
43175      if test "x$theroot" != x; then
43176        CUPS="$theroot"
43177      fi
43178      if test "x$thecflags" != x; then
43179        CUPS_CFLAGS="$thecflags"
43180      fi
43181      if test "x$thelibs" != x; then
43182        CUPS_LIBS="$thelibs"
43183      fi
43184      CUPS_FOUND=yes
43185
43186    fi
43187
43188  fi
43189
43190    fi
43191    if test "x$CUPS_FOUND" = xno; then
43192      # Are the cups headers installed in the default /usr/include location?
43193      for ac_header in cups/cups.h cups/ppd.h
43194do :
43195  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43196ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43197if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43198  cat >>confdefs.h <<_ACEOF
43199#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43200_ACEOF
43201
43202            CUPS_FOUND=yes
43203            CUPS_CFLAGS=
43204            DEFAULT_CUPS=yes
43205
43206
43207fi
43208
43209done
43210
43211    fi
43212    if test "x$CUPS_FOUND" = xno; then
43213      # Getting nervous now? Lets poke around for standard Solaris third-party
43214      # package installation locations.
43215      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43216$as_echo_n "checking for cups headers... " >&6; }
43217      if test -s /opt/sfw/cups/include/cups/cups.h; then
43218        # An SFW package seems to be installed!
43219        CUPS_FOUND=yes
43220        CUPS_CFLAGS="-I/opt/sfw/cups/include"
43221      elif test -s /opt/csw/include/cups/cups.h; then
43222        # A CSW package seems to be installed!
43223        CUPS_FOUND=yes
43224        CUPS_CFLAGS="-I/opt/csw/include"
43225      fi
43226      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43227$as_echo "$CUPS_FOUND" >&6; }
43228    fi
43229    if test "x$CUPS_FOUND" = xno; then
43230
43231  # Print a helpful message on how to acquire the necessary build dependency.
43232  # cups is the help tag: freetype, cups, pulse, alsa etc
43233  MISSING_DEPENDENCY=cups
43234
43235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43236    cygwin_help $MISSING_DEPENDENCY
43237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43238    msys_help $MISSING_DEPENDENCY
43239  else
43240    PKGHANDLER_COMMAND=
43241
43242    case $PKGHANDLER in
43243      apt-get)
43244        apt_help     $MISSING_DEPENDENCY ;;
43245      yum)
43246        yum_help     $MISSING_DEPENDENCY ;;
43247      port)
43248        port_help    $MISSING_DEPENDENCY ;;
43249      pkgutil)
43250        pkgutil_help $MISSING_DEPENDENCY ;;
43251      pkgadd)
43252        pkgadd_help  $MISSING_DEPENDENCY ;;
43253    esac
43254
43255    if test "x$PKGHANDLER_COMMAND" != x; then
43256      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43257    fi
43258  fi
43259
43260      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43261    fi
43262  fi
43263
43264
43265
43266
43267
43268
43269  ###############################################################################
43270  #
43271  # The ubiquitous freetype library is used to render fonts.
43272  #
43273
43274# Check whether --with-freetype was given.
43275if test "${with_freetype+set}" = set; then :
43276  withval=$with_freetype;
43277fi
43278
43279
43280# Check whether --with-freetype-include was given.
43281if test "${with_freetype_include+set}" = set; then :
43282  withval=$with_freetype_include;
43283fi
43284
43285
43286# Check whether --with-freetype-lib was given.
43287if test "${with_freetype_lib+set}" = set; then :
43288  withval=$with_freetype_lib;
43289fi
43290
43291  # Check whether --enable-freetype-bundling was given.
43292if test "${enable_freetype_bundling+set}" = set; then :
43293  enableval=$enable_freetype_bundling;
43294fi
43295
43296
43297  FREETYPE_CFLAGS=
43298  FREETYPE_LIBS=
43299  FREETYPE_BUNDLE_LIB_PATH=
43300
43301  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43302    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43303      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43304$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43305    fi
43306    if test "x$enable_freetype_bundling" != x; then
43307      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
43308$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
43309    fi
43310  else
43311    # freetype is needed to build; go get it!
43312
43313    BUNDLE_FREETYPE="$enable_freetype_bundling"
43314
43315    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43316      # User has specified settings
43317
43318      if test "x$BUNDLE_FREETYPE" = x; then
43319        # If not specified, default is to bundle freetype
43320        BUNDLE_FREETYPE=yes
43321      fi
43322
43323      if test "x$with_freetype" != x; then
43324        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
43325        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
43326      fi
43327
43328      # Allow --with-freetype-lib and --with-freetype-include to override
43329      if test "x$with_freetype_include" != x; then
43330        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
43331      fi
43332      if test "x$with_freetype_lib" != x; then
43333        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
43334      fi
43335
43336      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
43337        # Okay, we got it. Check that it works.
43338
43339  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43340  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43341  METHOD="--with-freetype"
43342
43343  # First check if the files exists.
43344  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43345    # We found an arbitrary include file. That's a good sign.
43346    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43347$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43348    FOUND_FREETYPE=yes
43349
43350    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43351    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43352      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43353$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43354      FOUND_FREETYPE=no
43355    else
43356      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43357        # On Windows, we will need both .lib and .dll file.
43358        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43359          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43360$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43361          FOUND_FREETYPE=no
43362        fi
43363      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
43364        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43365        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43366      fi
43367    fi
43368  fi
43369
43370  if test "x$FOUND_FREETYPE" = xyes; then
43371
43372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43373
43374  # Input might be given as Windows format, start by converting to
43375  # unix format.
43376  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43377  new_path=`$CYGPATH -u "$path"`
43378
43379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43382  # "foo.exe" is OK but "foo" is an error.
43383  #
43384  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43385  # It is also a way to make sure we got the proper file name for the real test later on.
43386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43387  if test "x$test_shortpath" = x; then
43388    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43389$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43390    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43391  fi
43392
43393  # Call helper function which possibly converts this using DOS-style short mode.
43394  # If so, the updated path is stored in $new_path.
43395
43396  input_path="$new_path"
43397  # Check if we need to convert this using DOS-style short mode. If the path
43398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43399  # take no chances and rewrite it.
43400  # Note: m4 eats our [], so we need to use [ and ] instead.
43401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43402  if test "x$has_forbidden_chars" != x; then
43403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43404    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43405    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43406    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43407      # Going to short mode and back again did indeed matter. Since short mode is
43408      # case insensitive, let's make it lowercase to improve readability.
43409      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43410      # Now convert it back to Unix-stile (cygpath)
43411      input_path=`$CYGPATH -u "$shortmode_path"`
43412      new_path="$input_path"
43413    fi
43414  fi
43415
43416  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43417  if test "x$test_cygdrive_prefix" = x; then
43418    # As a simple fix, exclude /usr/bin since it's not a real path.
43419    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43420      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43421      # a path prefixed by /cygdrive for fixpath to work.
43422      new_path="$CYGWIN_ROOT_PATH$input_path"
43423    fi
43424  fi
43425
43426
43427  if test "x$path" != "x$new_path"; then
43428    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43430$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43431  fi
43432
43433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43434
43435  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43436  has_colon=`$ECHO $path | $GREP ^.:`
43437  new_path="$path"
43438  if test "x$has_colon" = x; then
43439    # Not in mixed or Windows style, start by that.
43440    new_path=`cmd //c echo $path`
43441  fi
43442
43443
43444  input_path="$new_path"
43445  # Check if we need to convert this using DOS-style short mode. If the path
43446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43447  # take no chances and rewrite it.
43448  # Note: m4 eats our [], so we need to use [ and ] instead.
43449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43450  if test "x$has_forbidden_chars" != x; then
43451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43452    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43453  fi
43454
43455
43456  windows_path="$new_path"
43457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43458    unix_path=`$CYGPATH -u "$windows_path"`
43459    new_path="$unix_path"
43460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43462    new_path="$unix_path"
43463  fi
43464
43465  if test "x$path" != "x$new_path"; then
43466    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43468$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43469  fi
43470
43471  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43472  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43473
43474  else
43475    # We're on a posix platform. Hooray! :)
43476    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43477    has_space=`$ECHO "$path" | $GREP " "`
43478    if test "x$has_space" != x; then
43479      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43480$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43481      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43482    fi
43483
43484    # Use eval to expand a potential ~
43485    eval path="$path"
43486    if test ! -f "$path" && test ! -d "$path"; then
43487      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43488    fi
43489
43490    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43491  fi
43492
43493
43494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43495
43496  # Input might be given as Windows format, start by converting to
43497  # unix format.
43498  path="$POTENTIAL_FREETYPE_LIB_PATH"
43499  new_path=`$CYGPATH -u "$path"`
43500
43501  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43502  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43503  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43504  # "foo.exe" is OK but "foo" is an error.
43505  #
43506  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43507  # It is also a way to make sure we got the proper file name for the real test later on.
43508  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43509  if test "x$test_shortpath" = x; then
43510    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43511$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43512    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43513  fi
43514
43515  # Call helper function which possibly converts this using DOS-style short mode.
43516  # If so, the updated path is stored in $new_path.
43517
43518  input_path="$new_path"
43519  # Check if we need to convert this using DOS-style short mode. If the path
43520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43521  # take no chances and rewrite it.
43522  # Note: m4 eats our [], so we need to use [ and ] instead.
43523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43524  if test "x$has_forbidden_chars" != x; then
43525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43526    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43527    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43528    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43529      # Going to short mode and back again did indeed matter. Since short mode is
43530      # case insensitive, let's make it lowercase to improve readability.
43531      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43532      # Now convert it back to Unix-stile (cygpath)
43533      input_path=`$CYGPATH -u "$shortmode_path"`
43534      new_path="$input_path"
43535    fi
43536  fi
43537
43538  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43539  if test "x$test_cygdrive_prefix" = x; then
43540    # As a simple fix, exclude /usr/bin since it's not a real path.
43541    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43542      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43543      # a path prefixed by /cygdrive for fixpath to work.
43544      new_path="$CYGWIN_ROOT_PATH$input_path"
43545    fi
43546  fi
43547
43548
43549  if test "x$path" != "x$new_path"; then
43550    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43552$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43553  fi
43554
43555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43556
43557  path="$POTENTIAL_FREETYPE_LIB_PATH"
43558  has_colon=`$ECHO $path | $GREP ^.:`
43559  new_path="$path"
43560  if test "x$has_colon" = x; then
43561    # Not in mixed or Windows style, start by that.
43562    new_path=`cmd //c echo $path`
43563  fi
43564
43565
43566  input_path="$new_path"
43567  # Check if we need to convert this using DOS-style short mode. If the path
43568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43569  # take no chances and rewrite it.
43570  # Note: m4 eats our [], so we need to use [ and ] instead.
43571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43572  if test "x$has_forbidden_chars" != x; then
43573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43574    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43575  fi
43576
43577
43578  windows_path="$new_path"
43579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43580    unix_path=`$CYGPATH -u "$windows_path"`
43581    new_path="$unix_path"
43582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43584    new_path="$unix_path"
43585  fi
43586
43587  if test "x$path" != "x$new_path"; then
43588    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43590$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43591  fi
43592
43593  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43594  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43595
43596  else
43597    # We're on a posix platform. Hooray! :)
43598    path="$POTENTIAL_FREETYPE_LIB_PATH"
43599    has_space=`$ECHO "$path" | $GREP " "`
43600    if test "x$has_space" != x; then
43601      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43602$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43603      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43604    fi
43605
43606    # Use eval to expand a potential ~
43607    eval path="$path"
43608    if test ! -f "$path" && test ! -d "$path"; then
43609      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43610    fi
43611
43612    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43613  fi
43614
43615
43616    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43617    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43618$as_echo_n "checking for freetype includes... " >&6; }
43619    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43620$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43621    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43622    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43623$as_echo_n "checking for freetype libraries... " >&6; }
43624    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43625$as_echo "$FREETYPE_LIB_PATH" >&6; }
43626  fi
43627
43628        if test "x$FOUND_FREETYPE" != xyes; then
43629          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
43630        fi
43631      else
43632        # User specified only one of lib or include. This is an error.
43633        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
43634          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
43635$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
43636          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43637        else
43638          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
43639$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
43640          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43641        fi
43642      fi
43643    else
43644      # User did not specify settings, but we need freetype. Try to locate it.
43645
43646      if test "x$BUNDLE_FREETYPE" = x; then
43647        # If not specified, default is to bundle freetype only on windows
43648        if test "x$OPENJDK_TARGET_OS" = xwindows; then
43649          BUNDLE_FREETYPE=yes
43650        else
43651          BUNDLE_FREETYPE=no
43652        fi
43653      fi
43654
43655      if test "x$FOUND_FREETYPE" != xyes; then
43656        # Check builddeps
43657
43658
43659  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43660    # Source the builddeps file again, to make sure it uses the latest variables!
43661    . $builddepsfile
43662    # Look for a target and build machine specific resource!
43663    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43664    if test "x$resource" = x; then
43665      # Ok, lets instead look for a target specific resource
43666      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
43667    fi
43668    if test "x$resource" = x; then
43669      # Ok, lets instead look for a build specific resource
43670      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
43671    fi
43672    if test "x$resource" = x; then
43673      # Ok, lets instead look for a generic resource
43674      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
43675      resource=${builddep_freetype2}
43676    fi
43677    if test "x$resource" != x; then
43678      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
43679$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
43680      # If the resource in the builddeps.conf file is an existing directory,
43681      # for example /java/linux/cups
43682      if test -d ${resource}; then
43683        depdir=${resource}
43684      else
43685
43686  # freetype2 is for example mymodule
43687  # $resource is for example libs/general/libmymod_1_2_3.zip
43688  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43689  # $with_builddeps_dir is for example /localhome/builddeps
43690  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43691  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43692  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43693  filename=`basename $resource`
43694  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43695  filebase=${filename%%.*}
43696  extension=${filename#*.}
43697  installdir=$with_builddeps_dir/$filebase
43698  if test ! -f $installdir/$filename.unpacked; then
43699    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
43700$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43701    if test ! -d $installdir; then
43702      mkdir -p $installdir
43703    fi
43704    if test ! -d $installdir; then
43705      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43706    fi
43707    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
43708    touch $tmpfile
43709    if test ! -f $tmpfile; then
43710      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43711    fi
43712
43713  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43714  # $tmpfile is the local file name for the downloaded file.
43715  VALID_TOOL=no
43716  if test "x$BDEPS_FTP" = xwget; then
43717    VALID_TOOL=yes
43718    wget -O $tmpfile $with_builddeps_server/$resource
43719  fi
43720  if test "x$BDEPS_FTP" = xlftp; then
43721    VALID_TOOL=yes
43722    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43723  fi
43724  if test "x$BDEPS_FTP" = xftp; then
43725    VALID_TOOL=yes
43726    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43727    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43728    FTPUSERPWD=${FTPSERVER%%@*}
43729    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43730      FTPUSER=${userpwd%%:*}
43731      FTPPWD=${userpwd#*@}
43732      FTPSERVER=${FTPSERVER#*@}
43733    else
43734      FTPUSER=ftp
43735      FTPPWD=ftp
43736    fi
43737    # the "pass" command does not work on some
43738    # ftp clients (read ftp.exe) but if it works,
43739    # passive mode is better!
43740    ( \
43741        echo "user $FTPUSER $FTPPWD"        ; \
43742        echo "pass"                         ; \
43743        echo "bin"                          ; \
43744        echo "get $FTPPATH $tmpfile"              ; \
43745    ) | ftp -in $FTPSERVER
43746  fi
43747  if test "x$VALID_TOOL" != xyes; then
43748    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43749  fi
43750
43751    mv $tmpfile $installdir/$filename
43752    if test ! -s $installdir/$filename; then
43753      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43754    fi
43755    case "$extension" in
43756      zip)  echo "Unzipping $installdir/$filename..."
43757        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43758        ;;
43759      tar.gz) echo "Untaring $installdir/$filename..."
43760        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43761        ;;
43762      tgz) echo "Untaring $installdir/$filename..."
43763        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43764        ;;
43765      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43766        ;;
43767    esac
43768  fi
43769  if test -f $installdir/$filename.unpacked; then
43770    depdir=$installdir
43771  fi
43772
43773      fi
43774      # Source the builddeps file again, because in the previous command, the depdir
43775      # was updated to point at the current build dependency install directory.
43776      . $builddepsfile
43777      # Now extract variables from the builddeps.conf files.
43778      theroot=${builddep_freetype2_ROOT}
43779      thecflags=${builddep_freetype2_CFLAGS}
43780      thelibs=${builddep_freetype2_LIBS}
43781      if test "x$depdir" = x; then
43782        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
43783      fi
43784      FREETYPE=$depdir
43785      if test "x$theroot" != x; then
43786        FREETYPE="$theroot"
43787      fi
43788      if test "x$thecflags" != x; then
43789        FREETYPE_CFLAGS="$thecflags"
43790      fi
43791      if test "x$thelibs" != x; then
43792        FREETYPE_LIBS="$thelibs"
43793      fi
43794      FOUND_FREETYPE=yes
43795      else FOUND_FREETYPE=no
43796
43797    fi
43798    else FOUND_FREETYPE=no
43799
43800  fi
43801
43802        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
43803        if test "x$FOUND_FREETYPE" = xyes; then
43804          if test "x$BUNDLE_FREETYPE" = xyes; then
43805            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
43806$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
43807            FOUND_FREETYPE=no
43808          else
43809            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
43810$as_echo_n "checking for freetype... " >&6; }
43811            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
43812$as_echo "yes (using builddeps)" >&6; }
43813          fi
43814        fi
43815      fi
43816
43817      if test "x$FOUND_FREETYPE" != xyes; then
43818        # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
43819        if test "x$PKG_CONFIG" != x; then
43820
43821pkg_failed=no
43822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
43823$as_echo_n "checking for FREETYPE... " >&6; }
43824
43825if test -n "$FREETYPE_CFLAGS"; then
43826    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
43827 elif test -n "$PKG_CONFIG"; then
43828    if test -n "$PKG_CONFIG" && \
43829    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43830  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43831  ac_status=$?
43832  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43833  test $ac_status = 0; }; then
43834  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
43835else
43836  pkg_failed=yes
43837fi
43838 else
43839    pkg_failed=untried
43840fi
43841if test -n "$FREETYPE_LIBS"; then
43842    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
43843 elif test -n "$PKG_CONFIG"; then
43844    if test -n "$PKG_CONFIG" && \
43845    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43846  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43847  ac_status=$?
43848  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43849  test $ac_status = 0; }; then
43850  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
43851else
43852  pkg_failed=yes
43853fi
43854 else
43855    pkg_failed=untried
43856fi
43857
43858
43859
43860if test $pkg_failed = yes; then
43861
43862if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
43863        _pkg_short_errors_supported=yes
43864else
43865        _pkg_short_errors_supported=no
43866fi
43867        if test $_pkg_short_errors_supported = yes; then
43868	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
43869        else
43870	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
43871        fi
43872	# Put the nasty error message in config.log where it belongs
43873	echo "$FREETYPE_PKG_ERRORS" >&5
43874
43875	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43876$as_echo "no" >&6; }
43877                FOUND_FREETYPE=no
43878elif test $pkg_failed = untried; then
43879	FOUND_FREETYPE=no
43880else
43881	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
43882	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
43883        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43884$as_echo "yes" >&6; }
43885	FOUND_FREETYPE=yes
43886fi
43887          if test "x$FOUND_FREETYPE" = xyes; then
43888            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
43889            FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
43890            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
43891            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
43892              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
43893            fi
43894            # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
43895            if test "x$BUNDLE_FREETYPE" = xyes; then
43896              { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
43897$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
43898              FOUND_FREETYPE=no
43899            else
43900              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
43901$as_echo_n "checking for freetype... " >&6; }
43902              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
43903$as_echo "yes (using pkg-config)" >&6; }
43904            fi
43905          fi
43906        fi
43907      fi
43908
43909      if test "x$FOUND_FREETYPE" != xyes; then
43910        # Check in well-known locations
43911        if test "x$OPENJDK_TARGET_OS" = xwindows; then
43912          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
43913
43914  windows_path="$FREETYPE_BASE_DIR"
43915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43916    unix_path=`$CYGPATH -u "$windows_path"`
43917    FREETYPE_BASE_DIR="$unix_path"
43918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43920    FREETYPE_BASE_DIR="$unix_path"
43921  fi
43922
43923
43924  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
43925  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
43926  METHOD="well-known location"
43927
43928  # First check if the files exists.
43929  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43930    # We found an arbitrary include file. That's a good sign.
43931    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43932$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43933    FOUND_FREETYPE=yes
43934
43935    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43936    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43937      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43938$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43939      FOUND_FREETYPE=no
43940    else
43941      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43942        # On Windows, we will need both .lib and .dll file.
43943        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43944          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43945$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43946          FOUND_FREETYPE=no
43947        fi
43948      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
43949        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43950        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43951      fi
43952    fi
43953  fi
43954
43955  if test "x$FOUND_FREETYPE" = xyes; then
43956
43957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43958
43959  # Input might be given as Windows format, start by converting to
43960  # unix format.
43961  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43962  new_path=`$CYGPATH -u "$path"`
43963
43964  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43965  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43966  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43967  # "foo.exe" is OK but "foo" is an error.
43968  #
43969  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43970  # It is also a way to make sure we got the proper file name for the real test later on.
43971  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43972  if test "x$test_shortpath" = x; then
43973    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43974$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43975    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43976  fi
43977
43978  # Call helper function which possibly converts this using DOS-style short mode.
43979  # If so, the updated path is stored in $new_path.
43980
43981  input_path="$new_path"
43982  # Check if we need to convert this using DOS-style short mode. If the path
43983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43984  # take no chances and rewrite it.
43985  # Note: m4 eats our [], so we need to use [ and ] instead.
43986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43987  if test "x$has_forbidden_chars" != x; then
43988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43989    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43990    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43991    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43992      # Going to short mode and back again did indeed matter. Since short mode is
43993      # case insensitive, let's make it lowercase to improve readability.
43994      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43995      # Now convert it back to Unix-stile (cygpath)
43996      input_path=`$CYGPATH -u "$shortmode_path"`
43997      new_path="$input_path"
43998    fi
43999  fi
44000
44001  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44002  if test "x$test_cygdrive_prefix" = x; then
44003    # As a simple fix, exclude /usr/bin since it's not a real path.
44004    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44005      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44006      # a path prefixed by /cygdrive for fixpath to work.
44007      new_path="$CYGWIN_ROOT_PATH$input_path"
44008    fi
44009  fi
44010
44011
44012  if test "x$path" != "x$new_path"; then
44013    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44014    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44015$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44016  fi
44017
44018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44019
44020  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44021  has_colon=`$ECHO $path | $GREP ^.:`
44022  new_path="$path"
44023  if test "x$has_colon" = x; then
44024    # Not in mixed or Windows style, start by that.
44025    new_path=`cmd //c echo $path`
44026  fi
44027
44028
44029  input_path="$new_path"
44030  # Check if we need to convert this using DOS-style short mode. If the path
44031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44032  # take no chances and rewrite it.
44033  # Note: m4 eats our [], so we need to use [ and ] instead.
44034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44035  if test "x$has_forbidden_chars" != x; then
44036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44037    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44038  fi
44039
44040
44041  windows_path="$new_path"
44042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44043    unix_path=`$CYGPATH -u "$windows_path"`
44044    new_path="$unix_path"
44045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44047    new_path="$unix_path"
44048  fi
44049
44050  if test "x$path" != "x$new_path"; then
44051    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44052    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44053$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44054  fi
44055
44056  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44057  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44058
44059  else
44060    # We're on a posix platform. Hooray! :)
44061    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44062    has_space=`$ECHO "$path" | $GREP " "`
44063    if test "x$has_space" != x; then
44064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44065$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44066      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44067    fi
44068
44069    # Use eval to expand a potential ~
44070    eval path="$path"
44071    if test ! -f "$path" && test ! -d "$path"; then
44072      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44073    fi
44074
44075    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44076  fi
44077
44078
44079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44080
44081  # Input might be given as Windows format, start by converting to
44082  # unix format.
44083  path="$POTENTIAL_FREETYPE_LIB_PATH"
44084  new_path=`$CYGPATH -u "$path"`
44085
44086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44089  # "foo.exe" is OK but "foo" is an error.
44090  #
44091  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44092  # It is also a way to make sure we got the proper file name for the real test later on.
44093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44094  if test "x$test_shortpath" = x; then
44095    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44096$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44097    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44098  fi
44099
44100  # Call helper function which possibly converts this using DOS-style short mode.
44101  # If so, the updated path is stored in $new_path.
44102
44103  input_path="$new_path"
44104  # Check if we need to convert this using DOS-style short mode. If the path
44105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44106  # take no chances and rewrite it.
44107  # Note: m4 eats our [], so we need to use [ and ] instead.
44108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44109  if test "x$has_forbidden_chars" != x; then
44110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44114      # Going to short mode and back again did indeed matter. Since short mode is
44115      # case insensitive, let's make it lowercase to improve readability.
44116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44117      # Now convert it back to Unix-stile (cygpath)
44118      input_path=`$CYGPATH -u "$shortmode_path"`
44119      new_path="$input_path"
44120    fi
44121  fi
44122
44123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44124  if test "x$test_cygdrive_prefix" = x; then
44125    # As a simple fix, exclude /usr/bin since it's not a real path.
44126    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44128      # a path prefixed by /cygdrive for fixpath to work.
44129      new_path="$CYGWIN_ROOT_PATH$input_path"
44130    fi
44131  fi
44132
44133
44134  if test "x$path" != "x$new_path"; then
44135    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44137$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44138  fi
44139
44140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44141
44142  path="$POTENTIAL_FREETYPE_LIB_PATH"
44143  has_colon=`$ECHO $path | $GREP ^.:`
44144  new_path="$path"
44145  if test "x$has_colon" = x; then
44146    # Not in mixed or Windows style, start by that.
44147    new_path=`cmd //c echo $path`
44148  fi
44149
44150
44151  input_path="$new_path"
44152  # Check if we need to convert this using DOS-style short mode. If the path
44153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44154  # take no chances and rewrite it.
44155  # Note: m4 eats our [], so we need to use [ and ] instead.
44156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44157  if test "x$has_forbidden_chars" != x; then
44158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44160  fi
44161
44162
44163  windows_path="$new_path"
44164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44165    unix_path=`$CYGPATH -u "$windows_path"`
44166    new_path="$unix_path"
44167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44169    new_path="$unix_path"
44170  fi
44171
44172  if test "x$path" != "x$new_path"; then
44173    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44175$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44176  fi
44177
44178  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44179  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44180
44181  else
44182    # We're on a posix platform. Hooray! :)
44183    path="$POTENTIAL_FREETYPE_LIB_PATH"
44184    has_space=`$ECHO "$path" | $GREP " "`
44185    if test "x$has_space" != x; then
44186      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44187$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44188      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44189    fi
44190
44191    # Use eval to expand a potential ~
44192    eval path="$path"
44193    if test ! -f "$path" && test ! -d "$path"; then
44194      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44195    fi
44196
44197    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44198  fi
44199
44200
44201    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44202    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44203$as_echo_n "checking for freetype includes... " >&6; }
44204    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44205$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44206    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44207    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44208$as_echo_n "checking for freetype libraries... " >&6; }
44209    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44210$as_echo "$FREETYPE_LIB_PATH" >&6; }
44211  fi
44212
44213          if test "x$FOUND_FREETYPE" != xyes; then
44214            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
44215
44216  windows_path="$FREETYPE_BASE_DIR"
44217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44218    unix_path=`$CYGPATH -u "$windows_path"`
44219    FREETYPE_BASE_DIR="$unix_path"
44220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44222    FREETYPE_BASE_DIR="$unix_path"
44223  fi
44224
44225
44226  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44227  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44228  METHOD="well-known location"
44229
44230  # First check if the files exists.
44231  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44232    # We found an arbitrary include file. That's a good sign.
44233    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44234$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44235    FOUND_FREETYPE=yes
44236
44237    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44238    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44239      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44240$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44241      FOUND_FREETYPE=no
44242    else
44243      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44244        # On Windows, we will need both .lib and .dll file.
44245        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44246          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44247$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44248          FOUND_FREETYPE=no
44249        fi
44250      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
44251        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44252        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44253      fi
44254    fi
44255  fi
44256
44257  if test "x$FOUND_FREETYPE" = xyes; then
44258
44259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44260
44261  # Input might be given as Windows format, start by converting to
44262  # unix format.
44263  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44264  new_path=`$CYGPATH -u "$path"`
44265
44266  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44267  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44268  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44269  # "foo.exe" is OK but "foo" is an error.
44270  #
44271  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44272  # It is also a way to make sure we got the proper file name for the real test later on.
44273  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44274  if test "x$test_shortpath" = x; then
44275    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44276$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44277    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44278  fi
44279
44280  # Call helper function which possibly converts this using DOS-style short mode.
44281  # If so, the updated path is stored in $new_path.
44282
44283  input_path="$new_path"
44284  # Check if we need to convert this using DOS-style short mode. If the path
44285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44286  # take no chances and rewrite it.
44287  # Note: m4 eats our [], so we need to use [ and ] instead.
44288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44289  if test "x$has_forbidden_chars" != x; then
44290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44291    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44292    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44293    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44294      # Going to short mode and back again did indeed matter. Since short mode is
44295      # case insensitive, let's make it lowercase to improve readability.
44296      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44297      # Now convert it back to Unix-stile (cygpath)
44298      input_path=`$CYGPATH -u "$shortmode_path"`
44299      new_path="$input_path"
44300    fi
44301  fi
44302
44303  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44304  if test "x$test_cygdrive_prefix" = x; then
44305    # As a simple fix, exclude /usr/bin since it's not a real path.
44306    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44307      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44308      # a path prefixed by /cygdrive for fixpath to work.
44309      new_path="$CYGWIN_ROOT_PATH$input_path"
44310    fi
44311  fi
44312
44313
44314  if test "x$path" != "x$new_path"; then
44315    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44316    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44317$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44318  fi
44319
44320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44321
44322  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44323  has_colon=`$ECHO $path | $GREP ^.:`
44324  new_path="$path"
44325  if test "x$has_colon" = x; then
44326    # Not in mixed or Windows style, start by that.
44327    new_path=`cmd //c echo $path`
44328  fi
44329
44330
44331  input_path="$new_path"
44332  # Check if we need to convert this using DOS-style short mode. If the path
44333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44334  # take no chances and rewrite it.
44335  # Note: m4 eats our [], so we need to use [ and ] instead.
44336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44337  if test "x$has_forbidden_chars" != x; then
44338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44339    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44340  fi
44341
44342
44343  windows_path="$new_path"
44344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44345    unix_path=`$CYGPATH -u "$windows_path"`
44346    new_path="$unix_path"
44347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44349    new_path="$unix_path"
44350  fi
44351
44352  if test "x$path" != "x$new_path"; then
44353    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44354    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44355$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44356  fi
44357
44358  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44359  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44360
44361  else
44362    # We're on a posix platform. Hooray! :)
44363    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44364    has_space=`$ECHO "$path" | $GREP " "`
44365    if test "x$has_space" != x; then
44366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44367$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44368      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44369    fi
44370
44371    # Use eval to expand a potential ~
44372    eval path="$path"
44373    if test ! -f "$path" && test ! -d "$path"; then
44374      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44375    fi
44376
44377    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44378  fi
44379
44380
44381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44382
44383  # Input might be given as Windows format, start by converting to
44384  # unix format.
44385  path="$POTENTIAL_FREETYPE_LIB_PATH"
44386  new_path=`$CYGPATH -u "$path"`
44387
44388  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44389  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44390  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44391  # "foo.exe" is OK but "foo" is an error.
44392  #
44393  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44394  # It is also a way to make sure we got the proper file name for the real test later on.
44395  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44396  if test "x$test_shortpath" = x; then
44397    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44398$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44399    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44400  fi
44401
44402  # Call helper function which possibly converts this using DOS-style short mode.
44403  # If so, the updated path is stored in $new_path.
44404
44405  input_path="$new_path"
44406  # Check if we need to convert this using DOS-style short mode. If the path
44407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44408  # take no chances and rewrite it.
44409  # Note: m4 eats our [], so we need to use [ and ] instead.
44410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44411  if test "x$has_forbidden_chars" != x; then
44412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44413    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44414    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44415    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44416      # Going to short mode and back again did indeed matter. Since short mode is
44417      # case insensitive, let's make it lowercase to improve readability.
44418      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44419      # Now convert it back to Unix-stile (cygpath)
44420      input_path=`$CYGPATH -u "$shortmode_path"`
44421      new_path="$input_path"
44422    fi
44423  fi
44424
44425  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44426  if test "x$test_cygdrive_prefix" = x; then
44427    # As a simple fix, exclude /usr/bin since it's not a real path.
44428    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44429      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44430      # a path prefixed by /cygdrive for fixpath to work.
44431      new_path="$CYGWIN_ROOT_PATH$input_path"
44432    fi
44433  fi
44434
44435
44436  if test "x$path" != "x$new_path"; then
44437    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44439$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44440  fi
44441
44442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44443
44444  path="$POTENTIAL_FREETYPE_LIB_PATH"
44445  has_colon=`$ECHO $path | $GREP ^.:`
44446  new_path="$path"
44447  if test "x$has_colon" = x; then
44448    # Not in mixed or Windows style, start by that.
44449    new_path=`cmd //c echo $path`
44450  fi
44451
44452
44453  input_path="$new_path"
44454  # Check if we need to convert this using DOS-style short mode. If the path
44455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44456  # take no chances and rewrite it.
44457  # Note: m4 eats our [], so we need to use [ and ] instead.
44458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44459  if test "x$has_forbidden_chars" != x; then
44460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44461    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44462  fi
44463
44464
44465  windows_path="$new_path"
44466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44467    unix_path=`$CYGPATH -u "$windows_path"`
44468    new_path="$unix_path"
44469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44471    new_path="$unix_path"
44472  fi
44473
44474  if test "x$path" != "x$new_path"; then
44475    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44476    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44477$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44478  fi
44479
44480  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44481  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44482
44483  else
44484    # We're on a posix platform. Hooray! :)
44485    path="$POTENTIAL_FREETYPE_LIB_PATH"
44486    has_space=`$ECHO "$path" | $GREP " "`
44487    if test "x$has_space" != x; then
44488      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44489$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44490      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44491    fi
44492
44493    # Use eval to expand a potential ~
44494    eval path="$path"
44495    if test ! -f "$path" && test ! -d "$path"; then
44496      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44497    fi
44498
44499    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44500  fi
44501
44502
44503    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44504    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44505$as_echo_n "checking for freetype includes... " >&6; }
44506    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44507$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44508    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44509    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44510$as_echo_n "checking for freetype libraries... " >&6; }
44511    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44512$as_echo "$FREETYPE_LIB_PATH" >&6; }
44513  fi
44514
44515          fi
44516        else
44517          if test "x$SYS_ROOT" = "x/"; then
44518            FREETYPE_ROOT=
44519          else
44520            FREETYPE_ROOT="$SYS_ROOT"
44521          fi
44522          FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
44523
44524  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44525  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44526  METHOD="well-known location"
44527
44528  # First check if the files exists.
44529  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44530    # We found an arbitrary include file. That's a good sign.
44531    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44532$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44533    FOUND_FREETYPE=yes
44534
44535    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44536    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44537      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44538$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44539      FOUND_FREETYPE=no
44540    else
44541      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44542        # On Windows, we will need both .lib and .dll file.
44543        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44544          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44545$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44546          FOUND_FREETYPE=no
44547        fi
44548      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
44549        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44550        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44551      fi
44552    fi
44553  fi
44554
44555  if test "x$FOUND_FREETYPE" = xyes; then
44556
44557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44558
44559  # Input might be given as Windows format, start by converting to
44560  # unix format.
44561  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44562  new_path=`$CYGPATH -u "$path"`
44563
44564  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44565  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44566  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44567  # "foo.exe" is OK but "foo" is an error.
44568  #
44569  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44570  # It is also a way to make sure we got the proper file name for the real test later on.
44571  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44572  if test "x$test_shortpath" = x; then
44573    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44574$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44575    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44576  fi
44577
44578  # Call helper function which possibly converts this using DOS-style short mode.
44579  # If so, the updated path is stored in $new_path.
44580
44581  input_path="$new_path"
44582  # Check if we need to convert this using DOS-style short mode. If the path
44583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44584  # take no chances and rewrite it.
44585  # Note: m4 eats our [], so we need to use [ and ] instead.
44586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44587  if test "x$has_forbidden_chars" != x; then
44588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44589    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44590    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44591    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44592      # Going to short mode and back again did indeed matter. Since short mode is
44593      # case insensitive, let's make it lowercase to improve readability.
44594      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44595      # Now convert it back to Unix-stile (cygpath)
44596      input_path=`$CYGPATH -u "$shortmode_path"`
44597      new_path="$input_path"
44598    fi
44599  fi
44600
44601  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44602  if test "x$test_cygdrive_prefix" = x; then
44603    # As a simple fix, exclude /usr/bin since it's not a real path.
44604    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44605      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44606      # a path prefixed by /cygdrive for fixpath to work.
44607      new_path="$CYGWIN_ROOT_PATH$input_path"
44608    fi
44609  fi
44610
44611
44612  if test "x$path" != "x$new_path"; then
44613    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44614    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44615$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44616  fi
44617
44618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44619
44620  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44621  has_colon=`$ECHO $path | $GREP ^.:`
44622  new_path="$path"
44623  if test "x$has_colon" = x; then
44624    # Not in mixed or Windows style, start by that.
44625    new_path=`cmd //c echo $path`
44626  fi
44627
44628
44629  input_path="$new_path"
44630  # Check if we need to convert this using DOS-style short mode. If the path
44631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44632  # take no chances and rewrite it.
44633  # Note: m4 eats our [], so we need to use [ and ] instead.
44634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44635  if test "x$has_forbidden_chars" != x; then
44636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44637    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44638  fi
44639
44640
44641  windows_path="$new_path"
44642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44643    unix_path=`$CYGPATH -u "$windows_path"`
44644    new_path="$unix_path"
44645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44647    new_path="$unix_path"
44648  fi
44649
44650  if test "x$path" != "x$new_path"; then
44651    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44653$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44654  fi
44655
44656  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44657  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44658
44659  else
44660    # We're on a posix platform. Hooray! :)
44661    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44662    has_space=`$ECHO "$path" | $GREP " "`
44663    if test "x$has_space" != x; then
44664      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44665$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44666      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44667    fi
44668
44669    # Use eval to expand a potential ~
44670    eval path="$path"
44671    if test ! -f "$path" && test ! -d "$path"; then
44672      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44673    fi
44674
44675    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44676  fi
44677
44678
44679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44680
44681  # Input might be given as Windows format, start by converting to
44682  # unix format.
44683  path="$POTENTIAL_FREETYPE_LIB_PATH"
44684  new_path=`$CYGPATH -u "$path"`
44685
44686  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44687  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44688  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44689  # "foo.exe" is OK but "foo" is an error.
44690  #
44691  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44692  # It is also a way to make sure we got the proper file name for the real test later on.
44693  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44694  if test "x$test_shortpath" = x; then
44695    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44696$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44697    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44698  fi
44699
44700  # Call helper function which possibly converts this using DOS-style short mode.
44701  # If so, the updated path is stored in $new_path.
44702
44703  input_path="$new_path"
44704  # Check if we need to convert this using DOS-style short mode. If the path
44705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44706  # take no chances and rewrite it.
44707  # Note: m4 eats our [], so we need to use [ and ] instead.
44708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44709  if test "x$has_forbidden_chars" != x; then
44710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44711    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44712    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44713    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44714      # Going to short mode and back again did indeed matter. Since short mode is
44715      # case insensitive, let's make it lowercase to improve readability.
44716      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44717      # Now convert it back to Unix-stile (cygpath)
44718      input_path=`$CYGPATH -u "$shortmode_path"`
44719      new_path="$input_path"
44720    fi
44721  fi
44722
44723  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44724  if test "x$test_cygdrive_prefix" = x; then
44725    # As a simple fix, exclude /usr/bin since it's not a real path.
44726    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44727      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44728      # a path prefixed by /cygdrive for fixpath to work.
44729      new_path="$CYGWIN_ROOT_PATH$input_path"
44730    fi
44731  fi
44732
44733
44734  if test "x$path" != "x$new_path"; then
44735    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44737$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44738  fi
44739
44740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44741
44742  path="$POTENTIAL_FREETYPE_LIB_PATH"
44743  has_colon=`$ECHO $path | $GREP ^.:`
44744  new_path="$path"
44745  if test "x$has_colon" = x; then
44746    # Not in mixed or Windows style, start by that.
44747    new_path=`cmd //c echo $path`
44748  fi
44749
44750
44751  input_path="$new_path"
44752  # Check if we need to convert this using DOS-style short mode. If the path
44753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44754  # take no chances and rewrite it.
44755  # Note: m4 eats our [], so we need to use [ and ] instead.
44756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44757  if test "x$has_forbidden_chars" != x; then
44758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44759    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44760  fi
44761
44762
44763  windows_path="$new_path"
44764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44765    unix_path=`$CYGPATH -u "$windows_path"`
44766    new_path="$unix_path"
44767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44769    new_path="$unix_path"
44770  fi
44771
44772  if test "x$path" != "x$new_path"; then
44773    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44775$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44776  fi
44777
44778  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44779  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44780
44781  else
44782    # We're on a posix platform. Hooray! :)
44783    path="$POTENTIAL_FREETYPE_LIB_PATH"
44784    has_space=`$ECHO "$path" | $GREP " "`
44785    if test "x$has_space" != x; then
44786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44787$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44788      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44789    fi
44790
44791    # Use eval to expand a potential ~
44792    eval path="$path"
44793    if test ! -f "$path" && test ! -d "$path"; then
44794      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44795    fi
44796
44797    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44798  fi
44799
44800
44801    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44802    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44803$as_echo_n "checking for freetype includes... " >&6; }
44804    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44805$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44806    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44807    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44808$as_echo_n "checking for freetype libraries... " >&6; }
44809    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44810$as_echo "$FREETYPE_LIB_PATH" >&6; }
44811  fi
44812
44813
44814          if test "x$FOUND_FREETYPE" != xyes; then
44815            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
44816
44817  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44818  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44819  METHOD="well-known location"
44820
44821  # First check if the files exists.
44822  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44823    # We found an arbitrary include file. That's a good sign.
44824    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44825$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44826    FOUND_FREETYPE=yes
44827
44828    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44829    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44830      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44831$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44832      FOUND_FREETYPE=no
44833    else
44834      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44835        # On Windows, we will need both .lib and .dll file.
44836        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44837          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44838$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44839          FOUND_FREETYPE=no
44840        fi
44841      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
44842        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44843        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44844      fi
44845    fi
44846  fi
44847
44848  if test "x$FOUND_FREETYPE" = xyes; then
44849
44850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44851
44852  # Input might be given as Windows format, start by converting to
44853  # unix format.
44854  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44855  new_path=`$CYGPATH -u "$path"`
44856
44857  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44858  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44859  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44860  # "foo.exe" is OK but "foo" is an error.
44861  #
44862  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44863  # It is also a way to make sure we got the proper file name for the real test later on.
44864  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44865  if test "x$test_shortpath" = x; then
44866    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44867$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44868    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44869  fi
44870
44871  # Call helper function which possibly converts this using DOS-style short mode.
44872  # If so, the updated path is stored in $new_path.
44873
44874  input_path="$new_path"
44875  # Check if we need to convert this using DOS-style short mode. If the path
44876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44877  # take no chances and rewrite it.
44878  # Note: m4 eats our [], so we need to use [ and ] instead.
44879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44880  if test "x$has_forbidden_chars" != x; then
44881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44882    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44883    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44884    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44885      # Going to short mode and back again did indeed matter. Since short mode is
44886      # case insensitive, let's make it lowercase to improve readability.
44887      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44888      # Now convert it back to Unix-stile (cygpath)
44889      input_path=`$CYGPATH -u "$shortmode_path"`
44890      new_path="$input_path"
44891    fi
44892  fi
44893
44894  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44895  if test "x$test_cygdrive_prefix" = x; then
44896    # As a simple fix, exclude /usr/bin since it's not a real path.
44897    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44898      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44899      # a path prefixed by /cygdrive for fixpath to work.
44900      new_path="$CYGWIN_ROOT_PATH$input_path"
44901    fi
44902  fi
44903
44904
44905  if test "x$path" != "x$new_path"; then
44906    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44907    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44908$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44909  fi
44910
44911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44912
44913  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44914  has_colon=`$ECHO $path | $GREP ^.:`
44915  new_path="$path"
44916  if test "x$has_colon" = x; then
44917    # Not in mixed or Windows style, start by that.
44918    new_path=`cmd //c echo $path`
44919  fi
44920
44921
44922  input_path="$new_path"
44923  # Check if we need to convert this using DOS-style short mode. If the path
44924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44925  # take no chances and rewrite it.
44926  # Note: m4 eats our [], so we need to use [ and ] instead.
44927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44928  if test "x$has_forbidden_chars" != x; then
44929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44931  fi
44932
44933
44934  windows_path="$new_path"
44935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44936    unix_path=`$CYGPATH -u "$windows_path"`
44937    new_path="$unix_path"
44938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44940    new_path="$unix_path"
44941  fi
44942
44943  if test "x$path" != "x$new_path"; then
44944    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44946$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44947  fi
44948
44949  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44950  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44951
44952  else
44953    # We're on a posix platform. Hooray! :)
44954    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44955    has_space=`$ECHO "$path" | $GREP " "`
44956    if test "x$has_space" != x; then
44957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44958$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44959      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44960    fi
44961
44962    # Use eval to expand a potential ~
44963    eval path="$path"
44964    if test ! -f "$path" && test ! -d "$path"; then
44965      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44966    fi
44967
44968    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44969  fi
44970
44971
44972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44973
44974  # Input might be given as Windows format, start by converting to
44975  # unix format.
44976  path="$POTENTIAL_FREETYPE_LIB_PATH"
44977  new_path=`$CYGPATH -u "$path"`
44978
44979  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44980  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44981  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44982  # "foo.exe" is OK but "foo" is an error.
44983  #
44984  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44985  # It is also a way to make sure we got the proper file name for the real test later on.
44986  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44987  if test "x$test_shortpath" = x; then
44988    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44989$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44990    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44991  fi
44992
44993  # Call helper function which possibly converts this using DOS-style short mode.
44994  # If so, the updated path is stored in $new_path.
44995
44996  input_path="$new_path"
44997  # Check if we need to convert this using DOS-style short mode. If the path
44998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44999  # take no chances and rewrite it.
45000  # Note: m4 eats our [], so we need to use [ and ] instead.
45001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45002  if test "x$has_forbidden_chars" != x; then
45003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45004    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45005    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45006    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45007      # Going to short mode and back again did indeed matter. Since short mode is
45008      # case insensitive, let's make it lowercase to improve readability.
45009      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45010      # Now convert it back to Unix-stile (cygpath)
45011      input_path=`$CYGPATH -u "$shortmode_path"`
45012      new_path="$input_path"
45013    fi
45014  fi
45015
45016  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45017  if test "x$test_cygdrive_prefix" = x; then
45018    # As a simple fix, exclude /usr/bin since it's not a real path.
45019    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45020      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45021      # a path prefixed by /cygdrive for fixpath to work.
45022      new_path="$CYGWIN_ROOT_PATH$input_path"
45023    fi
45024  fi
45025
45026
45027  if test "x$path" != "x$new_path"; then
45028    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45030$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45031  fi
45032
45033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45034
45035  path="$POTENTIAL_FREETYPE_LIB_PATH"
45036  has_colon=`$ECHO $path | $GREP ^.:`
45037  new_path="$path"
45038  if test "x$has_colon" = x; then
45039    # Not in mixed or Windows style, start by that.
45040    new_path=`cmd //c echo $path`
45041  fi
45042
45043
45044  input_path="$new_path"
45045  # Check if we need to convert this using DOS-style short mode. If the path
45046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45047  # take no chances and rewrite it.
45048  # Note: m4 eats our [], so we need to use [ and ] instead.
45049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45050  if test "x$has_forbidden_chars" != x; then
45051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45052    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45053  fi
45054
45055
45056  windows_path="$new_path"
45057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45058    unix_path=`$CYGPATH -u "$windows_path"`
45059    new_path="$unix_path"
45060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45062    new_path="$unix_path"
45063  fi
45064
45065  if test "x$path" != "x$new_path"; then
45066    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45068$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45069  fi
45070
45071  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45072  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45073
45074  else
45075    # We're on a posix platform. Hooray! :)
45076    path="$POTENTIAL_FREETYPE_LIB_PATH"
45077    has_space=`$ECHO "$path" | $GREP " "`
45078    if test "x$has_space" != x; then
45079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45080$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45081      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45082    fi
45083
45084    # Use eval to expand a potential ~
45085    eval path="$path"
45086    if test ! -f "$path" && test ! -d "$path"; then
45087      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45088    fi
45089
45090    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45091  fi
45092
45093
45094    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45095    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45096$as_echo_n "checking for freetype includes... " >&6; }
45097    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45098$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45099    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45100    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45101$as_echo_n "checking for freetype libraries... " >&6; }
45102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45103$as_echo "$FREETYPE_LIB_PATH" >&6; }
45104  fi
45105
45106          fi
45107
45108          if test "x$FOUND_FREETYPE" != xyes; then
45109            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
45110            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45111
45112  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45113  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
45114  METHOD="well-known location"
45115
45116  # First check if the files exists.
45117  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45118    # We found an arbitrary include file. That's a good sign.
45119    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45120$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45121    FOUND_FREETYPE=yes
45122
45123    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45124    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45125      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45126$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45127      FOUND_FREETYPE=no
45128    else
45129      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45130        # On Windows, we will need both .lib and .dll file.
45131        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45132          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45133$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45134          FOUND_FREETYPE=no
45135        fi
45136      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
45137        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45138        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45139      fi
45140    fi
45141  fi
45142
45143  if test "x$FOUND_FREETYPE" = xyes; then
45144
45145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45146
45147  # Input might be given as Windows format, start by converting to
45148  # unix format.
45149  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45150  new_path=`$CYGPATH -u "$path"`
45151
45152  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45153  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45154  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45155  # "foo.exe" is OK but "foo" is an error.
45156  #
45157  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45158  # It is also a way to make sure we got the proper file name for the real test later on.
45159  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45160  if test "x$test_shortpath" = x; then
45161    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45162$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45163    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45164  fi
45165
45166  # Call helper function which possibly converts this using DOS-style short mode.
45167  # If so, the updated path is stored in $new_path.
45168
45169  input_path="$new_path"
45170  # Check if we need to convert this using DOS-style short mode. If the path
45171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45172  # take no chances and rewrite it.
45173  # Note: m4 eats our [], so we need to use [ and ] instead.
45174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45175  if test "x$has_forbidden_chars" != x; then
45176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45177    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45178    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45179    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45180      # Going to short mode and back again did indeed matter. Since short mode is
45181      # case insensitive, let's make it lowercase to improve readability.
45182      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45183      # Now convert it back to Unix-stile (cygpath)
45184      input_path=`$CYGPATH -u "$shortmode_path"`
45185      new_path="$input_path"
45186    fi
45187  fi
45188
45189  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45190  if test "x$test_cygdrive_prefix" = x; then
45191    # As a simple fix, exclude /usr/bin since it's not a real path.
45192    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45193      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45194      # a path prefixed by /cygdrive for fixpath to work.
45195      new_path="$CYGWIN_ROOT_PATH$input_path"
45196    fi
45197  fi
45198
45199
45200  if test "x$path" != "x$new_path"; then
45201    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45202    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45203$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45204  fi
45205
45206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45207
45208  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45209  has_colon=`$ECHO $path | $GREP ^.:`
45210  new_path="$path"
45211  if test "x$has_colon" = x; then
45212    # Not in mixed or Windows style, start by that.
45213    new_path=`cmd //c echo $path`
45214  fi
45215
45216
45217  input_path="$new_path"
45218  # Check if we need to convert this using DOS-style short mode. If the path
45219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45220  # take no chances and rewrite it.
45221  # Note: m4 eats our [], so we need to use [ and ] instead.
45222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45223  if test "x$has_forbidden_chars" != x; then
45224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45225    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45226  fi
45227
45228
45229  windows_path="$new_path"
45230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45231    unix_path=`$CYGPATH -u "$windows_path"`
45232    new_path="$unix_path"
45233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45235    new_path="$unix_path"
45236  fi
45237
45238  if test "x$path" != "x$new_path"; then
45239    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45240    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45241$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45242  fi
45243
45244  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45245  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45246
45247  else
45248    # We're on a posix platform. Hooray! :)
45249    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45250    has_space=`$ECHO "$path" | $GREP " "`
45251    if test "x$has_space" != x; then
45252      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45253$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45254      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45255    fi
45256
45257    # Use eval to expand a potential ~
45258    eval path="$path"
45259    if test ! -f "$path" && test ! -d "$path"; then
45260      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45261    fi
45262
45263    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45264  fi
45265
45266
45267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45268
45269  # Input might be given as Windows format, start by converting to
45270  # unix format.
45271  path="$POTENTIAL_FREETYPE_LIB_PATH"
45272  new_path=`$CYGPATH -u "$path"`
45273
45274  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45275  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45276  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45277  # "foo.exe" is OK but "foo" is an error.
45278  #
45279  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45280  # It is also a way to make sure we got the proper file name for the real test later on.
45281  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45282  if test "x$test_shortpath" = x; then
45283    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45284$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45285    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45286  fi
45287
45288  # Call helper function which possibly converts this using DOS-style short mode.
45289  # If so, the updated path is stored in $new_path.
45290
45291  input_path="$new_path"
45292  # Check if we need to convert this using DOS-style short mode. If the path
45293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45294  # take no chances and rewrite it.
45295  # Note: m4 eats our [], so we need to use [ and ] instead.
45296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45297  if test "x$has_forbidden_chars" != x; then
45298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45299    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45300    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45301    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45302      # Going to short mode and back again did indeed matter. Since short mode is
45303      # case insensitive, let's make it lowercase to improve readability.
45304      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45305      # Now convert it back to Unix-stile (cygpath)
45306      input_path=`$CYGPATH -u "$shortmode_path"`
45307      new_path="$input_path"
45308    fi
45309  fi
45310
45311  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45312  if test "x$test_cygdrive_prefix" = x; then
45313    # As a simple fix, exclude /usr/bin since it's not a real path.
45314    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45315      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45316      # a path prefixed by /cygdrive for fixpath to work.
45317      new_path="$CYGWIN_ROOT_PATH$input_path"
45318    fi
45319  fi
45320
45321
45322  if test "x$path" != "x$new_path"; then
45323    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45325$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45326  fi
45327
45328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45329
45330  path="$POTENTIAL_FREETYPE_LIB_PATH"
45331  has_colon=`$ECHO $path | $GREP ^.:`
45332  new_path="$path"
45333  if test "x$has_colon" = x; then
45334    # Not in mixed or Windows style, start by that.
45335    new_path=`cmd //c echo $path`
45336  fi
45337
45338
45339  input_path="$new_path"
45340  # Check if we need to convert this using DOS-style short mode. If the path
45341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45342  # take no chances and rewrite it.
45343  # Note: m4 eats our [], so we need to use [ and ] instead.
45344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45345  if test "x$has_forbidden_chars" != x; then
45346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45347    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45348  fi
45349
45350
45351  windows_path="$new_path"
45352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45353    unix_path=`$CYGPATH -u "$windows_path"`
45354    new_path="$unix_path"
45355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45357    new_path="$unix_path"
45358  fi
45359
45360  if test "x$path" != "x$new_path"; then
45361    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45363$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45364  fi
45365
45366  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45367  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45368
45369  else
45370    # We're on a posix platform. Hooray! :)
45371    path="$POTENTIAL_FREETYPE_LIB_PATH"
45372    has_space=`$ECHO "$path" | $GREP " "`
45373    if test "x$has_space" != x; then
45374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45375$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45376      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45377    fi
45378
45379    # Use eval to expand a potential ~
45380    eval path="$path"
45381    if test ! -f "$path" && test ! -d "$path"; then
45382      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45383    fi
45384
45385    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45386  fi
45387
45388
45389    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45390    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45391$as_echo_n "checking for freetype includes... " >&6; }
45392    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45393$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45394    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45395    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45396$as_echo_n "checking for freetype libraries... " >&6; }
45397    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45398$as_echo "$FREETYPE_LIB_PATH" >&6; }
45399  fi
45400
45401            else
45402
45403  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45404  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
45405  METHOD="well-known location"
45406
45407  # First check if the files exists.
45408  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45409    # We found an arbitrary include file. That's a good sign.
45410    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45411$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45412    FOUND_FREETYPE=yes
45413
45414    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45415    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45416      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45417$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45418      FOUND_FREETYPE=no
45419    else
45420      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45421        # On Windows, we will need both .lib and .dll file.
45422        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45423          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45424$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45425          FOUND_FREETYPE=no
45426        fi
45427      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
45428        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45429        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45430      fi
45431    fi
45432  fi
45433
45434  if test "x$FOUND_FREETYPE" = xyes; then
45435
45436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45437
45438  # Input might be given as Windows format, start by converting to
45439  # unix format.
45440  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45441  new_path=`$CYGPATH -u "$path"`
45442
45443  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45444  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45445  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45446  # "foo.exe" is OK but "foo" is an error.
45447  #
45448  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45449  # It is also a way to make sure we got the proper file name for the real test later on.
45450  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45451  if test "x$test_shortpath" = x; then
45452    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45453$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45454    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45455  fi
45456
45457  # Call helper function which possibly converts this using DOS-style short mode.
45458  # If so, the updated path is stored in $new_path.
45459
45460  input_path="$new_path"
45461  # Check if we need to convert this using DOS-style short mode. If the path
45462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45463  # take no chances and rewrite it.
45464  # Note: m4 eats our [], so we need to use [ and ] instead.
45465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45466  if test "x$has_forbidden_chars" != x; then
45467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45468    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45469    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45470    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45471      # Going to short mode and back again did indeed matter. Since short mode is
45472      # case insensitive, let's make it lowercase to improve readability.
45473      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45474      # Now convert it back to Unix-stile (cygpath)
45475      input_path=`$CYGPATH -u "$shortmode_path"`
45476      new_path="$input_path"
45477    fi
45478  fi
45479
45480  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45481  if test "x$test_cygdrive_prefix" = x; then
45482    # As a simple fix, exclude /usr/bin since it's not a real path.
45483    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45484      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45485      # a path prefixed by /cygdrive for fixpath to work.
45486      new_path="$CYGWIN_ROOT_PATH$input_path"
45487    fi
45488  fi
45489
45490
45491  if test "x$path" != "x$new_path"; then
45492    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45494$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45495  fi
45496
45497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45498
45499  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45500  has_colon=`$ECHO $path | $GREP ^.:`
45501  new_path="$path"
45502  if test "x$has_colon" = x; then
45503    # Not in mixed or Windows style, start by that.
45504    new_path=`cmd //c echo $path`
45505  fi
45506
45507
45508  input_path="$new_path"
45509  # Check if we need to convert this using DOS-style short mode. If the path
45510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45511  # take no chances and rewrite it.
45512  # Note: m4 eats our [], so we need to use [ and ] instead.
45513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45514  if test "x$has_forbidden_chars" != x; then
45515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45516    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45517  fi
45518
45519
45520  windows_path="$new_path"
45521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45522    unix_path=`$CYGPATH -u "$windows_path"`
45523    new_path="$unix_path"
45524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45526    new_path="$unix_path"
45527  fi
45528
45529  if test "x$path" != "x$new_path"; then
45530    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45532$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45533  fi
45534
45535  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45536  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45537
45538  else
45539    # We're on a posix platform. Hooray! :)
45540    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45541    has_space=`$ECHO "$path" | $GREP " "`
45542    if test "x$has_space" != x; then
45543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45544$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45545      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45546    fi
45547
45548    # Use eval to expand a potential ~
45549    eval path="$path"
45550    if test ! -f "$path" && test ! -d "$path"; then
45551      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45552    fi
45553
45554    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45555  fi
45556
45557
45558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45559
45560  # Input might be given as Windows format, start by converting to
45561  # unix format.
45562  path="$POTENTIAL_FREETYPE_LIB_PATH"
45563  new_path=`$CYGPATH -u "$path"`
45564
45565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45568  # "foo.exe" is OK but "foo" is an error.
45569  #
45570  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45571  # It is also a way to make sure we got the proper file name for the real test later on.
45572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45573  if test "x$test_shortpath" = x; then
45574    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45575$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45576    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45577  fi
45578
45579  # Call helper function which possibly converts this using DOS-style short mode.
45580  # If so, the updated path is stored in $new_path.
45581
45582  input_path="$new_path"
45583  # Check if we need to convert this using DOS-style short mode. If the path
45584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45585  # take no chances and rewrite it.
45586  # Note: m4 eats our [], so we need to use [ and ] instead.
45587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45588  if test "x$has_forbidden_chars" != x; then
45589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45593      # Going to short mode and back again did indeed matter. Since short mode is
45594      # case insensitive, let's make it lowercase to improve readability.
45595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45596      # Now convert it back to Unix-stile (cygpath)
45597      input_path=`$CYGPATH -u "$shortmode_path"`
45598      new_path="$input_path"
45599    fi
45600  fi
45601
45602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45603  if test "x$test_cygdrive_prefix" = x; then
45604    # As a simple fix, exclude /usr/bin since it's not a real path.
45605    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45607      # a path prefixed by /cygdrive for fixpath to work.
45608      new_path="$CYGWIN_ROOT_PATH$input_path"
45609    fi
45610  fi
45611
45612
45613  if test "x$path" != "x$new_path"; then
45614    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45616$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45617  fi
45618
45619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45620
45621  path="$POTENTIAL_FREETYPE_LIB_PATH"
45622  has_colon=`$ECHO $path | $GREP ^.:`
45623  new_path="$path"
45624  if test "x$has_colon" = x; then
45625    # Not in mixed or Windows style, start by that.
45626    new_path=`cmd //c echo $path`
45627  fi
45628
45629
45630  input_path="$new_path"
45631  # Check if we need to convert this using DOS-style short mode. If the path
45632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45633  # take no chances and rewrite it.
45634  # Note: m4 eats our [], so we need to use [ and ] instead.
45635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45636  if test "x$has_forbidden_chars" != x; then
45637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45639  fi
45640
45641
45642  windows_path="$new_path"
45643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45644    unix_path=`$CYGPATH -u "$windows_path"`
45645    new_path="$unix_path"
45646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45648    new_path="$unix_path"
45649  fi
45650
45651  if test "x$path" != "x$new_path"; then
45652    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45654$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45655  fi
45656
45657  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45658  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45659
45660  else
45661    # We're on a posix platform. Hooray! :)
45662    path="$POTENTIAL_FREETYPE_LIB_PATH"
45663    has_space=`$ECHO "$path" | $GREP " "`
45664    if test "x$has_space" != x; then
45665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45666$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45667      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45668    fi
45669
45670    # Use eval to expand a potential ~
45671    eval path="$path"
45672    if test ! -f "$path" && test ! -d "$path"; then
45673      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45674    fi
45675
45676    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45677  fi
45678
45679
45680    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45681    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45682$as_echo_n "checking for freetype includes... " >&6; }
45683    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45684$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45685    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45686    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45687$as_echo_n "checking for freetype libraries... " >&6; }
45688    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45689$as_echo "$FREETYPE_LIB_PATH" >&6; }
45690  fi
45691
45692              if test "x$FOUND_FREETYPE" != xyes; then
45693
45694  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45695  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
45696  METHOD="well-known location"
45697
45698  # First check if the files exists.
45699  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45700    # We found an arbitrary include file. That's a good sign.
45701    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45702$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45703    FOUND_FREETYPE=yes
45704
45705    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45706    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45707      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45708$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45709      FOUND_FREETYPE=no
45710    else
45711      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45712        # On Windows, we will need both .lib and .dll file.
45713        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45714          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45715$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45716          FOUND_FREETYPE=no
45717        fi
45718      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
45719        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45720        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45721      fi
45722    fi
45723  fi
45724
45725  if test "x$FOUND_FREETYPE" = xyes; then
45726
45727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45728
45729  # Input might be given as Windows format, start by converting to
45730  # unix format.
45731  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45732  new_path=`$CYGPATH -u "$path"`
45733
45734  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45735  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45736  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45737  # "foo.exe" is OK but "foo" is an error.
45738  #
45739  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45740  # It is also a way to make sure we got the proper file name for the real test later on.
45741  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45742  if test "x$test_shortpath" = x; then
45743    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45744$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45745    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45746  fi
45747
45748  # Call helper function which possibly converts this using DOS-style short mode.
45749  # If so, the updated path is stored in $new_path.
45750
45751  input_path="$new_path"
45752  # Check if we need to convert this using DOS-style short mode. If the path
45753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45754  # take no chances and rewrite it.
45755  # Note: m4 eats our [], so we need to use [ and ] instead.
45756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45757  if test "x$has_forbidden_chars" != x; then
45758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45759    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45760    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45761    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45762      # Going to short mode and back again did indeed matter. Since short mode is
45763      # case insensitive, let's make it lowercase to improve readability.
45764      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45765      # Now convert it back to Unix-stile (cygpath)
45766      input_path=`$CYGPATH -u "$shortmode_path"`
45767      new_path="$input_path"
45768    fi
45769  fi
45770
45771  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45772  if test "x$test_cygdrive_prefix" = x; then
45773    # As a simple fix, exclude /usr/bin since it's not a real path.
45774    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45775      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45776      # a path prefixed by /cygdrive for fixpath to work.
45777      new_path="$CYGWIN_ROOT_PATH$input_path"
45778    fi
45779  fi
45780
45781
45782  if test "x$path" != "x$new_path"; then
45783    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45784    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45785$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45786  fi
45787
45788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45789
45790  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45791  has_colon=`$ECHO $path | $GREP ^.:`
45792  new_path="$path"
45793  if test "x$has_colon" = x; then
45794    # Not in mixed or Windows style, start by that.
45795    new_path=`cmd //c echo $path`
45796  fi
45797
45798
45799  input_path="$new_path"
45800  # Check if we need to convert this using DOS-style short mode. If the path
45801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45802  # take no chances and rewrite it.
45803  # Note: m4 eats our [], so we need to use [ and ] instead.
45804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45805  if test "x$has_forbidden_chars" != x; then
45806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45807    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45808  fi
45809
45810
45811  windows_path="$new_path"
45812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45813    unix_path=`$CYGPATH -u "$windows_path"`
45814    new_path="$unix_path"
45815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45817    new_path="$unix_path"
45818  fi
45819
45820  if test "x$path" != "x$new_path"; then
45821    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45822    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45823$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45824  fi
45825
45826  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45827  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45828
45829  else
45830    # We're on a posix platform. Hooray! :)
45831    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45832    has_space=`$ECHO "$path" | $GREP " "`
45833    if test "x$has_space" != x; then
45834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45835$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45836      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45837    fi
45838
45839    # Use eval to expand a potential ~
45840    eval path="$path"
45841    if test ! -f "$path" && test ! -d "$path"; then
45842      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45843    fi
45844
45845    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45846  fi
45847
45848
45849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45850
45851  # Input might be given as Windows format, start by converting to
45852  # unix format.
45853  path="$POTENTIAL_FREETYPE_LIB_PATH"
45854  new_path=`$CYGPATH -u "$path"`
45855
45856  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45857  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45858  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45859  # "foo.exe" is OK but "foo" is an error.
45860  #
45861  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45862  # It is also a way to make sure we got the proper file name for the real test later on.
45863  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45864  if test "x$test_shortpath" = x; then
45865    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45866$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45867    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45868  fi
45869
45870  # Call helper function which possibly converts this using DOS-style short mode.
45871  # If so, the updated path is stored in $new_path.
45872
45873  input_path="$new_path"
45874  # Check if we need to convert this using DOS-style short mode. If the path
45875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45876  # take no chances and rewrite it.
45877  # Note: m4 eats our [], so we need to use [ and ] instead.
45878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45879  if test "x$has_forbidden_chars" != x; then
45880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45884      # Going to short mode and back again did indeed matter. Since short mode is
45885      # case insensitive, let's make it lowercase to improve readability.
45886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45887      # Now convert it back to Unix-stile (cygpath)
45888      input_path=`$CYGPATH -u "$shortmode_path"`
45889      new_path="$input_path"
45890    fi
45891  fi
45892
45893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45894  if test "x$test_cygdrive_prefix" = x; then
45895    # As a simple fix, exclude /usr/bin since it's not a real path.
45896    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45898      # a path prefixed by /cygdrive for fixpath to work.
45899      new_path="$CYGWIN_ROOT_PATH$input_path"
45900    fi
45901  fi
45902
45903
45904  if test "x$path" != "x$new_path"; then
45905    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45907$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45908  fi
45909
45910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45911
45912  path="$POTENTIAL_FREETYPE_LIB_PATH"
45913  has_colon=`$ECHO $path | $GREP ^.:`
45914  new_path="$path"
45915  if test "x$has_colon" = x; then
45916    # Not in mixed or Windows style, start by that.
45917    new_path=`cmd //c echo $path`
45918  fi
45919
45920
45921  input_path="$new_path"
45922  # Check if we need to convert this using DOS-style short mode. If the path
45923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45924  # take no chances and rewrite it.
45925  # Note: m4 eats our [], so we need to use [ and ] instead.
45926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45927  if test "x$has_forbidden_chars" != x; then
45928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45929    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45930  fi
45931
45932
45933  windows_path="$new_path"
45934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45935    unix_path=`$CYGPATH -u "$windows_path"`
45936    new_path="$unix_path"
45937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45939    new_path="$unix_path"
45940  fi
45941
45942  if test "x$path" != "x$new_path"; then
45943    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45944    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45945$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45946  fi
45947
45948  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45949  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45950
45951  else
45952    # We're on a posix platform. Hooray! :)
45953    path="$POTENTIAL_FREETYPE_LIB_PATH"
45954    has_space=`$ECHO "$path" | $GREP " "`
45955    if test "x$has_space" != x; then
45956      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45957$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45958      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45959    fi
45960
45961    # Use eval to expand a potential ~
45962    eval path="$path"
45963    if test ! -f "$path" && test ! -d "$path"; then
45964      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45965    fi
45966
45967    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45968  fi
45969
45970
45971    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45972    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45973$as_echo_n "checking for freetype includes... " >&6; }
45974    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45975$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45976    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45977    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45978$as_echo_n "checking for freetype libraries... " >&6; }
45979    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45980$as_echo "$FREETYPE_LIB_PATH" >&6; }
45981  fi
45982
45983              fi
45984            fi
45985          fi
45986        fi
45987      fi # end check in well-known locations
45988
45989      if test "x$FOUND_FREETYPE" != xyes; then
45990
45991  # Print a helpful message on how to acquire the necessary build dependency.
45992  # freetype is the help tag: freetype, cups, pulse, alsa etc
45993  MISSING_DEPENDENCY=freetype
45994
45995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45996    cygwin_help $MISSING_DEPENDENCY
45997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45998    msys_help $MISSING_DEPENDENCY
45999  else
46000    PKGHANDLER_COMMAND=
46001
46002    case $PKGHANDLER in
46003      apt-get)
46004        apt_help     $MISSING_DEPENDENCY ;;
46005      yum)
46006        yum_help     $MISSING_DEPENDENCY ;;
46007      port)
46008        port_help    $MISSING_DEPENDENCY ;;
46009      pkgutil)
46010        pkgutil_help $MISSING_DEPENDENCY ;;
46011      pkgadd)
46012        pkgadd_help  $MISSING_DEPENDENCY ;;
46013    esac
46014
46015    if test "x$PKGHANDLER_COMMAND" != x; then
46016      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46017    fi
46018  fi
46019
46020        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
46021      fi
46022    fi # end user specified settings
46023
46024    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
46025    if test "x$FREETYPE_CFLAGS" = x; then
46026
46027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46028
46029  # Input might be given as Windows format, start by converting to
46030  # unix format.
46031  path="$FREETYPE_INCLUDE_PATH"
46032  new_path=`$CYGPATH -u "$path"`
46033
46034  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46035  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46036  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46037  # "foo.exe" is OK but "foo" is an error.
46038  #
46039  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46040  # It is also a way to make sure we got the proper file name for the real test later on.
46041  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46042  if test "x$test_shortpath" = x; then
46043    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46044$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46045    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
46046  fi
46047
46048  # Call helper function which possibly converts this using DOS-style short mode.
46049  # If so, the updated path is stored in $new_path.
46050
46051  input_path="$new_path"
46052  # Check if we need to convert this using DOS-style short mode. If the path
46053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46054  # take no chances and rewrite it.
46055  # Note: m4 eats our [], so we need to use [ and ] instead.
46056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46057  if test "x$has_forbidden_chars" != x; then
46058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46059    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46060    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46061    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46062      # Going to short mode and back again did indeed matter. Since short mode is
46063      # case insensitive, let's make it lowercase to improve readability.
46064      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46065      # Now convert it back to Unix-stile (cygpath)
46066      input_path=`$CYGPATH -u "$shortmode_path"`
46067      new_path="$input_path"
46068    fi
46069  fi
46070
46071  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46072  if test "x$test_cygdrive_prefix" = x; then
46073    # As a simple fix, exclude /usr/bin since it's not a real path.
46074    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46075      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46076      # a path prefixed by /cygdrive for fixpath to work.
46077      new_path="$CYGWIN_ROOT_PATH$input_path"
46078    fi
46079  fi
46080
46081
46082  if test "x$path" != "x$new_path"; then
46083    FREETYPE_INCLUDE_PATH="$new_path"
46084    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46085$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46086  fi
46087
46088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46089
46090  path="$FREETYPE_INCLUDE_PATH"
46091  has_colon=`$ECHO $path | $GREP ^.:`
46092  new_path="$path"
46093  if test "x$has_colon" = x; then
46094    # Not in mixed or Windows style, start by that.
46095    new_path=`cmd //c echo $path`
46096  fi
46097
46098
46099  input_path="$new_path"
46100  # Check if we need to convert this using DOS-style short mode. If the path
46101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46102  # take no chances and rewrite it.
46103  # Note: m4 eats our [], so we need to use [ and ] instead.
46104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46105  if test "x$has_forbidden_chars" != x; then
46106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46107    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46108  fi
46109
46110
46111  windows_path="$new_path"
46112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46113    unix_path=`$CYGPATH -u "$windows_path"`
46114    new_path="$unix_path"
46115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46117    new_path="$unix_path"
46118  fi
46119
46120  if test "x$path" != "x$new_path"; then
46121    FREETYPE_INCLUDE_PATH="$new_path"
46122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46123$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46124  fi
46125
46126  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46127  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46128
46129  else
46130    # We're on a posix platform. Hooray! :)
46131    path="$FREETYPE_INCLUDE_PATH"
46132    has_space=`$ECHO "$path" | $GREP " "`
46133    if test "x$has_space" != x; then
46134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46135$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46136      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46137    fi
46138
46139    # Use eval to expand a potential ~
46140    eval path="$path"
46141    if test ! -f "$path" && test ! -d "$path"; then
46142      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46143    fi
46144
46145    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46146  fi
46147
46148      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
46149        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
46150      else
46151        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
46152      fi
46153    fi
46154
46155    if test "x$FREETYPE_LIBS" = x; then
46156
46157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46158
46159  # Input might be given as Windows format, start by converting to
46160  # unix format.
46161  path="$FREETYPE_LIB_PATH"
46162  new_path=`$CYGPATH -u "$path"`
46163
46164  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46165  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46166  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46167  # "foo.exe" is OK but "foo" is an error.
46168  #
46169  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46170  # It is also a way to make sure we got the proper file name for the real test later on.
46171  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46172  if test "x$test_shortpath" = x; then
46173    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46174$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46175    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
46176  fi
46177
46178  # Call helper function which possibly converts this using DOS-style short mode.
46179  # If so, the updated path is stored in $new_path.
46180
46181  input_path="$new_path"
46182  # Check if we need to convert this using DOS-style short mode. If the path
46183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46184  # take no chances and rewrite it.
46185  # Note: m4 eats our [], so we need to use [ and ] instead.
46186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46187  if test "x$has_forbidden_chars" != x; then
46188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46189    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46190    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46191    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46192      # Going to short mode and back again did indeed matter. Since short mode is
46193      # case insensitive, let's make it lowercase to improve readability.
46194      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46195      # Now convert it back to Unix-stile (cygpath)
46196      input_path=`$CYGPATH -u "$shortmode_path"`
46197      new_path="$input_path"
46198    fi
46199  fi
46200
46201  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46202  if test "x$test_cygdrive_prefix" = x; then
46203    # As a simple fix, exclude /usr/bin since it's not a real path.
46204    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46205      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46206      # a path prefixed by /cygdrive for fixpath to work.
46207      new_path="$CYGWIN_ROOT_PATH$input_path"
46208    fi
46209  fi
46210
46211
46212  if test "x$path" != "x$new_path"; then
46213    FREETYPE_LIB_PATH="$new_path"
46214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46215$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46216  fi
46217
46218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46219
46220  path="$FREETYPE_LIB_PATH"
46221  has_colon=`$ECHO $path | $GREP ^.:`
46222  new_path="$path"
46223  if test "x$has_colon" = x; then
46224    # Not in mixed or Windows style, start by that.
46225    new_path=`cmd //c echo $path`
46226  fi
46227
46228
46229  input_path="$new_path"
46230  # Check if we need to convert this using DOS-style short mode. If the path
46231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46232  # take no chances and rewrite it.
46233  # Note: m4 eats our [], so we need to use [ and ] instead.
46234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46235  if test "x$has_forbidden_chars" != x; then
46236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46237    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46238  fi
46239
46240
46241  windows_path="$new_path"
46242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46243    unix_path=`$CYGPATH -u "$windows_path"`
46244    new_path="$unix_path"
46245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46247    new_path="$unix_path"
46248  fi
46249
46250  if test "x$path" != "x$new_path"; then
46251    FREETYPE_LIB_PATH="$new_path"
46252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46253$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46254  fi
46255
46256  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46257  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46258
46259  else
46260    # We're on a posix platform. Hooray! :)
46261    path="$FREETYPE_LIB_PATH"
46262    has_space=`$ECHO "$path" | $GREP " "`
46263    if test "x$has_space" != x; then
46264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46265$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46266      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46267    fi
46268
46269    # Use eval to expand a potential ~
46270    eval path="$path"
46271    if test ! -f "$path" && test ! -d "$path"; then
46272      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46273    fi
46274
46275    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46276  fi
46277
46278      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46279        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
46280      else
46281        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
46282      fi
46283    fi
46284
46285    # Try to compile it
46286    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
46287$as_echo_n "checking if we can compile and link with freetype... " >&6; }
46288    ac_ext=cpp
46289ac_cpp='$CXXCPP $CPPFLAGS'
46290ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46291ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46292ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46293
46294    PREV_CXXCFLAGS="$CXXFLAGS"
46295    PREV_LIBS="$LIBS"
46296    PREV_CXX="$CXX"
46297    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
46298    LIBS="$LIBS $FREETYPE_LIBS"
46299    CXX="$FIXPATH $CXX"
46300    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46301/* end confdefs.h.  */
46302
46303          #include<ft2build.h>
46304          #include FT_FREETYPE_H
46305          int main () {
46306            FT_Init_FreeType(NULL);
46307            return 0;
46308          }
46309
46310_ACEOF
46311if ac_fn_cxx_try_link "$LINENO"; then :
46312
46313          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46314$as_echo "yes" >&6; }
46315
46316else
46317
46318          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46319$as_echo "no" >&6; }
46320          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
46321$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
46322          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
46323$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
46324
46325
46326  # Print a helpful message on how to acquire the necessary build dependency.
46327  # freetype is the help tag: freetype, cups, pulse, alsa etc
46328  MISSING_DEPENDENCY=freetype
46329
46330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46331    cygwin_help $MISSING_DEPENDENCY
46332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46333    msys_help $MISSING_DEPENDENCY
46334  else
46335    PKGHANDLER_COMMAND=
46336
46337    case $PKGHANDLER in
46338      apt-get)
46339        apt_help     $MISSING_DEPENDENCY ;;
46340      yum)
46341        yum_help     $MISSING_DEPENDENCY ;;
46342      port)
46343        port_help    $MISSING_DEPENDENCY ;;
46344      pkgutil)
46345        pkgutil_help $MISSING_DEPENDENCY ;;
46346      pkgadd)
46347        pkgadd_help  $MISSING_DEPENDENCY ;;
46348    esac
46349
46350    if test "x$PKGHANDLER_COMMAND" != x; then
46351      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46352    fi
46353  fi
46354
46355
46356          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
46357
46358
46359fi
46360rm -f core conftest.err conftest.$ac_objext \
46361    conftest$ac_exeext conftest.$ac_ext
46362    CXXCFLAGS="$PREV_CXXFLAGS"
46363    LIBS="$PREV_LIBS"
46364    CXX="$PREV_CXX"
46365    ac_ext=cpp
46366ac_cpp='$CXXCPP $CPPFLAGS'
46367ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46368ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46369ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46370
46371
46372    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
46373$as_echo_n "checking if we should bundle freetype... " >&6; }
46374    if test "x$BUNDLE_FREETYPE" = xyes; then
46375      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
46376    fi
46377    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
46378$as_echo "$BUNDLE_FREETYPE" >&6; }
46379
46380  fi # end freetype needed
46381
46382
46383
46384
46385
46386
46387
46388  ###############################################################################
46389  #
46390  # Check for alsa headers and libraries. Used on Linux/GNU systems.
46391  #
46392
46393# Check whether --with-alsa was given.
46394if test "${with_alsa+set}" = set; then :
46395  withval=$with_alsa;
46396fi
46397
46398
46399# Check whether --with-alsa-include was given.
46400if test "${with_alsa_include+set}" = set; then :
46401  withval=$with_alsa_include;
46402fi
46403
46404
46405# Check whether --with-alsa-lib was given.
46406if test "${with_alsa_lib+set}" = set; then :
46407  withval=$with_alsa_lib;
46408fi
46409
46410
46411  if test "x$ALSA_NOT_NEEDED" = xyes; then
46412    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
46413      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
46414$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
46415    fi
46416    ALSA_CFLAGS=
46417    ALSA_LIBS=
46418  else
46419    ALSA_FOUND=no
46420
46421    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
46422      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
46423    fi
46424
46425    if test "x${with_alsa}" != x; then
46426      ALSA_LIBS="-L${with_alsa}/lib -lasound"
46427      ALSA_CFLAGS="-I${with_alsa}/include"
46428      ALSA_FOUND=yes
46429    fi
46430    if test "x${with_alsa_include}" != x; then
46431      ALSA_CFLAGS="-I${with_alsa_include}"
46432      ALSA_FOUND=yes
46433    fi
46434    if test "x${with_alsa_lib}" != x; then
46435      ALSA_LIBS="-L${with_alsa_lib} -lasound"
46436      ALSA_FOUND=yes
46437    fi
46438    if test "x$ALSA_FOUND" = xno; then
46439
46440
46441  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
46442    # Source the builddeps file again, to make sure it uses the latest variables!
46443    . $builddepsfile
46444    # Look for a target and build machine specific resource!
46445    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
46446    if test "x$resource" = x; then
46447      # Ok, lets instead look for a target specific resource
46448      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
46449    fi
46450    if test "x$resource" = x; then
46451      # Ok, lets instead look for a build specific resource
46452      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
46453    fi
46454    if test "x$resource" = x; then
46455      # Ok, lets instead look for a generic resource
46456      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
46457      resource=${builddep_alsa}
46458    fi
46459    if test "x$resource" != x; then
46460      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
46461$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
46462      # If the resource in the builddeps.conf file is an existing directory,
46463      # for example /java/linux/cups
46464      if test -d ${resource}; then
46465        depdir=${resource}
46466      else
46467
46468  # alsa is for example mymodule
46469  # $resource is for example libs/general/libmymod_1_2_3.zip
46470  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
46471  # $with_builddeps_dir is for example /localhome/builddeps
46472  # depdir is the name of the variable into which we store the depdir, eg MYMOD
46473  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
46474  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
46475  filename=`basename $resource`
46476  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
46477  filebase=${filename%%.*}
46478  extension=${filename#*.}
46479  installdir=$with_builddeps_dir/$filebase
46480  if test ! -f $installdir/$filename.unpacked; then
46481    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
46482$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
46483    if test ! -d $installdir; then
46484      mkdir -p $installdir
46485    fi
46486    if test ! -d $installdir; then
46487      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
46488    fi
46489    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
46490    touch $tmpfile
46491    if test ! -f $tmpfile; then
46492      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
46493    fi
46494
46495  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
46496  # $tmpfile is the local file name for the downloaded file.
46497  VALID_TOOL=no
46498  if test "x$BDEPS_FTP" = xwget; then
46499    VALID_TOOL=yes
46500    wget -O $tmpfile $with_builddeps_server/$resource
46501  fi
46502  if test "x$BDEPS_FTP" = xlftp; then
46503    VALID_TOOL=yes
46504    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
46505  fi
46506  if test "x$BDEPS_FTP" = xftp; then
46507    VALID_TOOL=yes
46508    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
46509    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
46510    FTPUSERPWD=${FTPSERVER%%@*}
46511    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
46512      FTPUSER=${userpwd%%:*}
46513      FTPPWD=${userpwd#*@}
46514      FTPSERVER=${FTPSERVER#*@}
46515    else
46516      FTPUSER=ftp
46517      FTPPWD=ftp
46518    fi
46519    # the "pass" command does not work on some
46520    # ftp clients (read ftp.exe) but if it works,
46521    # passive mode is better!
46522    ( \
46523        echo "user $FTPUSER $FTPPWD"        ; \
46524        echo "pass"                         ; \
46525        echo "bin"                          ; \
46526        echo "get $FTPPATH $tmpfile"              ; \
46527    ) | ftp -in $FTPSERVER
46528  fi
46529  if test "x$VALID_TOOL" != xyes; then
46530    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
46531  fi
46532
46533    mv $tmpfile $installdir/$filename
46534    if test ! -s $installdir/$filename; then
46535      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
46536    fi
46537    case "$extension" in
46538      zip)  echo "Unzipping $installdir/$filename..."
46539        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
46540        ;;
46541      tar.gz) echo "Untaring $installdir/$filename..."
46542        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46543        ;;
46544      tgz) echo "Untaring $installdir/$filename..."
46545        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46546        ;;
46547      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
46548        ;;
46549    esac
46550  fi
46551  if test -f $installdir/$filename.unpacked; then
46552    depdir=$installdir
46553  fi
46554
46555      fi
46556      # Source the builddeps file again, because in the previous command, the depdir
46557      # was updated to point at the current build dependency install directory.
46558      . $builddepsfile
46559      # Now extract variables from the builddeps.conf files.
46560      theroot=${builddep_alsa_ROOT}
46561      thecflags=${builddep_alsa_CFLAGS}
46562      thelibs=${builddep_alsa_LIBS}
46563      if test "x$depdir" = x; then
46564        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
46565      fi
46566      ALSA=$depdir
46567      if test "x$theroot" != x; then
46568        ALSA="$theroot"
46569      fi
46570      if test "x$thecflags" != x; then
46571        ALSA_CFLAGS="$thecflags"
46572      fi
46573      if test "x$thelibs" != x; then
46574        ALSA_LIBS="$thelibs"
46575      fi
46576      ALSA_FOUND=yes
46577      else ALSA_FOUND=no
46578
46579    fi
46580    else ALSA_FOUND=no
46581
46582  fi
46583
46584    fi
46585    if test "x$ALSA_FOUND" = xno; then
46586
46587pkg_failed=no
46588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
46589$as_echo_n "checking for ALSA... " >&6; }
46590
46591if test -n "$ALSA_CFLAGS"; then
46592    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
46593 elif test -n "$PKG_CONFIG"; then
46594    if test -n "$PKG_CONFIG" && \
46595    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46596  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46597  ac_status=$?
46598  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46599  test $ac_status = 0; }; then
46600  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
46601else
46602  pkg_failed=yes
46603fi
46604 else
46605    pkg_failed=untried
46606fi
46607if test -n "$ALSA_LIBS"; then
46608    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
46609 elif test -n "$PKG_CONFIG"; then
46610    if test -n "$PKG_CONFIG" && \
46611    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46612  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46613  ac_status=$?
46614  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46615  test $ac_status = 0; }; then
46616  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
46617else
46618  pkg_failed=yes
46619fi
46620 else
46621    pkg_failed=untried
46622fi
46623
46624
46625
46626if test $pkg_failed = yes; then
46627
46628if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
46629        _pkg_short_errors_supported=yes
46630else
46631        _pkg_short_errors_supported=no
46632fi
46633        if test $_pkg_short_errors_supported = yes; then
46634	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
46635        else
46636	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
46637        fi
46638	# Put the nasty error message in config.log where it belongs
46639	echo "$ALSA_PKG_ERRORS" >&5
46640
46641	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46642$as_echo "no" >&6; }
46643                ALSA_FOUND=no
46644elif test $pkg_failed = untried; then
46645	ALSA_FOUND=no
46646else
46647	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
46648	ALSA_LIBS=$pkg_cv_ALSA_LIBS
46649        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46650$as_echo "yes" >&6; }
46651	ALSA_FOUND=yes
46652fi
46653    fi
46654    if test "x$ALSA_FOUND" = xno; then
46655      for ac_header in alsa/asoundlib.h
46656do :
46657  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
46658if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
46659  cat >>confdefs.h <<_ACEOF
46660#define HAVE_ALSA_ASOUNDLIB_H 1
46661_ACEOF
46662
46663            ALSA_FOUND=yes
46664            ALSA_CFLAGS=-Iignoreme
46665            ALSA_LIBS=-lasound
46666            DEFAULT_ALSA=yes
46667
46668else
46669  ALSA_FOUND=no
46670fi
46671
46672done
46673
46674    fi
46675    if test "x$ALSA_FOUND" = xno; then
46676
46677  # Print a helpful message on how to acquire the necessary build dependency.
46678  # alsa is the help tag: freetype, cups, pulse, alsa etc
46679  MISSING_DEPENDENCY=alsa
46680
46681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46682    cygwin_help $MISSING_DEPENDENCY
46683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46684    msys_help $MISSING_DEPENDENCY
46685  else
46686    PKGHANDLER_COMMAND=
46687
46688    case $PKGHANDLER in
46689      apt-get)
46690        apt_help     $MISSING_DEPENDENCY ;;
46691      yum)
46692        yum_help     $MISSING_DEPENDENCY ;;
46693      port)
46694        port_help    $MISSING_DEPENDENCY ;;
46695      pkgutil)
46696        pkgutil_help $MISSING_DEPENDENCY ;;
46697      pkgadd)
46698        pkgadd_help  $MISSING_DEPENDENCY ;;
46699    esac
46700
46701    if test "x$PKGHANDLER_COMMAND" != x; then
46702      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46703    fi
46704  fi
46705
46706      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
46707    fi
46708  fi
46709
46710
46711
46712
46713
46714
46715  ###############################################################################
46716  #
46717  # Check for the jpeg library
46718  #
46719
46720  USE_EXTERNAL_LIBJPEG=true
46721  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
46722$as_echo_n "checking for main in -ljpeg... " >&6; }
46723if ${ac_cv_lib_jpeg_main+:} false; then :
46724  $as_echo_n "(cached) " >&6
46725else
46726  ac_check_lib_save_LIBS=$LIBS
46727LIBS="-ljpeg  $LIBS"
46728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46729/* end confdefs.h.  */
46730
46731
46732int
46733main ()
46734{
46735return main ();
46736  ;
46737  return 0;
46738}
46739_ACEOF
46740if ac_fn_cxx_try_link "$LINENO"; then :
46741  ac_cv_lib_jpeg_main=yes
46742else
46743  ac_cv_lib_jpeg_main=no
46744fi
46745rm -f core conftest.err conftest.$ac_objext \
46746    conftest$ac_exeext conftest.$ac_ext
46747LIBS=$ac_check_lib_save_LIBS
46748fi
46749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
46750$as_echo "$ac_cv_lib_jpeg_main" >&6; }
46751if test "x$ac_cv_lib_jpeg_main" = xyes; then :
46752  cat >>confdefs.h <<_ACEOF
46753#define HAVE_LIBJPEG 1
46754_ACEOF
46755
46756  LIBS="-ljpeg $LIBS"
46757
46758else
46759   USE_EXTERNAL_LIBJPEG=false
46760      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
46761$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
46762
46763fi
46764
46765
46766
46767  ###############################################################################
46768  #
46769  # Check for the gif library
46770  #
46771
46772
46773# Check whether --with-giflib was given.
46774if test "${with_giflib+set}" = set; then :
46775  withval=$with_giflib;
46776fi
46777
46778
46779
46780  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
46781$as_echo_n "checking for which giflib to use... " >&6; }
46782
46783  # default is bundled
46784  DEFAULT_GIFLIB=bundled
46785
46786  #
46787  # if user didn't specify, use DEFAULT_GIFLIB
46788  #
46789  if test "x${with_giflib}" = "x"; then
46790    with_giflib=${DEFAULT_GIFLIB}
46791  fi
46792
46793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
46794$as_echo "${with_giflib}" >&6; }
46795
46796  if test "x${with_giflib}" = "xbundled"; then
46797    USE_EXTERNAL_LIBGIF=false
46798  elif test "x${with_giflib}" = "xsystem"; then
46799    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
46800if test "x$ac_cv_header_gif_lib_h" = xyes; then :
46801
46802else
46803   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
46804fi
46805
46806
46807    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
46808$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
46809if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
46810  $as_echo_n "(cached) " >&6
46811else
46812  ac_check_lib_save_LIBS=$LIBS
46813LIBS="-lgif  $LIBS"
46814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46815/* end confdefs.h.  */
46816
46817/* Override any GCC internal prototype to avoid an error.
46818   Use char because int might match the return type of a GCC
46819   builtin and then its argument prototype would still apply.  */
46820#ifdef __cplusplus
46821extern "C"
46822#endif
46823char DGifGetCode ();
46824int
46825main ()
46826{
46827return DGifGetCode ();
46828  ;
46829  return 0;
46830}
46831_ACEOF
46832if ac_fn_cxx_try_link "$LINENO"; then :
46833  ac_cv_lib_gif_DGifGetCode=yes
46834else
46835  ac_cv_lib_gif_DGifGetCode=no
46836fi
46837rm -f core conftest.err conftest.$ac_objext \
46838    conftest$ac_exeext conftest.$ac_ext
46839LIBS=$ac_check_lib_save_LIBS
46840fi
46841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
46842$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
46843if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
46844  cat >>confdefs.h <<_ACEOF
46845#define HAVE_LIBGIF 1
46846_ACEOF
46847
46848  LIBS="-lgif $LIBS"
46849
46850else
46851   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
46852fi
46853
46854
46855    USE_EXTERNAL_LIBGIF=true
46856  else
46857    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
46858  fi
46859
46860
46861  ###############################################################################
46862  #
46863  # Check for the png library
46864  #
46865
46866
46867# Check whether --with-libpng was given.
46868if test "${with_libpng+set}" = set; then :
46869  withval=$with_libpng;
46870fi
46871
46872
46873
46874  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
46875$as_echo_n "checking for which libpng to use... " >&6; }
46876
46877  # default is bundled
46878  DEFAULT_LIBPNG=bundled
46879
46880  #
46881  # if user didn't specify, use DEFAULT_LIBPNG
46882  #
46883  if test "x${with_libpng}" = "x"; then
46884      with_libpng=${DEFAULT_LIBPNG}
46885  fi
46886
46887  if test "x${with_libpng}" = "xbundled"; then
46888      USE_EXTERNAL_LIBPNG=false
46889      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
46890$as_echo "bundled" >&6; }
46891  elif test "x${with_libpng}" = "xsystem"; then
46892
46893pkg_failed=no
46894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
46895$as_echo_n "checking for PNG... " >&6; }
46896
46897if test -n "$PNG_CFLAGS"; then
46898    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
46899 elif test -n "$PKG_CONFIG"; then
46900    if test -n "$PKG_CONFIG" && \
46901    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
46902  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
46903  ac_status=$?
46904  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46905  test $ac_status = 0; }; then
46906  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
46907else
46908  pkg_failed=yes
46909fi
46910 else
46911    pkg_failed=untried
46912fi
46913if test -n "$PNG_LIBS"; then
46914    pkg_cv_PNG_LIBS="$PNG_LIBS"
46915 elif test -n "$PKG_CONFIG"; then
46916    if test -n "$PKG_CONFIG" && \
46917    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
46918  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
46919  ac_status=$?
46920  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46921  test $ac_status = 0; }; then
46922  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
46923else
46924  pkg_failed=yes
46925fi
46926 else
46927    pkg_failed=untried
46928fi
46929
46930
46931
46932if test $pkg_failed = yes; then
46933
46934if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
46935        _pkg_short_errors_supported=yes
46936else
46937        _pkg_short_errors_supported=no
46938fi
46939        if test $_pkg_short_errors_supported = yes; then
46940	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
46941        else
46942	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
46943        fi
46944	# Put the nasty error message in config.log where it belongs
46945	echo "$PNG_PKG_ERRORS" >&5
46946
46947	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46948$as_echo "no" >&6; }
46949                 LIBPNG_FOUND=no
46950elif test $pkg_failed = untried; then
46951	 LIBPNG_FOUND=no
46952else
46953	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
46954	PNG_LIBS=$pkg_cv_PNG_LIBS
46955        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46956$as_echo "yes" >&6; }
46957	 LIBPNG_FOUND=yes
46958fi
46959      if test "x${LIBPNG_FOUND}" = "xyes"; then
46960          USE_EXTERNAL_LIBPNG=true
46961          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
46962$as_echo "system" >&6; }
46963      else
46964          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
46965$as_echo "system not found" >&6; }
46966          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
46967      fi
46968  else
46969      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
46970  fi
46971
46972
46973  ###############################################################################
46974  #
46975  # Check for the zlib library
46976  #
46977
46978
46979# Check whether --with-zlib was given.
46980if test "${with_zlib+set}" = set; then :
46981  withval=$with_zlib;
46982fi
46983
46984
46985  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
46986$as_echo_n "checking for compress in -lz... " >&6; }
46987if ${ac_cv_lib_z_compress+:} false; then :
46988  $as_echo_n "(cached) " >&6
46989else
46990  ac_check_lib_save_LIBS=$LIBS
46991LIBS="-lz  $LIBS"
46992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46993/* end confdefs.h.  */
46994
46995/* Override any GCC internal prototype to avoid an error.
46996   Use char because int might match the return type of a GCC
46997   builtin and then its argument prototype would still apply.  */
46998#ifdef __cplusplus
46999extern "C"
47000#endif
47001char compress ();
47002int
47003main ()
47004{
47005return compress ();
47006  ;
47007  return 0;
47008}
47009_ACEOF
47010if ac_fn_cxx_try_link "$LINENO"; then :
47011  ac_cv_lib_z_compress=yes
47012else
47013  ac_cv_lib_z_compress=no
47014fi
47015rm -f core conftest.err conftest.$ac_objext \
47016    conftest$ac_exeext conftest.$ac_ext
47017LIBS=$ac_check_lib_save_LIBS
47018fi
47019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
47020$as_echo "$ac_cv_lib_z_compress" >&6; }
47021if test "x$ac_cv_lib_z_compress" = xyes; then :
47022   ZLIB_FOUND=yes
47023else
47024   ZLIB_FOUND=no
47025fi
47026
47027
47028  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
47029$as_echo_n "checking for which zlib to use... " >&6; }
47030
47031  DEFAULT_ZLIB=bundled
47032  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47033    #
47034    # On macosx default is system...on others default is
47035    #
47036    DEFAULT_ZLIB=system
47037  fi
47038
47039  if test "x${ZLIB_FOUND}" != "xyes"; then
47040    #
47041    # If we don't find any system...set default to bundled
47042    #
47043    DEFAULT_ZLIB=bundled
47044  fi
47045
47046  #
47047  # If user didn't specify, use DEFAULT_ZLIB
47048  #
47049  if test "x${with_zlib}" = "x"; then
47050    with_zlib=${DEFAULT_ZLIB}
47051  fi
47052
47053  if test "x${with_zlib}" = "xbundled"; then
47054    USE_EXTERNAL_LIBZ=false
47055    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47056$as_echo "bundled" >&6; }
47057  elif test "x${with_zlib}" = "xsystem"; then
47058    if test "x${ZLIB_FOUND}" = "xyes"; then
47059      USE_EXTERNAL_LIBZ=true
47060      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47061$as_echo "system" >&6; }
47062    else
47063      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47064$as_echo "system not found" >&6; }
47065      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
47066    fi
47067  else
47068    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
47069  fi
47070
47071
47072
47073  ###############################################################################
47074  LIBZIP_CAN_USE_MMAP=true
47075
47076
47077
47078  ###############################################################################
47079  #
47080  # Check if altzone exists in time.h
47081  #
47082
47083  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47084/* end confdefs.h.  */
47085#include <time.h>
47086int
47087main ()
47088{
47089return (int)altzone;
47090  ;
47091  return 0;
47092}
47093_ACEOF
47094if ac_fn_cxx_try_link "$LINENO"; then :
47095  has_altzone=yes
47096else
47097  has_altzone=no
47098fi
47099rm -f core conftest.err conftest.$ac_objext \
47100    conftest$ac_exeext conftest.$ac_ext
47101  if test "x$has_altzone" = xyes; then
47102
47103$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
47104
47105  fi
47106
47107  ###############################################################################
47108  #
47109  # Check the maths library
47110  #
47111
47112  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
47113$as_echo_n "checking for cos in -lm... " >&6; }
47114if ${ac_cv_lib_m_cos+:} false; then :
47115  $as_echo_n "(cached) " >&6
47116else
47117  ac_check_lib_save_LIBS=$LIBS
47118LIBS="-lm  $LIBS"
47119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47120/* end confdefs.h.  */
47121
47122/* Override any GCC internal prototype to avoid an error.
47123   Use char because int might match the return type of a GCC
47124   builtin and then its argument prototype would still apply.  */
47125#ifdef __cplusplus
47126extern "C"
47127#endif
47128char cos ();
47129int
47130main ()
47131{
47132return cos ();
47133  ;
47134  return 0;
47135}
47136_ACEOF
47137if ac_fn_cxx_try_link "$LINENO"; then :
47138  ac_cv_lib_m_cos=yes
47139else
47140  ac_cv_lib_m_cos=no
47141fi
47142rm -f core conftest.err conftest.$ac_objext \
47143    conftest$ac_exeext conftest.$ac_ext
47144LIBS=$ac_check_lib_save_LIBS
47145fi
47146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
47147$as_echo "$ac_cv_lib_m_cos" >&6; }
47148if test "x$ac_cv_lib_m_cos" = xyes; then :
47149  cat >>confdefs.h <<_ACEOF
47150#define HAVE_LIBM 1
47151_ACEOF
47152
47153  LIBS="-lm $LIBS"
47154
47155else
47156
47157        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
47158$as_echo "$as_me: Maths library was not found" >&6;}
47159
47160
47161fi
47162
47163
47164
47165  ###############################################################################
47166  #
47167  # Check for libdl.so
47168
47169  save_LIBS="$LIBS"
47170  LIBS=""
47171  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
47172$as_echo_n "checking for dlopen in -ldl... " >&6; }
47173if ${ac_cv_lib_dl_dlopen+:} false; then :
47174  $as_echo_n "(cached) " >&6
47175else
47176  ac_check_lib_save_LIBS=$LIBS
47177LIBS="-ldl  $LIBS"
47178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47179/* end confdefs.h.  */
47180
47181/* Override any GCC internal prototype to avoid an error.
47182   Use char because int might match the return type of a GCC
47183   builtin and then its argument prototype would still apply.  */
47184#ifdef __cplusplus
47185extern "C"
47186#endif
47187char dlopen ();
47188int
47189main ()
47190{
47191return dlopen ();
47192  ;
47193  return 0;
47194}
47195_ACEOF
47196if ac_fn_cxx_try_link "$LINENO"; then :
47197  ac_cv_lib_dl_dlopen=yes
47198else
47199  ac_cv_lib_dl_dlopen=no
47200fi
47201rm -f core conftest.err conftest.$ac_objext \
47202    conftest$ac_exeext conftest.$ac_ext
47203LIBS=$ac_check_lib_save_LIBS
47204fi
47205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
47206$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
47207if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
47208  cat >>confdefs.h <<_ACEOF
47209#define HAVE_LIBDL 1
47210_ACEOF
47211
47212  LIBS="-ldl $LIBS"
47213
47214fi
47215
47216  LIBDL="$LIBS"
47217
47218  LIBS="$save_LIBS"
47219
47220
47221  ###############################################################################
47222  #
47223  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47224  # dynamic build is configured on command line.
47225  #
47226
47227# Check whether --with-stdc++lib was given.
47228if test "${with_stdc__lib+set}" = set; then :
47229  withval=$with_stdc__lib;
47230        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47231                && test "x$with_stdc__lib" != xdefault; then
47232          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47233        fi
47234
47235else
47236  with_stdc__lib=default
47237
47238fi
47239
47240
47241  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47242    # Test if -lstdc++ works.
47243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47244$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47245    ac_ext=cpp
47246ac_cpp='$CXXCPP $CPPFLAGS'
47247ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47248ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47249ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47250
47251    OLD_CXXFLAGS="$CXXFLAGS"
47252    CXXFLAGS="$CXXFLAGS -lstdc++"
47253    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47254/* end confdefs.h.  */
47255
47256int
47257main ()
47258{
47259return 0;
47260  ;
47261  return 0;
47262}
47263_ACEOF
47264if ac_fn_cxx_try_link "$LINENO"; then :
47265  has_dynamic_libstdcxx=yes
47266else
47267  has_dynamic_libstdcxx=no
47268fi
47269rm -f core conftest.err conftest.$ac_objext \
47270    conftest$ac_exeext conftest.$ac_ext
47271    CXXFLAGS="$OLD_CXXFLAGS"
47272    ac_ext=cpp
47273ac_cpp='$CXXCPP $CPPFLAGS'
47274ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47275ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47276ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47277
47278    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47279$as_echo "$has_dynamic_libstdcxx" >&6; }
47280
47281    # Test if stdc++ can be linked statically.
47282    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47283$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47284    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47285    ac_ext=cpp
47286ac_cpp='$CXXCPP $CPPFLAGS'
47287ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47288ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47289ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47290
47291    OLD_LIBS="$LIBS"
47292    OLD_CXX="$CXX"
47293    LIBS="$STATIC_STDCXX_FLAGS"
47294    CXX="$CC"
47295    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47296/* end confdefs.h.  */
47297
47298int
47299main ()
47300{
47301return 0;
47302  ;
47303  return 0;
47304}
47305_ACEOF
47306if ac_fn_cxx_try_link "$LINENO"; then :
47307  has_static_libstdcxx=yes
47308else
47309  has_static_libstdcxx=no
47310fi
47311rm -f core conftest.err conftest.$ac_objext \
47312    conftest$ac_exeext conftest.$ac_ext
47313    LIBS="$OLD_LIBS"
47314    CXX="$OLD_CXX"
47315    ac_ext=cpp
47316ac_cpp='$CXXCPP $CPPFLAGS'
47317ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47318ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47319ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47320
47321    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47322$as_echo "$has_static_libstdcxx" >&6; }
47323
47324    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47325      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47326    fi
47327
47328    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47329      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47330    fi
47331
47332    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47333      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47334    fi
47335
47336    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47337$as_echo_n "checking how to link with libstdc++... " >&6; }
47338    # If dynamic was requested, it's available since it would fail above otherwise.
47339    # If dynamic wasn't requested, go with static unless it isn't available.
47340    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47341      LIBCXX="$LIBCXX -lstdc++"
47342      LDCXX="$CXX"
47343      STATIC_CXX_SETTING="STATIC_CXX=false"
47344      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47345$as_echo "dynamic" >&6; }
47346    else
47347      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47348      LDCXX="$CC"
47349      STATIC_CXX_SETTING="STATIC_CXX=true"
47350      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47351$as_echo "static" >&6; }
47352    fi
47353  fi
47354
47355
47356  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47357    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
47358
47359pkg_failed=no
47360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
47361$as_echo_n "checking for LIBFFI... " >&6; }
47362
47363if test -n "$LIBFFI_CFLAGS"; then
47364    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
47365 elif test -n "$PKG_CONFIG"; then
47366    if test -n "$PKG_CONFIG" && \
47367    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47368  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47369  ac_status=$?
47370  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47371  test $ac_status = 0; }; then
47372  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
47373else
47374  pkg_failed=yes
47375fi
47376 else
47377    pkg_failed=untried
47378fi
47379if test -n "$LIBFFI_LIBS"; then
47380    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
47381 elif test -n "$PKG_CONFIG"; then
47382    if test -n "$PKG_CONFIG" && \
47383    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47384  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47385  ac_status=$?
47386  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47387  test $ac_status = 0; }; then
47388  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
47389else
47390  pkg_failed=yes
47391fi
47392 else
47393    pkg_failed=untried
47394fi
47395
47396
47397
47398if test $pkg_failed = yes; then
47399
47400if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47401        _pkg_short_errors_supported=yes
47402else
47403        _pkg_short_errors_supported=no
47404fi
47405        if test $_pkg_short_errors_supported = yes; then
47406	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
47407        else
47408	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
47409        fi
47410	# Put the nasty error message in config.log where it belongs
47411	echo "$LIBFFI_PKG_ERRORS" >&5
47412
47413	as_fn_error $? "Package requirements (libffi) were not met:
47414
47415$LIBFFI_PKG_ERRORS
47416
47417Consider adjusting the PKG_CONFIG_PATH environment variable if you
47418installed software in a non-standard prefix.
47419
47420Alternatively, you may set the environment variables LIBFFI_CFLAGS
47421and LIBFFI_LIBS to avoid the need to call pkg-config.
47422See the pkg-config man page for more details.
47423" "$LINENO" 5
47424elif test $pkg_failed = untried; then
47425	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47426$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47427as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
47428is in your PATH or set the PKG_CONFIG environment variable to the full
47429path to pkg-config.
47430
47431Alternatively, you may set the environment variables LIBFFI_CFLAGS
47432and LIBFFI_LIBS to avoid the need to call pkg-config.
47433See the pkg-config man page for more details.
47434
47435To get pkg-config, see <http://pkg-config.freedesktop.org/>.
47436See \`config.log' for more details" "$LINENO" 5; }
47437else
47438	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
47439	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
47440        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47441$as_echo "yes" >&6; }
47442	:
47443fi
47444
47445  fi
47446
47447  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47448    # Extract the first word of "llvm-config", so it can be a program name with args.
47449set dummy llvm-config; ac_word=$2
47450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47451$as_echo_n "checking for $ac_word... " >&6; }
47452if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
47453  $as_echo_n "(cached) " >&6
47454else
47455  if test -n "$LLVM_CONFIG"; then
47456  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
47457else
47458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47459for as_dir in $PATH
47460do
47461  IFS=$as_save_IFS
47462  test -z "$as_dir" && as_dir=.
47463    for ac_exec_ext in '' $ac_executable_extensions; do
47464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47465    ac_cv_prog_LLVM_CONFIG="llvm-config"
47466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47467    break 2
47468  fi
47469done
47470  done
47471IFS=$as_save_IFS
47472
47473fi
47474fi
47475LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
47476if test -n "$LLVM_CONFIG"; then
47477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
47478$as_echo "$LLVM_CONFIG" >&6; }
47479else
47480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47481$as_echo "no" >&6; }
47482fi
47483
47484
47485
47486    if test "x$LLVM_CONFIG" != xllvm-config; then
47487      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
47488    fi
47489
47490    llvm_components="jit mcjit engine nativecodegen native"
47491    unset LLVM_CFLAGS
47492    for flag in $("$LLVM_CONFIG" --cxxflags); do
47493      if echo "${flag}" | grep -q '^-[ID]'; then
47494        if test "${flag}" != "-D_DEBUG" ; then
47495          if test "${LLVM_CFLAGS}" != "" ; then
47496            LLVM_CFLAGS="${LLVM_CFLAGS} "
47497          fi
47498          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
47499        fi
47500      fi
47501    done
47502    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
47503    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
47504
47505    unset LLVM_LDFLAGS
47506    for flag in $("${LLVM_CONFIG}" --ldflags); do
47507      if echo "${flag}" | grep -q '^-L'; then
47508        if test "${LLVM_LDFLAGS}" != ""; then
47509          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
47510        fi
47511        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
47512      fi
47513    done
47514
47515    unset LLVM_LIBS
47516    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
47517      if echo "${flag}" | grep -q '^-l'; then
47518        if test "${LLVM_LIBS}" != ""; then
47519          LLVM_LIBS="${LLVM_LIBS} "
47520        fi
47521        LLVM_LIBS="${LLVM_LIBS}${flag}"
47522      fi
47523    done
47524
47525
47526
47527
47528  fi
47529
47530  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47531  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
47532    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47533  fi
47534
47535  # TODO better (platform agnostic) test
47536  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
47537    LIBCXX="-lstdc++"
47538  fi
47539
47540
47541
47542
47543  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47544
47545
47546# Check whether --with-msvcr-dll was given.
47547if test "${with_msvcr_dll+set}" = set; then :
47548  withval=$with_msvcr_dll;
47549fi
47550
47551
47552  if test "x$with_msvcr_dll" != x; then
47553    # If given explicitely by user, do not probe. If not present, fail directly.
47554
47555  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
47556  METHOD="--with-msvcr-dll"
47557  if test -e "$POSSIBLE_MSVCR_DLL"; then
47558    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47559$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47560
47561    # Need to check if the found msvcr is correct architecture
47562    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47563$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47564    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47565    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47566      CORRECT_MSVCR_ARCH=386
47567    else
47568      CORRECT_MSVCR_ARCH=x86-64
47569    fi
47570    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47571      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47572$as_echo "ok" >&6; }
47573      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47574      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47575$as_echo_n "checking for msvcr100.dll... " >&6; }
47576      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47577$as_echo "$MSVCR_DLL" >&6; }
47578    else
47579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47580$as_echo "incorrect, ignoring" >&6; }
47581      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47582$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47583    fi
47584  fi
47585
47586    if test "x$MSVCR_DLL" = x; then
47587      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
47588    fi
47589  fi
47590
47591  if test "x$MSVCR_DLL" = x; then
47592    # Probe: Using well-known location from Visual Studio 10.0
47593    if test "x$VCINSTALLDIR" != x; then
47594      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
47595
47596  windows_path="$CYGWIN_VC_INSTALL_DIR"
47597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47598    unix_path=`$CYGPATH -u "$windows_path"`
47599    CYGWIN_VC_INSTALL_DIR="$unix_path"
47600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47602    CYGWIN_VC_INSTALL_DIR="$unix_path"
47603  fi
47604
47605      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47606        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
47607      else
47608        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
47609      fi
47610
47611  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47612  METHOD="well-known location in VCINSTALLDIR"
47613  if test -e "$POSSIBLE_MSVCR_DLL"; then
47614    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47615$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47616
47617    # Need to check if the found msvcr is correct architecture
47618    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47619$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47620    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47621    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47622      CORRECT_MSVCR_ARCH=386
47623    else
47624      CORRECT_MSVCR_ARCH=x86-64
47625    fi
47626    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47627      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47628$as_echo "ok" >&6; }
47629      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47630      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47631$as_echo_n "checking for msvcr100.dll... " >&6; }
47632      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47633$as_echo "$MSVCR_DLL" >&6; }
47634    else
47635      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47636$as_echo "incorrect, ignoring" >&6; }
47637      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47638$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47639    fi
47640  fi
47641
47642    fi
47643  fi
47644
47645  if test "x$MSVCR_DLL" = x; then
47646    # Probe: Check in the Boot JDK directory.
47647    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
47648
47649  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47650  METHOD="well-known location in Boot JDK"
47651  if test -e "$POSSIBLE_MSVCR_DLL"; then
47652    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47653$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47654
47655    # Need to check if the found msvcr is correct architecture
47656    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47657$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47658    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47659    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47660      CORRECT_MSVCR_ARCH=386
47661    else
47662      CORRECT_MSVCR_ARCH=x86-64
47663    fi
47664    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47665      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47666$as_echo "ok" >&6; }
47667      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47668      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47669$as_echo_n "checking for msvcr100.dll... " >&6; }
47670      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47671$as_echo "$MSVCR_DLL" >&6; }
47672    else
47673      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47674$as_echo "incorrect, ignoring" >&6; }
47675      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47676$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47677    fi
47678  fi
47679
47680  fi
47681
47682  if test "x$MSVCR_DLL" = x; then
47683    # Probe: Look in the Windows system32 directory
47684    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
47685
47686  windows_path="$CYGWIN_SYSTEMROOT"
47687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47688    unix_path=`$CYGPATH -u "$windows_path"`
47689    CYGWIN_SYSTEMROOT="$unix_path"
47690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47692    CYGWIN_SYSTEMROOT="$unix_path"
47693  fi
47694
47695    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
47696
47697  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47698  METHOD="well-known location in SYSTEMROOT"
47699  if test -e "$POSSIBLE_MSVCR_DLL"; then
47700    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47701$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47702
47703    # Need to check if the found msvcr is correct architecture
47704    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47705$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47706    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47707    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47708      CORRECT_MSVCR_ARCH=386
47709    else
47710      CORRECT_MSVCR_ARCH=x86-64
47711    fi
47712    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47713      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47714$as_echo "ok" >&6; }
47715      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47716      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47717$as_echo_n "checking for msvcr100.dll... " >&6; }
47718      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47719$as_echo "$MSVCR_DLL" >&6; }
47720    else
47721      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47722$as_echo "incorrect, ignoring" >&6; }
47723      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47724$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47725    fi
47726  fi
47727
47728  fi
47729
47730  if test "x$MSVCR_DLL" = x; then
47731    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
47732    if test "x$VS100COMNTOOLS" != x; then
47733      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
47734
47735  windows_path="$CYGWIN_VS_TOOLS_DIR"
47736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47737    unix_path=`$CYGPATH -u "$windows_path"`
47738    CYGWIN_VS_TOOLS_DIR="$unix_path"
47739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47741    CYGWIN_VS_TOOLS_DIR="$unix_path"
47742  fi
47743
47744      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47745        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
47746      else
47747        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
47748      fi
47749
47750  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47751  METHOD="search of VS100COMNTOOLS"
47752  if test -e "$POSSIBLE_MSVCR_DLL"; then
47753    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47754$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47755
47756    # Need to check if the found msvcr is correct architecture
47757    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47758$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47759    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47760    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47761      CORRECT_MSVCR_ARCH=386
47762    else
47763      CORRECT_MSVCR_ARCH=x86-64
47764    fi
47765    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47766      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47767$as_echo "ok" >&6; }
47768      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47769      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47770$as_echo_n "checking for msvcr100.dll... " >&6; }
47771      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47772$as_echo "$MSVCR_DLL" >&6; }
47773    else
47774      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47775$as_echo "incorrect, ignoring" >&6; }
47776      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47777$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47778    fi
47779  fi
47780
47781    fi
47782  fi
47783
47784  if test "x$MSVCR_DLL" = x; then
47785    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
47786    # (This was the original behaviour; kept since it might turn up something)
47787    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
47788      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47789        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
47790      else
47791        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
47792        if test "x$POSSIBLE_MSVCR_DLL" = x; then
47793          # We're grasping at straws now...
47794          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
47795        fi
47796      fi
47797
47798
47799  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47800  METHOD="search of VCINSTALLDIR"
47801  if test -e "$POSSIBLE_MSVCR_DLL"; then
47802    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47803$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47804
47805    # Need to check if the found msvcr is correct architecture
47806    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47807$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47808    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47809    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47810      CORRECT_MSVCR_ARCH=386
47811    else
47812      CORRECT_MSVCR_ARCH=x86-64
47813    fi
47814    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47815      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47816$as_echo "ok" >&6; }
47817      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47818      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47819$as_echo_n "checking for msvcr100.dll... " >&6; }
47820      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47821$as_echo "$MSVCR_DLL" >&6; }
47822    else
47823      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47824$as_echo "incorrect, ignoring" >&6; }
47825      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47826$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47827    fi
47828  fi
47829
47830    fi
47831  fi
47832
47833  if test "x$MSVCR_DLL" = x; then
47834    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47835$as_echo_n "checking for msvcr100.dll... " >&6; }
47836    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47837$as_echo "no" >&6; }
47838    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
47839  fi
47840
47841
47842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47843
47844  # Input might be given as Windows format, start by converting to
47845  # unix format.
47846  path="$MSVCR_DLL"
47847  new_path=`$CYGPATH -u "$path"`
47848
47849  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47850  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47851  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47852  # "foo.exe" is OK but "foo" is an error.
47853  #
47854  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47855  # It is also a way to make sure we got the proper file name for the real test later on.
47856  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47857  if test "x$test_shortpath" = x; then
47858    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
47859$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
47860    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
47861  fi
47862
47863  # Call helper function which possibly converts this using DOS-style short mode.
47864  # If so, the updated path is stored in $new_path.
47865
47866  input_path="$new_path"
47867  # Check if we need to convert this using DOS-style short mode. If the path
47868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47869  # take no chances and rewrite it.
47870  # Note: m4 eats our [], so we need to use [ and ] instead.
47871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47872  if test "x$has_forbidden_chars" != x; then
47873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47874    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47875    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47876    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47877      # Going to short mode and back again did indeed matter. Since short mode is
47878      # case insensitive, let's make it lowercase to improve readability.
47879      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47880      # Now convert it back to Unix-stile (cygpath)
47881      input_path=`$CYGPATH -u "$shortmode_path"`
47882      new_path="$input_path"
47883    fi
47884  fi
47885
47886  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47887  if test "x$test_cygdrive_prefix" = x; then
47888    # As a simple fix, exclude /usr/bin since it's not a real path.
47889    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47890      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47891      # a path prefixed by /cygdrive for fixpath to work.
47892      new_path="$CYGWIN_ROOT_PATH$input_path"
47893    fi
47894  fi
47895
47896
47897  if test "x$path" != "x$new_path"; then
47898    MSVCR_DLL="$new_path"
47899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
47900$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
47901  fi
47902
47903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47904
47905  path="$MSVCR_DLL"
47906  has_colon=`$ECHO $path | $GREP ^.:`
47907  new_path="$path"
47908  if test "x$has_colon" = x; then
47909    # Not in mixed or Windows style, start by that.
47910    new_path=`cmd //c echo $path`
47911  fi
47912
47913
47914  input_path="$new_path"
47915  # Check if we need to convert this using DOS-style short mode. If the path
47916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47917  # take no chances and rewrite it.
47918  # Note: m4 eats our [], so we need to use [ and ] instead.
47919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47920  if test "x$has_forbidden_chars" != x; then
47921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47922    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47923  fi
47924
47925
47926  windows_path="$new_path"
47927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47928    unix_path=`$CYGPATH -u "$windows_path"`
47929    new_path="$unix_path"
47930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47932    new_path="$unix_path"
47933  fi
47934
47935  if test "x$path" != "x$new_path"; then
47936    MSVCR_DLL="$new_path"
47937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
47938$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
47939  fi
47940
47941  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47942  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47943
47944  else
47945    # We're on a posix platform. Hooray! :)
47946    path="$MSVCR_DLL"
47947    has_space=`$ECHO "$path" | $GREP " "`
47948    if test "x$has_space" != x; then
47949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
47950$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
47951      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47952    fi
47953
47954    # Use eval to expand a potential ~
47955    eval path="$path"
47956    if test ! -f "$path" && test ! -d "$path"; then
47957      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47958    fi
47959
47960    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
47961  fi
47962
47963
47964
47965
47966# Check whether --with-dxsdk was given.
47967if test "${with_dxsdk+set}" = set; then :
47968  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
47969$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
47970fi
47971
47972
47973
47974
47975# Check whether --with-dxsdk-lib was given.
47976if test "${with_dxsdk_lib+set}" = set; then :
47977  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
47978$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
47979fi
47980
47981
47982
47983
47984# Check whether --with-dxsdk-include was given.
47985if test "${with_dxsdk_include+set}" = set; then :
47986  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
47987$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
47988fi
47989
47990
47991  fi
47992
47993
47994
47995###############################################################################
47996#
47997# We need to do some final tweaking, when everything else is done.
47998#
47999###############################################################################
48000
48001
48002  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
48003
48004
48005  # The name of the Service Agent jar.
48006  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
48007  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48008    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
48009  fi
48010
48011
48012
48013    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
48014$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
48015
48016    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
48017      ENABLE_INTREE_EC=yes
48018      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48019$as_echo "yes" >&6; }
48020    else
48021      ENABLE_INTREE_EC=no
48022      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48023$as_echo "no" >&6; }
48024    fi
48025
48026
48027
48028
48029###############################################################################
48030#
48031# Configure parts of the build that only affect the build performance,
48032# not the result.
48033#
48034###############################################################################
48035
48036
48037  # How many cores do we have on this build system?
48038
48039# Check whether --with-num-cores was given.
48040if test "${with_num_cores+set}" = set; then :
48041  withval=$with_num_cores;
48042fi
48043
48044  if test "x$with_num_cores" = x; then
48045    # The number of cores were not specified, try to probe them.
48046
48047  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
48048$as_echo_n "checking for number of cores... " >&6; }
48049  NUM_CORES=1
48050  FOUND_CORES=no
48051
48052  if test -f /proc/cpuinfo; then
48053    # Looks like a Linux (or cygwin) system
48054    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
48055    FOUND_CORES=yes
48056  elif test -x /usr/sbin/psrinfo; then
48057    # Looks like a Solaris system
48058    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
48059    FOUND_CORES=yes
48060  elif test -x /usr/sbin/system_profiler; then
48061    # Looks like a MacOSX system
48062    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
48063    FOUND_CORES=yes
48064  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
48065    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
48066    FOUND_CORES=yes
48067  elif test -n "$NUMBER_OF_PROCESSORS"; then
48068    # On windows, look in the env
48069    NUM_CORES=$NUMBER_OF_PROCESSORS
48070    FOUND_CORES=yes
48071  fi
48072
48073  if test "x$FOUND_CORES" = xyes; then
48074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
48075$as_echo "$NUM_CORES" >&6; }
48076  else
48077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
48078$as_echo "could not detect number of cores, defaulting to 1" >&6; }
48079    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
48080$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
48081  fi
48082
48083  else
48084    NUM_CORES=$with_num_cores
48085  fi
48086
48087
48088
48089  # How much memory do we have on this build system?
48090
48091# Check whether --with-memory-size was given.
48092if test "${with_memory_size+set}" = set; then :
48093  withval=$with_memory_size;
48094fi
48095
48096  if test "x$with_memory_size" = x; then
48097    # The memory size was not specified, try to probe it.
48098
48099  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
48100$as_echo_n "checking for memory size... " >&6; }
48101  # Default to 1024 MB
48102  MEMORY_SIZE=1024
48103  FOUND_MEM=no
48104
48105  if test -f /proc/meminfo; then
48106    # Looks like a Linux (or cygwin) system
48107    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
48108    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
48109    FOUND_MEM=yes
48110  elif test -x /usr/sbin/prtconf; then
48111    # Looks like a Solaris or AIX system
48112    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
48113    FOUND_MEM=yes
48114  elif test -x /usr/sbin/system_profiler; then
48115    # Looks like a MacOSX system
48116    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
48117    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
48118    FOUND_MEM=yes
48119  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
48120    # Windows, but without cygwin
48121    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
48122    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
48123    FOUND_MEM=yes
48124  fi
48125
48126  if test "x$FOUND_MEM" = xyes; then
48127    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
48128$as_echo "$MEMORY_SIZE MB" >&6; }
48129  else
48130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
48131$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
48132    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
48133$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
48134  fi
48135
48136  else
48137    MEMORY_SIZE=$with_memory_size
48138  fi
48139
48140
48141
48142  # Provide a decent default number of parallel jobs for make depending on
48143  # number of cores, amount of memory and machine architecture.
48144
48145# Check whether --with-jobs was given.
48146if test "${with_jobs+set}" = set; then :
48147  withval=$with_jobs;
48148fi
48149
48150  if test "x$with_jobs" = x; then
48151    # Number of jobs was not specified, calculate.
48152    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
48153$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
48154    # Approximate memory in GB, rounding up a bit.
48155    memory_gb=`expr $MEMORY_SIZE / 1100`
48156    # Pick the lowest of memory in gb and number of cores.
48157    if test "$memory_gb" -lt "$NUM_CORES"; then
48158      JOBS="$memory_gb"
48159    else
48160      JOBS="$NUM_CORES"
48161      # On bigger machines, leave some room for other processes to run
48162      if test "$JOBS" -gt "4"; then
48163        JOBS=`expr $JOBS '*' 90 / 100`
48164      fi
48165    fi
48166    # Cap number of jobs to 16
48167    if test "$JOBS" -gt "16"; then
48168      JOBS=16
48169    fi
48170    if test "$JOBS" -eq "0"; then
48171      JOBS=1
48172    fi
48173    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
48174$as_echo "$JOBS" >&6; }
48175  else
48176    JOBS=$with_jobs
48177  fi
48178
48179
48180
48181# Setup smart javac (after cores and memory have been setup)
48182
48183
48184# Check whether --with-sjavac-server-java was given.
48185if test "${with_sjavac_server_java+set}" = set; then :
48186  withval=$with_sjavac_server_java;
48187fi
48188
48189
48190  if test "x$with_sjavac_server_java" != x; then
48191    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
48192    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
48193    if test "x$FOUND_VERSION" = x; then
48194      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
48195    fi
48196  else
48197    SJAVAC_SERVER_JAVA=""
48198    # Hotspot specific options.
48199
48200  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
48201  $ECHO "Command: $JAVA -verbosegc -version" >&5
48202  OUTPUT=`$JAVA -verbosegc -version 2>&1`
48203  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48204  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48205  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48206    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
48207    JVM_ARG_OK=true
48208  else
48209    $ECHO "Arg failed:" >&5
48210    $ECHO "$OUTPUT" >&5
48211    JVM_ARG_OK=false
48212  fi
48213
48214    # JRockit specific options.
48215
48216  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
48217  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
48218  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
48219  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48220  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48221  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48222    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
48223    JVM_ARG_OK=true
48224  else
48225    $ECHO "Arg failed:" >&5
48226    $ECHO "$OUTPUT" >&5
48227    JVM_ARG_OK=false
48228  fi
48229
48230    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
48231  fi
48232
48233
48234  if test "$MEMORY_SIZE" -gt "2500"; then
48235
48236  $ECHO "Check if jvm arg is ok: -d64" >&5
48237  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
48238  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
48239  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48240  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48241  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48242    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
48243    JVM_ARG_OK=true
48244  else
48245    $ECHO "Arg failed:" >&5
48246    $ECHO "$OUTPUT" >&5
48247    JVM_ARG_OK=false
48248  fi
48249
48250    if test "$JVM_ARG_OK" = true; then
48251      JVM_64BIT=true
48252      JVM_ARG_OK=false
48253    fi
48254  fi
48255
48256  if test "$JVM_64BIT" = true; then
48257    if test "$MEMORY_SIZE" -gt "17000"; then
48258
48259  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
48260  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
48261  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
48262  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48263  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48264  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48265    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
48266    JVM_ARG_OK=true
48267  else
48268    $ECHO "Arg failed:" >&5
48269    $ECHO "$OUTPUT" >&5
48270    JVM_ARG_OK=false
48271  fi
48272
48273    fi
48274    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
48275
48276  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
48277  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
48278  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
48279  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48280  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48281  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48282    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
48283    JVM_ARG_OK=true
48284  else
48285    $ECHO "Arg failed:" >&5
48286    $ECHO "$OUTPUT" >&5
48287    JVM_ARG_OK=false
48288  fi
48289
48290    fi
48291    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
48292
48293  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
48294  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
48295  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
48296  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48297  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48298  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48299    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
48300    JVM_ARG_OK=true
48301  else
48302    $ECHO "Arg failed:" >&5
48303    $ECHO "$OUTPUT" >&5
48304    JVM_ARG_OK=false
48305  fi
48306
48307    fi
48308    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
48309
48310  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
48311  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
48312  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
48313  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48314  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48315  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48316    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
48317    JVM_ARG_OK=true
48318  else
48319    $ECHO "Arg failed:" >&5
48320    $ECHO "$OUTPUT" >&5
48321    JVM_ARG_OK=false
48322  fi
48323
48324    fi
48325  fi
48326  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
48327
48328  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
48329  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
48330  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
48331  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48332  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48333  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48334    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
48335    JVM_ARG_OK=true
48336  else
48337    $ECHO "Arg failed:" >&5
48338    $ECHO "$OUTPUT" >&5
48339    JVM_ARG_OK=false
48340  fi
48341
48342  fi
48343  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
48344
48345  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
48346  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
48347  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
48348  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48349  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48350  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48351    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
48352    JVM_ARG_OK=true
48353  else
48354    $ECHO "Arg failed:" >&5
48355    $ECHO "$OUTPUT" >&5
48356    JVM_ARG_OK=false
48357  fi
48358
48359  fi
48360  if test "$JVM_ARG_OK" = false; then
48361
48362  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
48363  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
48364  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
48365  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48366  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48367  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48368    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
48369    JVM_ARG_OK=true
48370  else
48371    $ECHO "Arg failed:" >&5
48372    $ECHO "$OUTPUT" >&5
48373    JVM_ARG_OK=false
48374  fi
48375
48376  fi
48377
48378  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
48379$as_echo_n "checking whether to use sjavac... " >&6; }
48380  # Check whether --enable-sjavac was given.
48381if test "${enable_sjavac+set}" = set; then :
48382  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
48383else
48384  ENABLE_SJAVAC='no'
48385fi
48386
48387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
48388$as_echo "$ENABLE_SJAVAC" >&6; }
48389
48390
48391  if test "x$ENABLE_SJAVAC" = xyes; then
48392    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
48393  else
48394    SJAVAC_SERVER_DIR=
48395  fi
48396
48397
48398
48399# Can the C/C++ compiler use precompiled headers?
48400
48401
48402  ###############################################################################
48403  #
48404  # Can the C/C++ compiler use precompiled headers?
48405  #
48406  # Check whether --enable-precompiled-headers was given.
48407if test "${enable_precompiled_headers+set}" = set; then :
48408  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
48409else
48410  ENABLE_PRECOMPH=yes
48411fi
48412
48413
48414  USE_PRECOMPILED_HEADER=1
48415  if test "x$ENABLE_PRECOMPH" = xno; then
48416    USE_PRECOMPILED_HEADER=0
48417  fi
48418
48419  if test "x$ENABLE_PRECOMPH" = xyes; then
48420    # Check that the compiler actually supports precomp headers.
48421    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48422      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
48423$as_echo_n "checking that precompiled headers work... " >&6; }
48424      echo "int alfa();" > conftest.h
48425      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
48426      if test ! -f conftest.hpp.gch; then
48427        USE_PRECOMPILED_HEADER=0
48428        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48429$as_echo "no" >&6; }
48430      else
48431        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48432$as_echo "yes" >&6; }
48433      fi
48434      rm -f conftest.h conftest.hpp.gch
48435    fi
48436  fi
48437
48438
48439
48440
48441# Setup use of ccache, if available
48442
48443  # Check whether --enable-ccache was given.
48444if test "${enable_ccache+set}" = set; then :
48445  enableval=$enable_ccache;
48446fi
48447
48448
48449  CCACHE=
48450  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
48451$as_echo_n "checking is ccache enabled... " >&6; }
48452  ENABLE_CCACHE=$enable_ccache
48453  if test "x$enable_ccache" = xyes; then
48454    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48455$as_echo "yes" >&6; }
48456    OLD_PATH="$PATH"
48457    if test "x$TOOLS_DIR" != x; then
48458      PATH=$TOOLS_DIR:$PATH
48459    fi
48460
48461
48462
48463  # Publish this variable in the help.
48464
48465
48466  if test "x$CCACHE" = x; then
48467    # The variable is not set by user, try to locate tool using the code snippet
48468    for ac_prog in ccache
48469do
48470  # Extract the first word of "$ac_prog", so it can be a program name with args.
48471set dummy $ac_prog; ac_word=$2
48472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48473$as_echo_n "checking for $ac_word... " >&6; }
48474if ${ac_cv_path_CCACHE+:} false; then :
48475  $as_echo_n "(cached) " >&6
48476else
48477  case $CCACHE in
48478  [\\/]* | ?:[\\/]*)
48479  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48480  ;;
48481  *)
48482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48483for as_dir in $PATH
48484do
48485  IFS=$as_save_IFS
48486  test -z "$as_dir" && as_dir=.
48487    for ac_exec_ext in '' $ac_executable_extensions; do
48488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48489    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48491    break 2
48492  fi
48493done
48494  done
48495IFS=$as_save_IFS
48496
48497  ;;
48498esac
48499fi
48500CCACHE=$ac_cv_path_CCACHE
48501if test -n "$CCACHE"; then
48502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48503$as_echo "$CCACHE" >&6; }
48504else
48505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48506$as_echo "no" >&6; }
48507fi
48508
48509
48510  test -n "$CCACHE" && break
48511done
48512
48513  else
48514    # The variable is set, but is it from the command line or the environment?
48515
48516    # Try to remove the string !CCACHE! from our list.
48517    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
48518    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48519      # If it failed, the variable was not from the command line. Ignore it,
48520      # but warn the user (except for BASH, which is always set by the calling BASH).
48521      if test "xCCACHE" != xBASH; then
48522        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
48523$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
48524      fi
48525      # Try to locate tool using the code snippet
48526      for ac_prog in ccache
48527do
48528  # Extract the first word of "$ac_prog", so it can be a program name with args.
48529set dummy $ac_prog; ac_word=$2
48530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48531$as_echo_n "checking for $ac_word... " >&6; }
48532if ${ac_cv_path_CCACHE+:} false; then :
48533  $as_echo_n "(cached) " >&6
48534else
48535  case $CCACHE in
48536  [\\/]* | ?:[\\/]*)
48537  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48538  ;;
48539  *)
48540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48541for as_dir in $PATH
48542do
48543  IFS=$as_save_IFS
48544  test -z "$as_dir" && as_dir=.
48545    for ac_exec_ext in '' $ac_executable_extensions; do
48546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48547    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48549    break 2
48550  fi
48551done
48552  done
48553IFS=$as_save_IFS
48554
48555  ;;
48556esac
48557fi
48558CCACHE=$ac_cv_path_CCACHE
48559if test -n "$CCACHE"; then
48560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48561$as_echo "$CCACHE" >&6; }
48562else
48563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48564$as_echo "no" >&6; }
48565fi
48566
48567
48568  test -n "$CCACHE" && break
48569done
48570
48571    else
48572      # If it succeeded, then it was overridden by the user. We will use it
48573      # for the tool.
48574
48575      # First remove it from the list of overridden variables, so we can test
48576      # for unknown variables in the end.
48577      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48578
48579      # Check if the provided tool contains a complete path.
48580      tool_specified="$CCACHE"
48581      tool_basename="${tool_specified##*/}"
48582      if test "x$tool_basename" = "x$tool_specified"; then
48583        # A command without a complete path is provided, search $PATH.
48584        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
48585$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
48586        # Extract the first word of "$tool_basename", so it can be a program name with args.
48587set dummy $tool_basename; ac_word=$2
48588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48589$as_echo_n "checking for $ac_word... " >&6; }
48590if ${ac_cv_path_CCACHE+:} false; then :
48591  $as_echo_n "(cached) " >&6
48592else
48593  case $CCACHE in
48594  [\\/]* | ?:[\\/]*)
48595  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48596  ;;
48597  *)
48598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48599for as_dir in $PATH
48600do
48601  IFS=$as_save_IFS
48602  test -z "$as_dir" && as_dir=.
48603    for ac_exec_ext in '' $ac_executable_extensions; do
48604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48605    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48607    break 2
48608  fi
48609done
48610  done
48611IFS=$as_save_IFS
48612
48613  ;;
48614esac
48615fi
48616CCACHE=$ac_cv_path_CCACHE
48617if test -n "$CCACHE"; then
48618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48619$as_echo "$CCACHE" >&6; }
48620else
48621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48622$as_echo "no" >&6; }
48623fi
48624
48625
48626        if test "x$CCACHE" = x; then
48627          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48628        fi
48629      else
48630        # Otherwise we believe it is a complete path. Use it as it is.
48631        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
48632$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
48633        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
48634$as_echo_n "checking for CCACHE... " >&6; }
48635        if test ! -x "$tool_specified"; then
48636          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48637$as_echo "not found" >&6; }
48638          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
48639        fi
48640        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48641$as_echo "$tool_specified" >&6; }
48642      fi
48643    fi
48644  fi
48645
48646
48647
48648  if test "x$CCACHE" = x; then
48649    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
48650  fi
48651
48652
48653    CCACHE_STATUS="enabled"
48654    PATH="$OLD_PATH"
48655  elif test "x$enable_ccache" = xno; then
48656    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
48657$as_echo "no, explicitly disabled" >&6; }
48658  elif test "x$enable_ccache" = x; then
48659    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48660$as_echo "no" >&6; }
48661  else
48662    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
48663$as_echo "unknown" >&6; }
48664    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
48665  fi
48666
48667
48668
48669# Check whether --with-ccache-dir was given.
48670if test "${with_ccache_dir+set}" = set; then :
48671  withval=$with_ccache_dir;
48672fi
48673
48674
48675  if test "x$with_ccache_dir" != x; then
48676    # When using a non home ccache directory, assume the use is to share ccache files
48677    # with other users. Thus change the umask.
48678    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
48679    if test "x$CCACHE" = x; then
48680      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
48681$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
48682    fi
48683  fi
48684
48685  if test "x$CCACHE" != x; then
48686
48687  if test "x$CCACHE" != x; then
48688    # Only use ccache if it is 3.1.4 or later, which supports
48689    # precompiled headers.
48690    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
48691$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
48692    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
48693    if test "x$HAS_GOOD_CCACHE" = x; then
48694      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
48695$as_echo "no, disabling ccache" >&6; }
48696      CCACHE=
48697      CCACHE_STATUS="disabled"
48698    else
48699      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48700$as_echo "yes" >&6; }
48701      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
48702$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
48703      PUSHED_FLAGS="$CXXFLAGS"
48704      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
48705      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48706/* end confdefs.h.  */
48707
48708int
48709main ()
48710{
48711
48712  ;
48713  return 0;
48714}
48715_ACEOF
48716if ac_fn_cxx_try_compile "$LINENO"; then :
48717  CC_KNOWS_CCACHE_TRICK=yes
48718else
48719  CC_KNOWS_CCACHE_TRICK=no
48720fi
48721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48722      CXXFLAGS="$PUSHED_FLAGS"
48723      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
48724        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48725$as_echo "yes" >&6; }
48726      else
48727        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
48728$as_echo "no, disabling ccaching of precompiled headers" >&6; }
48729        CCACHE=
48730        CCACHE_STATUS="disabled"
48731      fi
48732    fi
48733  fi
48734
48735  if test "x$CCACHE" != x; then
48736    CCACHE_SLOPPINESS=time_macros
48737    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
48738    CCACHE_FLAGS=-fpch-preprocess
48739
48740    if test "x$SET_CCACHE_DIR" != x; then
48741      mkdir -p $CCACHE_DIR > /dev/null 2>&1
48742      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
48743    fi
48744  fi
48745
48746  fi
48747
48748
48749###############################################################################
48750#
48751# And now the finish...
48752#
48753###############################################################################
48754
48755# Check for some common pitfalls
48756
48757  if test x"$OPENJDK_BUILD_OS" = xwindows; then
48758    file_to_test="$SRC_ROOT/LICENSE"
48759    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
48760      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
48761    fi
48762  fi
48763
48764
48765  # Did user specify any unknown variables?
48766
48767  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
48768    # Replace the separating ! with spaces before presenting for end user.
48769    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
48770    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
48771$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
48772  fi
48773
48774
48775  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
48776$as_echo_n "checking if build directory is on local disk... " >&6; }
48777
48778  # df -l lists only local disks; if the given directory is not found then
48779  # a non-zero exit code is given
48780  if test "x$DF" = x; then
48781    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48782      # msys does not have df; use Windows "net use" instead.
48783      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
48784      if test "x$IS_NETWORK_DISK" = x; then
48785        OUTPUT_DIR_IS_LOCAL="yes"
48786      else
48787        OUTPUT_DIR_IS_LOCAL="no"
48788      fi
48789    else
48790      # No df here, say it's local
48791      OUTPUT_DIR_IS_LOCAL="yes"
48792    fi
48793  else
48794    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
48795      OUTPUT_DIR_IS_LOCAL="yes"
48796    else
48797      OUTPUT_DIR_IS_LOCAL="no"
48798    fi
48799  fi
48800
48801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
48802$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
48803
48804
48805
48806  # Check if the user has any old-style ALT_ variables set.
48807  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
48808
48809  # Before generating output files, test if they exist. If they do, this is a reconfigure.
48810  # Since we can't properly handle the dependencies for this, warn the user about the situation
48811  if test -e $OUTPUT_ROOT/spec.gmk; then
48812    IS_RECONFIGURE=yes
48813  else
48814    IS_RECONFIGURE=no
48815  fi
48816
48817
48818# At the end, call the custom hook. (Dummy macro if no custom sources available)
48819
48820
48821# We're messing a bit with internal autoconf variables to put the config.status
48822# in the output directory instead of the current directory.
48823CONFIG_STATUS="$OUTPUT_ROOT/config.status"
48824
48825# Create the actual output files. Now the main work of configure is done.
48826cat >confcache <<\_ACEOF
48827# This file is a shell script that caches the results of configure
48828# tests run on this system so they can be shared between configure
48829# scripts and configure runs, see configure's option --config-cache.
48830# It is not useful on other systems.  If it contains results you don't
48831# want to keep, you may remove or edit it.
48832#
48833# config.status only pays attention to the cache file if you give it
48834# the --recheck option to rerun configure.
48835#
48836# `ac_cv_env_foo' variables (set or unset) will be overridden when
48837# loading this file, other *unset* `ac_cv_foo' will be assigned the
48838# following values.
48839
48840_ACEOF
48841
48842# The following way of writing the cache mishandles newlines in values,
48843# but we know of no workaround that is simple, portable, and efficient.
48844# So, we kill variables containing newlines.
48845# Ultrix sh set writes to stderr and can't be redirected directly,
48846# and sets the high bit in the cache file unless we assign to the vars.
48847(
48848  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
48849    eval ac_val=\$$ac_var
48850    case $ac_val in #(
48851    *${as_nl}*)
48852      case $ac_var in #(
48853      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
48854$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
48855      esac
48856      case $ac_var in #(
48857      _ | IFS | as_nl) ;; #(
48858      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
48859      *) { eval $ac_var=; unset $ac_var;} ;;
48860      esac ;;
48861    esac
48862  done
48863
48864  (set) 2>&1 |
48865    case $as_nl`(ac_space=' '; set) 2>&1` in #(
48866    *${as_nl}ac_space=\ *)
48867      # `set' does not quote correctly, so add quotes: double-quote
48868      # substitution turns \\\\ into \\, and sed turns \\ into \.
48869      sed -n \
48870	"s/'/'\\\\''/g;
48871	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
48872      ;; #(
48873    *)
48874      # `set' quotes correctly as required by POSIX, so do not add quotes.
48875      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
48876      ;;
48877    esac |
48878    sort
48879) |
48880  sed '
48881     /^ac_cv_env_/b end
48882     t clear
48883     :clear
48884     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
48885     t end
48886     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
48887     :end' >>confcache
48888if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
48889  if test -w "$cache_file"; then
48890    if test "x$cache_file" != "x/dev/null"; then
48891      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
48892$as_echo "$as_me: updating cache $cache_file" >&6;}
48893      if test ! -f "$cache_file" || test -h "$cache_file"; then
48894	cat confcache >"$cache_file"
48895      else
48896        case $cache_file in #(
48897        */* | ?:*)
48898	  mv -f confcache "$cache_file"$$ &&
48899	  mv -f "$cache_file"$$ "$cache_file" ;; #(
48900        *)
48901	  mv -f confcache "$cache_file" ;;
48902	esac
48903      fi
48904    fi
48905  else
48906    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
48907$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
48908  fi
48909fi
48910rm -f confcache
48911
48912test "x$prefix" = xNONE && prefix=$ac_default_prefix
48913# Let make expand exec_prefix.
48914test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
48915
48916DEFS=-DHAVE_CONFIG_H
48917
48918ac_libobjs=
48919ac_ltlibobjs=
48920U=
48921for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
48922  # 1. Remove the extension, and $U if already installed.
48923  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
48924  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
48925  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
48926  #    will be set to the directory where LIBOBJS objects are built.
48927  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
48928  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
48929done
48930LIBOBJS=$ac_libobjs
48931
48932LTLIBOBJS=$ac_ltlibobjs
48933
48934
48935
48936: "${CONFIG_STATUS=./config.status}"
48937ac_write_fail=0
48938ac_clean_files_save=$ac_clean_files
48939ac_clean_files="$ac_clean_files $CONFIG_STATUS"
48940{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
48941$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
48942as_write_fail=0
48943cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
48944#! $SHELL
48945# Generated by $as_me.
48946# Run this file to recreate the current configuration.
48947# Compiler output produced by configure, useful for debugging
48948# configure, is in config.log if it exists.
48949
48950debug=false
48951ac_cs_recheck=false
48952ac_cs_silent=false
48953
48954SHELL=\${CONFIG_SHELL-$SHELL}
48955export SHELL
48956_ASEOF
48957cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
48958## -------------------- ##
48959## M4sh Initialization. ##
48960## -------------------- ##
48961
48962# Be more Bourne compatible
48963DUALCASE=1; export DUALCASE # for MKS sh
48964if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
48965  emulate sh
48966  NULLCMD=:
48967  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
48968  # is contrary to our usage.  Disable this feature.
48969  alias -g '${1+"$@"}'='"$@"'
48970  setopt NO_GLOB_SUBST
48971else
48972  case `(set -o) 2>/dev/null` in #(
48973  *posix*) :
48974    set -o posix ;; #(
48975  *) :
48976     ;;
48977esac
48978fi
48979
48980
48981as_nl='
48982'
48983export as_nl
48984# Printing a long string crashes Solaris 7 /usr/bin/printf.
48985as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
48986as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48987as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
48988# Prefer a ksh shell builtin over an external printf program on Solaris,
48989# but without wasting forks for bash or zsh.
48990if test -z "$BASH_VERSION$ZSH_VERSION" \
48991    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48992  as_echo='print -r --'
48993  as_echo_n='print -rn --'
48994elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48995  as_echo='printf %s\n'
48996  as_echo_n='printf %s'
48997else
48998  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
48999    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
49000    as_echo_n='/usr/ucb/echo -n'
49001  else
49002    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
49003    as_echo_n_body='eval
49004      arg=$1;
49005      case $arg in #(
49006      *"$as_nl"*)
49007	expr "X$arg" : "X\\(.*\\)$as_nl";
49008	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
49009      esac;
49010      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
49011    '
49012    export as_echo_n_body
49013    as_echo_n='sh -c $as_echo_n_body as_echo'
49014  fi
49015  export as_echo_body
49016  as_echo='sh -c $as_echo_body as_echo'
49017fi
49018
49019# The user is always right.
49020if test "${PATH_SEPARATOR+set}" != set; then
49021  PATH_SEPARATOR=:
49022  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
49023    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
49024      PATH_SEPARATOR=';'
49025  }
49026fi
49027
49028
49029# IFS
49030# We need space, tab and new line, in precisely that order.  Quoting is
49031# there to prevent editors from complaining about space-tab.
49032# (If _AS_PATH_WALK were called with IFS unset, it would disable word
49033# splitting by setting IFS to empty value.)
49034IFS=" ""	$as_nl"
49035
49036# Find who we are.  Look in the path if we contain no directory separator.
49037as_myself=
49038case $0 in #((
49039  *[\\/]* ) as_myself=$0 ;;
49040  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49041for as_dir in $PATH
49042do
49043  IFS=$as_save_IFS
49044  test -z "$as_dir" && as_dir=.
49045    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
49046  done
49047IFS=$as_save_IFS
49048
49049     ;;
49050esac
49051# We did not find ourselves, most probably we were run as `sh COMMAND'
49052# in which case we are not to be found in the path.
49053if test "x$as_myself" = x; then
49054  as_myself=$0
49055fi
49056if test ! -f "$as_myself"; then
49057  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
49058  exit 1
49059fi
49060
49061# Unset variables that we do not need and which cause bugs (e.g. in
49062# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
49063# suppresses any "Segmentation fault" message there.  '((' could
49064# trigger a bug in pdksh 5.2.14.
49065for as_var in BASH_ENV ENV MAIL MAILPATH
49066do eval test x\${$as_var+set} = xset \
49067  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
49068done
49069PS1='$ '
49070PS2='> '
49071PS4='+ '
49072
49073# NLS nuisances.
49074LC_ALL=C
49075export LC_ALL
49076LANGUAGE=C
49077export LANGUAGE
49078
49079# CDPATH.
49080(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
49081
49082
49083# as_fn_error STATUS ERROR [LINENO LOG_FD]
49084# ----------------------------------------
49085# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
49086# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
49087# script with STATUS, using 1 if that was 0.
49088as_fn_error ()
49089{
49090  as_status=$1; test $as_status -eq 0 && as_status=1
49091  if test "$4"; then
49092    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
49093    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
49094  fi
49095  $as_echo "$as_me: error: $2" >&2
49096  as_fn_exit $as_status
49097} # as_fn_error
49098
49099
49100# as_fn_set_status STATUS
49101# -----------------------
49102# Set $? to STATUS, without forking.
49103as_fn_set_status ()
49104{
49105  return $1
49106} # as_fn_set_status
49107
49108# as_fn_exit STATUS
49109# -----------------
49110# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
49111as_fn_exit ()
49112{
49113  set +e
49114  as_fn_set_status $1
49115  exit $1
49116} # as_fn_exit
49117
49118# as_fn_unset VAR
49119# ---------------
49120# Portably unset VAR.
49121as_fn_unset ()
49122{
49123  { eval $1=; unset $1;}
49124}
49125as_unset=as_fn_unset
49126# as_fn_append VAR VALUE
49127# ----------------------
49128# Append the text in VALUE to the end of the definition contained in VAR. Take
49129# advantage of any shell optimizations that allow amortized linear growth over
49130# repeated appends, instead of the typical quadratic growth present in naive
49131# implementations.
49132if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
49133  eval 'as_fn_append ()
49134  {
49135    eval $1+=\$2
49136  }'
49137else
49138  as_fn_append ()
49139  {
49140    eval $1=\$$1\$2
49141  }
49142fi # as_fn_append
49143
49144# as_fn_arith ARG...
49145# ------------------
49146# Perform arithmetic evaluation on the ARGs, and store the result in the
49147# global $as_val. Take advantage of shells that can avoid forks. The arguments
49148# must be portable across $(()) and expr.
49149if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
49150  eval 'as_fn_arith ()
49151  {
49152    as_val=$(( $* ))
49153  }'
49154else
49155  as_fn_arith ()
49156  {
49157    as_val=`expr "$@" || test $? -eq 1`
49158  }
49159fi # as_fn_arith
49160
49161
49162if expr a : '\(a\)' >/dev/null 2>&1 &&
49163   test "X`expr 00001 : '.*\(...\)'`" = X001; then
49164  as_expr=expr
49165else
49166  as_expr=false
49167fi
49168
49169if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
49170  as_basename=basename
49171else
49172  as_basename=false
49173fi
49174
49175if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
49176  as_dirname=dirname
49177else
49178  as_dirname=false
49179fi
49180
49181as_me=`$as_basename -- "$0" ||
49182$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
49183	 X"$0" : 'X\(//\)$' \| \
49184	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
49185$as_echo X/"$0" |
49186    sed '/^.*\/\([^/][^/]*\)\/*$/{
49187	    s//\1/
49188	    q
49189	  }
49190	  /^X\/\(\/\/\)$/{
49191	    s//\1/
49192	    q
49193	  }
49194	  /^X\/\(\/\).*/{
49195	    s//\1/
49196	    q
49197	  }
49198	  s/.*/./; q'`
49199
49200# Avoid depending upon Character Ranges.
49201as_cr_letters='abcdefghijklmnopqrstuvwxyz'
49202as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
49203as_cr_Letters=$as_cr_letters$as_cr_LETTERS
49204as_cr_digits='0123456789'
49205as_cr_alnum=$as_cr_Letters$as_cr_digits
49206
49207ECHO_C= ECHO_N= ECHO_T=
49208case `echo -n x` in #(((((
49209-n*)
49210  case `echo 'xy\c'` in
49211  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
49212  xy)  ECHO_C='\c';;
49213  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
49214       ECHO_T='	';;
49215  esac;;
49216*)
49217  ECHO_N='-n';;
49218esac
49219
49220rm -f conf$$ conf$$.exe conf$$.file
49221if test -d conf$$.dir; then
49222  rm -f conf$$.dir/conf$$.file
49223else
49224  rm -f conf$$.dir
49225  mkdir conf$$.dir 2>/dev/null
49226fi
49227if (echo >conf$$.file) 2>/dev/null; then
49228  if ln -s conf$$.file conf$$ 2>/dev/null; then
49229    as_ln_s='ln -s'
49230    # ... but there are two gotchas:
49231    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
49232    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
49233    # In both cases, we have to default to `cp -pR'.
49234    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
49235      as_ln_s='cp -pR'
49236  elif ln conf$$.file conf$$ 2>/dev/null; then
49237    as_ln_s=ln
49238  else
49239    as_ln_s='cp -pR'
49240  fi
49241else
49242  as_ln_s='cp -pR'
49243fi
49244rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
49245rmdir conf$$.dir 2>/dev/null
49246
49247
49248# as_fn_mkdir_p
49249# -------------
49250# Create "$as_dir" as a directory, including parents if necessary.
49251as_fn_mkdir_p ()
49252{
49253
49254  case $as_dir in #(
49255  -*) as_dir=./$as_dir;;
49256  esac
49257  test -d "$as_dir" || eval $as_mkdir_p || {
49258    as_dirs=
49259    while :; do
49260      case $as_dir in #(
49261      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
49262      *) as_qdir=$as_dir;;
49263      esac
49264      as_dirs="'$as_qdir' $as_dirs"
49265      as_dir=`$as_dirname -- "$as_dir" ||
49266$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49267	 X"$as_dir" : 'X\(//\)[^/]' \| \
49268	 X"$as_dir" : 'X\(//\)$' \| \
49269	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
49270$as_echo X"$as_dir" |
49271    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49272	    s//\1/
49273	    q
49274	  }
49275	  /^X\(\/\/\)[^/].*/{
49276	    s//\1/
49277	    q
49278	  }
49279	  /^X\(\/\/\)$/{
49280	    s//\1/
49281	    q
49282	  }
49283	  /^X\(\/\).*/{
49284	    s//\1/
49285	    q
49286	  }
49287	  s/.*/./; q'`
49288      test -d "$as_dir" && break
49289    done
49290    test -z "$as_dirs" || eval "mkdir $as_dirs"
49291  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
49292
49293
49294} # as_fn_mkdir_p
49295if mkdir -p . 2>/dev/null; then
49296  as_mkdir_p='mkdir -p "$as_dir"'
49297else
49298  test -d ./-p && rmdir ./-p
49299  as_mkdir_p=false
49300fi
49301
49302
49303# as_fn_executable_p FILE
49304# -----------------------
49305# Test if FILE is an executable regular file.
49306as_fn_executable_p ()
49307{
49308  test -f "$1" && test -x "$1"
49309} # as_fn_executable_p
49310as_test_x='test -x'
49311as_executable_p=as_fn_executable_p
49312
49313# Sed expression to map a string onto a valid CPP name.
49314as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
49315
49316# Sed expression to map a string onto a valid variable name.
49317as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
49318
49319
49320exec 6>&1
49321## ----------------------------------- ##
49322## Main body of $CONFIG_STATUS script. ##
49323## ----------------------------------- ##
49324_ASEOF
49325test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
49326
49327cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49328# Save the log message, to keep $0 and so on meaningful, and to
49329# report actual input values of CONFIG_FILES etc. instead of their
49330# values after options handling.
49331ac_log="
49332This file was extended by OpenJDK $as_me jdk9, which was
49333generated by GNU Autoconf 2.69.  Invocation command line was
49334
49335  CONFIG_FILES    = $CONFIG_FILES
49336  CONFIG_HEADERS  = $CONFIG_HEADERS
49337  CONFIG_LINKS    = $CONFIG_LINKS
49338  CONFIG_COMMANDS = $CONFIG_COMMANDS
49339  $ $0 $@
49340
49341on `(hostname || uname -n) 2>/dev/null | sed 1q`
49342"
49343
49344_ACEOF
49345
49346case $ac_config_files in *"
49347"*) set x $ac_config_files; shift; ac_config_files=$*;;
49348esac
49349
49350case $ac_config_headers in *"
49351"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
49352esac
49353
49354
49355cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49356# Files that config.status was made for.
49357config_files="$ac_config_files"
49358config_headers="$ac_config_headers"
49359
49360_ACEOF
49361
49362cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49363ac_cs_usage="\
49364\`$as_me' instantiates files and other configuration actions
49365from templates according to the current configuration.  Unless the files
49366and actions are specified as TAGs, all are instantiated by default.
49367
49368Usage: $0 [OPTION]... [TAG]...
49369
49370  -h, --help       print this help, then exit
49371  -V, --version    print version number and configuration settings, then exit
49372      --config     print configuration, then exit
49373  -q, --quiet, --silent
49374                   do not print progress messages
49375  -d, --debug      don't remove temporary files
49376      --recheck    update $as_me by reconfiguring in the same conditions
49377      --file=FILE[:TEMPLATE]
49378                   instantiate the configuration file FILE
49379      --header=FILE[:TEMPLATE]
49380                   instantiate the configuration header FILE
49381
49382Configuration files:
49383$config_files
49384
49385Configuration headers:
49386$config_headers
49387
49388Report bugs to <build-dev@openjdk.java.net>.
49389OpenJDK home page: <http://openjdk.java.net>."
49390
49391_ACEOF
49392cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49393ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
49394ac_cs_version="\\
49395OpenJDK config.status jdk9
49396configured by $0, generated by GNU Autoconf 2.69,
49397  with options \\"\$ac_cs_config\\"
49398
49399Copyright (C) 2012 Free Software Foundation, Inc.
49400This config.status script is free software; the Free Software Foundation
49401gives unlimited permission to copy, distribute and modify it."
49402
49403ac_pwd='$ac_pwd'
49404srcdir='$srcdir'
49405AWK='$AWK'
49406test -n "\$AWK" || AWK=awk
49407_ACEOF
49408
49409cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49410# The default lists apply if the user does not specify any file.
49411ac_need_defaults=:
49412while test $# != 0
49413do
49414  case $1 in
49415  --*=?*)
49416    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49417    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
49418    ac_shift=:
49419    ;;
49420  --*=)
49421    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49422    ac_optarg=
49423    ac_shift=:
49424    ;;
49425  *)
49426    ac_option=$1
49427    ac_optarg=$2
49428    ac_shift=shift
49429    ;;
49430  esac
49431
49432  case $ac_option in
49433  # Handling of the options.
49434  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
49435    ac_cs_recheck=: ;;
49436  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
49437    $as_echo "$ac_cs_version"; exit ;;
49438  --config | --confi | --conf | --con | --co | --c )
49439    $as_echo "$ac_cs_config"; exit ;;
49440  --debug | --debu | --deb | --de | --d | -d )
49441    debug=: ;;
49442  --file | --fil | --fi | --f )
49443    $ac_shift
49444    case $ac_optarg in
49445    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49446    '') as_fn_error $? "missing file argument" ;;
49447    esac
49448    as_fn_append CONFIG_FILES " '$ac_optarg'"
49449    ac_need_defaults=false;;
49450  --header | --heade | --head | --hea )
49451    $ac_shift
49452    case $ac_optarg in
49453    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49454    esac
49455    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
49456    ac_need_defaults=false;;
49457  --he | --h)
49458    # Conflict between --help and --header
49459    as_fn_error $? "ambiguous option: \`$1'
49460Try \`$0 --help' for more information.";;
49461  --help | --hel | -h )
49462    $as_echo "$ac_cs_usage"; exit ;;
49463  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
49464  | -silent | --silent | --silen | --sile | --sil | --si | --s)
49465    ac_cs_silent=: ;;
49466
49467  # This is an error.
49468  -*) as_fn_error $? "unrecognized option: \`$1'
49469Try \`$0 --help' for more information." ;;
49470
49471  *) as_fn_append ac_config_targets " $1"
49472     ac_need_defaults=false ;;
49473
49474  esac
49475  shift
49476done
49477
49478ac_configure_extra_args=
49479
49480if $ac_cs_silent; then
49481  exec 6>/dev/null
49482  ac_configure_extra_args="$ac_configure_extra_args --silent"
49483fi
49484
49485_ACEOF
49486cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49487if \$ac_cs_recheck; then
49488  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
49489  shift
49490  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
49491  CONFIG_SHELL='$SHELL'
49492  export CONFIG_SHELL
49493  exec "\$@"
49494fi
49495
49496_ACEOF
49497cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49498exec 5>>config.log
49499{
49500  echo
49501  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
49502## Running $as_me. ##
49503_ASBOX
49504  $as_echo "$ac_log"
49505} >&5
49506
49507_ACEOF
49508cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49509_ACEOF
49510
49511cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49512
49513# Handling of arguments.
49514for ac_config_target in $ac_config_targets
49515do
49516  case $ac_config_target in
49517    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
49518    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
49519    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
49520    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
49521    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
49522    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
49523    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
49524
49525  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
49526  esac
49527done
49528
49529
49530# If the user did not use the arguments to specify the items to instantiate,
49531# then the envvar interface is used.  Set only those that are not.
49532# We use the long form for the default assignment because of an extremely
49533# bizarre bug on SunOS 4.1.3.
49534if $ac_need_defaults; then
49535  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
49536  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
49537fi
49538
49539# Have a temporary directory for convenience.  Make it in the build tree
49540# simply because there is no reason against having it here, and in addition,
49541# creating and moving files from /tmp can sometimes cause problems.
49542# Hook for its removal unless debugging.
49543# Note that there is a small window in which the directory will not be cleaned:
49544# after its creation but before its name has been assigned to `$tmp'.
49545$debug ||
49546{
49547  tmp= ac_tmp=
49548  trap 'exit_status=$?
49549  : "${ac_tmp:=$tmp}"
49550  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
49551' 0
49552  trap 'as_fn_exit 1' 1 2 13 15
49553}
49554# Create a (secure) tmp directory for tmp files.
49555
49556{
49557  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
49558  test -d "$tmp"
49559}  ||
49560{
49561  tmp=./conf$$-$RANDOM
49562  (umask 077 && mkdir "$tmp")
49563} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
49564ac_tmp=$tmp
49565
49566# Set up the scripts for CONFIG_FILES section.
49567# No need to generate them if there are no CONFIG_FILES.
49568# This happens for instance with `./config.status config.h'.
49569if test -n "$CONFIG_FILES"; then
49570
49571
49572ac_cr=`echo X | tr X '\015'`
49573# On cygwin, bash can eat \r inside `` if the user requested igncr.
49574# But we know of no other shell where ac_cr would be empty at this
49575# point, so we can use a bashism as a fallback.
49576if test "x$ac_cr" = x; then
49577  eval ac_cr=\$\'\\r\'
49578fi
49579ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
49580if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
49581  ac_cs_awk_cr='\\r'
49582else
49583  ac_cs_awk_cr=$ac_cr
49584fi
49585
49586echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
49587_ACEOF
49588
49589
49590{
49591  echo "cat >conf$$subs.awk <<_ACEOF" &&
49592  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
49593  echo "_ACEOF"
49594} >conf$$subs.sh ||
49595  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49596ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
49597ac_delim='%!_!# '
49598for ac_last_try in false false false false false :; do
49599  . ./conf$$subs.sh ||
49600    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49601
49602  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
49603  if test $ac_delim_n = $ac_delim_num; then
49604    break
49605  elif $ac_last_try; then
49606    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49607  else
49608    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49609  fi
49610done
49611rm -f conf$$subs.sh
49612
49613cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49614cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
49615_ACEOF
49616sed -n '
49617h
49618s/^/S["/; s/!.*/"]=/
49619p
49620g
49621s/^[^!]*!//
49622:repl
49623t repl
49624s/'"$ac_delim"'$//
49625t delim
49626:nl
49627h
49628s/\(.\{148\}\)..*/\1/
49629t more1
49630s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
49631p
49632n
49633b repl
49634:more1
49635s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49636p
49637g
49638s/.\{148\}//
49639t nl
49640:delim
49641h
49642s/\(.\{148\}\)..*/\1/
49643t more2
49644s/["\\]/\\&/g; s/^/"/; s/$/"/
49645p
49646b
49647:more2
49648s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49649p
49650g
49651s/.\{148\}//
49652t delim
49653' <conf$$subs.awk | sed '
49654/^[^""]/{
49655  N
49656  s/\n//
49657}
49658' >>$CONFIG_STATUS || ac_write_fail=1
49659rm -f conf$$subs.awk
49660cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49661_ACAWK
49662cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
49663  for (key in S) S_is_set[key] = 1
49664  FS = ""
49665
49666}
49667{
49668  line = $ 0
49669  nfields = split(line, field, "@")
49670  substed = 0
49671  len = length(field[1])
49672  for (i = 2; i < nfields; i++) {
49673    key = field[i]
49674    keylen = length(key)
49675    if (S_is_set[key]) {
49676      value = S[key]
49677      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
49678      len += length(value) + length(field[++i])
49679      substed = 1
49680    } else
49681      len += 1 + keylen
49682  }
49683
49684  print line
49685}
49686
49687_ACAWK
49688_ACEOF
49689cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49690if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
49691  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
49692else
49693  cat
49694fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
49695  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
49696_ACEOF
49697
49698# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
49699# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
49700# trailing colons and then remove the whole line if VPATH becomes empty
49701# (actually we leave an empty line to preserve line numbers).
49702if test "x$srcdir" = x.; then
49703  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
49704h
49705s///
49706s/^/:/
49707s/[	 ]*$/:/
49708s/:\$(srcdir):/:/g
49709s/:\${srcdir}:/:/g
49710s/:@srcdir@:/:/g
49711s/^:*//
49712s/:*$//
49713x
49714s/\(=[	 ]*\).*/\1/
49715G
49716s/\n//
49717s/^[^=]*=[	 ]*$//
49718}'
49719fi
49720
49721cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49722fi # test -n "$CONFIG_FILES"
49723
49724# Set up the scripts for CONFIG_HEADERS section.
49725# No need to generate them if there are no CONFIG_HEADERS.
49726# This happens for instance with `./config.status Makefile'.
49727if test -n "$CONFIG_HEADERS"; then
49728cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
49729BEGIN {
49730_ACEOF
49731
49732# Transform confdefs.h into an awk script `defines.awk', embedded as
49733# here-document in config.status, that substitutes the proper values into
49734# config.h.in to produce config.h.
49735
49736# Create a delimiter string that does not exist in confdefs.h, to ease
49737# handling of long lines.
49738ac_delim='%!_!# '
49739for ac_last_try in false false :; do
49740  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
49741  if test -z "$ac_tt"; then
49742    break
49743  elif $ac_last_try; then
49744    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
49745  else
49746    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49747  fi
49748done
49749
49750# For the awk script, D is an array of macro values keyed by name,
49751# likewise P contains macro parameters if any.  Preserve backslash
49752# newline sequences.
49753
49754ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
49755sed -n '
49756s/.\{148\}/&'"$ac_delim"'/g
49757t rset
49758:rset
49759s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
49760t def
49761d
49762:def
49763s/\\$//
49764t bsnl
49765s/["\\]/\\&/g
49766s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
49767D["\1"]=" \3"/p
49768s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
49769d
49770:bsnl
49771s/["\\]/\\&/g
49772s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
49773D["\1"]=" \3\\\\\\n"\\/p
49774t cont
49775s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
49776t cont
49777d
49778:cont
49779n
49780s/.\{148\}/&'"$ac_delim"'/g
49781t clear
49782:clear
49783s/\\$//
49784t bsnlc
49785s/["\\]/\\&/g; s/^/"/; s/$/"/p
49786d
49787:bsnlc
49788s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
49789b cont
49790' <confdefs.h | sed '
49791s/'"$ac_delim"'/"\\\
49792"/g' >>$CONFIG_STATUS || ac_write_fail=1
49793
49794cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49795  for (key in D) D_is_set[key] = 1
49796  FS = ""
49797}
49798/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
49799  line = \$ 0
49800  split(line, arg, " ")
49801  if (arg[1] == "#") {
49802    defundef = arg[2]
49803    mac1 = arg[3]
49804  } else {
49805    defundef = substr(arg[1], 2)
49806    mac1 = arg[2]
49807  }
49808  split(mac1, mac2, "(") #)
49809  macro = mac2[1]
49810  prefix = substr(line, 1, index(line, defundef) - 1)
49811  if (D_is_set[macro]) {
49812    # Preserve the white space surrounding the "#".
49813    print prefix "define", macro P[macro] D[macro]
49814    next
49815  } else {
49816    # Replace #undef with comments.  This is necessary, for example,
49817    # in the case of _POSIX_SOURCE, which is predefined and required
49818    # on some systems where configure will not decide to define it.
49819    if (defundef == "undef") {
49820      print "/*", prefix defundef, macro, "*/"
49821      next
49822    }
49823  }
49824}
49825{ print }
49826_ACAWK
49827_ACEOF
49828cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49829  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
49830fi # test -n "$CONFIG_HEADERS"
49831
49832
49833eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
49834shift
49835for ac_tag
49836do
49837  case $ac_tag in
49838  :[FHLC]) ac_mode=$ac_tag; continue;;
49839  esac
49840  case $ac_mode$ac_tag in
49841  :[FHL]*:*);;
49842  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
49843  :[FH]-) ac_tag=-:-;;
49844  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
49845  esac
49846  ac_save_IFS=$IFS
49847  IFS=:
49848  set x $ac_tag
49849  IFS=$ac_save_IFS
49850  shift
49851  ac_file=$1
49852  shift
49853
49854  case $ac_mode in
49855  :L) ac_source=$1;;
49856  :[FH])
49857    ac_file_inputs=
49858    for ac_f
49859    do
49860      case $ac_f in
49861      -) ac_f="$ac_tmp/stdin";;
49862      *) # Look for the file first in the build tree, then in the source tree
49863	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
49864	 # because $ac_f cannot contain `:'.
49865	 test -f "$ac_f" ||
49866	   case $ac_f in
49867	   [\\/$]*) false;;
49868	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
49869	   esac ||
49870	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
49871      esac
49872      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
49873      as_fn_append ac_file_inputs " '$ac_f'"
49874    done
49875
49876    # Let's still pretend it is `configure' which instantiates (i.e., don't
49877    # use $as_me), people would be surprised to read:
49878    #    /* config.h.  Generated by config.status.  */
49879    configure_input='Generated from '`
49880	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
49881	`' by configure.'
49882    if test x"$ac_file" != x-; then
49883      configure_input="$ac_file.  $configure_input"
49884      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
49885$as_echo "$as_me: creating $ac_file" >&6;}
49886    fi
49887    # Neutralize special characters interpreted by sed in replacement strings.
49888    case $configure_input in #(
49889    *\&* | *\|* | *\\* )
49890       ac_sed_conf_input=`$as_echo "$configure_input" |
49891       sed 's/[\\\\&|]/\\\\&/g'`;; #(
49892    *) ac_sed_conf_input=$configure_input;;
49893    esac
49894
49895    case $ac_tag in
49896    *:-:* | *:-) cat >"$ac_tmp/stdin" \
49897      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
49898    esac
49899    ;;
49900  esac
49901
49902  ac_dir=`$as_dirname -- "$ac_file" ||
49903$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49904	 X"$ac_file" : 'X\(//\)[^/]' \| \
49905	 X"$ac_file" : 'X\(//\)$' \| \
49906	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
49907$as_echo X"$ac_file" |
49908    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49909	    s//\1/
49910	    q
49911	  }
49912	  /^X\(\/\/\)[^/].*/{
49913	    s//\1/
49914	    q
49915	  }
49916	  /^X\(\/\/\)$/{
49917	    s//\1/
49918	    q
49919	  }
49920	  /^X\(\/\).*/{
49921	    s//\1/
49922	    q
49923	  }
49924	  s/.*/./; q'`
49925  as_dir="$ac_dir"; as_fn_mkdir_p
49926  ac_builddir=.
49927
49928case "$ac_dir" in
49929.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
49930*)
49931  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
49932  # A ".." for each directory in $ac_dir_suffix.
49933  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
49934  case $ac_top_builddir_sub in
49935  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
49936  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
49937  esac ;;
49938esac
49939ac_abs_top_builddir=$ac_pwd
49940ac_abs_builddir=$ac_pwd$ac_dir_suffix
49941# for backward compatibility:
49942ac_top_builddir=$ac_top_build_prefix
49943
49944case $srcdir in
49945  .)  # We are building in place.
49946    ac_srcdir=.
49947    ac_top_srcdir=$ac_top_builddir_sub
49948    ac_abs_top_srcdir=$ac_pwd ;;
49949  [\\/]* | ?:[\\/]* )  # Absolute name.
49950    ac_srcdir=$srcdir$ac_dir_suffix;
49951    ac_top_srcdir=$srcdir
49952    ac_abs_top_srcdir=$srcdir ;;
49953  *) # Relative name.
49954    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
49955    ac_top_srcdir=$ac_top_build_prefix$srcdir
49956    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
49957esac
49958ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
49959
49960
49961  case $ac_mode in
49962  :F)
49963  #
49964  # CONFIG_FILE
49965  #
49966
49967_ACEOF
49968
49969cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49970# If the template does not know about datarootdir, expand it.
49971# FIXME: This hack should be removed a few years after 2.60.
49972ac_datarootdir_hack=; ac_datarootdir_seen=
49973ac_sed_dataroot='
49974/datarootdir/ {
49975  p
49976  q
49977}
49978/@datadir@/p
49979/@docdir@/p
49980/@infodir@/p
49981/@localedir@/p
49982/@mandir@/p'
49983case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
49984*datarootdir*) ac_datarootdir_seen=yes;;
49985*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
49986  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
49987$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
49988_ACEOF
49989cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49990  ac_datarootdir_hack='
49991  s&@datadir@&$datadir&g
49992  s&@docdir@&$docdir&g
49993  s&@infodir@&$infodir&g
49994  s&@localedir@&$localedir&g
49995  s&@mandir@&$mandir&g
49996  s&\\\${datarootdir}&$datarootdir&g' ;;
49997esac
49998_ACEOF
49999
50000# Neutralize VPATH when `$srcdir' = `.'.
50001# Shell code in configure.ac might set extrasub.
50002# FIXME: do we really want to maintain this feature?
50003cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50004ac_sed_extra="$ac_vpsub
50005$extrasub
50006_ACEOF
50007cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50008:t
50009/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
50010s|@configure_input@|$ac_sed_conf_input|;t t
50011s&@top_builddir@&$ac_top_builddir_sub&;t t
50012s&@top_build_prefix@&$ac_top_build_prefix&;t t
50013s&@srcdir@&$ac_srcdir&;t t
50014s&@abs_srcdir@&$ac_abs_srcdir&;t t
50015s&@top_srcdir@&$ac_top_srcdir&;t t
50016s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
50017s&@builddir@&$ac_builddir&;t t
50018s&@abs_builddir@&$ac_abs_builddir&;t t
50019s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
50020$ac_datarootdir_hack
50021"
50022eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
50023  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50024
50025test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
50026  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
50027  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
50028      "$ac_tmp/out"`; test -z "$ac_out"; } &&
50029  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
50030which seems to be undefined.  Please make sure it is defined" >&5
50031$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
50032which seems to be undefined.  Please make sure it is defined" >&2;}
50033
50034  rm -f "$ac_tmp/stdin"
50035  case $ac_file in
50036  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
50037  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
50038  esac \
50039  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50040 ;;
50041  :H)
50042  #
50043  # CONFIG_HEADER
50044  #
50045  if test x"$ac_file" != x-; then
50046    {
50047      $as_echo "/* $configure_input  */" \
50048      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
50049    } >"$ac_tmp/config.h" \
50050      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50051    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
50052      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
50053$as_echo "$as_me: $ac_file is unchanged" >&6;}
50054    else
50055      rm -f "$ac_file"
50056      mv "$ac_tmp/config.h" "$ac_file" \
50057	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
50058    fi
50059  else
50060    $as_echo "/* $configure_input  */" \
50061      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
50062      || as_fn_error $? "could not create -" "$LINENO" 5
50063  fi
50064 ;;
50065
50066
50067  esac
50068
50069done # for ac_tag
50070
50071
50072as_fn_exit 0
50073_ACEOF
50074ac_clean_files=$ac_clean_files_save
50075
50076test $ac_write_fail = 0 ||
50077  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
50078
50079
50080# configure is writing to config.log, and then calls config.status.
50081# config.status does its own redirection, appending to config.log.
50082# Unfortunately, on DOS this fails, as config.log is still kept open
50083# by configure, so config.status won't be able to write to it; its
50084# output is simply discarded.  So we exec the FD to /dev/null,
50085# effectively closing config.log, so it can be properly (re)opened and
50086# appended to by config.status.  When coming back to configure, we
50087# need to make the FD available again.
50088if test "$no_create" != yes; then
50089  ac_cs_success=:
50090  ac_config_status_args=
50091  test "$silent" = yes &&
50092    ac_config_status_args="$ac_config_status_args --quiet"
50093  exec 5>/dev/null
50094  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
50095  exec 5>>config.log
50096  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
50097  # would make configure fail if this is the last instruction.
50098  $ac_cs_success || as_fn_exit 1
50099fi
50100if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
50101  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
50102$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
50103fi
50104
50105
50106# Try to move the config.log file to the output directory.
50107if test -e ./config.log; then
50108  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
50109fi
50110
50111# Make the compare script executable
50112$CHMOD +x $OUTPUT_ROOT/compare.sh
50113
50114# Finally output some useful information to the user
50115
50116  # Finally output some useful information to the user
50117
50118  printf "\n"
50119  printf "====================================================\n"
50120  if test "x$no_create" != "xyes"; then
50121    if test "x$IS_RECONFIGURE" != "xyes"; then
50122      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
50123    else
50124      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
50125    fi
50126  else
50127    if test "x$IS_RECONFIGURE" != "xyes"; then
50128      printf "A configuration has been successfully checked but not created\n"
50129    else
50130      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
50131    fi
50132  fi
50133  if test "x$CONFIGURE_COMMAND_LINE" != x; then
50134    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
50135  else
50136    printf "using default settings.\n"
50137  fi
50138
50139  printf "\n"
50140  printf "Configuration summary:\n"
50141  printf "* Debug level:    $DEBUG_LEVEL\n"
50142  printf "* JDK variant:    $JDK_VARIANT\n"
50143  printf "* JVM variants:   $with_jvm_variants\n"
50144  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
50145
50146  printf "\n"
50147  printf "Tools summary:\n"
50148  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
50149    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
50150  fi
50151  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
50152  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
50153  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
50154  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
50155
50156  printf "\n"
50157  printf "Build performance summary:\n"
50158  printf "* Cores to use:   $JOBS\n"
50159  printf "* Memory limit:   $MEMORY_SIZE MB\n"
50160  if test "x$CCACHE_STATUS" != "x"; then
50161    printf "* ccache status:  $CCACHE_STATUS\n"
50162  fi
50163  printf "\n"
50164
50165  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
50166    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
50167    printf "will result in longer build times.\n"
50168    printf "\n"
50169  fi
50170
50171  if test "x$FOUND_ALT_VARIABLES" != "x"; then
50172    printf "WARNING: You have old-style ALT_ environment variables set.\n"
50173    printf "These are not respected, and will be ignored. It is recommended\n"
50174    printf "that you clean your environment. The following variables are set:\n"
50175    printf "$FOUND_ALT_VARIABLES\n"
50176    printf "\n"
50177  fi
50178
50179  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
50180    printf "WARNING: Your build output directory is not on a local disk.\n"
50181    printf "This will severely degrade build performance!\n"
50182    printf "It is recommended that you create an output directory on a local disk,\n"
50183    printf "and run the configure script again from that directory.\n"
50184    printf "\n"
50185  fi
50186
50187  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
50188    printf "WARNING: The result of this configuration has overridden an older\n"
50189    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
50190    printf "proper build. Failure to do so might result in strange build problems.\n"
50191    printf "\n"
50192  fi
50193
50194  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
50195    printf "WARNING: The result of this configuration was not saved.\n"
50196    printf "You should run without '--no-create | -n' to create the configuration.\n"
50197    printf "\n"
50198  fi
50199
50200