generated-configure.sh revision 984:08301f5e5780
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_LIBGIF
657USE_EXTERNAL_LIBJPEG
658ALSA_LIBS
659ALSA_CFLAGS
660FREETYPE_BUNDLE_LIB_PATH
661FREETYPE_LIBS
662FREETYPE_CFLAGS
663CUPS_CFLAGS
664OPENWIN_HOME
665X_EXTRA_LIBS
666X_LIBS
667X_PRE_LIBS
668X_CFLAGS
669XMKMF
670FIXPATH
671ZIP_DEBUGINFO_FILES
672ENABLE_DEBUG_SYMBOLS
673COMPILER_SUPPORTS_TARGET_BITS_FLAG
674ZERO_ARCHFLAG
675LDFLAGS_CXX_JDK
676LDFLAGS_JDKEXE_SUFFIX
677LDFLAGS_JDKLIB_SUFFIX
678LDFLAGS_JDKEXE
679LDFLAGS_JDKLIB
680CXXFLAGS_JDKEXE
681CXXFLAGS_JDKLIB
682CFLAGS_JDKEXE
683CFLAGS_JDKLIB
684MACOSX_VERSION_MIN
685LEGACY_EXTRA_LDFLAGS
686LEGACY_EXTRA_CXXFLAGS
687LEGACY_EXTRA_CFLAGS
688CXX_O_FLAG_NONE
689CXX_O_FLAG_NORM
690CXX_O_FLAG_HI
691CXX_O_FLAG_HIGHEST
692C_O_FLAG_NONE
693C_O_FLAG_NORM
694C_O_FLAG_HI
695C_O_FLAG_HIGHEST
696CXXFLAGS_DEBUG_SYMBOLS
697CFLAGS_DEBUG_SYMBOLS
698CXX_FLAG_DEPS
699C_FLAG_DEPS
700SET_SHARED_LIBRARY_MAPFILE
701SET_SHARED_LIBRARY_NAME
702SET_SHARED_LIBRARY_ORIGIN
703SET_EXECUTABLE_ORIGIN
704SHARED_LIBRARY_FLAGS
705CXX_FLAG_REORDER
706C_FLAG_REORDER
707RC_FLAGS
708AR_OUT_OPTION
709LD_OUT_OPTION
710EXE_OUT_OPTION
711CC_OUT_OPTION
712POST_MCS_CMD
713POST_STRIP_CMD
714ARFLAGS
715COMPILER_TARGET_BITS_FLAG
716JT_HOME
717JTREGEXE
718USING_BROKEN_SUSE_LD
719PACKAGE_PATH
720LDEXECXX
721LDEXE
722USE_CLANG
723HOTSPOT_LD
724HOTSPOT_CXX
725HOTSPOT_RC
726HOTSPOT_MT
727BUILD_LD
728BUILD_CXX
729BUILD_CC
730ac_ct_OBJDUMP
731OBJDUMP
732ac_ct_OBJCOPY
733OBJCOPY
734ac_ct_NM
735ac_ct_STRIP
736MCS
737GNM
738NM
739STRIP
740DUMPBIN
741RC
742MT
743LIPO
744ac_ct_OBJC
745OBJCFLAGS
746OBJC
747ac_ct_AR
748AR
749AS
750LDCXX
751LD
752CXXCPP
753CPP
754ac_ct_CXX
755CXXFLAGS
756CXX
757ac_ct_PROPER_COMPILER_CXX
758PROPER_COMPILER_CXX
759TOOLS_DIR_CXX
760POTENTIAL_CXX
761OBJEXT
762EXEEXT
763ac_ct_CC
764CPPFLAGS
765LDFLAGS
766CFLAGS
767CC
768ac_ct_PROPER_COMPILER_CC
769PROPER_COMPILER_CC
770TOOLS_DIR_CC
771POTENTIAL_CC
772VS_PATH
773VS_LIB
774VS_INCLUDE
775CYGWIN_LINK
776EXE_SUFFIX
777OBJ_SUFFIX
778STATIC_LIBRARY
779SHARED_LIBRARY
780STATIC_LIBRARY_SUFFIX
781SHARED_LIBRARY_SUFFIX
782LIBRARY_PREFIX
783TOOLCHAIN_TYPE
784BUILD_HOTSPOT
785HOTSPOT_DIST
786BUILD_OUTPUT
787OVERRIDE_SRC_ROOT
788ADD_SRC_ROOT
789JDK_TOPDIR
790NASHORN_TOPDIR
791HOTSPOT_TOPDIR
792JAXWS_TOPDIR
793JAXP_TOPDIR
794CORBA_TOPDIR
795LANGTOOLS_TOPDIR
796JAVA_FLAGS
797BOOT_JDK_JVMARGS
798JAVAC_FLAGS
799BOOT_JDK_SOURCETARGET
800JARSIGNER
801NATIVE2ASCII
802JAR
803JAVAH
804JAVAC
805JAVA
806BOOT_JDK
807BOOT_TOOLSJAR
808BOOT_RTJAR
809JAVA_CHECK
810JAVAC_CHECK
811COOKED_BUILD_NUMBER
812JDK_VERSION
813COPYRIGHT_YEAR
814MACOSX_BUNDLE_ID_BASE
815MACOSX_BUNDLE_NAME_BASE
816COMPANY_NAME
817JDK_RC_PLATFORM_NAME
818PRODUCT_SUFFIX
819PRODUCT_NAME
820LAUNCHER_NAME
821MILESTONE
822JDK_BUILD_NUMBER
823JDK_UPDATE_VERSION
824JDK_MICRO_VERSION
825JDK_MINOR_VERSION
826JDK_MAJOR_VERSION
827USER_RELEASE_SUFFIX
828COMPRESS_JARS
829RMICONNECTOR_IIOP
830UNLIMITED_CRYPTO
831CACERTS_FILE
832TEST_IN_BUILD
833BUILD_HEADLESS
834SUPPORT_HEADFUL
835SUPPORT_HEADLESS
836BDEPS_FTP
837BDEPS_UNZIP
838OS_VERSION_MICRO
839OS_VERSION_MINOR
840OS_VERSION_MAJOR
841PKG_CONFIG
842CODESIGN
843XATTR
844DSYMUTIL
845IS_GNU_TIME
846TIME
847STAT
848HG
849READELF
850OTOOL
851LDD
852ZIP
853UNZIP
854FIND_DELETE
855MAKE
856CHECK_TOOLSDIR_MAKE
857CHECK_TOOLSDIR_GMAKE
858CHECK_MAKE
859CHECK_GMAKE
860PKGHANDLER
861OUTPUT_ROOT
862CONF_NAME
863SPEC
864BUILD_VARIANT_RELEASE
865DEBUG_CLASSFILES
866FASTDEBUG
867VARIANT
868DEBUG_LEVEL
869MACOSX_UNIVERSAL
870INCLUDE_SA
871JVM_VARIANT_CORE
872JVM_VARIANT_ZEROSHARK
873JVM_VARIANT_ZERO
874JVM_VARIANT_KERNEL
875JVM_VARIANT_MINIMAL1
876JVM_VARIANT_CLIENT
877JVM_VARIANT_SERVER
878JVM_VARIANTS
879JVM_INTERPRETER
880JDK_VARIANT
881SET_OPENJDK
882BUILD_LOG_WRAPPER
883BUILD_LOG_PREVIOUS
884BUILD_LOG
885SYS_ROOT
886TOPDIR
887PATH_SEP
888ZERO_ARCHDEF
889DEFINE_CROSS_COMPILE_ARCH
890LP64
891OPENJDK_TARGET_OS_EXPORT_DIR
892OPENJDK_TARGET_OS_API_DIR
893OPENJDK_TARGET_CPU_JLI_CFLAGS
894OPENJDK_TARGET_CPU_OSARCH
895OPENJDK_TARGET_CPU_ISADIR
896OPENJDK_TARGET_CPU_LIBDIR
897OPENJDK_TARGET_CPU_LEGACY_LIB
898OPENJDK_TARGET_CPU_LEGACY
899REQUIRED_OS_VERSION
900REQUIRED_OS_NAME
901COMPILE_TYPE
902OPENJDK_TARGET_CPU_ENDIAN
903OPENJDK_TARGET_CPU_BITS
904OPENJDK_TARGET_CPU_ARCH
905OPENJDK_TARGET_CPU
906OPENJDK_TARGET_OS_API
907OPENJDK_TARGET_OS
908OPENJDK_BUILD_CPU_ENDIAN
909OPENJDK_BUILD_CPU_BITS
910OPENJDK_BUILD_CPU_ARCH
911OPENJDK_BUILD_CPU
912OPENJDK_BUILD_OS_API
913OPENJDK_BUILD_OS
914OPENJDK_BUILD_AUTOCONF_NAME
915OPENJDK_TARGET_AUTOCONF_NAME
916target_os
917target_vendor
918target_cpu
919target
920host_os
921host_vendor
922host_cpu
923host
924build_os
925build_vendor
926build_cpu
927build
928SETFILE
929DF
930READLINK
931CYGPATH
932SED
933FGREP
934EGREP
935GREP
936AWK
937XARGS
938WHICH
939WC
940UNIQ
941UNAME
942TR
943TOUCH
944TEE
945TAR
946TAIL
947SORT
948SH
949RM
950PRINTF
951NAWK
952MV
953MKTEMP
954MKDIR
955LS
956LN
957HEAD
958FIND
959FILE
960EXPR
961ECHO
962DIRNAME
963DIFF
964DATE
965CUT
966CPIO
967CP
968COMM
969CMP
970CHMOD
971CAT
972BASH
973BASENAME
974DATE_WHEN_CONFIGURED
975CONFIGURE_COMMAND_LINE
976target_alias
977host_alias
978build_alias
979LIBS
980ECHO_T
981ECHO_N
982ECHO_C
983DEFS
984mandir
985localedir
986libdir
987psdir
988pdfdir
989dvidir
990htmldir
991infodir
992docdir
993oldincludedir
994includedir
995localstatedir
996sharedstatedir
997sysconfdir
998datadir
999datarootdir
1000libexecdir
1001sbindir
1002bindir
1003program_transform_name
1004prefix
1005exec_prefix
1006PACKAGE_URL
1007PACKAGE_BUGREPORT
1008PACKAGE_STRING
1009PACKAGE_VERSION
1010PACKAGE_TARNAME
1011PACKAGE_NAME
1012PATH_SEPARATOR
1013SHELL'
1014ac_subst_files=''
1015ac_user_opts='
1016enable_option_checking
1017with_target_bits
1018with_sys_root
1019with_tools_dir
1020with_devkit
1021enable_openjdk_only
1022with_custom_make_dir
1023with_jdk_variant
1024with_jvm_interpreter
1025with_jvm_variants
1026enable_debug
1027with_debug_level
1028with_conf_name
1029with_builddeps_conf
1030with_builddeps_server
1031with_builddeps_dir
1032with_builddeps_group
1033enable_headful
1034enable_hotspot_test_in_build
1035with_cacerts_file
1036enable_unlimited_crypto
1037enable_rmiconnector_iiop
1038with_milestone
1039with_update_version
1040with_user_release_suffix
1041with_build_number
1042with_boot_jdk
1043with_boot_jdk_jvmargs
1044with_add_source_root
1045with_override_source_root
1046with_adds_and_overrides
1047with_override_langtools
1048with_override_corba
1049with_override_jaxp
1050with_override_jaxws
1051with_override_hotspot
1052with_override_nashorn
1053with_override_jdk
1054with_import_hotspot
1055with_toolchain_type
1056with_jtreg
1057with_extra_cflags
1058with_extra_cxxflags
1059with_extra_ldflags
1060enable_debug_symbols
1061enable_zip_debug_info
1062enable_macosx_runtime_support
1063with_x
1064with_cups
1065with_cups_include
1066with_freetype
1067with_freetype_include
1068with_freetype_lib
1069enable_freetype_bundling
1070with_alsa
1071with_alsa_include
1072with_alsa_lib
1073with_giflib
1074with_zlib
1075with_stdc__lib
1076with_msvcr_dll
1077with_dxsdk
1078with_dxsdk_lib
1079with_dxsdk_include
1080with_num_cores
1081with_memory_size
1082with_jobs
1083with_sjavac_server_java
1084enable_sjavac
1085enable_precompiled_headers
1086enable_ccache
1087with_ccache_dir
1088'
1089      ac_precious_vars='build_alias
1090host_alias
1091target_alias
1092BASENAME
1093BASH
1094CAT
1095CHMOD
1096CMP
1097COMM
1098CP
1099CPIO
1100CUT
1101DATE
1102DIFF
1103DIRNAME
1104ECHO
1105EXPR
1106FILE
1107FIND
1108HEAD
1109LN
1110LS
1111MKDIR
1112MKTEMP
1113MV
1114NAWK
1115PRINTF
1116RM
1117SH
1118SORT
1119TAIL
1120TAR
1121TEE
1122TOUCH
1123TR
1124UNAME
1125UNIQ
1126WC
1127WHICH
1128XARGS
1129AWK
1130GREP
1131EGREP
1132FGREP
1133SED
1134CYGPATH
1135READLINK
1136DF
1137SETFILE
1138UNZIP
1139ZIP
1140LDD
1141OTOOL
1142READELF
1143HG
1144STAT
1145TIME
1146DSYMUTIL
1147XATTR
1148CODESIGN
1149PKG_CONFIG
1150JAVA
1151JAVAC
1152JAVAH
1153JAR
1154NATIVE2ASCII
1155JARSIGNER
1156CC
1157CFLAGS
1158LDFLAGS
1159LIBS
1160CPPFLAGS
1161CXX
1162CXXFLAGS
1163CCC
1164CPP
1165CXXCPP
1166AS
1167AR
1168OBJC
1169OBJCFLAGS
1170LIPO
1171STRIP
1172NM
1173GNM
1174MCS
1175OBJCOPY
1176OBJDUMP
1177BUILD_CC
1178BUILD_CXX
1179BUILD_LD
1180JTREGEXE
1181XMKMF
1182FREETYPE_CFLAGS
1183FREETYPE_LIBS
1184ALSA_CFLAGS
1185ALSA_LIBS
1186LIBFFI_CFLAGS
1187LIBFFI_LIBS
1188CCACHE'
1189
1190
1191# Initialize some variables set by options.
1192ac_init_help=
1193ac_init_version=false
1194ac_unrecognized_opts=
1195ac_unrecognized_sep=
1196# The variables have the same names as the options, with
1197# dashes changed to underlines.
1198cache_file=/dev/null
1199exec_prefix=NONE
1200no_create=
1201no_recursion=
1202prefix=NONE
1203program_prefix=NONE
1204program_suffix=NONE
1205program_transform_name=s,x,x,
1206silent=
1207site=
1208srcdir=
1209verbose=
1210x_includes=NONE
1211x_libraries=NONE
1212
1213# Installation directory options.
1214# These are left unexpanded so users can "make install exec_prefix=/foo"
1215# and all the variables that are supposed to be based on exec_prefix
1216# by default will actually change.
1217# Use braces instead of parens because sh, perl, etc. also accept them.
1218# (The list follows the same order as the GNU Coding Standards.)
1219bindir='${exec_prefix}/bin'
1220sbindir='${exec_prefix}/sbin'
1221libexecdir='${exec_prefix}/libexec'
1222datarootdir='${prefix}/share'
1223datadir='${datarootdir}'
1224sysconfdir='${prefix}/etc'
1225sharedstatedir='${prefix}/com'
1226localstatedir='${prefix}/var'
1227includedir='${prefix}/include'
1228oldincludedir='/usr/include'
1229docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1230infodir='${datarootdir}/info'
1231htmldir='${docdir}'
1232dvidir='${docdir}'
1233pdfdir='${docdir}'
1234psdir='${docdir}'
1235libdir='${exec_prefix}/lib'
1236localedir='${datarootdir}/locale'
1237mandir='${datarootdir}/man'
1238
1239ac_prev=
1240ac_dashdash=
1241for ac_option
1242do
1243  # If the previous option needs an argument, assign it.
1244  if test -n "$ac_prev"; then
1245    eval $ac_prev=\$ac_option
1246    ac_prev=
1247    continue
1248  fi
1249
1250  case $ac_option in
1251  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1252  *=)   ac_optarg= ;;
1253  *)    ac_optarg=yes ;;
1254  esac
1255
1256  # Accept the important Cygnus configure options, so we can diagnose typos.
1257
1258  case $ac_dashdash$ac_option in
1259  --)
1260    ac_dashdash=yes ;;
1261
1262  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1263    ac_prev=bindir ;;
1264  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1265    bindir=$ac_optarg ;;
1266
1267  -build | --build | --buil | --bui | --bu)
1268    ac_prev=build_alias ;;
1269  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1270    build_alias=$ac_optarg ;;
1271
1272  -cache-file | --cache-file | --cache-fil | --cache-fi \
1273  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1274    ac_prev=cache_file ;;
1275  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1276  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1277    cache_file=$ac_optarg ;;
1278
1279  --config-cache | -C)
1280    cache_file=config.cache ;;
1281
1282  -datadir | --datadir | --datadi | --datad)
1283    ac_prev=datadir ;;
1284  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1285    datadir=$ac_optarg ;;
1286
1287  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1288  | --dataroo | --dataro | --datar)
1289    ac_prev=datarootdir ;;
1290  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1291  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1292    datarootdir=$ac_optarg ;;
1293
1294  -disable-* | --disable-*)
1295    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1296    # Reject names that are not valid shell variable names.
1297    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1298      as_fn_error $? "invalid feature name: $ac_useropt"
1299    ac_useropt_orig=$ac_useropt
1300    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1301    case $ac_user_opts in
1302      *"
1303"enable_$ac_useropt"
1304"*) ;;
1305      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1306	 ac_unrecognized_sep=', ';;
1307    esac
1308    eval enable_$ac_useropt=no ;;
1309
1310  -docdir | --docdir | --docdi | --doc | --do)
1311    ac_prev=docdir ;;
1312  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1313    docdir=$ac_optarg ;;
1314
1315  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1316    ac_prev=dvidir ;;
1317  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1318    dvidir=$ac_optarg ;;
1319
1320  -enable-* | --enable-*)
1321    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1322    # Reject names that are not valid shell variable names.
1323    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1324      as_fn_error $? "invalid feature name: $ac_useropt"
1325    ac_useropt_orig=$ac_useropt
1326    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1327    case $ac_user_opts in
1328      *"
1329"enable_$ac_useropt"
1330"*) ;;
1331      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1332	 ac_unrecognized_sep=', ';;
1333    esac
1334    eval enable_$ac_useropt=\$ac_optarg ;;
1335
1336  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1337  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1338  | --exec | --exe | --ex)
1339    ac_prev=exec_prefix ;;
1340  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1341  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1342  | --exec=* | --exe=* | --ex=*)
1343    exec_prefix=$ac_optarg ;;
1344
1345  -gas | --gas | --ga | --g)
1346    # Obsolete; use --with-gas.
1347    with_gas=yes ;;
1348
1349  -help | --help | --hel | --he | -h)
1350    ac_init_help=long ;;
1351  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1352    ac_init_help=recursive ;;
1353  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1354    ac_init_help=short ;;
1355
1356  -host | --host | --hos | --ho)
1357    ac_prev=host_alias ;;
1358  -host=* | --host=* | --hos=* | --ho=*)
1359    host_alias=$ac_optarg ;;
1360
1361  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1362    ac_prev=htmldir ;;
1363  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1364  | --ht=*)
1365    htmldir=$ac_optarg ;;
1366
1367  -includedir | --includedir | --includedi | --included | --include \
1368  | --includ | --inclu | --incl | --inc)
1369    ac_prev=includedir ;;
1370  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1371  | --includ=* | --inclu=* | --incl=* | --inc=*)
1372    includedir=$ac_optarg ;;
1373
1374  -infodir | --infodir | --infodi | --infod | --info | --inf)
1375    ac_prev=infodir ;;
1376  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1377    infodir=$ac_optarg ;;
1378
1379  -libdir | --libdir | --libdi | --libd)
1380    ac_prev=libdir ;;
1381  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1382    libdir=$ac_optarg ;;
1383
1384  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1385  | --libexe | --libex | --libe)
1386    ac_prev=libexecdir ;;
1387  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1388  | --libexe=* | --libex=* | --libe=*)
1389    libexecdir=$ac_optarg ;;
1390
1391  -localedir | --localedir | --localedi | --localed | --locale)
1392    ac_prev=localedir ;;
1393  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1394    localedir=$ac_optarg ;;
1395
1396  -localstatedir | --localstatedir | --localstatedi | --localstated \
1397  | --localstate | --localstat | --localsta | --localst | --locals)
1398    ac_prev=localstatedir ;;
1399  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1400  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1401    localstatedir=$ac_optarg ;;
1402
1403  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1404    ac_prev=mandir ;;
1405  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1406    mandir=$ac_optarg ;;
1407
1408  -nfp | --nfp | --nf)
1409    # Obsolete; use --without-fp.
1410    with_fp=no ;;
1411
1412  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1413  | --no-cr | --no-c | -n)
1414    no_create=yes ;;
1415
1416  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1417  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1418    no_recursion=yes ;;
1419
1420  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1421  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1422  | --oldin | --oldi | --old | --ol | --o)
1423    ac_prev=oldincludedir ;;
1424  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1425  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1426  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1427    oldincludedir=$ac_optarg ;;
1428
1429  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1430    ac_prev=prefix ;;
1431  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1432    prefix=$ac_optarg ;;
1433
1434  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1435  | --program-pre | --program-pr | --program-p)
1436    ac_prev=program_prefix ;;
1437  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1438  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1439    program_prefix=$ac_optarg ;;
1440
1441  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1442  | --program-suf | --program-su | --program-s)
1443    ac_prev=program_suffix ;;
1444  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1445  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1446    program_suffix=$ac_optarg ;;
1447
1448  -program-transform-name | --program-transform-name \
1449  | --program-transform-nam | --program-transform-na \
1450  | --program-transform-n | --program-transform- \
1451  | --program-transform | --program-transfor \
1452  | --program-transfo | --program-transf \
1453  | --program-trans | --program-tran \
1454  | --progr-tra | --program-tr | --program-t)
1455    ac_prev=program_transform_name ;;
1456  -program-transform-name=* | --program-transform-name=* \
1457  | --program-transform-nam=* | --program-transform-na=* \
1458  | --program-transform-n=* | --program-transform-=* \
1459  | --program-transform=* | --program-transfor=* \
1460  | --program-transfo=* | --program-transf=* \
1461  | --program-trans=* | --program-tran=* \
1462  | --progr-tra=* | --program-tr=* | --program-t=*)
1463    program_transform_name=$ac_optarg ;;
1464
1465  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1466    ac_prev=pdfdir ;;
1467  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1468    pdfdir=$ac_optarg ;;
1469
1470  -psdir | --psdir | --psdi | --psd | --ps)
1471    ac_prev=psdir ;;
1472  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1473    psdir=$ac_optarg ;;
1474
1475  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1476  | -silent | --silent | --silen | --sile | --sil)
1477    silent=yes ;;
1478
1479  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1480    ac_prev=sbindir ;;
1481  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1482  | --sbi=* | --sb=*)
1483    sbindir=$ac_optarg ;;
1484
1485  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1486  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1487  | --sharedst | --shareds | --shared | --share | --shar \
1488  | --sha | --sh)
1489    ac_prev=sharedstatedir ;;
1490  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1491  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1492  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1493  | --sha=* | --sh=*)
1494    sharedstatedir=$ac_optarg ;;
1495
1496  -site | --site | --sit)
1497    ac_prev=site ;;
1498  -site=* | --site=* | --sit=*)
1499    site=$ac_optarg ;;
1500
1501  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1502    ac_prev=srcdir ;;
1503  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1504    srcdir=$ac_optarg ;;
1505
1506  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1507  | --syscon | --sysco | --sysc | --sys | --sy)
1508    ac_prev=sysconfdir ;;
1509  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1510  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1511    sysconfdir=$ac_optarg ;;
1512
1513  -target | --target | --targe | --targ | --tar | --ta | --t)
1514    ac_prev=target_alias ;;
1515  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1516    target_alias=$ac_optarg ;;
1517
1518  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1519    verbose=yes ;;
1520
1521  -version | --version | --versio | --versi | --vers | -V)
1522    ac_init_version=: ;;
1523
1524  -with-* | --with-*)
1525    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1526    # Reject names that are not valid shell variable names.
1527    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1528      as_fn_error $? "invalid package name: $ac_useropt"
1529    ac_useropt_orig=$ac_useropt
1530    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1531    case $ac_user_opts in
1532      *"
1533"with_$ac_useropt"
1534"*) ;;
1535      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1536	 ac_unrecognized_sep=', ';;
1537    esac
1538    eval with_$ac_useropt=\$ac_optarg ;;
1539
1540  -without-* | --without-*)
1541    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1542    # Reject names that are not valid shell variable names.
1543    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1544      as_fn_error $? "invalid package name: $ac_useropt"
1545    ac_useropt_orig=$ac_useropt
1546    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1547    case $ac_user_opts in
1548      *"
1549"with_$ac_useropt"
1550"*) ;;
1551      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1552	 ac_unrecognized_sep=', ';;
1553    esac
1554    eval with_$ac_useropt=no ;;
1555
1556  --x)
1557    # Obsolete; use --with-x.
1558    with_x=yes ;;
1559
1560  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1561  | --x-incl | --x-inc | --x-in | --x-i)
1562    ac_prev=x_includes ;;
1563  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1564  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1565    x_includes=$ac_optarg ;;
1566
1567  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1568  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1569    ac_prev=x_libraries ;;
1570  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1571  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1572    x_libraries=$ac_optarg ;;
1573
1574  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1575Try \`$0 --help' for more information"
1576    ;;
1577
1578  *=*)
1579    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1580    # Reject names that are not valid shell variable names.
1581    case $ac_envvar in #(
1582      '' | [0-9]* | *[!_$as_cr_alnum]* )
1583      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1584    esac
1585    eval $ac_envvar=\$ac_optarg
1586    export $ac_envvar ;;
1587
1588  *)
1589    # FIXME: should be removed in autoconf 3.0.
1590    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1591    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1592      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1593    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1594    ;;
1595
1596  esac
1597done
1598
1599if test -n "$ac_prev"; then
1600  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1601  as_fn_error $? "missing argument to $ac_option"
1602fi
1603
1604if test -n "$ac_unrecognized_opts"; then
1605  case $enable_option_checking in
1606    no) ;;
1607    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1608    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1609  esac
1610fi
1611
1612# Check all directory arguments for consistency.
1613for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1614		datadir sysconfdir sharedstatedir localstatedir includedir \
1615		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1616		libdir localedir mandir
1617do
1618  eval ac_val=\$$ac_var
1619  # Remove trailing slashes.
1620  case $ac_val in
1621    */ )
1622      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1623      eval $ac_var=\$ac_val;;
1624  esac
1625  # Be sure to have absolute directory names.
1626  case $ac_val in
1627    [\\/$]* | ?:[\\/]* )  continue;;
1628    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1629  esac
1630  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1631done
1632
1633# There might be people who depend on the old broken behavior: `$host'
1634# used to hold the argument of --host etc.
1635# FIXME: To remove some day.
1636build=$build_alias
1637host=$host_alias
1638target=$target_alias
1639
1640# FIXME: To remove some day.
1641if test "x$host_alias" != x; then
1642  if test "x$build_alias" = x; then
1643    cross_compiling=maybe
1644  elif test "x$build_alias" != "x$host_alias"; then
1645    cross_compiling=yes
1646  fi
1647fi
1648
1649ac_tool_prefix=
1650test -n "$host_alias" && ac_tool_prefix=$host_alias-
1651
1652test "$silent" = yes && exec 6>/dev/null
1653
1654
1655ac_pwd=`pwd` && test -n "$ac_pwd" &&
1656ac_ls_di=`ls -di .` &&
1657ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1658  as_fn_error $? "working directory cannot be determined"
1659test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1660  as_fn_error $? "pwd does not report name of working directory"
1661
1662
1663# Find the source files, if location was not specified.
1664if test -z "$srcdir"; then
1665  ac_srcdir_defaulted=yes
1666  # Try the directory containing this script, then the parent directory.
1667  ac_confdir=`$as_dirname -- "$as_myself" ||
1668$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1669	 X"$as_myself" : 'X\(//\)[^/]' \| \
1670	 X"$as_myself" : 'X\(//\)$' \| \
1671	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1672$as_echo X"$as_myself" |
1673    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1674	    s//\1/
1675	    q
1676	  }
1677	  /^X\(\/\/\)[^/].*/{
1678	    s//\1/
1679	    q
1680	  }
1681	  /^X\(\/\/\)$/{
1682	    s//\1/
1683	    q
1684	  }
1685	  /^X\(\/\).*/{
1686	    s//\1/
1687	    q
1688	  }
1689	  s/.*/./; q'`
1690  srcdir=$ac_confdir
1691  if test ! -r "$srcdir/$ac_unique_file"; then
1692    srcdir=..
1693  fi
1694else
1695  ac_srcdir_defaulted=no
1696fi
1697if test ! -r "$srcdir/$ac_unique_file"; then
1698  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1699  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1700fi
1701ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1702ac_abs_confdir=`(
1703	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1704	pwd)`
1705# When building in place, set srcdir=.
1706if test "$ac_abs_confdir" = "$ac_pwd"; then
1707  srcdir=.
1708fi
1709# Remove unnecessary trailing slashes from srcdir.
1710# Double slashes in file names in object file debugging info
1711# mess up M-x gdb in Emacs.
1712case $srcdir in
1713*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1714esac
1715for ac_var in $ac_precious_vars; do
1716  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1717  eval ac_env_${ac_var}_value=\$${ac_var}
1718  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1719  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1720done
1721
1722#
1723# Report the --help message.
1724#
1725if test "$ac_init_help" = "long"; then
1726  # Omit some internal or obsolete options to make the list less imposing.
1727  # This message is too long to be a string in the A/UX 3.1 sh.
1728  cat <<_ACEOF
1729\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1730
1731Usage: $0 [OPTION]... [VAR=VALUE]...
1732
1733To assign environment variables (e.g., CC, CFLAGS...), specify them as
1734VAR=VALUE.  See below for descriptions of some of the useful variables.
1735
1736Defaults for the options are specified in brackets.
1737
1738Configuration:
1739  -h, --help              display this help and exit
1740      --help=short        display options specific to this package
1741      --help=recursive    display the short help of all the included packages
1742  -V, --version           display version information and exit
1743  -q, --quiet, --silent   do not print \`checking ...' messages
1744      --cache-file=FILE   cache test results in FILE [disabled]
1745  -C, --config-cache      alias for \`--cache-file=config.cache'
1746  -n, --no-create         do not create output files
1747      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1748
1749Installation directories:
1750  --prefix=PREFIX         install architecture-independent files in PREFIX
1751                          [$ac_default_prefix]
1752  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1753                          [PREFIX]
1754
1755By default, \`make install' will install all the files in
1756\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1757an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1758for instance \`--prefix=\$HOME'.
1759
1760For better control, use the options below.
1761
1762Fine tuning of the installation directories:
1763  --bindir=DIR            user executables [EPREFIX/bin]
1764  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1765  --libexecdir=DIR        program executables [EPREFIX/libexec]
1766  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1767  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1768  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1769  --libdir=DIR            object code libraries [EPREFIX/lib]
1770  --includedir=DIR        C header files [PREFIX/include]
1771  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1772  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1773  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1774  --infodir=DIR           info documentation [DATAROOTDIR/info]
1775  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1776  --mandir=DIR            man documentation [DATAROOTDIR/man]
1777  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1778  --htmldir=DIR           html documentation [DOCDIR]
1779  --dvidir=DIR            dvi documentation [DOCDIR]
1780  --pdfdir=DIR            pdf documentation [DOCDIR]
1781  --psdir=DIR             ps documentation [DOCDIR]
1782_ACEOF
1783
1784  cat <<\_ACEOF
1785
1786X features:
1787  --x-includes=DIR    X include files are in DIR
1788  --x-libraries=DIR   X library files are in DIR
1789
1790System types:
1791  --build=BUILD     configure for building on BUILD [guessed]
1792  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1793  --target=TARGET   configure for building compilers for TARGET [HOST]
1794_ACEOF
1795fi
1796
1797if test -n "$ac_init_help"; then
1798  case $ac_init_help in
1799     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1800   esac
1801  cat <<\_ACEOF
1802
1803Optional Features:
1804  --disable-option-checking  ignore unrecognized --enable/--with options
1805  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1806  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1807  --enable-openjdk-only   suppress building custom source even if present
1808                          [disabled]
1809  --enable-debug          set the debug level to fastdebug (shorthand for
1810                          --with-debug-level=fastdebug) [disabled]
1811  --disable-headful       disable building headful support (graphical UI
1812                          support) [enabled]
1813  --enable-hotspot-test-in-build
1814                          run the Queens test after Hotspot build [disabled]
1815  --enable-unlimited-crypto
1816                          Enable unlimited crypto policy [disabled]
1817  --enable-rmiconnector-iiop
1818                          enable the JMX RMIConnector iiop transport
1819                          [disabled]
1820  --disable-debug-symbols disable generation of debug symbols [enabled]
1821  --disable-zip-debug-info
1822                          disable zipping of debug-info files [enabled]
1823  --enable-macosx-runtime-support
1824                          Deprecated. Option is kept for backwards
1825                          compatibility and is ignored
1826  --disable-freetype-bundling
1827                          disable bundling of the freetype library with the
1828                          build result [enabled on Windows or when using
1829                          --with-freetype, disabled otherwise]
1830  --enable-sjavac         use sjavac to do fast incremental compiles
1831                          [disabled]
1832  --disable-precompiled-headers
1833                          disable using precompiled headers when compiling C++
1834                          [enabled]
1835  --enable-ccache         enable using ccache to speed up recompilations
1836                          [disabled]
1837
1838Optional Packages:
1839  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1840  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1841  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1842                          support it), e.g. --with-target-bits=32 [guessed]
1843  --with-sys-root         pass this sys-root to the compilers and tools (for
1844                          cross-compiling)
1845  --with-tools-dir        search this directory for compilers and tools (for
1846                          cross-compiling)
1847  --with-devkit           use this directory as base for tools-dir and
1848                          sys-root (for cross-compiling)
1849  --with-custom-make-dir  Deprecated. Option is kept for backwards
1850                          compatibility and is ignored
1851  --with-jdk-variant      JDK variant to build (normal) [normal]
1852  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1853  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1854                          client, minimal1, kernel, zero, zeroshark, core)
1855                          [server]
1856  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1857                          [release]
1858  --with-conf-name        use this as the name of the configuration [generated
1859                          from important configuration options]
1860  --with-builddeps-conf   use this configuration file for the builddeps
1861  --with-builddeps-server download and use build dependencies from this server
1862                          url
1863  --with-builddeps-dir    store downloaded build dependencies here
1864                          [/localhome/builddeps]
1865  --with-builddeps-group  chgrp the downloaded build dependencies to this
1866                          group
1867  --with-cacerts-file     specify alternative cacerts file
1868  --with-milestone        Set milestone value for build [internal]
1869  --with-update-version   Set update version value for build [b00]
1870  --with-user-release-suffix
1871                          Add a custom string to the version string if build
1872                          number is not set.[username_builddateb00]
1873  --with-build-number     Set build number value for build [b00]
1874  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1875  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1876                          invocations of boot JDK, overriding the default
1877                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1878                          -enableassertions"
1879  --with-add-source-root  for each and every source directory, look in this
1880                          additional source root for the same directory; if it
1881                          exists and have files in it, include it in the build
1882  --with-override-source-root
1883                          for each and every source directory, look in this
1884                          override source root for the same directory; if it
1885                          exists, use that directory instead and ignore the
1886                          directory in the original source root
1887  --with-adds-and-overrides
1888                          use the subdirs 'adds' and 'overrides' in the
1889                          specified directory as add-source-root and
1890                          override-source-root
1891  --with-override-langtools
1892                          use this langtools dir for the build
1893  --with-override-corba   use this corba dir for the build
1894  --with-override-jaxp    use this jaxp dir for the build
1895  --with-override-jaxws   use this jaxws dir for the build
1896  --with-override-hotspot use this hotspot dir for the build
1897  --with-override-nashorn use this nashorn dir for the build
1898  --with-override-jdk     use this jdk dir for the build
1899  --with-import-hotspot   import hotspot binaries from this jdk image or
1900                          hotspot build dist dir instead of building from
1901                          source
1902  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1903                          to show possible values [platform dependent]
1904  --with-jtreg            Regression Test Harness [probed]
1905  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1906  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1907  --with-extra-ldflags    extra flags to be used when linking jdk
1908  --with-x                use the X Window System
1909  --with-cups             specify prefix directory for the cups package
1910                          (expecting the headers under PATH/include)
1911  --with-cups-include     specify directory for the cups include files
1912  --with-freetype         specify prefix directory for the freetype package
1913                          (expecting the libraries under PATH/lib and the
1914                          headers under PATH/include)
1915  --with-freetype-include specify directory for the freetype include files
1916  --with-freetype-lib     specify directory for the freetype library
1917  --with-alsa             specify prefix directory for the alsa package
1918                          (expecting the libraries under PATH/lib and the
1919                          headers under PATH/include)
1920  --with-alsa-include     specify directory for the alsa include files
1921  --with-alsa-lib         specify directory for the alsa library
1922  --with-giflib           use giflib from build system or OpenJDK source
1923                          (system, bundled) [bundled]
1924  --with-zlib             use zlib from build system or OpenJDK source
1925                          (system, bundled) [bundled]
1926  --with-stdc++lib=<static>,<dynamic>,<default>
1927                          force linking of the C++ runtime on Linux to either
1928                          static or dynamic, default is static with dynamic as
1929                          fallback
1930  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1931                          only) [probed]
1932  --with-dxsdk            Deprecated. Option is kept for backwards
1933                          compatibility and is ignored
1934  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1935                          compatibility and is ignored
1936  --with-dxsdk-include    Deprecated. Option is kept for backwards
1937                          compatibility and is ignored
1938  --with-num-cores        number of cores in the build system, e.g.
1939                          --with-num-cores=8 [probed]
1940  --with-memory-size      memory (in MB) available in the build system, e.g.
1941                          --with-memory-size=1024 [probed]
1942  --with-jobs             number of parallel jobs to let make run [calculated
1943                          based on cores and memory]
1944  --with-sjavac-server-java
1945                          use this java binary for running the sjavac
1946                          background server [Boot JDK java]
1947  --with-ccache-dir       where to store ccache files [~/.ccache]
1948
1949Some influential environment variables:
1950  BASENAME    Override default value for BASENAME
1951  BASH        Override default value for BASH
1952  CAT         Override default value for CAT
1953  CHMOD       Override default value for CHMOD
1954  CMP         Override default value for CMP
1955  COMM        Override default value for COMM
1956  CP          Override default value for CP
1957  CPIO        Override default value for CPIO
1958  CUT         Override default value for CUT
1959  DATE        Override default value for DATE
1960  DIFF        Override default value for DIFF
1961  DIRNAME     Override default value for DIRNAME
1962  ECHO        Override default value for ECHO
1963  EXPR        Override default value for EXPR
1964  FILE        Override default value for FILE
1965  FIND        Override default value for FIND
1966  HEAD        Override default value for HEAD
1967  LN          Override default value for LN
1968  LS          Override default value for LS
1969  MKDIR       Override default value for MKDIR
1970  MKTEMP      Override default value for MKTEMP
1971  MV          Override default value for MV
1972  NAWK        Override default value for NAWK
1973  PRINTF      Override default value for PRINTF
1974  RM          Override default value for RM
1975  SH          Override default value for SH
1976  SORT        Override default value for SORT
1977  TAIL        Override default value for TAIL
1978  TAR         Override default value for TAR
1979  TEE         Override default value for TEE
1980  TOUCH       Override default value for TOUCH
1981  TR          Override default value for TR
1982  UNAME       Override default value for UNAME
1983  UNIQ        Override default value for UNIQ
1984  WC          Override default value for WC
1985  WHICH       Override default value for WHICH
1986  XARGS       Override default value for XARGS
1987  AWK         Override default value for AWK
1988  GREP        Override default value for GREP
1989  EGREP       Override default value for EGREP
1990  FGREP       Override default value for FGREP
1991  SED         Override default value for SED
1992  CYGPATH     Override default value for CYGPATH
1993  READLINK    Override default value for READLINK
1994  DF          Override default value for DF
1995  SETFILE     Override default value for SETFILE
1996  UNZIP       Override default value for UNZIP
1997  ZIP         Override default value for ZIP
1998  LDD         Override default value for LDD
1999  OTOOL       Override default value for OTOOL
2000  READELF     Override default value for READELF
2001  HG          Override default value for HG
2002  STAT        Override default value for STAT
2003  TIME        Override default value for TIME
2004  DSYMUTIL    Override default value for DSYMUTIL
2005  XATTR       Override default value for XATTR
2006  CODESIGN    Override default value for CODESIGN
2007  PKG_CONFIG  path to pkg-config utility
2008  JAVA        Override default value for JAVA
2009  JAVAC       Override default value for JAVAC
2010  JAVAH       Override default value for JAVAH
2011  JAR         Override default value for JAR
2012  NATIVE2ASCII
2013              Override default value for NATIVE2ASCII
2014  JARSIGNER   Override default value for JARSIGNER
2015  CC          C compiler command
2016  CFLAGS      C compiler flags
2017  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2018              nonstandard directory <lib dir>
2019  LIBS        libraries to pass to the linker, e.g. -l<library>
2020  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2021              you have headers in a nonstandard directory <include dir>
2022  CXX         C++ compiler command
2023  CXXFLAGS    C++ compiler flags
2024  CPP         C preprocessor
2025  CXXCPP      C++ preprocessor
2026  AS          Override default value for AS
2027  AR          Override default value for AR
2028  OBJC        Objective C compiler command
2029  OBJCFLAGS   Objective C compiler flags
2030  LIPO        Override default value for LIPO
2031  STRIP       Override default value for STRIP
2032  NM          Override default value for NM
2033  GNM         Override default value for GNM
2034  MCS         Override default value for MCS
2035  OBJCOPY     Override default value for OBJCOPY
2036  OBJDUMP     Override default value for OBJDUMP
2037  BUILD_CC    Override default value for BUILD_CC
2038  BUILD_CXX   Override default value for BUILD_CXX
2039  BUILD_LD    Override default value for BUILD_LD
2040  JTREGEXE    Override default value for JTREGEXE
2041  XMKMF       Path to xmkmf, Makefile generator for X Window System
2042  FREETYPE_CFLAGS
2043              C compiler flags for FREETYPE, overriding pkg-config
2044  FREETYPE_LIBS
2045              linker flags for FREETYPE, overriding pkg-config
2046  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2047  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2048  LIBFFI_CFLAGS
2049              C compiler flags for LIBFFI, overriding pkg-config
2050  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2051  CCACHE      Override default value for CCACHE
2052
2053Use these variables to override the choices made by `configure' or to help
2054it to find libraries and programs with nonstandard names/locations.
2055
2056Report bugs to <build-dev@openjdk.java.net>.
2057OpenJDK home page: <http://openjdk.java.net>.
2058_ACEOF
2059ac_status=$?
2060fi
2061
2062if test "$ac_init_help" = "recursive"; then
2063  # If there are subdirs, report their specific --help.
2064  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2065    test -d "$ac_dir" ||
2066      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2067      continue
2068    ac_builddir=.
2069
2070case "$ac_dir" in
2071.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2072*)
2073  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2074  # A ".." for each directory in $ac_dir_suffix.
2075  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2076  case $ac_top_builddir_sub in
2077  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2078  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2079  esac ;;
2080esac
2081ac_abs_top_builddir=$ac_pwd
2082ac_abs_builddir=$ac_pwd$ac_dir_suffix
2083# for backward compatibility:
2084ac_top_builddir=$ac_top_build_prefix
2085
2086case $srcdir in
2087  .)  # We are building in place.
2088    ac_srcdir=.
2089    ac_top_srcdir=$ac_top_builddir_sub
2090    ac_abs_top_srcdir=$ac_pwd ;;
2091  [\\/]* | ?:[\\/]* )  # Absolute name.
2092    ac_srcdir=$srcdir$ac_dir_suffix;
2093    ac_top_srcdir=$srcdir
2094    ac_abs_top_srcdir=$srcdir ;;
2095  *) # Relative name.
2096    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2097    ac_top_srcdir=$ac_top_build_prefix$srcdir
2098    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2099esac
2100ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2101
2102    cd "$ac_dir" || { ac_status=$?; continue; }
2103    # Check for guested configure.
2104    if test -f "$ac_srcdir/configure.gnu"; then
2105      echo &&
2106      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2107    elif test -f "$ac_srcdir/configure"; then
2108      echo &&
2109      $SHELL "$ac_srcdir/configure" --help=recursive
2110    else
2111      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2112    fi || ac_status=$?
2113    cd "$ac_pwd" || { ac_status=$?; break; }
2114  done
2115fi
2116
2117test -n "$ac_init_help" && exit $ac_status
2118if $ac_init_version; then
2119  cat <<\_ACEOF
2120OpenJDK configure jdk9
2121generated by GNU Autoconf 2.69
2122
2123Copyright (C) 2012 Free Software Foundation, Inc.
2124This configure script is free software; the Free Software Foundation
2125gives unlimited permission to copy, distribute and modify it.
2126_ACEOF
2127  exit
2128fi
2129
2130## ------------------------ ##
2131## Autoconf initialization. ##
2132## ------------------------ ##
2133
2134# ac_fn_c_try_compile LINENO
2135# --------------------------
2136# Try to compile conftest.$ac_ext, and return whether this succeeded.
2137ac_fn_c_try_compile ()
2138{
2139  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2140  rm -f conftest.$ac_objext
2141  if { { ac_try="$ac_compile"
2142case "(($ac_try" in
2143  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2144  *) ac_try_echo=$ac_try;;
2145esac
2146eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2147$as_echo "$ac_try_echo"; } >&5
2148  (eval "$ac_compile") 2>conftest.err
2149  ac_status=$?
2150  if test -s conftest.err; then
2151    grep -v '^ *+' conftest.err >conftest.er1
2152    cat conftest.er1 >&5
2153    mv -f conftest.er1 conftest.err
2154  fi
2155  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2156  test $ac_status = 0; } && {
2157	 test -z "$ac_c_werror_flag" ||
2158	 test ! -s conftest.err
2159       } && test -s conftest.$ac_objext; then :
2160  ac_retval=0
2161else
2162  $as_echo "$as_me: failed program was:" >&5
2163sed 's/^/| /' conftest.$ac_ext >&5
2164
2165	ac_retval=1
2166fi
2167  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2168  as_fn_set_status $ac_retval
2169
2170} # ac_fn_c_try_compile
2171
2172# ac_fn_cxx_try_compile LINENO
2173# ----------------------------
2174# Try to compile conftest.$ac_ext, and return whether this succeeded.
2175ac_fn_cxx_try_compile ()
2176{
2177  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2178  rm -f conftest.$ac_objext
2179  if { { ac_try="$ac_compile"
2180case "(($ac_try" in
2181  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2182  *) ac_try_echo=$ac_try;;
2183esac
2184eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2185$as_echo "$ac_try_echo"; } >&5
2186  (eval "$ac_compile") 2>conftest.err
2187  ac_status=$?
2188  if test -s conftest.err; then
2189    grep -v '^ *+' conftest.err >conftest.er1
2190    cat conftest.er1 >&5
2191    mv -f conftest.er1 conftest.err
2192  fi
2193  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2194  test $ac_status = 0; } && {
2195	 test -z "$ac_cxx_werror_flag" ||
2196	 test ! -s conftest.err
2197       } && test -s conftest.$ac_objext; then :
2198  ac_retval=0
2199else
2200  $as_echo "$as_me: failed program was:" >&5
2201sed 's/^/| /' conftest.$ac_ext >&5
2202
2203	ac_retval=1
2204fi
2205  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2206  as_fn_set_status $ac_retval
2207
2208} # ac_fn_cxx_try_compile
2209
2210# ac_fn_c_try_cpp LINENO
2211# ----------------------
2212# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2213ac_fn_c_try_cpp ()
2214{
2215  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2216  if { { ac_try="$ac_cpp conftest.$ac_ext"
2217case "(($ac_try" in
2218  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2219  *) ac_try_echo=$ac_try;;
2220esac
2221eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2222$as_echo "$ac_try_echo"; } >&5
2223  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2224  ac_status=$?
2225  if test -s conftest.err; then
2226    grep -v '^ *+' conftest.err >conftest.er1
2227    cat conftest.er1 >&5
2228    mv -f conftest.er1 conftest.err
2229  fi
2230  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2231  test $ac_status = 0; } > conftest.i && {
2232	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2233	 test ! -s conftest.err
2234       }; then :
2235  ac_retval=0
2236else
2237  $as_echo "$as_me: failed program was:" >&5
2238sed 's/^/| /' conftest.$ac_ext >&5
2239
2240    ac_retval=1
2241fi
2242  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2243  as_fn_set_status $ac_retval
2244
2245} # ac_fn_c_try_cpp
2246
2247# ac_fn_cxx_try_cpp LINENO
2248# ------------------------
2249# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2250ac_fn_cxx_try_cpp ()
2251{
2252  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2253  if { { ac_try="$ac_cpp conftest.$ac_ext"
2254case "(($ac_try" in
2255  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2256  *) ac_try_echo=$ac_try;;
2257esac
2258eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2259$as_echo "$ac_try_echo"; } >&5
2260  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2261  ac_status=$?
2262  if test -s conftest.err; then
2263    grep -v '^ *+' conftest.err >conftest.er1
2264    cat conftest.er1 >&5
2265    mv -f conftest.er1 conftest.err
2266  fi
2267  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2268  test $ac_status = 0; } > conftest.i && {
2269	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2270	 test ! -s conftest.err
2271       }; then :
2272  ac_retval=0
2273else
2274  $as_echo "$as_me: failed program was:" >&5
2275sed 's/^/| /' conftest.$ac_ext >&5
2276
2277    ac_retval=1
2278fi
2279  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2280  as_fn_set_status $ac_retval
2281
2282} # ac_fn_cxx_try_cpp
2283
2284# ac_fn_objc_try_compile LINENO
2285# -----------------------------
2286# Try to compile conftest.$ac_ext, and return whether this succeeded.
2287ac_fn_objc_try_compile ()
2288{
2289  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2290  rm -f conftest.$ac_objext
2291  if { { ac_try="$ac_compile"
2292case "(($ac_try" in
2293  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2294  *) ac_try_echo=$ac_try;;
2295esac
2296eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2297$as_echo "$ac_try_echo"; } >&5
2298  (eval "$ac_compile") 2>conftest.err
2299  ac_status=$?
2300  if test -s conftest.err; then
2301    grep -v '^ *+' conftest.err >conftest.er1
2302    cat conftest.er1 >&5
2303    mv -f conftest.er1 conftest.err
2304  fi
2305  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2306  test $ac_status = 0; } && {
2307	 test -z "$ac_objc_werror_flag" ||
2308	 test ! -s conftest.err
2309       } && test -s conftest.$ac_objext; then :
2310  ac_retval=0
2311else
2312  $as_echo "$as_me: failed program was:" >&5
2313sed 's/^/| /' conftest.$ac_ext >&5
2314
2315	ac_retval=1
2316fi
2317  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2318  as_fn_set_status $ac_retval
2319
2320} # ac_fn_objc_try_compile
2321
2322# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2323# ---------------------------------------------------------
2324# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2325# the include files in INCLUDES and setting the cache variable VAR
2326# accordingly.
2327ac_fn_cxx_check_header_mongrel ()
2328{
2329  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2330  if eval \${$3+:} false; then :
2331  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2332$as_echo_n "checking for $2... " >&6; }
2333if eval \${$3+:} false; then :
2334  $as_echo_n "(cached) " >&6
2335fi
2336eval ac_res=\$$3
2337	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2338$as_echo "$ac_res" >&6; }
2339else
2340  # Is the header compilable?
2341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2342$as_echo_n "checking $2 usability... " >&6; }
2343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2344/* end confdefs.h.  */
2345$4
2346#include <$2>
2347_ACEOF
2348if ac_fn_cxx_try_compile "$LINENO"; then :
2349  ac_header_compiler=yes
2350else
2351  ac_header_compiler=no
2352fi
2353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2355$as_echo "$ac_header_compiler" >&6; }
2356
2357# Is the header present?
2358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2359$as_echo_n "checking $2 presence... " >&6; }
2360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2361/* end confdefs.h.  */
2362#include <$2>
2363_ACEOF
2364if ac_fn_cxx_try_cpp "$LINENO"; then :
2365  ac_header_preproc=yes
2366else
2367  ac_header_preproc=no
2368fi
2369rm -f conftest.err conftest.i conftest.$ac_ext
2370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2371$as_echo "$ac_header_preproc" >&6; }
2372
2373# So?  What about this header?
2374case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2375  yes:no: )
2376    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2377$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2378    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2379$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2380    ;;
2381  no:yes:* )
2382    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2383$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2384    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2385$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2386    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2387$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2388    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2389$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2390    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2391$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2392( $as_echo "## ----------------------------------------- ##
2393## Report this to build-dev@openjdk.java.net ##
2394## ----------------------------------------- ##"
2395     ) | sed "s/^/$as_me: WARNING:     /" >&2
2396    ;;
2397esac
2398  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2399$as_echo_n "checking for $2... " >&6; }
2400if eval \${$3+:} false; then :
2401  $as_echo_n "(cached) " >&6
2402else
2403  eval "$3=\$ac_header_compiler"
2404fi
2405eval ac_res=\$$3
2406	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2407$as_echo "$ac_res" >&6; }
2408fi
2409  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2410
2411} # ac_fn_cxx_check_header_mongrel
2412
2413# ac_fn_cxx_try_run LINENO
2414# ------------------------
2415# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2416# that executables *can* be run.
2417ac_fn_cxx_try_run ()
2418{
2419  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2420  if { { ac_try="$ac_link"
2421case "(($ac_try" in
2422  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2423  *) ac_try_echo=$ac_try;;
2424esac
2425eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2426$as_echo "$ac_try_echo"; } >&5
2427  (eval "$ac_link") 2>&5
2428  ac_status=$?
2429  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2430  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2431  { { case "(($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_try") 2>&5
2438  ac_status=$?
2439  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2440  test $ac_status = 0; }; }; then :
2441  ac_retval=0
2442else
2443  $as_echo "$as_me: program exited with status $ac_status" >&5
2444       $as_echo "$as_me: failed program was:" >&5
2445sed 's/^/| /' conftest.$ac_ext >&5
2446
2447       ac_retval=$ac_status
2448fi
2449  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2450  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2451  as_fn_set_status $ac_retval
2452
2453} # ac_fn_cxx_try_run
2454
2455# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2456# ---------------------------------------------------------
2457# Tests whether HEADER exists and can be compiled using the include files in
2458# INCLUDES, setting the cache variable VAR accordingly.
2459ac_fn_cxx_check_header_compile ()
2460{
2461  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2462  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2463$as_echo_n "checking for $2... " >&6; }
2464if eval \${$3+:} false; then :
2465  $as_echo_n "(cached) " >&6
2466else
2467  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2468/* end confdefs.h.  */
2469$4
2470#include <$2>
2471_ACEOF
2472if ac_fn_cxx_try_compile "$LINENO"; then :
2473  eval "$3=yes"
2474else
2475  eval "$3=no"
2476fi
2477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2478fi
2479eval ac_res=\$$3
2480	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2481$as_echo "$ac_res" >&6; }
2482  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2483
2484} # ac_fn_cxx_check_header_compile
2485
2486# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2487# ----------------------------------------------
2488# Tries to find the compile-time value of EXPR in a program that includes
2489# INCLUDES, setting VAR accordingly. Returns whether the value could be
2490# computed
2491ac_fn_cxx_compute_int ()
2492{
2493  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2494  if test "$cross_compiling" = yes; then
2495    # Depending upon the size, compute the lo and hi bounds.
2496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2497/* end confdefs.h.  */
2498$4
2499int
2500main ()
2501{
2502static int test_array [1 - 2 * !(($2) >= 0)];
2503test_array [0] = 0;
2504return test_array [0];
2505
2506  ;
2507  return 0;
2508}
2509_ACEOF
2510if ac_fn_cxx_try_compile "$LINENO"; then :
2511  ac_lo=0 ac_mid=0
2512  while :; do
2513    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2514/* end confdefs.h.  */
2515$4
2516int
2517main ()
2518{
2519static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2520test_array [0] = 0;
2521return test_array [0];
2522
2523  ;
2524  return 0;
2525}
2526_ACEOF
2527if ac_fn_cxx_try_compile "$LINENO"; then :
2528  ac_hi=$ac_mid; break
2529else
2530  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2531			if test $ac_lo -le $ac_mid; then
2532			  ac_lo= ac_hi=
2533			  break
2534			fi
2535			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2536fi
2537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2538  done
2539else
2540  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2541/* end confdefs.h.  */
2542$4
2543int
2544main ()
2545{
2546static int test_array [1 - 2 * !(($2) < 0)];
2547test_array [0] = 0;
2548return test_array [0];
2549
2550  ;
2551  return 0;
2552}
2553_ACEOF
2554if ac_fn_cxx_try_compile "$LINENO"; then :
2555  ac_hi=-1 ac_mid=-1
2556  while :; do
2557    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2558/* end confdefs.h.  */
2559$4
2560int
2561main ()
2562{
2563static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2564test_array [0] = 0;
2565return test_array [0];
2566
2567  ;
2568  return 0;
2569}
2570_ACEOF
2571if ac_fn_cxx_try_compile "$LINENO"; then :
2572  ac_lo=$ac_mid; break
2573else
2574  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2575			if test $ac_mid -le $ac_hi; then
2576			  ac_lo= ac_hi=
2577			  break
2578			fi
2579			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2580fi
2581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2582  done
2583else
2584  ac_lo= ac_hi=
2585fi
2586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2587fi
2588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2589# Binary search between lo and hi bounds.
2590while test "x$ac_lo" != "x$ac_hi"; do
2591  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2592  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2593/* end confdefs.h.  */
2594$4
2595int
2596main ()
2597{
2598static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2599test_array [0] = 0;
2600return test_array [0];
2601
2602  ;
2603  return 0;
2604}
2605_ACEOF
2606if ac_fn_cxx_try_compile "$LINENO"; then :
2607  ac_hi=$ac_mid
2608else
2609  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2610fi
2611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2612done
2613case $ac_lo in #((
2614?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2615'') ac_retval=1 ;;
2616esac
2617  else
2618    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2619/* end confdefs.h.  */
2620$4
2621static long int longval () { return $2; }
2622static unsigned long int ulongval () { return $2; }
2623#include <stdio.h>
2624#include <stdlib.h>
2625int
2626main ()
2627{
2628
2629  FILE *f = fopen ("conftest.val", "w");
2630  if (! f)
2631    return 1;
2632  if (($2) < 0)
2633    {
2634      long int i = longval ();
2635      if (i != ($2))
2636	return 1;
2637      fprintf (f, "%ld", i);
2638    }
2639  else
2640    {
2641      unsigned long int i = ulongval ();
2642      if (i != ($2))
2643	return 1;
2644      fprintf (f, "%lu", i);
2645    }
2646  /* Do not output a trailing newline, as this causes \r\n confusion
2647     on some platforms.  */
2648  return ferror (f) || fclose (f) != 0;
2649
2650  ;
2651  return 0;
2652}
2653_ACEOF
2654if ac_fn_cxx_try_run "$LINENO"; then :
2655  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2656else
2657  ac_retval=1
2658fi
2659rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2660  conftest.$ac_objext conftest.beam conftest.$ac_ext
2661rm -f conftest.val
2662
2663  fi
2664  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2665  as_fn_set_status $ac_retval
2666
2667} # ac_fn_cxx_compute_int
2668
2669# ac_fn_cxx_try_link LINENO
2670# -------------------------
2671# Try to link conftest.$ac_ext, and return whether this succeeded.
2672ac_fn_cxx_try_link ()
2673{
2674  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2675  rm -f conftest.$ac_objext conftest$ac_exeext
2676  if { { ac_try="$ac_link"
2677case "(($ac_try" in
2678  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2679  *) ac_try_echo=$ac_try;;
2680esac
2681eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2682$as_echo "$ac_try_echo"; } >&5
2683  (eval "$ac_link") 2>conftest.err
2684  ac_status=$?
2685  if test -s conftest.err; then
2686    grep -v '^ *+' conftest.err >conftest.er1
2687    cat conftest.er1 >&5
2688    mv -f conftest.er1 conftest.err
2689  fi
2690  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2691  test $ac_status = 0; } && {
2692	 test -z "$ac_cxx_werror_flag" ||
2693	 test ! -s conftest.err
2694       } && test -s conftest$ac_exeext && {
2695	 test "$cross_compiling" = yes ||
2696	 test -x conftest$ac_exeext
2697       }; then :
2698  ac_retval=0
2699else
2700  $as_echo "$as_me: failed program was:" >&5
2701sed 's/^/| /' conftest.$ac_ext >&5
2702
2703	ac_retval=1
2704fi
2705  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2706  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2707  # interfere with the next link command; also delete a directory that is
2708  # left behind by Apple's compiler.  We do this before executing the actions.
2709  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2710  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2711  as_fn_set_status $ac_retval
2712
2713} # ac_fn_cxx_try_link
2714
2715# ac_fn_cxx_check_func LINENO FUNC VAR
2716# ------------------------------------
2717# Tests whether FUNC exists, setting the cache variable VAR accordingly
2718ac_fn_cxx_check_func ()
2719{
2720  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2721  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2722$as_echo_n "checking for $2... " >&6; }
2723if eval \${$3+:} false; then :
2724  $as_echo_n "(cached) " >&6
2725else
2726  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2727/* end confdefs.h.  */
2728/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2729   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2730#define $2 innocuous_$2
2731
2732/* System header to define __stub macros and hopefully few prototypes,
2733    which can conflict with char $2 (); below.
2734    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2735    <limits.h> exists even on freestanding compilers.  */
2736
2737#ifdef __STDC__
2738# include <limits.h>
2739#else
2740# include <assert.h>
2741#endif
2742
2743#undef $2
2744
2745/* Override any GCC internal prototype to avoid an error.
2746   Use char because int might match the return type of a GCC
2747   builtin and then its argument prototype would still apply.  */
2748#ifdef __cplusplus
2749extern "C"
2750#endif
2751char $2 ();
2752/* The GNU C library defines this for functions which it implements
2753    to always fail with ENOSYS.  Some functions are actually named
2754    something starting with __ and the normal name is an alias.  */
2755#if defined __stub_$2 || defined __stub___$2
2756choke me
2757#endif
2758
2759int
2760main ()
2761{
2762return $2 ();
2763  ;
2764  return 0;
2765}
2766_ACEOF
2767if ac_fn_cxx_try_link "$LINENO"; then :
2768  eval "$3=yes"
2769else
2770  eval "$3=no"
2771fi
2772rm -f core conftest.err conftest.$ac_objext \
2773    conftest$ac_exeext conftest.$ac_ext
2774fi
2775eval ac_res=\$$3
2776	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2777$as_echo "$ac_res" >&6; }
2778  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2779
2780} # ac_fn_cxx_check_func
2781
2782# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2783# -------------------------------------------------------
2784# Tests whether HEADER exists and can be compiled using the include files in
2785# INCLUDES, setting the cache variable VAR accordingly.
2786ac_fn_c_check_header_compile ()
2787{
2788  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2789  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2790$as_echo_n "checking for $2... " >&6; }
2791if eval \${$3+:} false; then :
2792  $as_echo_n "(cached) " >&6
2793else
2794  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2795/* end confdefs.h.  */
2796$4
2797#include <$2>
2798_ACEOF
2799if ac_fn_c_try_compile "$LINENO"; then :
2800  eval "$3=yes"
2801else
2802  eval "$3=no"
2803fi
2804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2805fi
2806eval ac_res=\$$3
2807	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2808$as_echo "$ac_res" >&6; }
2809  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2810
2811} # ac_fn_c_check_header_compile
2812cat >config.log <<_ACEOF
2813This file contains any messages produced by compilers while
2814running configure, to aid debugging if configure makes a mistake.
2815
2816It was created by OpenJDK $as_me jdk9, which was
2817generated by GNU Autoconf 2.69.  Invocation command line was
2818
2819  $ $0 $@
2820
2821_ACEOF
2822exec 5>>config.log
2823{
2824cat <<_ASUNAME
2825## --------- ##
2826## Platform. ##
2827## --------- ##
2828
2829hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2830uname -m = `(uname -m) 2>/dev/null || echo unknown`
2831uname -r = `(uname -r) 2>/dev/null || echo unknown`
2832uname -s = `(uname -s) 2>/dev/null || echo unknown`
2833uname -v = `(uname -v) 2>/dev/null || echo unknown`
2834
2835/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2836/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2837
2838/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2839/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2840/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2841/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2842/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2843/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2844/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2845
2846_ASUNAME
2847
2848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2849for as_dir in $PATH
2850do
2851  IFS=$as_save_IFS
2852  test -z "$as_dir" && as_dir=.
2853    $as_echo "PATH: $as_dir"
2854  done
2855IFS=$as_save_IFS
2856
2857} >&5
2858
2859cat >&5 <<_ACEOF
2860
2861
2862## ----------- ##
2863## Core tests. ##
2864## ----------- ##
2865
2866_ACEOF
2867
2868
2869# Keep a trace of the command line.
2870# Strip out --no-create and --no-recursion so they do not pile up.
2871# Strip out --silent because we don't want to record it for future runs.
2872# Also quote any args containing shell meta-characters.
2873# Make two passes to allow for proper duplicate-argument suppression.
2874ac_configure_args=
2875ac_configure_args0=
2876ac_configure_args1=
2877ac_must_keep_next=false
2878for ac_pass in 1 2
2879do
2880  for ac_arg
2881  do
2882    case $ac_arg in
2883    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2884    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2885    | -silent | --silent | --silen | --sile | --sil)
2886      continue ;;
2887    *\'*)
2888      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2889    esac
2890    case $ac_pass in
2891    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2892    2)
2893      as_fn_append ac_configure_args1 " '$ac_arg'"
2894      if test $ac_must_keep_next = true; then
2895	ac_must_keep_next=false # Got value, back to normal.
2896      else
2897	case $ac_arg in
2898	  *=* | --config-cache | -C | -disable-* | --disable-* \
2899	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2900	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2901	  | -with-* | --with-* | -without-* | --without-* | --x)
2902	    case "$ac_configure_args0 " in
2903	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2904	    esac
2905	    ;;
2906	  -* ) ac_must_keep_next=true ;;
2907	esac
2908      fi
2909      as_fn_append ac_configure_args " '$ac_arg'"
2910      ;;
2911    esac
2912  done
2913done
2914{ ac_configure_args0=; unset ac_configure_args0;}
2915{ ac_configure_args1=; unset ac_configure_args1;}
2916
2917# When interrupted or exit'd, cleanup temporary files, and complete
2918# config.log.  We remove comments because anyway the quotes in there
2919# would cause problems or look ugly.
2920# WARNING: Use '\'' to represent an apostrophe within the trap.
2921# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2922trap 'exit_status=$?
2923  # Save into config.log some information that might help in debugging.
2924  {
2925    echo
2926
2927    $as_echo "## ---------------- ##
2928## Cache variables. ##
2929## ---------------- ##"
2930    echo
2931    # The following way of writing the cache mishandles newlines in values,
2932(
2933  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2934    eval ac_val=\$$ac_var
2935    case $ac_val in #(
2936    *${as_nl}*)
2937      case $ac_var in #(
2938      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2939$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2940      esac
2941      case $ac_var in #(
2942      _ | IFS | as_nl) ;; #(
2943      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2944      *) { eval $ac_var=; unset $ac_var;} ;;
2945      esac ;;
2946    esac
2947  done
2948  (set) 2>&1 |
2949    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2950    *${as_nl}ac_space=\ *)
2951      sed -n \
2952	"s/'\''/'\''\\\\'\'''\''/g;
2953	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2954      ;; #(
2955    *)
2956      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2957      ;;
2958    esac |
2959    sort
2960)
2961    echo
2962
2963    $as_echo "## ----------------- ##
2964## Output variables. ##
2965## ----------------- ##"
2966    echo
2967    for ac_var in $ac_subst_vars
2968    do
2969      eval ac_val=\$$ac_var
2970      case $ac_val in
2971      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2972      esac
2973      $as_echo "$ac_var='\''$ac_val'\''"
2974    done | sort
2975    echo
2976
2977    if test -n "$ac_subst_files"; then
2978      $as_echo "## ------------------- ##
2979## File substitutions. ##
2980## ------------------- ##"
2981      echo
2982      for ac_var in $ac_subst_files
2983      do
2984	eval ac_val=\$$ac_var
2985	case $ac_val in
2986	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2987	esac
2988	$as_echo "$ac_var='\''$ac_val'\''"
2989      done | sort
2990      echo
2991    fi
2992
2993    if test -s confdefs.h; then
2994      $as_echo "## ----------- ##
2995## confdefs.h. ##
2996## ----------- ##"
2997      echo
2998      cat confdefs.h
2999      echo
3000    fi
3001    test "$ac_signal" != 0 &&
3002      $as_echo "$as_me: caught signal $ac_signal"
3003    $as_echo "$as_me: exit $exit_status"
3004  } >&5
3005  rm -f core *.core core.conftest.* &&
3006    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3007    exit $exit_status
3008' 0
3009for ac_signal in 1 2 13 15; do
3010  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3011done
3012ac_signal=0
3013
3014# confdefs.h avoids OS command line length limits that DEFS can exceed.
3015rm -f -r conftest* confdefs.h
3016
3017$as_echo "/* confdefs.h */" > confdefs.h
3018
3019# Predefined preprocessor variables.
3020
3021cat >>confdefs.h <<_ACEOF
3022#define PACKAGE_NAME "$PACKAGE_NAME"
3023_ACEOF
3024
3025cat >>confdefs.h <<_ACEOF
3026#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3027_ACEOF
3028
3029cat >>confdefs.h <<_ACEOF
3030#define PACKAGE_VERSION "$PACKAGE_VERSION"
3031_ACEOF
3032
3033cat >>confdefs.h <<_ACEOF
3034#define PACKAGE_STRING "$PACKAGE_STRING"
3035_ACEOF
3036
3037cat >>confdefs.h <<_ACEOF
3038#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3039_ACEOF
3040
3041cat >>confdefs.h <<_ACEOF
3042#define PACKAGE_URL "$PACKAGE_URL"
3043_ACEOF
3044
3045
3046# Let the site file select an alternate cache file if it wants to.
3047# Prefer an explicitly selected file to automatically selected ones.
3048ac_site_file1=NONE
3049ac_site_file2=NONE
3050if test -n "$CONFIG_SITE"; then
3051  # We do not want a PATH search for config.site.
3052  case $CONFIG_SITE in #((
3053    -*)  ac_site_file1=./$CONFIG_SITE;;
3054    */*) ac_site_file1=$CONFIG_SITE;;
3055    *)   ac_site_file1=./$CONFIG_SITE;;
3056  esac
3057elif test "x$prefix" != xNONE; then
3058  ac_site_file1=$prefix/share/config.site
3059  ac_site_file2=$prefix/etc/config.site
3060else
3061  ac_site_file1=$ac_default_prefix/share/config.site
3062  ac_site_file2=$ac_default_prefix/etc/config.site
3063fi
3064for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3065do
3066  test "x$ac_site_file" = xNONE && continue
3067  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3068    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3069$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3070    sed 's/^/| /' "$ac_site_file" >&5
3071    . "$ac_site_file" \
3072      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3073$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3074as_fn_error $? "failed to load site script $ac_site_file
3075See \`config.log' for more details" "$LINENO" 5; }
3076  fi
3077done
3078
3079if test -r "$cache_file"; then
3080  # Some versions of bash will fail to source /dev/null (special files
3081  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3082  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3083    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3084$as_echo "$as_me: loading cache $cache_file" >&6;}
3085    case $cache_file in
3086      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3087      *)                      . "./$cache_file";;
3088    esac
3089  fi
3090else
3091  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3092$as_echo "$as_me: creating cache $cache_file" >&6;}
3093  >$cache_file
3094fi
3095
3096# Check that the precious variables saved in the cache have kept the same
3097# value.
3098ac_cache_corrupted=false
3099for ac_var in $ac_precious_vars; do
3100  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3101  eval ac_new_set=\$ac_env_${ac_var}_set
3102  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3103  eval ac_new_val=\$ac_env_${ac_var}_value
3104  case $ac_old_set,$ac_new_set in
3105    set,)
3106      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3107$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3108      ac_cache_corrupted=: ;;
3109    ,set)
3110      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3111$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3112      ac_cache_corrupted=: ;;
3113    ,);;
3114    *)
3115      if test "x$ac_old_val" != "x$ac_new_val"; then
3116	# differences in whitespace do not lead to failure.
3117	ac_old_val_w=`echo x $ac_old_val`
3118	ac_new_val_w=`echo x $ac_new_val`
3119	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3120	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3121$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3122	  ac_cache_corrupted=:
3123	else
3124	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3125$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3126	  eval $ac_var=\$ac_old_val
3127	fi
3128	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3129$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3130	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3131$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3132      fi;;
3133  esac
3134  # Pass precious variables to config.status.
3135  if test "$ac_new_set" = set; then
3136    case $ac_new_val in
3137    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3138    *) ac_arg=$ac_var=$ac_new_val ;;
3139    esac
3140    case " $ac_configure_args " in
3141      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3142      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3143    esac
3144  fi
3145done
3146if $ac_cache_corrupted; then
3147  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3148$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3149  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3150$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3151  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3152fi
3153## -------------------- ##
3154## Main body of script. ##
3155## -------------------- ##
3156
3157ac_ext=c
3158ac_cpp='$CPP $CPPFLAGS'
3159ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3160ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3161ac_compiler_gnu=$ac_cv_c_compiler_gnu
3162
3163
3164
3165ac_aux_dir=
3166for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3167  if test -f "$ac_dir/install-sh"; then
3168    ac_aux_dir=$ac_dir
3169    ac_install_sh="$ac_aux_dir/install-sh -c"
3170    break
3171  elif test -f "$ac_dir/install.sh"; then
3172    ac_aux_dir=$ac_dir
3173    ac_install_sh="$ac_aux_dir/install.sh -c"
3174    break
3175  elif test -f "$ac_dir/shtool"; then
3176    ac_aux_dir=$ac_dir
3177    ac_install_sh="$ac_aux_dir/shtool install -c"
3178    break
3179  fi
3180done
3181if test -z "$ac_aux_dir"; then
3182  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
3183fi
3184
3185# These three variables are undocumented and unsupported,
3186# and are intended to be withdrawn in a future Autoconf release.
3187# They can cause serious problems if a builder's source tree is in a directory
3188# whose full name contains unusual characters.
3189ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3190ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3191ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3192
3193
3194# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3195
3196#
3197# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3198# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3199#
3200# This code is free software; you can redistribute it and/or modify it
3201# under the terms of the GNU General Public License version 2 only, as
3202# published by the Free Software Foundation.  Oracle designates this
3203# particular file as subject to the "Classpath" exception as provided
3204# by Oracle in the LICENSE file that accompanied this code.
3205#
3206# This code is distributed in the hope that it will be useful, but WITHOUT
3207# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3208# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3209# version 2 for more details (a copy is included in the LICENSE file that
3210# accompanied this code).
3211#
3212# You should have received a copy of the GNU General Public License version
3213# 2 along with this work; if not, write to the Free Software Foundation,
3214# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3215#
3216# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3217# or visit www.oracle.com if you need additional information or have any
3218# questions.
3219#
3220
3221#
3222# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3223#
3224# This program is free software; you can redistribute it and/or modify
3225# it under the terms of the GNU General Public License as published by
3226# the Free Software Foundation; either version 2 of the License, or
3227# (at your option) any later version.
3228#
3229# This program is distributed in the hope that it will be useful, but
3230# WITHOUT ANY WARRANTY; without even the implied warranty of
3231# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3232# General Public License for more details.
3233#
3234# You should have received a copy of the GNU General Public License
3235# along with this program; if not, write to the Free Software
3236# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3237#
3238# As a special exception to the GNU General Public License, if you
3239# distribute this file as part of a program that contains a
3240# configuration script generated by Autoconf, you may include it under
3241# the same distribution terms that you use for the rest of that program.
3242
3243# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3244# ----------------------------------
3245# PKG_PROG_PKG_CONFIG
3246
3247# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3248#
3249# Check to see whether a particular set of modules exists.  Similar
3250# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3251#
3252#
3253# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3254# this or PKG_CHECK_MODULES is called, or make sure to call
3255# PKG_CHECK_EXISTS manually
3256# --------------------------------------------------------------
3257
3258
3259
3260# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3261# ---------------------------------------------
3262# _PKG_CONFIG
3263
3264# _PKG_SHORT_ERRORS_SUPPORTED
3265# -----------------------------
3266# _PKG_SHORT_ERRORS_SUPPORTED
3267
3268
3269# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3270# [ACTION-IF-NOT-FOUND])
3271#
3272#
3273# Note that if there is a possibility the first call to
3274# PKG_CHECK_MODULES might not happen, you should be sure to include an
3275# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3276#
3277#
3278# --------------------------------------------------------------
3279# PKG_CHECK_MODULES
3280
3281
3282# Include these first...
3283#
3284# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3285# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3286#
3287# This code is free software; you can redistribute it and/or modify it
3288# under the terms of the GNU General Public License version 2 only, as
3289# published by the Free Software Foundation.  Oracle designates this
3290# particular file as subject to the "Classpath" exception as provided
3291# by Oracle in the LICENSE file that accompanied this code.
3292#
3293# This code is distributed in the hope that it will be useful, but WITHOUT
3294# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3295# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3296# version 2 for more details (a copy is included in the LICENSE file that
3297# accompanied this code).
3298#
3299# You should have received a copy of the GNU General Public License version
3300# 2 along with this work; if not, write to the Free Software Foundation,
3301# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3302#
3303# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3304# or visit www.oracle.com if you need additional information or have any
3305# questions.
3306#
3307
3308# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3309# If so, then append $1 to $2 \
3310# Also set JVM_ARG_OK to true/false depending on outcome.
3311
3312
3313# Appends a string to a path variable, only adding the : when needed.
3314
3315
3316# This will make sure the given variable points to a full and proper
3317# path. This means:
3318# 1) There will be no spaces in the path. On posix platforms,
3319#    spaces in the path will result in an error. On Windows,
3320#    the path will be rewritten using short-style to be space-free.
3321# 2) The path will be absolute, and it will be in unix-style (on
3322#     cygwin).
3323# $1: The name of the variable to fix
3324
3325
3326# This will make sure the given variable points to a executable
3327# with a full and proper 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# Any arguments given to the executable is preserved.
3334# If the input variable does not have a directory specification, then
3335# it need to be in the PATH.
3336# $1: The name of the variable to fix
3337
3338
3339
3340
3341# Register a --with argument but mark it as deprecated
3342# $1: The name of the with argument to deprecate, not including --with-
3343
3344
3345# Register a --enable argument but mark it as deprecated
3346# $1: The name of the with argument to deprecate, not including --enable-
3347# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3348
3349
3350
3351
3352# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3353# $1: variable to check
3354
3355
3356# Check that there are no unprocessed overridden variables left.
3357# If so, they are an incorrect argument and we will exit with an error.
3358
3359
3360# Setup a tool for the given variable. If correctly specified by the user,
3361# use that value, otherwise search for the tool using the supplied code snippet.
3362# $1: variable to set
3363# $2: code snippet to call to look for the tool
3364
3365
3366# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3367# $1: variable to set
3368# $2: executable name (or list of names) to look for
3369
3370
3371# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3372# $1: variable to set
3373# $2: executable name (or list of names) to look for
3374
3375
3376# Like BASIC_PATH_PROGS but fails if no tool was found.
3377# $1: variable to set
3378# $2: executable name (or list of names) to look for
3379
3380
3381# Like BASIC_SETUP_TOOL but fails if no tool was found.
3382# $1: variable to set
3383# $2: autoconf macro to call to look for the special tool
3384
3385
3386# Setup the most fundamental tools that relies on not much else to set up,
3387# but is used by much of the early bootstrap code.
3388
3389
3390# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3391
3392
3393
3394
3395
3396
3397
3398#%%% Simple tools %%%
3399
3400# Check if we have found a usable version of make
3401# $1: the path to a potential make binary (or empty)
3402# $2: the description on how we found this
3403
3404
3405# Goes looking for a usable version of GNU make.
3406
3407
3408
3409
3410
3411
3412# Check if build directory is on local disk. If not possible to determine,
3413# we prefer to claim it's local.
3414# Argument 1: directory to test
3415# Argument 2: what to do if it is on local disk
3416# Argument 3: what to do otherwise (remote disk or failure)
3417
3418
3419# Check that source files have basic read permissions set. This might
3420# not be the case in cygwin in certain conditions.
3421
3422
3423
3424
3425#
3426# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3427# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3428#
3429# This code is free software; you can redistribute it and/or modify it
3430# under the terms of the GNU General Public License version 2 only, as
3431# published by the Free Software Foundation.  Oracle designates this
3432# particular file as subject to the "Classpath" exception as provided
3433# by Oracle in the LICENSE file that accompanied this code.
3434#
3435# This code is distributed in the hope that it will be useful, but WITHOUT
3436# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3437# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3438# version 2 for more details (a copy is included in the LICENSE file that
3439# accompanied this code).
3440#
3441# You should have received a copy of the GNU General Public License version
3442# 2 along with this work; if not, write to the Free Software Foundation,
3443# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3444#
3445# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3446# or visit www.oracle.com if you need additional information or have any
3447# questions.
3448#
3449
3450
3451
3452
3453
3454# Helper function which possibly converts a path using DOS-style short mode.
3455# If so, the updated path is stored in $new_path.
3456# $1: The path to check
3457
3458
3459# Helper function which possibly converts a path using DOS-style short mode.
3460# If so, the updated path is stored in $new_path.
3461# $1: The path to check
3462
3463
3464# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3465# and could probably be heavily simplified. However, all changes in this
3466# area tend to need lot of testing in different scenarios, and in lack of
3467# proper unit testing, cleaning this up has not been deemed worth the effort
3468# at the moment.
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3479
3480
3481
3482
3483#
3484# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3485# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3486#
3487# This code is free software; you can redistribute it and/or modify it
3488# under the terms of the GNU General Public License version 2 only, as
3489# published by the Free Software Foundation.  Oracle designates this
3490# particular file as subject to the "Classpath" exception as provided
3491# by Oracle in the LICENSE file that accompanied this code.
3492#
3493# This code is distributed in the hope that it will be useful, but WITHOUT
3494# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3495# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3496# version 2 for more details (a copy is included in the LICENSE file that
3497# accompanied this code).
3498#
3499# You should have received a copy of the GNU General Public License version
3500# 2 along with this work; if not, write to the Free Software Foundation,
3501# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3502#
3503# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3504# or visit www.oracle.com if you need additional information or have any
3505# questions.
3506#
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518# ... then the rest
3519#
3520# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3521# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3522#
3523# This code is free software; you can redistribute it and/or modify it
3524# under the terms of the GNU General Public License version 2 only, as
3525# published by the Free Software Foundation.  Oracle designates this
3526# particular file as subject to the "Classpath" exception as provided
3527# by Oracle in the LICENSE file that accompanied this code.
3528#
3529# This code is distributed in the hope that it will be useful, but WITHOUT
3530# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3531# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3532# version 2 for more details (a copy is included in the LICENSE file that
3533# accompanied this code).
3534#
3535# You should have received a copy of the GNU General Public License version
3536# 2 along with this work; if not, write to the Free Software Foundation,
3537# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3538#
3539# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3540# or visit www.oracle.com if you need additional information or have any
3541# questions.
3542#
3543
3544########################################################################
3545# This file handles detection of the Boot JDK. The Boot JDK detection
3546# process has been developed as a response to solve a complex real-world
3547# problem. Initially, it was simple, but it has grown as platform after
3548# platform, idiosyncracy after idiosyncracy has been supported.
3549#
3550# The basic idea is this:
3551# 1) You need an acceptable *) JDK to use as a Boot JDK
3552# 2) There are several ways to locate a JDK, that are mostly platform
3553#    dependent **)
3554# 3) You can have multiple JDKs installed
3555# 4) If possible, configure should try to dig out an acceptable JDK
3556#    automatically, without having to resort to command-line options
3557#
3558# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3559#     javac) and not a JRE, etc.
3560#
3561# **) On Windows we typically use a well-known path.
3562#     On MacOSX we typically use the tool java_home.
3563#     On Linux we typically find javac in the $PATH, and then follow a
3564#     chain of symlinks that often ends up in a real JDK.
3565#
3566# This leads to the code where we check in different ways to locate a
3567# JDK, and if one is found, check if it is acceptable. If not, we print
3568# our reasons for rejecting it (useful when debugging non-working
3569# configure situations) and continue checking the next one.
3570########################################################################
3571
3572# Execute the check given as argument, and verify the result
3573# If the Boot JDK was previously found, do nothing
3574# $1 A command line (typically autoconf macro) to execute
3575
3576
3577# Test: Is bootjdk explicitely set by command line arguments?
3578
3579
3580# Test: Is bootjdk available from builddeps?
3581
3582
3583# Test: Is $JAVA_HOME set?
3584
3585
3586# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3587
3588
3589# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3590# $1: Argument to the java_home binary (optional)
3591
3592
3593# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3594
3595
3596# Look for a jdk in the given path. If there are multiple, try to select the newest.
3597# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3598# $1 = Path to directory containing jdk installations.
3599# $2 = String to append to the found JDK directory to get the proper JDK home
3600
3601
3602# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3603# environmental variable as base for where to look.
3604# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3605
3606
3607# Test: Is there a JDK installed in default, well-known locations?
3608
3609
3610# Check that a command-line tool in the Boot JDK is correct
3611# $1 = name of variable to assign
3612# $2 = name of binary
3613
3614
3615###############################################################################
3616#
3617# We need a Boot JDK to bootstrap the build.
3618#
3619
3620
3621
3622
3623
3624#
3625# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3626# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3627#
3628# This code is free software; you can redistribute it and/or modify it
3629# under the terms of the GNU General Public License version 2 only, as
3630# published by the Free Software Foundation.  Oracle designates this
3631# particular file as subject to the "Classpath" exception as provided
3632# by Oracle in the LICENSE file that accompanied this code.
3633#
3634# This code is distributed in the hope that it will be useful, but WITHOUT
3635# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3636# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3637# version 2 for more details (a copy is included in the LICENSE file that
3638# accompanied this code).
3639#
3640# You should have received a copy of the GNU General Public License version
3641# 2 along with this work; if not, write to the Free Software Foundation,
3642# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3643#
3644# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3645# or visit www.oracle.com if you need additional information or have any
3646# questions.
3647#
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668#
3669# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3670# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3671#
3672# This code is free software; you can redistribute it and/or modify it
3673# under the terms of the GNU General Public License version 2 only, as
3674# published by the Free Software Foundation.  Oracle designates this
3675# particular file as subject to the "Classpath" exception as provided
3676# by Oracle in the LICENSE file that accompanied this code.
3677#
3678# This code is distributed in the hope that it will be useful, but WITHOUT
3679# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3680# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3681# version 2 for more details (a copy is included in the LICENSE file that
3682# accompanied this code).
3683#
3684# You should have received a copy of the GNU General Public License version
3685# 2 along with this work; if not, write to the Free Software Foundation,
3686# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3687#
3688# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3689# or visit www.oracle.com if you need additional information or have any
3690# questions.
3691#
3692
3693
3694
3695
3696
3697# Documentation on common flags used for solstudio in HIGHEST.
3698#
3699# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3700#          done with care, there are some assumptions below that need to
3701#          be understood about the use of pointers, and IEEE behavior.
3702#
3703# -fns: Use non-standard floating point mode (not IEEE 754)
3704# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3705# -fsingle: Use single precision floating point with 'float'
3706# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3707#   (Source with excessing pointer casting and data access with mixed
3708#    pointer types are not recommended)
3709# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3710#   (If you expect perfect errno behavior, do not use this)
3711# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3712# -xrestrict: Pointer parameters to functions do not overlap
3713#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3714#    If you pass in multiple pointers to the same data, do not use this)
3715# -xlibmil: Inline some library routines
3716#   (If you expect perfect errno behavior, do not use this)
3717# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3718#   (If you expect perfect errno behavior, do not use this)
3719#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3720
3721    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3722    # Bug?
3723    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3724    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3725    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3726    #fi
3727
3728
3729
3730
3731
3732
3733# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3734#                                   [RUN-IF-FALSE])
3735# ------------------------------------------------------------
3736# Check that the c and c++ compilers support an argument
3737
3738
3739
3740
3741#
3742# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3743# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3744#
3745# This code is free software; you can redistribute it and/or modify it
3746# under the terms of the GNU General Public License version 2 only, as
3747# published by the Free Software Foundation.  Oracle designates this
3748# particular file as subject to the "Classpath" exception as provided
3749# by Oracle in the LICENSE file that accompanied this code.
3750#
3751# This code is distributed in the hope that it will be useful, but WITHOUT
3752# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3753# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3754# version 2 for more details (a copy is included in the LICENSE file that
3755# accompanied this code).
3756#
3757# You should have received a copy of the GNU General Public License version
3758# 2 along with this work; if not, write to the Free Software Foundation,
3759# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3760#
3761# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3762# or visit www.oracle.com if you need additional information or have any
3763# questions.
3764#
3765
3766
3767
3768
3769
3770cygwin_help() {
3771  case $1 in
3772    unzip)
3773      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3774      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3775      ;;
3776    zip)
3777      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3778      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3779      ;;
3780    make)
3781      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3782      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3783      ;;
3784    freetype)
3785      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3786        HELP_MSG="To install freetype, run:
3787wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3788chmod +x /tmp/freetype-setup.exe
3789/tmp/freetype-setup.exe
3790Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3791After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3792      else
3793        HELP_MSG="You need to build a 64-bit version of freetype.
3794This is not readily available.
3795You can find source code and build instructions on
3796http://www.freetype.org/
3797If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3798      fi
3799      ;;
3800  esac
3801}
3802
3803msys_help() {
3804  PKGHANDLER_COMMAND=""
3805}
3806
3807apt_help() {
3808  case $1 in
3809    devkit)
3810      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3811    openjdk)
3812      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3813    alsa)
3814      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3815    cups)
3816      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3817    freetype)
3818      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3819    pulse)
3820      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3821    x11)
3822      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3823    ccache)
3824      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3825  esac
3826}
3827
3828yum_help() {
3829  case $1 in
3830    devkit)
3831      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3832    openjdk)
3833      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3834    alsa)
3835      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3836    cups)
3837      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3838    freetype)
3839      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3840    pulse)
3841      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3842    x11)
3843      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3844    ccache)
3845      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3846  esac
3847}
3848
3849port_help() {
3850  PKGHANDLER_COMMAND=""
3851}
3852
3853pkgutil_help() {
3854  PKGHANDLER_COMMAND=""
3855}
3856
3857pkgadd_help() {
3858  PKGHANDLER_COMMAND=""
3859}
3860
3861# This function will check if we're called from the "configure" wrapper while
3862# printing --help. If so, we will print out additional information that can
3863# only be extracted within the autoconf script, and then exit. This must be
3864# called at the very beginning in configure.ac.
3865
3866
3867
3868
3869#
3870# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3871# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3872#
3873# This code is free software; you can redistribute it and/or modify it
3874# under the terms of the GNU General Public License version 2 only, as
3875# published by the Free Software Foundation.  Oracle designates this
3876# particular file as subject to the "Classpath" exception as provided
3877# by Oracle in the LICENSE file that accompanied this code.
3878#
3879# This code is distributed in the hope that it will be useful, but WITHOUT
3880# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3881# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3882# version 2 for more details (a copy is included in the LICENSE file that
3883# accompanied this code).
3884#
3885# You should have received a copy of the GNU General Public License version
3886# 2 along with this work; if not, write to the Free Software Foundation,
3887# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3888#
3889# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3890# or visit www.oracle.com if you need additional information or have any
3891# questions.
3892#
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903###############################################################################
3904#
3905# Should we build only OpenJDK even if closed sources are present?
3906#
3907
3908
3909
3910
3911###############################################################################
3912#
3913# Setup version numbers
3914#
3915
3916
3917
3918
3919
3920
3921#
3922# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3923# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3924#
3925# This code is free software; you can redistribute it and/or modify it
3926# under the terms of the GNU General Public License version 2 only, as
3927# published by the Free Software Foundation.  Oracle designates this
3928# particular file as subject to the "Classpath" exception as provided
3929# by Oracle in the LICENSE file that accompanied this code.
3930#
3931# This code is distributed in the hope that it will be useful, but WITHOUT
3932# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3933# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3934# version 2 for more details (a copy is included in the LICENSE file that
3935# accompanied this code).
3936#
3937# You should have received a copy of the GNU General Public License version
3938# 2 along with this work; if not, write to the Free Software Foundation,
3939# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3940#
3941# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3942# or visit www.oracle.com if you need additional information or have any
3943# questions.
3944#
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964#
3965# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3966# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3967#
3968# This code is free software; you can redistribute it and/or modify it
3969# under the terms of the GNU General Public License version 2 only, as
3970# published by the Free Software Foundation.  Oracle designates this
3971# particular file as subject to the "Classpath" exception as provided
3972# by Oracle in the LICENSE file that accompanied this code.
3973#
3974# This code is distributed in the hope that it will be useful, but WITHOUT
3975# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3976# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3977# version 2 for more details (a copy is included in the LICENSE file that
3978# accompanied this code).
3979#
3980# You should have received a copy of the GNU General Public License version
3981# 2 along with this work; if not, write to the Free Software Foundation,
3982# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3983#
3984# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3985# or visit www.oracle.com if you need additional information or have any
3986# questions.
3987#
3988
3989# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3990# Converts autoconf style CPU name to OpenJDK style, into
3991# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3992
3993
3994# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3995# Converts autoconf style OS name to OpenJDK style, into
3996# VAR_OS and VAR_OS_API.
3997
3998
3999# Expects $host_os $host_cpu $build_os and $build_cpu
4000# and $with_target_bits to have been setup!
4001#
4002# Translate the standard triplet(quadruplet) definition
4003# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4004# OPENJDK_BUILD_OS, etc.
4005
4006
4007# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4008# accordingly. Must be done after setting up build and target system, but before
4009# doing anything else with these values.
4010
4011
4012# Setup the legacy variables, for controlling the old makefiles.
4013#
4014
4015
4016
4017
4018#%%% Build and target systems %%%
4019
4020
4021
4022
4023# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4024# Add -mX to various FLAGS variables.
4025
4026
4027
4028
4029
4030
4031#
4032# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4033# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4034#
4035# This code is free software; you can redistribute it and/or modify it
4036# under the terms of the GNU General Public License version 2 only, as
4037# published by the Free Software Foundation.  Oracle designates this
4038# particular file as subject to the "Classpath" exception as provided
4039# by Oracle in the LICENSE file that accompanied this code.
4040#
4041# This code is distributed in the hope that it will be useful, but WITHOUT
4042# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4043# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4044# version 2 for more details (a copy is included in the LICENSE file that
4045# accompanied this code).
4046#
4047# You should have received a copy of the GNU General Public License version
4048# 2 along with this work; if not, write to the Free Software Foundation,
4049# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4050#
4051# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4052# or visit www.oracle.com if you need additional information or have any
4053# questions.
4054#
4055
4056
4057
4058
4059
4060
4061
4062
4063#
4064# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4065# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4066#
4067# This code is free software; you can redistribute it and/or modify it
4068# under the terms of the GNU General Public License version 2 only, as
4069# published by the Free Software Foundation.  Oracle designates this
4070# particular file as subject to the "Classpath" exception as provided
4071# by Oracle in the LICENSE file that accompanied this code.
4072#
4073# This code is distributed in the hope that it will be useful, but WITHOUT
4074# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4075# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4076# version 2 for more details (a copy is included in the LICENSE file that
4077# accompanied this code).
4078#
4079# You should have received a copy of the GNU General Public License version
4080# 2 along with this work; if not, write to the Free Software Foundation,
4081# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4082#
4083# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4084# or visit www.oracle.com if you need additional information or have any
4085# questions.
4086#
4087
4088########################################################################
4089# This file is responsible for detecting, verifying and setting up the
4090# toolchain, i.e. the compiler, linker and related utilities. It will setup
4091# proper paths to the binaries, but it will not setup any flags.
4092#
4093# The binaries used is determined by the toolchain type, which is the family of
4094# compilers and related tools that are used.
4095########################################################################
4096
4097
4098# All valid toolchains, regardless of platform (used by help.m4)
4099VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4100
4101# These toolchains are valid on different platforms
4102VALID_TOOLCHAINS_linux="gcc clang"
4103VALID_TOOLCHAINS_solaris="solstudio"
4104VALID_TOOLCHAINS_macosx="gcc clang"
4105VALID_TOOLCHAINS_aix="xlc"
4106VALID_TOOLCHAINS_windows="microsoft"
4107
4108# Toolchain descriptions
4109TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4110TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4111TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4112TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4113TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4114
4115# Setup a number of variables describing how native output files are
4116# named on this platform/toolchain.
4117
4118
4119# Determine which toolchain type to use, and make sure it is valid for this
4120# platform. Setup various information about the selected toolchain.
4121
4122
4123# Before we start detecting the toolchain executables, we might need some
4124# special setup, e.g. additional paths etc.
4125
4126
4127# Restore path, etc
4128
4129
4130# Check if a compiler is of the toolchain type we expect, and save the version
4131# information from it. If the compiler does not match the expected type,
4132# this function will abort using AC_MSG_ERROR. If it matches, the version will
4133# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4134# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4135#
4136# $1 = compiler to test (CC or CXX)
4137# $2 = human readable name of compiler (C or C++)
4138
4139
4140# Try to locate the given C or C++ compiler in the path, or otherwise.
4141#
4142# $1 = compiler to test (CC or CXX)
4143# $2 = human readable name of compiler (C or C++)
4144# $3 = list of compiler names to search for
4145
4146
4147# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4148# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4149# archiver (AR). Verify that the compilers are correct according to the
4150# toolchain type.
4151
4152
4153# Setup additional tools that is considered a part of the toolchain, but not the
4154# core part. Many of these are highly platform-specific and do not exist,
4155# and/or are not needed on all platforms.
4156
4157
4158# Setup the build tools (i.e, the compiler and linker used to build programs
4159# that should be run on the build platform, not the target platform, as a build
4160# helper). Since the non-cross-compile case uses the normal, target compilers
4161# for this, we can only do this after these have been setup.
4162
4163
4164# Setup legacy variables that are still needed as alternative ways to refer to
4165# parts of the toolchain.
4166
4167
4168# Do some additional checks on the detected tools.
4169
4170
4171# Setup the JTReg Regression Test Harness.
4172
4173
4174#
4175# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4176# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4177#
4178# This code is free software; you can redistribute it and/or modify it
4179# under the terms of the GNU General Public License version 2 only, as
4180# published by the Free Software Foundation.  Oracle designates this
4181# particular file as subject to the "Classpath" exception as provided
4182# by Oracle in the LICENSE file that accompanied this code.
4183#
4184# This code is distributed in the hope that it will be useful, but WITHOUT
4185# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4186# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4187# version 2 for more details (a copy is included in the LICENSE file that
4188# accompanied this code).
4189#
4190# You should have received a copy of the GNU General Public License version
4191# 2 along with this work; if not, write to the Free Software Foundation,
4192# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4193#
4194# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4195# or visit www.oracle.com if you need additional information or have any
4196# questions.
4197#
4198
4199
4200
4201
4202
4203
4204
4205# Check if the VS env variables were setup prior to running configure.
4206# If not, then find vcvarsall.bat and run it automatically, and integrate
4207# the set env variables into the spec file.
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218# This line needs to be here, verbatim, after all includes and the dummy hook
4219# definitions. It is replaced with custom functionality when building
4220# custom sources.
4221#CUSTOM_AUTOCONF_INCLUDE
4222
4223# Do not change or remove the following line, it is needed for consistency checks:
4224DATE_WHEN_GENERATED=1394011255
4225
4226###############################################################################
4227#
4228# Initialization / Boot-strapping
4229#
4230# The bootstrapping process needs to solve the "chicken or the egg" problem,
4231# thus it jumps back and forth, each time gaining something needed later on.
4232#
4233###############################################################################
4234
4235# If we are requested to print additional help, do that and then exit.
4236# This must be the very first call.
4237
4238  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4239    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4240    $PRINTF "Which are valid to use depends on the build platform.\n"
4241    for toolchain in $VALID_TOOLCHAINS_all; do
4242      # Use indirect variable referencing
4243      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4244      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4245      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4246    done
4247
4248    # And now exit directly
4249    exit 0
4250  fi
4251
4252
4253# Basic initialization that must happen first of all in the normal process.
4254
4255  # Save the original command line. This is passed to us by the wrapper configure script.
4256
4257  DATE_WHEN_CONFIGURED=`LANG=C date`
4258
4259  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4260$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4261  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4262$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4263
4264
4265  # Start with tools that do not need have cross compilation support
4266  # and can be expected to be found in the default PATH. These tools are
4267  # used by configure. Nor are these tools expected to be found in the
4268  # devkit from the builddeps server either, since they are
4269  # needed to download the devkit.
4270
4271  # First are all the simple required tools.
4272
4273
4274
4275  # Publish this variable in the help.
4276
4277
4278  if test "x$BASENAME" = x; then
4279    # The variable is not set by user, try to locate tool using the code snippet
4280    for ac_prog in basename
4281do
4282  # Extract the first word of "$ac_prog", so it can be a program name with args.
4283set dummy $ac_prog; ac_word=$2
4284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4285$as_echo_n "checking for $ac_word... " >&6; }
4286if ${ac_cv_path_BASENAME+:} false; then :
4287  $as_echo_n "(cached) " >&6
4288else
4289  case $BASENAME in
4290  [\\/]* | ?:[\\/]*)
4291  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4292  ;;
4293  *)
4294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4295for as_dir in $PATH
4296do
4297  IFS=$as_save_IFS
4298  test -z "$as_dir" && as_dir=.
4299    for ac_exec_ext in '' $ac_executable_extensions; do
4300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4301    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4303    break 2
4304  fi
4305done
4306  done
4307IFS=$as_save_IFS
4308
4309  ;;
4310esac
4311fi
4312BASENAME=$ac_cv_path_BASENAME
4313if test -n "$BASENAME"; then
4314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4315$as_echo "$BASENAME" >&6; }
4316else
4317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4318$as_echo "no" >&6; }
4319fi
4320
4321
4322  test -n "$BASENAME" && break
4323done
4324
4325  else
4326    # The variable is set, but is it from the command line or the environment?
4327
4328    # Try to remove the string !BASENAME! from our list.
4329    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4330    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4331      # If it failed, the variable was not from the command line. Ignore it,
4332      # but warn the user (except for BASH, which is always set by the calling BASH).
4333      if test "xBASENAME" != xBASH; then
4334        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4335$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4336      fi
4337      # Try to locate tool using the code snippet
4338      for ac_prog in basename
4339do
4340  # Extract the first word of "$ac_prog", so it can be a program name with args.
4341set dummy $ac_prog; ac_word=$2
4342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4343$as_echo_n "checking for $ac_word... " >&6; }
4344if ${ac_cv_path_BASENAME+:} false; then :
4345  $as_echo_n "(cached) " >&6
4346else
4347  case $BASENAME in
4348  [\\/]* | ?:[\\/]*)
4349  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4350  ;;
4351  *)
4352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4353for as_dir in $PATH
4354do
4355  IFS=$as_save_IFS
4356  test -z "$as_dir" && as_dir=.
4357    for ac_exec_ext in '' $ac_executable_extensions; do
4358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4359    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4361    break 2
4362  fi
4363done
4364  done
4365IFS=$as_save_IFS
4366
4367  ;;
4368esac
4369fi
4370BASENAME=$ac_cv_path_BASENAME
4371if test -n "$BASENAME"; then
4372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4373$as_echo "$BASENAME" >&6; }
4374else
4375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4376$as_echo "no" >&6; }
4377fi
4378
4379
4380  test -n "$BASENAME" && break
4381done
4382
4383    else
4384      # If it succeeded, then it was overridden by the user. We will use it
4385      # for the tool.
4386
4387      # First remove it from the list of overridden variables, so we can test
4388      # for unknown variables in the end.
4389      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4390
4391      # Check if the provided tool contains a complete path.
4392      tool_specified="$BASENAME"
4393      tool_basename="${tool_specified##*/}"
4394      if test "x$tool_basename" = "x$tool_specified"; then
4395        # A command without a complete path is provided, search $PATH.
4396        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4397$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4398        # Extract the first word of "$tool_basename", so it can be a program name with args.
4399set dummy $tool_basename; ac_word=$2
4400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4401$as_echo_n "checking for $ac_word... " >&6; }
4402if ${ac_cv_path_BASENAME+:} false; then :
4403  $as_echo_n "(cached) " >&6
4404else
4405  case $BASENAME in
4406  [\\/]* | ?:[\\/]*)
4407  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4408  ;;
4409  *)
4410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4411for as_dir in $PATH
4412do
4413  IFS=$as_save_IFS
4414  test -z "$as_dir" && as_dir=.
4415    for ac_exec_ext in '' $ac_executable_extensions; do
4416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4417    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4419    break 2
4420  fi
4421done
4422  done
4423IFS=$as_save_IFS
4424
4425  ;;
4426esac
4427fi
4428BASENAME=$ac_cv_path_BASENAME
4429if test -n "$BASENAME"; then
4430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4431$as_echo "$BASENAME" >&6; }
4432else
4433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4434$as_echo "no" >&6; }
4435fi
4436
4437
4438        if test "x$BASENAME" = x; then
4439          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4440        fi
4441      else
4442        # Otherwise we believe it is a complete path. Use it as it is.
4443        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4444$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4445        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4446$as_echo_n "checking for BASENAME... " >&6; }
4447        if test ! -x "$tool_specified"; then
4448          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4449$as_echo "not found" >&6; }
4450          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4451        fi
4452        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4453$as_echo "$tool_specified" >&6; }
4454      fi
4455    fi
4456  fi
4457
4458
4459
4460  if test "x$BASENAME" = x; then
4461    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4462  fi
4463
4464
4465
4466
4467
4468  # Publish this variable in the help.
4469
4470
4471  if test "x$BASH" = x; then
4472    # The variable is not set by user, try to locate tool using the code snippet
4473    for ac_prog in bash
4474do
4475  # Extract the first word of "$ac_prog", so it can be a program name with args.
4476set dummy $ac_prog; ac_word=$2
4477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4478$as_echo_n "checking for $ac_word... " >&6; }
4479if ${ac_cv_path_BASH+:} false; then :
4480  $as_echo_n "(cached) " >&6
4481else
4482  case $BASH in
4483  [\\/]* | ?:[\\/]*)
4484  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4485  ;;
4486  *)
4487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4488for as_dir in $PATH
4489do
4490  IFS=$as_save_IFS
4491  test -z "$as_dir" && as_dir=.
4492    for ac_exec_ext in '' $ac_executable_extensions; do
4493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4494    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4496    break 2
4497  fi
4498done
4499  done
4500IFS=$as_save_IFS
4501
4502  ;;
4503esac
4504fi
4505BASH=$ac_cv_path_BASH
4506if test -n "$BASH"; then
4507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4508$as_echo "$BASH" >&6; }
4509else
4510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4511$as_echo "no" >&6; }
4512fi
4513
4514
4515  test -n "$BASH" && break
4516done
4517
4518  else
4519    # The variable is set, but is it from the command line or the environment?
4520
4521    # Try to remove the string !BASH! from our list.
4522    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4523    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4524      # If it failed, the variable was not from the command line. Ignore it,
4525      # but warn the user (except for BASH, which is always set by the calling BASH).
4526      if test "xBASH" != xBASH; then
4527        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4528$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4529      fi
4530      # Try to locate tool using the code snippet
4531      for ac_prog in bash
4532do
4533  # Extract the first word of "$ac_prog", so it can be a program name with args.
4534set dummy $ac_prog; ac_word=$2
4535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4536$as_echo_n "checking for $ac_word... " >&6; }
4537if ${ac_cv_path_BASH+:} false; then :
4538  $as_echo_n "(cached) " >&6
4539else
4540  case $BASH in
4541  [\\/]* | ?:[\\/]*)
4542  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4543  ;;
4544  *)
4545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4546for as_dir in $PATH
4547do
4548  IFS=$as_save_IFS
4549  test -z "$as_dir" && as_dir=.
4550    for ac_exec_ext in '' $ac_executable_extensions; do
4551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4552    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4554    break 2
4555  fi
4556done
4557  done
4558IFS=$as_save_IFS
4559
4560  ;;
4561esac
4562fi
4563BASH=$ac_cv_path_BASH
4564if test -n "$BASH"; then
4565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4566$as_echo "$BASH" >&6; }
4567else
4568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4569$as_echo "no" >&6; }
4570fi
4571
4572
4573  test -n "$BASH" && break
4574done
4575
4576    else
4577      # If it succeeded, then it was overridden by the user. We will use it
4578      # for the tool.
4579
4580      # First remove it from the list of overridden variables, so we can test
4581      # for unknown variables in the end.
4582      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4583
4584      # Check if the provided tool contains a complete path.
4585      tool_specified="$BASH"
4586      tool_basename="${tool_specified##*/}"
4587      if test "x$tool_basename" = "x$tool_specified"; then
4588        # A command without a complete path is provided, search $PATH.
4589        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4590$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4591        # Extract the first word of "$tool_basename", so it can be a program name with args.
4592set dummy $tool_basename; ac_word=$2
4593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4594$as_echo_n "checking for $ac_word... " >&6; }
4595if ${ac_cv_path_BASH+:} false; then :
4596  $as_echo_n "(cached) " >&6
4597else
4598  case $BASH in
4599  [\\/]* | ?:[\\/]*)
4600  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4601  ;;
4602  *)
4603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4604for as_dir in $PATH
4605do
4606  IFS=$as_save_IFS
4607  test -z "$as_dir" && as_dir=.
4608    for ac_exec_ext in '' $ac_executable_extensions; do
4609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4610    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4612    break 2
4613  fi
4614done
4615  done
4616IFS=$as_save_IFS
4617
4618  ;;
4619esac
4620fi
4621BASH=$ac_cv_path_BASH
4622if test -n "$BASH"; then
4623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4624$as_echo "$BASH" >&6; }
4625else
4626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4627$as_echo "no" >&6; }
4628fi
4629
4630
4631        if test "x$BASH" = x; then
4632          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4633        fi
4634      else
4635        # Otherwise we believe it is a complete path. Use it as it is.
4636        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4637$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4638        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4639$as_echo_n "checking for BASH... " >&6; }
4640        if test ! -x "$tool_specified"; then
4641          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4642$as_echo "not found" >&6; }
4643          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4644        fi
4645        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4646$as_echo "$tool_specified" >&6; }
4647      fi
4648    fi
4649  fi
4650
4651
4652
4653  if test "x$BASH" = x; then
4654    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4655  fi
4656
4657
4658
4659
4660
4661  # Publish this variable in the help.
4662
4663
4664  if test "x$CAT" = x; then
4665    # The variable is not set by user, try to locate tool using the code snippet
4666    for ac_prog in cat
4667do
4668  # Extract the first word of "$ac_prog", so it can be a program name with args.
4669set dummy $ac_prog; ac_word=$2
4670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4671$as_echo_n "checking for $ac_word... " >&6; }
4672if ${ac_cv_path_CAT+:} false; then :
4673  $as_echo_n "(cached) " >&6
4674else
4675  case $CAT in
4676  [\\/]* | ?:[\\/]*)
4677  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4678  ;;
4679  *)
4680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4681for as_dir in $PATH
4682do
4683  IFS=$as_save_IFS
4684  test -z "$as_dir" && as_dir=.
4685    for ac_exec_ext in '' $ac_executable_extensions; do
4686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4687    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4689    break 2
4690  fi
4691done
4692  done
4693IFS=$as_save_IFS
4694
4695  ;;
4696esac
4697fi
4698CAT=$ac_cv_path_CAT
4699if test -n "$CAT"; then
4700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4701$as_echo "$CAT" >&6; }
4702else
4703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4704$as_echo "no" >&6; }
4705fi
4706
4707
4708  test -n "$CAT" && break
4709done
4710
4711  else
4712    # The variable is set, but is it from the command line or the environment?
4713
4714    # Try to remove the string !CAT! from our list.
4715    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4716    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4717      # If it failed, the variable was not from the command line. Ignore it,
4718      # but warn the user (except for BASH, which is always set by the calling BASH).
4719      if test "xCAT" != xBASH; then
4720        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4721$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4722      fi
4723      # Try to locate tool using the code snippet
4724      for ac_prog in cat
4725do
4726  # Extract the first word of "$ac_prog", so it can be a program name with args.
4727set dummy $ac_prog; ac_word=$2
4728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4729$as_echo_n "checking for $ac_word... " >&6; }
4730if ${ac_cv_path_CAT+:} false; then :
4731  $as_echo_n "(cached) " >&6
4732else
4733  case $CAT in
4734  [\\/]* | ?:[\\/]*)
4735  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4736  ;;
4737  *)
4738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4739for as_dir in $PATH
4740do
4741  IFS=$as_save_IFS
4742  test -z "$as_dir" && as_dir=.
4743    for ac_exec_ext in '' $ac_executable_extensions; do
4744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4745    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4747    break 2
4748  fi
4749done
4750  done
4751IFS=$as_save_IFS
4752
4753  ;;
4754esac
4755fi
4756CAT=$ac_cv_path_CAT
4757if test -n "$CAT"; then
4758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4759$as_echo "$CAT" >&6; }
4760else
4761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4762$as_echo "no" >&6; }
4763fi
4764
4765
4766  test -n "$CAT" && break
4767done
4768
4769    else
4770      # If it succeeded, then it was overridden by the user. We will use it
4771      # for the tool.
4772
4773      # First remove it from the list of overridden variables, so we can test
4774      # for unknown variables in the end.
4775      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4776
4777      # Check if the provided tool contains a complete path.
4778      tool_specified="$CAT"
4779      tool_basename="${tool_specified##*/}"
4780      if test "x$tool_basename" = "x$tool_specified"; then
4781        # A command without a complete path is provided, search $PATH.
4782        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4783$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4784        # Extract the first word of "$tool_basename", so it can be a program name with args.
4785set dummy $tool_basename; ac_word=$2
4786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4787$as_echo_n "checking for $ac_word... " >&6; }
4788if ${ac_cv_path_CAT+:} false; then :
4789  $as_echo_n "(cached) " >&6
4790else
4791  case $CAT in
4792  [\\/]* | ?:[\\/]*)
4793  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4794  ;;
4795  *)
4796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4797for as_dir in $PATH
4798do
4799  IFS=$as_save_IFS
4800  test -z "$as_dir" && as_dir=.
4801    for ac_exec_ext in '' $ac_executable_extensions; do
4802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4803    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4805    break 2
4806  fi
4807done
4808  done
4809IFS=$as_save_IFS
4810
4811  ;;
4812esac
4813fi
4814CAT=$ac_cv_path_CAT
4815if test -n "$CAT"; then
4816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4817$as_echo "$CAT" >&6; }
4818else
4819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4820$as_echo "no" >&6; }
4821fi
4822
4823
4824        if test "x$CAT" = x; then
4825          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4826        fi
4827      else
4828        # Otherwise we believe it is a complete path. Use it as it is.
4829        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4830$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4831        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4832$as_echo_n "checking for CAT... " >&6; }
4833        if test ! -x "$tool_specified"; then
4834          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4835$as_echo "not found" >&6; }
4836          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4837        fi
4838        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4839$as_echo "$tool_specified" >&6; }
4840      fi
4841    fi
4842  fi
4843
4844
4845
4846  if test "x$CAT" = x; then
4847    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4848  fi
4849
4850
4851
4852
4853
4854  # Publish this variable in the help.
4855
4856
4857  if test "x$CHMOD" = x; then
4858    # The variable is not set by user, try to locate tool using the code snippet
4859    for ac_prog in chmod
4860do
4861  # Extract the first word of "$ac_prog", so it can be a program name with args.
4862set dummy $ac_prog; ac_word=$2
4863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4864$as_echo_n "checking for $ac_word... " >&6; }
4865if ${ac_cv_path_CHMOD+:} false; then :
4866  $as_echo_n "(cached) " >&6
4867else
4868  case $CHMOD in
4869  [\\/]* | ?:[\\/]*)
4870  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4871  ;;
4872  *)
4873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4874for as_dir in $PATH
4875do
4876  IFS=$as_save_IFS
4877  test -z "$as_dir" && as_dir=.
4878    for ac_exec_ext in '' $ac_executable_extensions; do
4879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4880    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4882    break 2
4883  fi
4884done
4885  done
4886IFS=$as_save_IFS
4887
4888  ;;
4889esac
4890fi
4891CHMOD=$ac_cv_path_CHMOD
4892if test -n "$CHMOD"; then
4893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4894$as_echo "$CHMOD" >&6; }
4895else
4896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4897$as_echo "no" >&6; }
4898fi
4899
4900
4901  test -n "$CHMOD" && break
4902done
4903
4904  else
4905    # The variable is set, but is it from the command line or the environment?
4906
4907    # Try to remove the string !CHMOD! from our list.
4908    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
4909    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4910      # If it failed, the variable was not from the command line. Ignore it,
4911      # but warn the user (except for BASH, which is always set by the calling BASH).
4912      if test "xCHMOD" != xBASH; then
4913        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
4914$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
4915      fi
4916      # Try to locate tool using the code snippet
4917      for ac_prog in chmod
4918do
4919  # Extract the first word of "$ac_prog", so it can be a program name with args.
4920set dummy $ac_prog; ac_word=$2
4921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4922$as_echo_n "checking for $ac_word... " >&6; }
4923if ${ac_cv_path_CHMOD+:} false; then :
4924  $as_echo_n "(cached) " >&6
4925else
4926  case $CHMOD in
4927  [\\/]* | ?:[\\/]*)
4928  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4929  ;;
4930  *)
4931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4932for as_dir in $PATH
4933do
4934  IFS=$as_save_IFS
4935  test -z "$as_dir" && as_dir=.
4936    for ac_exec_ext in '' $ac_executable_extensions; do
4937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4938    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4940    break 2
4941  fi
4942done
4943  done
4944IFS=$as_save_IFS
4945
4946  ;;
4947esac
4948fi
4949CHMOD=$ac_cv_path_CHMOD
4950if test -n "$CHMOD"; then
4951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4952$as_echo "$CHMOD" >&6; }
4953else
4954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4955$as_echo "no" >&6; }
4956fi
4957
4958
4959  test -n "$CHMOD" && break
4960done
4961
4962    else
4963      # If it succeeded, then it was overridden by the user. We will use it
4964      # for the tool.
4965
4966      # First remove it from the list of overridden variables, so we can test
4967      # for unknown variables in the end.
4968      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4969
4970      # Check if the provided tool contains a complete path.
4971      tool_specified="$CHMOD"
4972      tool_basename="${tool_specified##*/}"
4973      if test "x$tool_basename" = "x$tool_specified"; then
4974        # A command without a complete path is provided, search $PATH.
4975        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
4976$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
4977        # Extract the first word of "$tool_basename", so it can be a program name with args.
4978set dummy $tool_basename; ac_word=$2
4979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4980$as_echo_n "checking for $ac_word... " >&6; }
4981if ${ac_cv_path_CHMOD+:} false; then :
4982  $as_echo_n "(cached) " >&6
4983else
4984  case $CHMOD in
4985  [\\/]* | ?:[\\/]*)
4986  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4987  ;;
4988  *)
4989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4990for as_dir in $PATH
4991do
4992  IFS=$as_save_IFS
4993  test -z "$as_dir" && as_dir=.
4994    for ac_exec_ext in '' $ac_executable_extensions; do
4995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4996    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4998    break 2
4999  fi
5000done
5001  done
5002IFS=$as_save_IFS
5003
5004  ;;
5005esac
5006fi
5007CHMOD=$ac_cv_path_CHMOD
5008if test -n "$CHMOD"; then
5009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5010$as_echo "$CHMOD" >&6; }
5011else
5012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5013$as_echo "no" >&6; }
5014fi
5015
5016
5017        if test "x$CHMOD" = x; then
5018          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5019        fi
5020      else
5021        # Otherwise we believe it is a complete path. Use it as it is.
5022        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5023$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5024        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5025$as_echo_n "checking for CHMOD... " >&6; }
5026        if test ! -x "$tool_specified"; then
5027          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5028$as_echo "not found" >&6; }
5029          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5030        fi
5031        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5032$as_echo "$tool_specified" >&6; }
5033      fi
5034    fi
5035  fi
5036
5037
5038
5039  if test "x$CHMOD" = x; then
5040    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5041  fi
5042
5043
5044
5045
5046
5047  # Publish this variable in the help.
5048
5049
5050  if test "x$CMP" = x; then
5051    # The variable is not set by user, try to locate tool using the code snippet
5052    for ac_prog in cmp
5053do
5054  # Extract the first word of "$ac_prog", so it can be a program name with args.
5055set dummy $ac_prog; ac_word=$2
5056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5057$as_echo_n "checking for $ac_word... " >&6; }
5058if ${ac_cv_path_CMP+:} false; then :
5059  $as_echo_n "(cached) " >&6
5060else
5061  case $CMP in
5062  [\\/]* | ?:[\\/]*)
5063  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5064  ;;
5065  *)
5066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5067for as_dir in $PATH
5068do
5069  IFS=$as_save_IFS
5070  test -z "$as_dir" && as_dir=.
5071    for ac_exec_ext in '' $ac_executable_extensions; do
5072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5073    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5075    break 2
5076  fi
5077done
5078  done
5079IFS=$as_save_IFS
5080
5081  ;;
5082esac
5083fi
5084CMP=$ac_cv_path_CMP
5085if test -n "$CMP"; then
5086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5087$as_echo "$CMP" >&6; }
5088else
5089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5090$as_echo "no" >&6; }
5091fi
5092
5093
5094  test -n "$CMP" && break
5095done
5096
5097  else
5098    # The variable is set, but is it from the command line or the environment?
5099
5100    # Try to remove the string !CMP! from our list.
5101    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5102    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5103      # If it failed, the variable was not from the command line. Ignore it,
5104      # but warn the user (except for BASH, which is always set by the calling BASH).
5105      if test "xCMP" != xBASH; then
5106        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5107$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5108      fi
5109      # Try to locate tool using the code snippet
5110      for ac_prog in cmp
5111do
5112  # Extract the first word of "$ac_prog", so it can be a program name with args.
5113set dummy $ac_prog; ac_word=$2
5114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5115$as_echo_n "checking for $ac_word... " >&6; }
5116if ${ac_cv_path_CMP+:} false; then :
5117  $as_echo_n "(cached) " >&6
5118else
5119  case $CMP in
5120  [\\/]* | ?:[\\/]*)
5121  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5122  ;;
5123  *)
5124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5125for as_dir in $PATH
5126do
5127  IFS=$as_save_IFS
5128  test -z "$as_dir" && as_dir=.
5129    for ac_exec_ext in '' $ac_executable_extensions; do
5130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5131    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5133    break 2
5134  fi
5135done
5136  done
5137IFS=$as_save_IFS
5138
5139  ;;
5140esac
5141fi
5142CMP=$ac_cv_path_CMP
5143if test -n "$CMP"; then
5144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5145$as_echo "$CMP" >&6; }
5146else
5147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5148$as_echo "no" >&6; }
5149fi
5150
5151
5152  test -n "$CMP" && break
5153done
5154
5155    else
5156      # If it succeeded, then it was overridden by the user. We will use it
5157      # for the tool.
5158
5159      # First remove it from the list of overridden variables, so we can test
5160      # for unknown variables in the end.
5161      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5162
5163      # Check if the provided tool contains a complete path.
5164      tool_specified="$CMP"
5165      tool_basename="${tool_specified##*/}"
5166      if test "x$tool_basename" = "x$tool_specified"; then
5167        # A command without a complete path is provided, search $PATH.
5168        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5169$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5170        # Extract the first word of "$tool_basename", so it can be a program name with args.
5171set dummy $tool_basename; ac_word=$2
5172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5173$as_echo_n "checking for $ac_word... " >&6; }
5174if ${ac_cv_path_CMP+:} false; then :
5175  $as_echo_n "(cached) " >&6
5176else
5177  case $CMP in
5178  [\\/]* | ?:[\\/]*)
5179  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5180  ;;
5181  *)
5182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5183for as_dir in $PATH
5184do
5185  IFS=$as_save_IFS
5186  test -z "$as_dir" && as_dir=.
5187    for ac_exec_ext in '' $ac_executable_extensions; do
5188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5189    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5191    break 2
5192  fi
5193done
5194  done
5195IFS=$as_save_IFS
5196
5197  ;;
5198esac
5199fi
5200CMP=$ac_cv_path_CMP
5201if test -n "$CMP"; then
5202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5203$as_echo "$CMP" >&6; }
5204else
5205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5206$as_echo "no" >&6; }
5207fi
5208
5209
5210        if test "x$CMP" = x; then
5211          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5212        fi
5213      else
5214        # Otherwise we believe it is a complete path. Use it as it is.
5215        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5216$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5217        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5218$as_echo_n "checking for CMP... " >&6; }
5219        if test ! -x "$tool_specified"; then
5220          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5221$as_echo "not found" >&6; }
5222          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5223        fi
5224        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5225$as_echo "$tool_specified" >&6; }
5226      fi
5227    fi
5228  fi
5229
5230
5231
5232  if test "x$CMP" = x; then
5233    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5234  fi
5235
5236
5237
5238
5239
5240  # Publish this variable in the help.
5241
5242
5243  if test "x$COMM" = x; then
5244    # The variable is not set by user, try to locate tool using the code snippet
5245    for ac_prog in comm
5246do
5247  # Extract the first word of "$ac_prog", so it can be a program name with args.
5248set dummy $ac_prog; ac_word=$2
5249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5250$as_echo_n "checking for $ac_word... " >&6; }
5251if ${ac_cv_path_COMM+:} false; then :
5252  $as_echo_n "(cached) " >&6
5253else
5254  case $COMM in
5255  [\\/]* | ?:[\\/]*)
5256  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5257  ;;
5258  *)
5259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5260for as_dir in $PATH
5261do
5262  IFS=$as_save_IFS
5263  test -z "$as_dir" && as_dir=.
5264    for ac_exec_ext in '' $ac_executable_extensions; do
5265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5266    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5268    break 2
5269  fi
5270done
5271  done
5272IFS=$as_save_IFS
5273
5274  ;;
5275esac
5276fi
5277COMM=$ac_cv_path_COMM
5278if test -n "$COMM"; then
5279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5280$as_echo "$COMM" >&6; }
5281else
5282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5283$as_echo "no" >&6; }
5284fi
5285
5286
5287  test -n "$COMM" && break
5288done
5289
5290  else
5291    # The variable is set, but is it from the command line or the environment?
5292
5293    # Try to remove the string !COMM! from our list.
5294    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5295    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5296      # If it failed, the variable was not from the command line. Ignore it,
5297      # but warn the user (except for BASH, which is always set by the calling BASH).
5298      if test "xCOMM" != xBASH; then
5299        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5300$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5301      fi
5302      # Try to locate tool using the code snippet
5303      for ac_prog in comm
5304do
5305  # Extract the first word of "$ac_prog", so it can be a program name with args.
5306set dummy $ac_prog; ac_word=$2
5307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5308$as_echo_n "checking for $ac_word... " >&6; }
5309if ${ac_cv_path_COMM+:} false; then :
5310  $as_echo_n "(cached) " >&6
5311else
5312  case $COMM in
5313  [\\/]* | ?:[\\/]*)
5314  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5315  ;;
5316  *)
5317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5318for as_dir in $PATH
5319do
5320  IFS=$as_save_IFS
5321  test -z "$as_dir" && as_dir=.
5322    for ac_exec_ext in '' $ac_executable_extensions; do
5323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5324    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5326    break 2
5327  fi
5328done
5329  done
5330IFS=$as_save_IFS
5331
5332  ;;
5333esac
5334fi
5335COMM=$ac_cv_path_COMM
5336if test -n "$COMM"; then
5337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5338$as_echo "$COMM" >&6; }
5339else
5340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5341$as_echo "no" >&6; }
5342fi
5343
5344
5345  test -n "$COMM" && break
5346done
5347
5348    else
5349      # If it succeeded, then it was overridden by the user. We will use it
5350      # for the tool.
5351
5352      # First remove it from the list of overridden variables, so we can test
5353      # for unknown variables in the end.
5354      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5355
5356      # Check if the provided tool contains a complete path.
5357      tool_specified="$COMM"
5358      tool_basename="${tool_specified##*/}"
5359      if test "x$tool_basename" = "x$tool_specified"; then
5360        # A command without a complete path is provided, search $PATH.
5361        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5362$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5363        # Extract the first word of "$tool_basename", so it can be a program name with args.
5364set dummy $tool_basename; ac_word=$2
5365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5366$as_echo_n "checking for $ac_word... " >&6; }
5367if ${ac_cv_path_COMM+:} false; then :
5368  $as_echo_n "(cached) " >&6
5369else
5370  case $COMM in
5371  [\\/]* | ?:[\\/]*)
5372  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5373  ;;
5374  *)
5375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5376for as_dir in $PATH
5377do
5378  IFS=$as_save_IFS
5379  test -z "$as_dir" && as_dir=.
5380    for ac_exec_ext in '' $ac_executable_extensions; do
5381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5382    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5384    break 2
5385  fi
5386done
5387  done
5388IFS=$as_save_IFS
5389
5390  ;;
5391esac
5392fi
5393COMM=$ac_cv_path_COMM
5394if test -n "$COMM"; then
5395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5396$as_echo "$COMM" >&6; }
5397else
5398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5399$as_echo "no" >&6; }
5400fi
5401
5402
5403        if test "x$COMM" = x; then
5404          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5405        fi
5406      else
5407        # Otherwise we believe it is a complete path. Use it as it is.
5408        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5409$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5410        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5411$as_echo_n "checking for COMM... " >&6; }
5412        if test ! -x "$tool_specified"; then
5413          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5414$as_echo "not found" >&6; }
5415          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5416        fi
5417        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5418$as_echo "$tool_specified" >&6; }
5419      fi
5420    fi
5421  fi
5422
5423
5424
5425  if test "x$COMM" = x; then
5426    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5427  fi
5428
5429
5430
5431
5432
5433  # Publish this variable in the help.
5434
5435
5436  if test "x$CP" = x; then
5437    # The variable is not set by user, try to locate tool using the code snippet
5438    for ac_prog in cp
5439do
5440  # Extract the first word of "$ac_prog", so it can be a program name with args.
5441set dummy $ac_prog; ac_word=$2
5442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5443$as_echo_n "checking for $ac_word... " >&6; }
5444if ${ac_cv_path_CP+:} false; then :
5445  $as_echo_n "(cached) " >&6
5446else
5447  case $CP in
5448  [\\/]* | ?:[\\/]*)
5449  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5450  ;;
5451  *)
5452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5453for as_dir in $PATH
5454do
5455  IFS=$as_save_IFS
5456  test -z "$as_dir" && as_dir=.
5457    for ac_exec_ext in '' $ac_executable_extensions; do
5458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5459    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5461    break 2
5462  fi
5463done
5464  done
5465IFS=$as_save_IFS
5466
5467  ;;
5468esac
5469fi
5470CP=$ac_cv_path_CP
5471if test -n "$CP"; then
5472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5473$as_echo "$CP" >&6; }
5474else
5475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5476$as_echo "no" >&6; }
5477fi
5478
5479
5480  test -n "$CP" && break
5481done
5482
5483  else
5484    # The variable is set, but is it from the command line or the environment?
5485
5486    # Try to remove the string !CP! from our list.
5487    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5488    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5489      # If it failed, the variable was not from the command line. Ignore it,
5490      # but warn the user (except for BASH, which is always set by the calling BASH).
5491      if test "xCP" != xBASH; then
5492        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5493$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5494      fi
5495      # Try to locate tool using the code snippet
5496      for ac_prog in cp
5497do
5498  # Extract the first word of "$ac_prog", so it can be a program name with args.
5499set dummy $ac_prog; ac_word=$2
5500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5501$as_echo_n "checking for $ac_word... " >&6; }
5502if ${ac_cv_path_CP+:} false; then :
5503  $as_echo_n "(cached) " >&6
5504else
5505  case $CP in
5506  [\\/]* | ?:[\\/]*)
5507  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5508  ;;
5509  *)
5510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5511for as_dir in $PATH
5512do
5513  IFS=$as_save_IFS
5514  test -z "$as_dir" && as_dir=.
5515    for ac_exec_ext in '' $ac_executable_extensions; do
5516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5517    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5519    break 2
5520  fi
5521done
5522  done
5523IFS=$as_save_IFS
5524
5525  ;;
5526esac
5527fi
5528CP=$ac_cv_path_CP
5529if test -n "$CP"; then
5530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5531$as_echo "$CP" >&6; }
5532else
5533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5534$as_echo "no" >&6; }
5535fi
5536
5537
5538  test -n "$CP" && break
5539done
5540
5541    else
5542      # If it succeeded, then it was overridden by the user. We will use it
5543      # for the tool.
5544
5545      # First remove it from the list of overridden variables, so we can test
5546      # for unknown variables in the end.
5547      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5548
5549      # Check if the provided tool contains a complete path.
5550      tool_specified="$CP"
5551      tool_basename="${tool_specified##*/}"
5552      if test "x$tool_basename" = "x$tool_specified"; then
5553        # A command without a complete path is provided, search $PATH.
5554        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5555$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5556        # Extract the first word of "$tool_basename", so it can be a program name with args.
5557set dummy $tool_basename; ac_word=$2
5558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5559$as_echo_n "checking for $ac_word... " >&6; }
5560if ${ac_cv_path_CP+:} false; then :
5561  $as_echo_n "(cached) " >&6
5562else
5563  case $CP in
5564  [\\/]* | ?:[\\/]*)
5565  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5566  ;;
5567  *)
5568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5569for as_dir in $PATH
5570do
5571  IFS=$as_save_IFS
5572  test -z "$as_dir" && as_dir=.
5573    for ac_exec_ext in '' $ac_executable_extensions; do
5574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5575    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5577    break 2
5578  fi
5579done
5580  done
5581IFS=$as_save_IFS
5582
5583  ;;
5584esac
5585fi
5586CP=$ac_cv_path_CP
5587if test -n "$CP"; then
5588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5589$as_echo "$CP" >&6; }
5590else
5591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5592$as_echo "no" >&6; }
5593fi
5594
5595
5596        if test "x$CP" = x; then
5597          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5598        fi
5599      else
5600        # Otherwise we believe it is a complete path. Use it as it is.
5601        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5602$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5603        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5604$as_echo_n "checking for CP... " >&6; }
5605        if test ! -x "$tool_specified"; then
5606          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5607$as_echo "not found" >&6; }
5608          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5609        fi
5610        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5611$as_echo "$tool_specified" >&6; }
5612      fi
5613    fi
5614  fi
5615
5616
5617
5618  if test "x$CP" = x; then
5619    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5620  fi
5621
5622
5623
5624
5625
5626  # Publish this variable in the help.
5627
5628
5629  if test "x$CPIO" = x; then
5630    # The variable is not set by user, try to locate tool using the code snippet
5631    for ac_prog in cpio
5632do
5633  # Extract the first word of "$ac_prog", so it can be a program name with args.
5634set dummy $ac_prog; ac_word=$2
5635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5636$as_echo_n "checking for $ac_word... " >&6; }
5637if ${ac_cv_path_CPIO+:} false; then :
5638  $as_echo_n "(cached) " >&6
5639else
5640  case $CPIO in
5641  [\\/]* | ?:[\\/]*)
5642  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5643  ;;
5644  *)
5645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5646for as_dir in $PATH
5647do
5648  IFS=$as_save_IFS
5649  test -z "$as_dir" && as_dir=.
5650    for ac_exec_ext in '' $ac_executable_extensions; do
5651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5652    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5654    break 2
5655  fi
5656done
5657  done
5658IFS=$as_save_IFS
5659
5660  ;;
5661esac
5662fi
5663CPIO=$ac_cv_path_CPIO
5664if test -n "$CPIO"; then
5665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5666$as_echo "$CPIO" >&6; }
5667else
5668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5669$as_echo "no" >&6; }
5670fi
5671
5672
5673  test -n "$CPIO" && break
5674done
5675
5676  else
5677    # The variable is set, but is it from the command line or the environment?
5678
5679    # Try to remove the string !CPIO! from our list.
5680    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
5681    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5682      # If it failed, the variable was not from the command line. Ignore it,
5683      # but warn the user (except for BASH, which is always set by the calling BASH).
5684      if test "xCPIO" != xBASH; then
5685        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
5686$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
5687      fi
5688      # Try to locate tool using the code snippet
5689      for ac_prog in cpio
5690do
5691  # Extract the first word of "$ac_prog", so it can be a program name with args.
5692set dummy $ac_prog; ac_word=$2
5693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5694$as_echo_n "checking for $ac_word... " >&6; }
5695if ${ac_cv_path_CPIO+:} false; then :
5696  $as_echo_n "(cached) " >&6
5697else
5698  case $CPIO in
5699  [\\/]* | ?:[\\/]*)
5700  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5701  ;;
5702  *)
5703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5704for as_dir in $PATH
5705do
5706  IFS=$as_save_IFS
5707  test -z "$as_dir" && as_dir=.
5708    for ac_exec_ext in '' $ac_executable_extensions; do
5709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5710    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5712    break 2
5713  fi
5714done
5715  done
5716IFS=$as_save_IFS
5717
5718  ;;
5719esac
5720fi
5721CPIO=$ac_cv_path_CPIO
5722if test -n "$CPIO"; then
5723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5724$as_echo "$CPIO" >&6; }
5725else
5726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5727$as_echo "no" >&6; }
5728fi
5729
5730
5731  test -n "$CPIO" && break
5732done
5733
5734    else
5735      # If it succeeded, then it was overridden by the user. We will use it
5736      # for the tool.
5737
5738      # First remove it from the list of overridden variables, so we can test
5739      # for unknown variables in the end.
5740      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5741
5742      # Check if the provided tool contains a complete path.
5743      tool_specified="$CPIO"
5744      tool_basename="${tool_specified##*/}"
5745      if test "x$tool_basename" = "x$tool_specified"; then
5746        # A command without a complete path is provided, search $PATH.
5747        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
5748$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
5749        # Extract the first word of "$tool_basename", so it can be a program name with args.
5750set dummy $tool_basename; ac_word=$2
5751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5752$as_echo_n "checking for $ac_word... " >&6; }
5753if ${ac_cv_path_CPIO+:} false; then :
5754  $as_echo_n "(cached) " >&6
5755else
5756  case $CPIO in
5757  [\\/]* | ?:[\\/]*)
5758  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5759  ;;
5760  *)
5761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5762for as_dir in $PATH
5763do
5764  IFS=$as_save_IFS
5765  test -z "$as_dir" && as_dir=.
5766    for ac_exec_ext in '' $ac_executable_extensions; do
5767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5768    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5770    break 2
5771  fi
5772done
5773  done
5774IFS=$as_save_IFS
5775
5776  ;;
5777esac
5778fi
5779CPIO=$ac_cv_path_CPIO
5780if test -n "$CPIO"; then
5781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5782$as_echo "$CPIO" >&6; }
5783else
5784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5785$as_echo "no" >&6; }
5786fi
5787
5788
5789        if test "x$CPIO" = x; then
5790          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5791        fi
5792      else
5793        # Otherwise we believe it is a complete path. Use it as it is.
5794        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
5795$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
5796        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
5797$as_echo_n "checking for CPIO... " >&6; }
5798        if test ! -x "$tool_specified"; then
5799          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5800$as_echo "not found" >&6; }
5801          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
5802        fi
5803        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5804$as_echo "$tool_specified" >&6; }
5805      fi
5806    fi
5807  fi
5808
5809
5810
5811  if test "x$CPIO" = x; then
5812    as_fn_error $? "Could not find required tool for CPIO" "$LINENO" 5
5813  fi
5814
5815
5816
5817
5818
5819  # Publish this variable in the help.
5820
5821
5822  if test "x$CUT" = x; then
5823    # The variable is not set by user, try to locate tool using the code snippet
5824    for ac_prog in cut
5825do
5826  # Extract the first word of "$ac_prog", so it can be a program name with args.
5827set dummy $ac_prog; ac_word=$2
5828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5829$as_echo_n "checking for $ac_word... " >&6; }
5830if ${ac_cv_path_CUT+:} false; then :
5831  $as_echo_n "(cached) " >&6
5832else
5833  case $CUT in
5834  [\\/]* | ?:[\\/]*)
5835  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5836  ;;
5837  *)
5838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5839for as_dir in $PATH
5840do
5841  IFS=$as_save_IFS
5842  test -z "$as_dir" && as_dir=.
5843    for ac_exec_ext in '' $ac_executable_extensions; do
5844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5845    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5847    break 2
5848  fi
5849done
5850  done
5851IFS=$as_save_IFS
5852
5853  ;;
5854esac
5855fi
5856CUT=$ac_cv_path_CUT
5857if test -n "$CUT"; then
5858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5859$as_echo "$CUT" >&6; }
5860else
5861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5862$as_echo "no" >&6; }
5863fi
5864
5865
5866  test -n "$CUT" && break
5867done
5868
5869  else
5870    # The variable is set, but is it from the command line or the environment?
5871
5872    # Try to remove the string !CUT! from our list.
5873    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5874    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5875      # If it failed, the variable was not from the command line. Ignore it,
5876      # but warn the user (except for BASH, which is always set by the calling BASH).
5877      if test "xCUT" != xBASH; then
5878        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5879$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5880      fi
5881      # Try to locate tool using the code snippet
5882      for ac_prog in cut
5883do
5884  # Extract the first word of "$ac_prog", so it can be a program name with args.
5885set dummy $ac_prog; ac_word=$2
5886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5887$as_echo_n "checking for $ac_word... " >&6; }
5888if ${ac_cv_path_CUT+:} false; then :
5889  $as_echo_n "(cached) " >&6
5890else
5891  case $CUT in
5892  [\\/]* | ?:[\\/]*)
5893  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5894  ;;
5895  *)
5896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5897for as_dir in $PATH
5898do
5899  IFS=$as_save_IFS
5900  test -z "$as_dir" && as_dir=.
5901    for ac_exec_ext in '' $ac_executable_extensions; do
5902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5903    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5905    break 2
5906  fi
5907done
5908  done
5909IFS=$as_save_IFS
5910
5911  ;;
5912esac
5913fi
5914CUT=$ac_cv_path_CUT
5915if test -n "$CUT"; then
5916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5917$as_echo "$CUT" >&6; }
5918else
5919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5920$as_echo "no" >&6; }
5921fi
5922
5923
5924  test -n "$CUT" && break
5925done
5926
5927    else
5928      # If it succeeded, then it was overridden by the user. We will use it
5929      # for the tool.
5930
5931      # First remove it from the list of overridden variables, so we can test
5932      # for unknown variables in the end.
5933      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5934
5935      # Check if the provided tool contains a complete path.
5936      tool_specified="$CUT"
5937      tool_basename="${tool_specified##*/}"
5938      if test "x$tool_basename" = "x$tool_specified"; then
5939        # A command without a complete path is provided, search $PATH.
5940        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5941$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5942        # Extract the first word of "$tool_basename", so it can be a program name with args.
5943set dummy $tool_basename; ac_word=$2
5944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5945$as_echo_n "checking for $ac_word... " >&6; }
5946if ${ac_cv_path_CUT+:} false; then :
5947  $as_echo_n "(cached) " >&6
5948else
5949  case $CUT in
5950  [\\/]* | ?:[\\/]*)
5951  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5952  ;;
5953  *)
5954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5955for as_dir in $PATH
5956do
5957  IFS=$as_save_IFS
5958  test -z "$as_dir" && as_dir=.
5959    for ac_exec_ext in '' $ac_executable_extensions; do
5960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5961    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5963    break 2
5964  fi
5965done
5966  done
5967IFS=$as_save_IFS
5968
5969  ;;
5970esac
5971fi
5972CUT=$ac_cv_path_CUT
5973if test -n "$CUT"; then
5974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5975$as_echo "$CUT" >&6; }
5976else
5977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5978$as_echo "no" >&6; }
5979fi
5980
5981
5982        if test "x$CUT" = x; then
5983          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5984        fi
5985      else
5986        # Otherwise we believe it is a complete path. Use it as it is.
5987        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5988$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5989        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5990$as_echo_n "checking for CUT... " >&6; }
5991        if test ! -x "$tool_specified"; then
5992          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5993$as_echo "not found" >&6; }
5994          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5995        fi
5996        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5997$as_echo "$tool_specified" >&6; }
5998      fi
5999    fi
6000  fi
6001
6002
6003
6004  if test "x$CUT" = x; then
6005    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6006  fi
6007
6008
6009
6010
6011
6012  # Publish this variable in the help.
6013
6014
6015  if test "x$DATE" = x; then
6016    # The variable is not set by user, try to locate tool using the code snippet
6017    for ac_prog in date
6018do
6019  # Extract the first word of "$ac_prog", so it can be a program name with args.
6020set dummy $ac_prog; ac_word=$2
6021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6022$as_echo_n "checking for $ac_word... " >&6; }
6023if ${ac_cv_path_DATE+:} false; then :
6024  $as_echo_n "(cached) " >&6
6025else
6026  case $DATE in
6027  [\\/]* | ?:[\\/]*)
6028  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6029  ;;
6030  *)
6031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6032for as_dir in $PATH
6033do
6034  IFS=$as_save_IFS
6035  test -z "$as_dir" && as_dir=.
6036    for ac_exec_ext in '' $ac_executable_extensions; do
6037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6038    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6040    break 2
6041  fi
6042done
6043  done
6044IFS=$as_save_IFS
6045
6046  ;;
6047esac
6048fi
6049DATE=$ac_cv_path_DATE
6050if test -n "$DATE"; then
6051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6052$as_echo "$DATE" >&6; }
6053else
6054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6055$as_echo "no" >&6; }
6056fi
6057
6058
6059  test -n "$DATE" && break
6060done
6061
6062  else
6063    # The variable is set, but is it from the command line or the environment?
6064
6065    # Try to remove the string !DATE! from our list.
6066    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6067    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6068      # If it failed, the variable was not from the command line. Ignore it,
6069      # but warn the user (except for BASH, which is always set by the calling BASH).
6070      if test "xDATE" != xBASH; then
6071        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6072$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6073      fi
6074      # Try to locate tool using the code snippet
6075      for ac_prog in date
6076do
6077  # Extract the first word of "$ac_prog", so it can be a program name with args.
6078set dummy $ac_prog; ac_word=$2
6079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6080$as_echo_n "checking for $ac_word... " >&6; }
6081if ${ac_cv_path_DATE+:} false; then :
6082  $as_echo_n "(cached) " >&6
6083else
6084  case $DATE in
6085  [\\/]* | ?:[\\/]*)
6086  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6087  ;;
6088  *)
6089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6090for as_dir in $PATH
6091do
6092  IFS=$as_save_IFS
6093  test -z "$as_dir" && as_dir=.
6094    for ac_exec_ext in '' $ac_executable_extensions; do
6095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6096    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6098    break 2
6099  fi
6100done
6101  done
6102IFS=$as_save_IFS
6103
6104  ;;
6105esac
6106fi
6107DATE=$ac_cv_path_DATE
6108if test -n "$DATE"; then
6109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6110$as_echo "$DATE" >&6; }
6111else
6112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6113$as_echo "no" >&6; }
6114fi
6115
6116
6117  test -n "$DATE" && break
6118done
6119
6120    else
6121      # If it succeeded, then it was overridden by the user. We will use it
6122      # for the tool.
6123
6124      # First remove it from the list of overridden variables, so we can test
6125      # for unknown variables in the end.
6126      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6127
6128      # Check if the provided tool contains a complete path.
6129      tool_specified="$DATE"
6130      tool_basename="${tool_specified##*/}"
6131      if test "x$tool_basename" = "x$tool_specified"; then
6132        # A command without a complete path is provided, search $PATH.
6133        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6134$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6135        # Extract the first word of "$tool_basename", so it can be a program name with args.
6136set dummy $tool_basename; ac_word=$2
6137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6138$as_echo_n "checking for $ac_word... " >&6; }
6139if ${ac_cv_path_DATE+:} false; then :
6140  $as_echo_n "(cached) " >&6
6141else
6142  case $DATE in
6143  [\\/]* | ?:[\\/]*)
6144  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6145  ;;
6146  *)
6147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6148for as_dir in $PATH
6149do
6150  IFS=$as_save_IFS
6151  test -z "$as_dir" && as_dir=.
6152    for ac_exec_ext in '' $ac_executable_extensions; do
6153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6154    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6156    break 2
6157  fi
6158done
6159  done
6160IFS=$as_save_IFS
6161
6162  ;;
6163esac
6164fi
6165DATE=$ac_cv_path_DATE
6166if test -n "$DATE"; then
6167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6168$as_echo "$DATE" >&6; }
6169else
6170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6171$as_echo "no" >&6; }
6172fi
6173
6174
6175        if test "x$DATE" = x; then
6176          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6177        fi
6178      else
6179        # Otherwise we believe it is a complete path. Use it as it is.
6180        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6181$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6182        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6183$as_echo_n "checking for DATE... " >&6; }
6184        if test ! -x "$tool_specified"; then
6185          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6186$as_echo "not found" >&6; }
6187          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6188        fi
6189        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6190$as_echo "$tool_specified" >&6; }
6191      fi
6192    fi
6193  fi
6194
6195
6196
6197  if test "x$DATE" = x; then
6198    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6199  fi
6200
6201
6202
6203
6204
6205  # Publish this variable in the help.
6206
6207
6208  if test "x$DIFF" = x; then
6209    # The variable is not set by user, try to locate tool using the code snippet
6210    for ac_prog in gdiff diff
6211do
6212  # Extract the first word of "$ac_prog", so it can be a program name with args.
6213set dummy $ac_prog; ac_word=$2
6214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6215$as_echo_n "checking for $ac_word... " >&6; }
6216if ${ac_cv_path_DIFF+:} false; then :
6217  $as_echo_n "(cached) " >&6
6218else
6219  case $DIFF in
6220  [\\/]* | ?:[\\/]*)
6221  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6222  ;;
6223  *)
6224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6225for as_dir in $PATH
6226do
6227  IFS=$as_save_IFS
6228  test -z "$as_dir" && as_dir=.
6229    for ac_exec_ext in '' $ac_executable_extensions; do
6230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6231    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6233    break 2
6234  fi
6235done
6236  done
6237IFS=$as_save_IFS
6238
6239  ;;
6240esac
6241fi
6242DIFF=$ac_cv_path_DIFF
6243if test -n "$DIFF"; then
6244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6245$as_echo "$DIFF" >&6; }
6246else
6247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6248$as_echo "no" >&6; }
6249fi
6250
6251
6252  test -n "$DIFF" && break
6253done
6254
6255  else
6256    # The variable is set, but is it from the command line or the environment?
6257
6258    # Try to remove the string !DIFF! from our list.
6259    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6260    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6261      # If it failed, the variable was not from the command line. Ignore it,
6262      # but warn the user (except for BASH, which is always set by the calling BASH).
6263      if test "xDIFF" != xBASH; then
6264        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6265$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6266      fi
6267      # Try to locate tool using the code snippet
6268      for ac_prog in gdiff diff
6269do
6270  # Extract the first word of "$ac_prog", so it can be a program name with args.
6271set dummy $ac_prog; ac_word=$2
6272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6273$as_echo_n "checking for $ac_word... " >&6; }
6274if ${ac_cv_path_DIFF+:} false; then :
6275  $as_echo_n "(cached) " >&6
6276else
6277  case $DIFF in
6278  [\\/]* | ?:[\\/]*)
6279  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6280  ;;
6281  *)
6282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6283for as_dir in $PATH
6284do
6285  IFS=$as_save_IFS
6286  test -z "$as_dir" && as_dir=.
6287    for ac_exec_ext in '' $ac_executable_extensions; do
6288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6289    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6291    break 2
6292  fi
6293done
6294  done
6295IFS=$as_save_IFS
6296
6297  ;;
6298esac
6299fi
6300DIFF=$ac_cv_path_DIFF
6301if test -n "$DIFF"; then
6302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6303$as_echo "$DIFF" >&6; }
6304else
6305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6306$as_echo "no" >&6; }
6307fi
6308
6309
6310  test -n "$DIFF" && break
6311done
6312
6313    else
6314      # If it succeeded, then it was overridden by the user. We will use it
6315      # for the tool.
6316
6317      # First remove it from the list of overridden variables, so we can test
6318      # for unknown variables in the end.
6319      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6320
6321      # Check if the provided tool contains a complete path.
6322      tool_specified="$DIFF"
6323      tool_basename="${tool_specified##*/}"
6324      if test "x$tool_basename" = "x$tool_specified"; then
6325        # A command without a complete path is provided, search $PATH.
6326        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6327$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6328        # Extract the first word of "$tool_basename", so it can be a program name with args.
6329set dummy $tool_basename; ac_word=$2
6330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6331$as_echo_n "checking for $ac_word... " >&6; }
6332if ${ac_cv_path_DIFF+:} false; then :
6333  $as_echo_n "(cached) " >&6
6334else
6335  case $DIFF in
6336  [\\/]* | ?:[\\/]*)
6337  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6338  ;;
6339  *)
6340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6341for as_dir in $PATH
6342do
6343  IFS=$as_save_IFS
6344  test -z "$as_dir" && as_dir=.
6345    for ac_exec_ext in '' $ac_executable_extensions; do
6346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6347    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6349    break 2
6350  fi
6351done
6352  done
6353IFS=$as_save_IFS
6354
6355  ;;
6356esac
6357fi
6358DIFF=$ac_cv_path_DIFF
6359if test -n "$DIFF"; then
6360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6361$as_echo "$DIFF" >&6; }
6362else
6363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6364$as_echo "no" >&6; }
6365fi
6366
6367
6368        if test "x$DIFF" = x; then
6369          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6370        fi
6371      else
6372        # Otherwise we believe it is a complete path. Use it as it is.
6373        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6374$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6375        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6376$as_echo_n "checking for DIFF... " >&6; }
6377        if test ! -x "$tool_specified"; then
6378          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6379$as_echo "not found" >&6; }
6380          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6381        fi
6382        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6383$as_echo "$tool_specified" >&6; }
6384      fi
6385    fi
6386  fi
6387
6388
6389
6390  if test "x$DIFF" = x; then
6391    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6392  fi
6393
6394
6395
6396
6397
6398  # Publish this variable in the help.
6399
6400
6401  if test "x$DIRNAME" = x; then
6402    # The variable is not set by user, try to locate tool using the code snippet
6403    for ac_prog in dirname
6404do
6405  # Extract the first word of "$ac_prog", so it can be a program name with args.
6406set dummy $ac_prog; ac_word=$2
6407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6408$as_echo_n "checking for $ac_word... " >&6; }
6409if ${ac_cv_path_DIRNAME+:} false; then :
6410  $as_echo_n "(cached) " >&6
6411else
6412  case $DIRNAME in
6413  [\\/]* | ?:[\\/]*)
6414  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6415  ;;
6416  *)
6417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6418for as_dir in $PATH
6419do
6420  IFS=$as_save_IFS
6421  test -z "$as_dir" && as_dir=.
6422    for ac_exec_ext in '' $ac_executable_extensions; do
6423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6424    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6426    break 2
6427  fi
6428done
6429  done
6430IFS=$as_save_IFS
6431
6432  ;;
6433esac
6434fi
6435DIRNAME=$ac_cv_path_DIRNAME
6436if test -n "$DIRNAME"; then
6437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6438$as_echo "$DIRNAME" >&6; }
6439else
6440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6441$as_echo "no" >&6; }
6442fi
6443
6444
6445  test -n "$DIRNAME" && break
6446done
6447
6448  else
6449    # The variable is set, but is it from the command line or the environment?
6450
6451    # Try to remove the string !DIRNAME! from our list.
6452    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6453    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6454      # If it failed, the variable was not from the command line. Ignore it,
6455      # but warn the user (except for BASH, which is always set by the calling BASH).
6456      if test "xDIRNAME" != xBASH; then
6457        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6458$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6459      fi
6460      # Try to locate tool using the code snippet
6461      for ac_prog in dirname
6462do
6463  # Extract the first word of "$ac_prog", so it can be a program name with args.
6464set dummy $ac_prog; ac_word=$2
6465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6466$as_echo_n "checking for $ac_word... " >&6; }
6467if ${ac_cv_path_DIRNAME+:} false; then :
6468  $as_echo_n "(cached) " >&6
6469else
6470  case $DIRNAME in
6471  [\\/]* | ?:[\\/]*)
6472  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6473  ;;
6474  *)
6475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6476for as_dir in $PATH
6477do
6478  IFS=$as_save_IFS
6479  test -z "$as_dir" && as_dir=.
6480    for ac_exec_ext in '' $ac_executable_extensions; do
6481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6482    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6484    break 2
6485  fi
6486done
6487  done
6488IFS=$as_save_IFS
6489
6490  ;;
6491esac
6492fi
6493DIRNAME=$ac_cv_path_DIRNAME
6494if test -n "$DIRNAME"; then
6495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6496$as_echo "$DIRNAME" >&6; }
6497else
6498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6499$as_echo "no" >&6; }
6500fi
6501
6502
6503  test -n "$DIRNAME" && break
6504done
6505
6506    else
6507      # If it succeeded, then it was overridden by the user. We will use it
6508      # for the tool.
6509
6510      # First remove it from the list of overridden variables, so we can test
6511      # for unknown variables in the end.
6512      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6513
6514      # Check if the provided tool contains a complete path.
6515      tool_specified="$DIRNAME"
6516      tool_basename="${tool_specified##*/}"
6517      if test "x$tool_basename" = "x$tool_specified"; then
6518        # A command without a complete path is provided, search $PATH.
6519        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6520$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6521        # Extract the first word of "$tool_basename", so it can be a program name with args.
6522set dummy $tool_basename; ac_word=$2
6523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6524$as_echo_n "checking for $ac_word... " >&6; }
6525if ${ac_cv_path_DIRNAME+:} false; then :
6526  $as_echo_n "(cached) " >&6
6527else
6528  case $DIRNAME in
6529  [\\/]* | ?:[\\/]*)
6530  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6531  ;;
6532  *)
6533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6534for as_dir in $PATH
6535do
6536  IFS=$as_save_IFS
6537  test -z "$as_dir" && as_dir=.
6538    for ac_exec_ext in '' $ac_executable_extensions; do
6539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6540    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6542    break 2
6543  fi
6544done
6545  done
6546IFS=$as_save_IFS
6547
6548  ;;
6549esac
6550fi
6551DIRNAME=$ac_cv_path_DIRNAME
6552if test -n "$DIRNAME"; then
6553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6554$as_echo "$DIRNAME" >&6; }
6555else
6556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6557$as_echo "no" >&6; }
6558fi
6559
6560
6561        if test "x$DIRNAME" = x; then
6562          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6563        fi
6564      else
6565        # Otherwise we believe it is a complete path. Use it as it is.
6566        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6567$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6568        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6569$as_echo_n "checking for DIRNAME... " >&6; }
6570        if test ! -x "$tool_specified"; then
6571          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6572$as_echo "not found" >&6; }
6573          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6574        fi
6575        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6576$as_echo "$tool_specified" >&6; }
6577      fi
6578    fi
6579  fi
6580
6581
6582
6583  if test "x$DIRNAME" = x; then
6584    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6585  fi
6586
6587
6588
6589
6590
6591  # Publish this variable in the help.
6592
6593
6594  if test "x$ECHO" = x; then
6595    # The variable is not set by user, try to locate tool using the code snippet
6596    for ac_prog in echo
6597do
6598  # Extract the first word of "$ac_prog", so it can be a program name with args.
6599set dummy $ac_prog; ac_word=$2
6600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6601$as_echo_n "checking for $ac_word... " >&6; }
6602if ${ac_cv_path_ECHO+:} false; then :
6603  $as_echo_n "(cached) " >&6
6604else
6605  case $ECHO in
6606  [\\/]* | ?:[\\/]*)
6607  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6608  ;;
6609  *)
6610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6611for as_dir in $PATH
6612do
6613  IFS=$as_save_IFS
6614  test -z "$as_dir" && as_dir=.
6615    for ac_exec_ext in '' $ac_executable_extensions; do
6616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6617    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6619    break 2
6620  fi
6621done
6622  done
6623IFS=$as_save_IFS
6624
6625  ;;
6626esac
6627fi
6628ECHO=$ac_cv_path_ECHO
6629if test -n "$ECHO"; then
6630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6631$as_echo "$ECHO" >&6; }
6632else
6633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6634$as_echo "no" >&6; }
6635fi
6636
6637
6638  test -n "$ECHO" && break
6639done
6640
6641  else
6642    # The variable is set, but is it from the command line or the environment?
6643
6644    # Try to remove the string !ECHO! from our list.
6645    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6646    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6647      # If it failed, the variable was not from the command line. Ignore it,
6648      # but warn the user (except for BASH, which is always set by the calling BASH).
6649      if test "xECHO" != xBASH; then
6650        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6651$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6652      fi
6653      # Try to locate tool using the code snippet
6654      for ac_prog in echo
6655do
6656  # Extract the first word of "$ac_prog", so it can be a program name with args.
6657set dummy $ac_prog; ac_word=$2
6658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6659$as_echo_n "checking for $ac_word... " >&6; }
6660if ${ac_cv_path_ECHO+:} false; then :
6661  $as_echo_n "(cached) " >&6
6662else
6663  case $ECHO in
6664  [\\/]* | ?:[\\/]*)
6665  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6666  ;;
6667  *)
6668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6669for as_dir in $PATH
6670do
6671  IFS=$as_save_IFS
6672  test -z "$as_dir" && as_dir=.
6673    for ac_exec_ext in '' $ac_executable_extensions; do
6674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6675    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6677    break 2
6678  fi
6679done
6680  done
6681IFS=$as_save_IFS
6682
6683  ;;
6684esac
6685fi
6686ECHO=$ac_cv_path_ECHO
6687if test -n "$ECHO"; then
6688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6689$as_echo "$ECHO" >&6; }
6690else
6691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6692$as_echo "no" >&6; }
6693fi
6694
6695
6696  test -n "$ECHO" && break
6697done
6698
6699    else
6700      # If it succeeded, then it was overridden by the user. We will use it
6701      # for the tool.
6702
6703      # First remove it from the list of overridden variables, so we can test
6704      # for unknown variables in the end.
6705      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6706
6707      # Check if the provided tool contains a complete path.
6708      tool_specified="$ECHO"
6709      tool_basename="${tool_specified##*/}"
6710      if test "x$tool_basename" = "x$tool_specified"; then
6711        # A command without a complete path is provided, search $PATH.
6712        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6713$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6714        # Extract the first word of "$tool_basename", so it can be a program name with args.
6715set dummy $tool_basename; ac_word=$2
6716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6717$as_echo_n "checking for $ac_word... " >&6; }
6718if ${ac_cv_path_ECHO+:} false; then :
6719  $as_echo_n "(cached) " >&6
6720else
6721  case $ECHO in
6722  [\\/]* | ?:[\\/]*)
6723  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6724  ;;
6725  *)
6726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6727for as_dir in $PATH
6728do
6729  IFS=$as_save_IFS
6730  test -z "$as_dir" && as_dir=.
6731    for ac_exec_ext in '' $ac_executable_extensions; do
6732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6733    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6735    break 2
6736  fi
6737done
6738  done
6739IFS=$as_save_IFS
6740
6741  ;;
6742esac
6743fi
6744ECHO=$ac_cv_path_ECHO
6745if test -n "$ECHO"; then
6746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6747$as_echo "$ECHO" >&6; }
6748else
6749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6750$as_echo "no" >&6; }
6751fi
6752
6753
6754        if test "x$ECHO" = x; then
6755          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6756        fi
6757      else
6758        # Otherwise we believe it is a complete path. Use it as it is.
6759        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6760$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6761        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6762$as_echo_n "checking for ECHO... " >&6; }
6763        if test ! -x "$tool_specified"; then
6764          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6765$as_echo "not found" >&6; }
6766          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6767        fi
6768        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6769$as_echo "$tool_specified" >&6; }
6770      fi
6771    fi
6772  fi
6773
6774
6775
6776  if test "x$ECHO" = x; then
6777    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6778  fi
6779
6780
6781
6782
6783
6784  # Publish this variable in the help.
6785
6786
6787  if test "x$EXPR" = x; then
6788    # The variable is not set by user, try to locate tool using the code snippet
6789    for ac_prog in expr
6790do
6791  # Extract the first word of "$ac_prog", so it can be a program name with args.
6792set dummy $ac_prog; ac_word=$2
6793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6794$as_echo_n "checking for $ac_word... " >&6; }
6795if ${ac_cv_path_EXPR+:} false; then :
6796  $as_echo_n "(cached) " >&6
6797else
6798  case $EXPR in
6799  [\\/]* | ?:[\\/]*)
6800  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6801  ;;
6802  *)
6803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6804for as_dir in $PATH
6805do
6806  IFS=$as_save_IFS
6807  test -z "$as_dir" && as_dir=.
6808    for ac_exec_ext in '' $ac_executable_extensions; do
6809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6810    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6812    break 2
6813  fi
6814done
6815  done
6816IFS=$as_save_IFS
6817
6818  ;;
6819esac
6820fi
6821EXPR=$ac_cv_path_EXPR
6822if test -n "$EXPR"; then
6823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6824$as_echo "$EXPR" >&6; }
6825else
6826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6827$as_echo "no" >&6; }
6828fi
6829
6830
6831  test -n "$EXPR" && break
6832done
6833
6834  else
6835    # The variable is set, but is it from the command line or the environment?
6836
6837    # Try to remove the string !EXPR! from our list.
6838    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6839    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6840      # If it failed, the variable was not from the command line. Ignore it,
6841      # but warn the user (except for BASH, which is always set by the calling BASH).
6842      if test "xEXPR" != xBASH; then
6843        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6844$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6845      fi
6846      # Try to locate tool using the code snippet
6847      for ac_prog in expr
6848do
6849  # Extract the first word of "$ac_prog", so it can be a program name with args.
6850set dummy $ac_prog; ac_word=$2
6851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6852$as_echo_n "checking for $ac_word... " >&6; }
6853if ${ac_cv_path_EXPR+:} false; then :
6854  $as_echo_n "(cached) " >&6
6855else
6856  case $EXPR in
6857  [\\/]* | ?:[\\/]*)
6858  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6859  ;;
6860  *)
6861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6862for as_dir in $PATH
6863do
6864  IFS=$as_save_IFS
6865  test -z "$as_dir" && as_dir=.
6866    for ac_exec_ext in '' $ac_executable_extensions; do
6867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6868    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6870    break 2
6871  fi
6872done
6873  done
6874IFS=$as_save_IFS
6875
6876  ;;
6877esac
6878fi
6879EXPR=$ac_cv_path_EXPR
6880if test -n "$EXPR"; then
6881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6882$as_echo "$EXPR" >&6; }
6883else
6884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6885$as_echo "no" >&6; }
6886fi
6887
6888
6889  test -n "$EXPR" && break
6890done
6891
6892    else
6893      # If it succeeded, then it was overridden by the user. We will use it
6894      # for the tool.
6895
6896      # First remove it from the list of overridden variables, so we can test
6897      # for unknown variables in the end.
6898      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6899
6900      # Check if the provided tool contains a complete path.
6901      tool_specified="$EXPR"
6902      tool_basename="${tool_specified##*/}"
6903      if test "x$tool_basename" = "x$tool_specified"; then
6904        # A command without a complete path is provided, search $PATH.
6905        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6906$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6907        # Extract the first word of "$tool_basename", so it can be a program name with args.
6908set dummy $tool_basename; ac_word=$2
6909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6910$as_echo_n "checking for $ac_word... " >&6; }
6911if ${ac_cv_path_EXPR+:} false; then :
6912  $as_echo_n "(cached) " >&6
6913else
6914  case $EXPR in
6915  [\\/]* | ?:[\\/]*)
6916  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6917  ;;
6918  *)
6919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6920for as_dir in $PATH
6921do
6922  IFS=$as_save_IFS
6923  test -z "$as_dir" && as_dir=.
6924    for ac_exec_ext in '' $ac_executable_extensions; do
6925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6926    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6928    break 2
6929  fi
6930done
6931  done
6932IFS=$as_save_IFS
6933
6934  ;;
6935esac
6936fi
6937EXPR=$ac_cv_path_EXPR
6938if test -n "$EXPR"; then
6939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6940$as_echo "$EXPR" >&6; }
6941else
6942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6943$as_echo "no" >&6; }
6944fi
6945
6946
6947        if test "x$EXPR" = x; then
6948          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6949        fi
6950      else
6951        # Otherwise we believe it is a complete path. Use it as it is.
6952        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6953$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6954        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6955$as_echo_n "checking for EXPR... " >&6; }
6956        if test ! -x "$tool_specified"; then
6957          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6958$as_echo "not found" >&6; }
6959          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6960        fi
6961        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6962$as_echo "$tool_specified" >&6; }
6963      fi
6964    fi
6965  fi
6966
6967
6968
6969  if test "x$EXPR" = x; then
6970    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6971  fi
6972
6973
6974
6975
6976
6977  # Publish this variable in the help.
6978
6979
6980  if test "x$FILE" = x; then
6981    # The variable is not set by user, try to locate tool using the code snippet
6982    for ac_prog in file
6983do
6984  # Extract the first word of "$ac_prog", so it can be a program name with args.
6985set dummy $ac_prog; ac_word=$2
6986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6987$as_echo_n "checking for $ac_word... " >&6; }
6988if ${ac_cv_path_FILE+:} false; then :
6989  $as_echo_n "(cached) " >&6
6990else
6991  case $FILE in
6992  [\\/]* | ?:[\\/]*)
6993  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6994  ;;
6995  *)
6996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6997for as_dir in $PATH
6998do
6999  IFS=$as_save_IFS
7000  test -z "$as_dir" && as_dir=.
7001    for ac_exec_ext in '' $ac_executable_extensions; do
7002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7003    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7005    break 2
7006  fi
7007done
7008  done
7009IFS=$as_save_IFS
7010
7011  ;;
7012esac
7013fi
7014FILE=$ac_cv_path_FILE
7015if test -n "$FILE"; then
7016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7017$as_echo "$FILE" >&6; }
7018else
7019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7020$as_echo "no" >&6; }
7021fi
7022
7023
7024  test -n "$FILE" && break
7025done
7026
7027  else
7028    # The variable is set, but is it from the command line or the environment?
7029
7030    # Try to remove the string !FILE! from our list.
7031    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7032    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7033      # If it failed, the variable was not from the command line. Ignore it,
7034      # but warn the user (except for BASH, which is always set by the calling BASH).
7035      if test "xFILE" != xBASH; then
7036        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7037$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7038      fi
7039      # Try to locate tool using the code snippet
7040      for ac_prog in file
7041do
7042  # Extract the first word of "$ac_prog", so it can be a program name with args.
7043set dummy $ac_prog; ac_word=$2
7044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7045$as_echo_n "checking for $ac_word... " >&6; }
7046if ${ac_cv_path_FILE+:} false; then :
7047  $as_echo_n "(cached) " >&6
7048else
7049  case $FILE in
7050  [\\/]* | ?:[\\/]*)
7051  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7052  ;;
7053  *)
7054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7055for as_dir in $PATH
7056do
7057  IFS=$as_save_IFS
7058  test -z "$as_dir" && as_dir=.
7059    for ac_exec_ext in '' $ac_executable_extensions; do
7060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7061    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7063    break 2
7064  fi
7065done
7066  done
7067IFS=$as_save_IFS
7068
7069  ;;
7070esac
7071fi
7072FILE=$ac_cv_path_FILE
7073if test -n "$FILE"; then
7074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7075$as_echo "$FILE" >&6; }
7076else
7077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7078$as_echo "no" >&6; }
7079fi
7080
7081
7082  test -n "$FILE" && break
7083done
7084
7085    else
7086      # If it succeeded, then it was overridden by the user. We will use it
7087      # for the tool.
7088
7089      # First remove it from the list of overridden variables, so we can test
7090      # for unknown variables in the end.
7091      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7092
7093      # Check if the provided tool contains a complete path.
7094      tool_specified="$FILE"
7095      tool_basename="${tool_specified##*/}"
7096      if test "x$tool_basename" = "x$tool_specified"; then
7097        # A command without a complete path is provided, search $PATH.
7098        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7099$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7100        # Extract the first word of "$tool_basename", so it can be a program name with args.
7101set dummy $tool_basename; ac_word=$2
7102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7103$as_echo_n "checking for $ac_word... " >&6; }
7104if ${ac_cv_path_FILE+:} false; then :
7105  $as_echo_n "(cached) " >&6
7106else
7107  case $FILE in
7108  [\\/]* | ?:[\\/]*)
7109  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7110  ;;
7111  *)
7112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7113for as_dir in $PATH
7114do
7115  IFS=$as_save_IFS
7116  test -z "$as_dir" && as_dir=.
7117    for ac_exec_ext in '' $ac_executable_extensions; do
7118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7119    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7121    break 2
7122  fi
7123done
7124  done
7125IFS=$as_save_IFS
7126
7127  ;;
7128esac
7129fi
7130FILE=$ac_cv_path_FILE
7131if test -n "$FILE"; then
7132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7133$as_echo "$FILE" >&6; }
7134else
7135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7136$as_echo "no" >&6; }
7137fi
7138
7139
7140        if test "x$FILE" = x; then
7141          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7142        fi
7143      else
7144        # Otherwise we believe it is a complete path. Use it as it is.
7145        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7146$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7147        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7148$as_echo_n "checking for FILE... " >&6; }
7149        if test ! -x "$tool_specified"; then
7150          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7151$as_echo "not found" >&6; }
7152          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7153        fi
7154        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7155$as_echo "$tool_specified" >&6; }
7156      fi
7157    fi
7158  fi
7159
7160
7161
7162  if test "x$FILE" = x; then
7163    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7164  fi
7165
7166
7167
7168
7169
7170  # Publish this variable in the help.
7171
7172
7173  if test "x$FIND" = x; then
7174    # The variable is not set by user, try to locate tool using the code snippet
7175    for ac_prog in find
7176do
7177  # Extract the first word of "$ac_prog", so it can be a program name with args.
7178set dummy $ac_prog; ac_word=$2
7179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7180$as_echo_n "checking for $ac_word... " >&6; }
7181if ${ac_cv_path_FIND+:} false; then :
7182  $as_echo_n "(cached) " >&6
7183else
7184  case $FIND in
7185  [\\/]* | ?:[\\/]*)
7186  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7187  ;;
7188  *)
7189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7190for as_dir in $PATH
7191do
7192  IFS=$as_save_IFS
7193  test -z "$as_dir" && as_dir=.
7194    for ac_exec_ext in '' $ac_executable_extensions; do
7195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7196    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7198    break 2
7199  fi
7200done
7201  done
7202IFS=$as_save_IFS
7203
7204  ;;
7205esac
7206fi
7207FIND=$ac_cv_path_FIND
7208if test -n "$FIND"; then
7209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7210$as_echo "$FIND" >&6; }
7211else
7212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7213$as_echo "no" >&6; }
7214fi
7215
7216
7217  test -n "$FIND" && break
7218done
7219
7220  else
7221    # The variable is set, but is it from the command line or the environment?
7222
7223    # Try to remove the string !FIND! from our list.
7224    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7225    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7226      # If it failed, the variable was not from the command line. Ignore it,
7227      # but warn the user (except for BASH, which is always set by the calling BASH).
7228      if test "xFIND" != xBASH; then
7229        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7230$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7231      fi
7232      # Try to locate tool using the code snippet
7233      for ac_prog in find
7234do
7235  # Extract the first word of "$ac_prog", so it can be a program name with args.
7236set dummy $ac_prog; ac_word=$2
7237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7238$as_echo_n "checking for $ac_word... " >&6; }
7239if ${ac_cv_path_FIND+:} false; then :
7240  $as_echo_n "(cached) " >&6
7241else
7242  case $FIND in
7243  [\\/]* | ?:[\\/]*)
7244  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7245  ;;
7246  *)
7247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7248for as_dir in $PATH
7249do
7250  IFS=$as_save_IFS
7251  test -z "$as_dir" && as_dir=.
7252    for ac_exec_ext in '' $ac_executable_extensions; do
7253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7254    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7256    break 2
7257  fi
7258done
7259  done
7260IFS=$as_save_IFS
7261
7262  ;;
7263esac
7264fi
7265FIND=$ac_cv_path_FIND
7266if test -n "$FIND"; then
7267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7268$as_echo "$FIND" >&6; }
7269else
7270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7271$as_echo "no" >&6; }
7272fi
7273
7274
7275  test -n "$FIND" && break
7276done
7277
7278    else
7279      # If it succeeded, then it was overridden by the user. We will use it
7280      # for the tool.
7281
7282      # First remove it from the list of overridden variables, so we can test
7283      # for unknown variables in the end.
7284      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7285
7286      # Check if the provided tool contains a complete path.
7287      tool_specified="$FIND"
7288      tool_basename="${tool_specified##*/}"
7289      if test "x$tool_basename" = "x$tool_specified"; then
7290        # A command without a complete path is provided, search $PATH.
7291        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7292$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7293        # Extract the first word of "$tool_basename", so it can be a program name with args.
7294set dummy $tool_basename; ac_word=$2
7295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7296$as_echo_n "checking for $ac_word... " >&6; }
7297if ${ac_cv_path_FIND+:} false; then :
7298  $as_echo_n "(cached) " >&6
7299else
7300  case $FIND in
7301  [\\/]* | ?:[\\/]*)
7302  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7303  ;;
7304  *)
7305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7306for as_dir in $PATH
7307do
7308  IFS=$as_save_IFS
7309  test -z "$as_dir" && as_dir=.
7310    for ac_exec_ext in '' $ac_executable_extensions; do
7311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7312    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7314    break 2
7315  fi
7316done
7317  done
7318IFS=$as_save_IFS
7319
7320  ;;
7321esac
7322fi
7323FIND=$ac_cv_path_FIND
7324if test -n "$FIND"; then
7325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7326$as_echo "$FIND" >&6; }
7327else
7328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7329$as_echo "no" >&6; }
7330fi
7331
7332
7333        if test "x$FIND" = x; then
7334          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7335        fi
7336      else
7337        # Otherwise we believe it is a complete path. Use it as it is.
7338        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7339$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7340        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7341$as_echo_n "checking for FIND... " >&6; }
7342        if test ! -x "$tool_specified"; then
7343          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7344$as_echo "not found" >&6; }
7345          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7346        fi
7347        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7348$as_echo "$tool_specified" >&6; }
7349      fi
7350    fi
7351  fi
7352
7353
7354
7355  if test "x$FIND" = x; then
7356    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7357  fi
7358
7359
7360
7361
7362
7363  # Publish this variable in the help.
7364
7365
7366  if test "x$HEAD" = x; then
7367    # The variable is not set by user, try to locate tool using the code snippet
7368    for ac_prog in head
7369do
7370  # Extract the first word of "$ac_prog", so it can be a program name with args.
7371set dummy $ac_prog; ac_word=$2
7372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7373$as_echo_n "checking for $ac_word... " >&6; }
7374if ${ac_cv_path_HEAD+:} false; then :
7375  $as_echo_n "(cached) " >&6
7376else
7377  case $HEAD in
7378  [\\/]* | ?:[\\/]*)
7379  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7380  ;;
7381  *)
7382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7383for as_dir in $PATH
7384do
7385  IFS=$as_save_IFS
7386  test -z "$as_dir" && as_dir=.
7387    for ac_exec_ext in '' $ac_executable_extensions; do
7388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7389    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7391    break 2
7392  fi
7393done
7394  done
7395IFS=$as_save_IFS
7396
7397  ;;
7398esac
7399fi
7400HEAD=$ac_cv_path_HEAD
7401if test -n "$HEAD"; then
7402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7403$as_echo "$HEAD" >&6; }
7404else
7405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7406$as_echo "no" >&6; }
7407fi
7408
7409
7410  test -n "$HEAD" && break
7411done
7412
7413  else
7414    # The variable is set, but is it from the command line or the environment?
7415
7416    # Try to remove the string !HEAD! from our list.
7417    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7418    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7419      # If it failed, the variable was not from the command line. Ignore it,
7420      # but warn the user (except for BASH, which is always set by the calling BASH).
7421      if test "xHEAD" != xBASH; then
7422        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7423$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7424      fi
7425      # Try to locate tool using the code snippet
7426      for ac_prog in head
7427do
7428  # Extract the first word of "$ac_prog", so it can be a program name with args.
7429set dummy $ac_prog; ac_word=$2
7430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7431$as_echo_n "checking for $ac_word... " >&6; }
7432if ${ac_cv_path_HEAD+:} false; then :
7433  $as_echo_n "(cached) " >&6
7434else
7435  case $HEAD in
7436  [\\/]* | ?:[\\/]*)
7437  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7438  ;;
7439  *)
7440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7441for as_dir in $PATH
7442do
7443  IFS=$as_save_IFS
7444  test -z "$as_dir" && as_dir=.
7445    for ac_exec_ext in '' $ac_executable_extensions; do
7446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7447    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7449    break 2
7450  fi
7451done
7452  done
7453IFS=$as_save_IFS
7454
7455  ;;
7456esac
7457fi
7458HEAD=$ac_cv_path_HEAD
7459if test -n "$HEAD"; then
7460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7461$as_echo "$HEAD" >&6; }
7462else
7463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7464$as_echo "no" >&6; }
7465fi
7466
7467
7468  test -n "$HEAD" && break
7469done
7470
7471    else
7472      # If it succeeded, then it was overridden by the user. We will use it
7473      # for the tool.
7474
7475      # First remove it from the list of overridden variables, so we can test
7476      # for unknown variables in the end.
7477      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7478
7479      # Check if the provided tool contains a complete path.
7480      tool_specified="$HEAD"
7481      tool_basename="${tool_specified##*/}"
7482      if test "x$tool_basename" = "x$tool_specified"; then
7483        # A command without a complete path is provided, search $PATH.
7484        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7485$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7486        # Extract the first word of "$tool_basename", so it can be a program name with args.
7487set dummy $tool_basename; ac_word=$2
7488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7489$as_echo_n "checking for $ac_word... " >&6; }
7490if ${ac_cv_path_HEAD+:} false; then :
7491  $as_echo_n "(cached) " >&6
7492else
7493  case $HEAD in
7494  [\\/]* | ?:[\\/]*)
7495  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7496  ;;
7497  *)
7498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7499for as_dir in $PATH
7500do
7501  IFS=$as_save_IFS
7502  test -z "$as_dir" && as_dir=.
7503    for ac_exec_ext in '' $ac_executable_extensions; do
7504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7505    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7507    break 2
7508  fi
7509done
7510  done
7511IFS=$as_save_IFS
7512
7513  ;;
7514esac
7515fi
7516HEAD=$ac_cv_path_HEAD
7517if test -n "$HEAD"; then
7518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7519$as_echo "$HEAD" >&6; }
7520else
7521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7522$as_echo "no" >&6; }
7523fi
7524
7525
7526        if test "x$HEAD" = x; then
7527          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7528        fi
7529      else
7530        # Otherwise we believe it is a complete path. Use it as it is.
7531        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7532$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7533        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7534$as_echo_n "checking for HEAD... " >&6; }
7535        if test ! -x "$tool_specified"; then
7536          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7537$as_echo "not found" >&6; }
7538          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7539        fi
7540        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7541$as_echo "$tool_specified" >&6; }
7542      fi
7543    fi
7544  fi
7545
7546
7547
7548  if test "x$HEAD" = x; then
7549    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7550  fi
7551
7552
7553
7554
7555
7556  # Publish this variable in the help.
7557
7558
7559  if test "x$LN" = x; then
7560    # The variable is not set by user, try to locate tool using the code snippet
7561    for ac_prog in ln
7562do
7563  # Extract the first word of "$ac_prog", so it can be a program name with args.
7564set dummy $ac_prog; ac_word=$2
7565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7566$as_echo_n "checking for $ac_word... " >&6; }
7567if ${ac_cv_path_LN+:} false; then :
7568  $as_echo_n "(cached) " >&6
7569else
7570  case $LN in
7571  [\\/]* | ?:[\\/]*)
7572  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7573  ;;
7574  *)
7575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7576for as_dir in $PATH
7577do
7578  IFS=$as_save_IFS
7579  test -z "$as_dir" && as_dir=.
7580    for ac_exec_ext in '' $ac_executable_extensions; do
7581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7582    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7584    break 2
7585  fi
7586done
7587  done
7588IFS=$as_save_IFS
7589
7590  ;;
7591esac
7592fi
7593LN=$ac_cv_path_LN
7594if test -n "$LN"; then
7595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7596$as_echo "$LN" >&6; }
7597else
7598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7599$as_echo "no" >&6; }
7600fi
7601
7602
7603  test -n "$LN" && break
7604done
7605
7606  else
7607    # The variable is set, but is it from the command line or the environment?
7608
7609    # Try to remove the string !LN! from our list.
7610    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7611    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7612      # If it failed, the variable was not from the command line. Ignore it,
7613      # but warn the user (except for BASH, which is always set by the calling BASH).
7614      if test "xLN" != xBASH; then
7615        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7616$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7617      fi
7618      # Try to locate tool using the code snippet
7619      for ac_prog in ln
7620do
7621  # Extract the first word of "$ac_prog", so it can be a program name with args.
7622set dummy $ac_prog; ac_word=$2
7623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7624$as_echo_n "checking for $ac_word... " >&6; }
7625if ${ac_cv_path_LN+:} false; then :
7626  $as_echo_n "(cached) " >&6
7627else
7628  case $LN in
7629  [\\/]* | ?:[\\/]*)
7630  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7631  ;;
7632  *)
7633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7634for as_dir in $PATH
7635do
7636  IFS=$as_save_IFS
7637  test -z "$as_dir" && as_dir=.
7638    for ac_exec_ext in '' $ac_executable_extensions; do
7639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7640    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7642    break 2
7643  fi
7644done
7645  done
7646IFS=$as_save_IFS
7647
7648  ;;
7649esac
7650fi
7651LN=$ac_cv_path_LN
7652if test -n "$LN"; then
7653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7654$as_echo "$LN" >&6; }
7655else
7656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7657$as_echo "no" >&6; }
7658fi
7659
7660
7661  test -n "$LN" && break
7662done
7663
7664    else
7665      # If it succeeded, then it was overridden by the user. We will use it
7666      # for the tool.
7667
7668      # First remove it from the list of overridden variables, so we can test
7669      # for unknown variables in the end.
7670      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7671
7672      # Check if the provided tool contains a complete path.
7673      tool_specified="$LN"
7674      tool_basename="${tool_specified##*/}"
7675      if test "x$tool_basename" = "x$tool_specified"; then
7676        # A command without a complete path is provided, search $PATH.
7677        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7678$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7679        # Extract the first word of "$tool_basename", so it can be a program name with args.
7680set dummy $tool_basename; ac_word=$2
7681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7682$as_echo_n "checking for $ac_word... " >&6; }
7683if ${ac_cv_path_LN+:} false; then :
7684  $as_echo_n "(cached) " >&6
7685else
7686  case $LN in
7687  [\\/]* | ?:[\\/]*)
7688  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7689  ;;
7690  *)
7691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7692for as_dir in $PATH
7693do
7694  IFS=$as_save_IFS
7695  test -z "$as_dir" && as_dir=.
7696    for ac_exec_ext in '' $ac_executable_extensions; do
7697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7698    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7700    break 2
7701  fi
7702done
7703  done
7704IFS=$as_save_IFS
7705
7706  ;;
7707esac
7708fi
7709LN=$ac_cv_path_LN
7710if test -n "$LN"; then
7711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7712$as_echo "$LN" >&6; }
7713else
7714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7715$as_echo "no" >&6; }
7716fi
7717
7718
7719        if test "x$LN" = x; then
7720          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7721        fi
7722      else
7723        # Otherwise we believe it is a complete path. Use it as it is.
7724        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7725$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7726        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7727$as_echo_n "checking for LN... " >&6; }
7728        if test ! -x "$tool_specified"; then
7729          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7730$as_echo "not found" >&6; }
7731          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7732        fi
7733        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7734$as_echo "$tool_specified" >&6; }
7735      fi
7736    fi
7737  fi
7738
7739
7740
7741  if test "x$LN" = x; then
7742    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7743  fi
7744
7745
7746
7747
7748
7749  # Publish this variable in the help.
7750
7751
7752  if test "x$LS" = x; then
7753    # The variable is not set by user, try to locate tool using the code snippet
7754    for ac_prog in ls
7755do
7756  # Extract the first word of "$ac_prog", so it can be a program name with args.
7757set dummy $ac_prog; ac_word=$2
7758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7759$as_echo_n "checking for $ac_word... " >&6; }
7760if ${ac_cv_path_LS+:} false; then :
7761  $as_echo_n "(cached) " >&6
7762else
7763  case $LS in
7764  [\\/]* | ?:[\\/]*)
7765  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7766  ;;
7767  *)
7768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7769for as_dir in $PATH
7770do
7771  IFS=$as_save_IFS
7772  test -z "$as_dir" && as_dir=.
7773    for ac_exec_ext in '' $ac_executable_extensions; do
7774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7775    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7777    break 2
7778  fi
7779done
7780  done
7781IFS=$as_save_IFS
7782
7783  ;;
7784esac
7785fi
7786LS=$ac_cv_path_LS
7787if test -n "$LS"; then
7788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7789$as_echo "$LS" >&6; }
7790else
7791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7792$as_echo "no" >&6; }
7793fi
7794
7795
7796  test -n "$LS" && break
7797done
7798
7799  else
7800    # The variable is set, but is it from the command line or the environment?
7801
7802    # Try to remove the string !LS! from our list.
7803    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7804    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7805      # If it failed, the variable was not from the command line. Ignore it,
7806      # but warn the user (except for BASH, which is always set by the calling BASH).
7807      if test "xLS" != xBASH; then
7808        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7809$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7810      fi
7811      # Try to locate tool using the code snippet
7812      for ac_prog in ls
7813do
7814  # Extract the first word of "$ac_prog", so it can be a program name with args.
7815set dummy $ac_prog; ac_word=$2
7816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7817$as_echo_n "checking for $ac_word... " >&6; }
7818if ${ac_cv_path_LS+:} false; then :
7819  $as_echo_n "(cached) " >&6
7820else
7821  case $LS in
7822  [\\/]* | ?:[\\/]*)
7823  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7824  ;;
7825  *)
7826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7827for as_dir in $PATH
7828do
7829  IFS=$as_save_IFS
7830  test -z "$as_dir" && as_dir=.
7831    for ac_exec_ext in '' $ac_executable_extensions; do
7832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7833    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7835    break 2
7836  fi
7837done
7838  done
7839IFS=$as_save_IFS
7840
7841  ;;
7842esac
7843fi
7844LS=$ac_cv_path_LS
7845if test -n "$LS"; then
7846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7847$as_echo "$LS" >&6; }
7848else
7849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7850$as_echo "no" >&6; }
7851fi
7852
7853
7854  test -n "$LS" && break
7855done
7856
7857    else
7858      # If it succeeded, then it was overridden by the user. We will use it
7859      # for the tool.
7860
7861      # First remove it from the list of overridden variables, so we can test
7862      # for unknown variables in the end.
7863      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7864
7865      # Check if the provided tool contains a complete path.
7866      tool_specified="$LS"
7867      tool_basename="${tool_specified##*/}"
7868      if test "x$tool_basename" = "x$tool_specified"; then
7869        # A command without a complete path is provided, search $PATH.
7870        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7871$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7872        # Extract the first word of "$tool_basename", so it can be a program name with args.
7873set dummy $tool_basename; ac_word=$2
7874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7875$as_echo_n "checking for $ac_word... " >&6; }
7876if ${ac_cv_path_LS+:} false; then :
7877  $as_echo_n "(cached) " >&6
7878else
7879  case $LS in
7880  [\\/]* | ?:[\\/]*)
7881  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7882  ;;
7883  *)
7884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7885for as_dir in $PATH
7886do
7887  IFS=$as_save_IFS
7888  test -z "$as_dir" && as_dir=.
7889    for ac_exec_ext in '' $ac_executable_extensions; do
7890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7891    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7893    break 2
7894  fi
7895done
7896  done
7897IFS=$as_save_IFS
7898
7899  ;;
7900esac
7901fi
7902LS=$ac_cv_path_LS
7903if test -n "$LS"; then
7904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7905$as_echo "$LS" >&6; }
7906else
7907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7908$as_echo "no" >&6; }
7909fi
7910
7911
7912        if test "x$LS" = x; then
7913          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7914        fi
7915      else
7916        # Otherwise we believe it is a complete path. Use it as it is.
7917        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7918$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7919        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7920$as_echo_n "checking for LS... " >&6; }
7921        if test ! -x "$tool_specified"; then
7922          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7923$as_echo "not found" >&6; }
7924          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7925        fi
7926        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7927$as_echo "$tool_specified" >&6; }
7928      fi
7929    fi
7930  fi
7931
7932
7933
7934  if test "x$LS" = x; then
7935    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7936  fi
7937
7938
7939
7940
7941
7942  # Publish this variable in the help.
7943
7944
7945  if test "x$MKDIR" = x; then
7946    # The variable is not set by user, try to locate tool using the code snippet
7947    for ac_prog in mkdir
7948do
7949  # Extract the first word of "$ac_prog", so it can be a program name with args.
7950set dummy $ac_prog; ac_word=$2
7951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7952$as_echo_n "checking for $ac_word... " >&6; }
7953if ${ac_cv_path_MKDIR+:} false; then :
7954  $as_echo_n "(cached) " >&6
7955else
7956  case $MKDIR in
7957  [\\/]* | ?:[\\/]*)
7958  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7959  ;;
7960  *)
7961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7962for as_dir in $PATH
7963do
7964  IFS=$as_save_IFS
7965  test -z "$as_dir" && as_dir=.
7966    for ac_exec_ext in '' $ac_executable_extensions; do
7967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7968    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7970    break 2
7971  fi
7972done
7973  done
7974IFS=$as_save_IFS
7975
7976  ;;
7977esac
7978fi
7979MKDIR=$ac_cv_path_MKDIR
7980if test -n "$MKDIR"; then
7981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7982$as_echo "$MKDIR" >&6; }
7983else
7984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7985$as_echo "no" >&6; }
7986fi
7987
7988
7989  test -n "$MKDIR" && break
7990done
7991
7992  else
7993    # The variable is set, but is it from the command line or the environment?
7994
7995    # Try to remove the string !MKDIR! from our list.
7996    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7997    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7998      # If it failed, the variable was not from the command line. Ignore it,
7999      # but warn the user (except for BASH, which is always set by the calling BASH).
8000      if test "xMKDIR" != xBASH; then
8001        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8002$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8003      fi
8004      # Try to locate tool using the code snippet
8005      for ac_prog in mkdir
8006do
8007  # Extract the first word of "$ac_prog", so it can be a program name with args.
8008set dummy $ac_prog; ac_word=$2
8009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8010$as_echo_n "checking for $ac_word... " >&6; }
8011if ${ac_cv_path_MKDIR+:} false; then :
8012  $as_echo_n "(cached) " >&6
8013else
8014  case $MKDIR in
8015  [\\/]* | ?:[\\/]*)
8016  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8017  ;;
8018  *)
8019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8020for as_dir in $PATH
8021do
8022  IFS=$as_save_IFS
8023  test -z "$as_dir" && as_dir=.
8024    for ac_exec_ext in '' $ac_executable_extensions; do
8025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8026    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8028    break 2
8029  fi
8030done
8031  done
8032IFS=$as_save_IFS
8033
8034  ;;
8035esac
8036fi
8037MKDIR=$ac_cv_path_MKDIR
8038if test -n "$MKDIR"; then
8039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8040$as_echo "$MKDIR" >&6; }
8041else
8042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8043$as_echo "no" >&6; }
8044fi
8045
8046
8047  test -n "$MKDIR" && break
8048done
8049
8050    else
8051      # If it succeeded, then it was overridden by the user. We will use it
8052      # for the tool.
8053
8054      # First remove it from the list of overridden variables, so we can test
8055      # for unknown variables in the end.
8056      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8057
8058      # Check if the provided tool contains a complete path.
8059      tool_specified="$MKDIR"
8060      tool_basename="${tool_specified##*/}"
8061      if test "x$tool_basename" = "x$tool_specified"; then
8062        # A command without a complete path is provided, search $PATH.
8063        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8064$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8065        # Extract the first word of "$tool_basename", so it can be a program name with args.
8066set dummy $tool_basename; ac_word=$2
8067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8068$as_echo_n "checking for $ac_word... " >&6; }
8069if ${ac_cv_path_MKDIR+:} false; then :
8070  $as_echo_n "(cached) " >&6
8071else
8072  case $MKDIR in
8073  [\\/]* | ?:[\\/]*)
8074  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8075  ;;
8076  *)
8077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8078for as_dir in $PATH
8079do
8080  IFS=$as_save_IFS
8081  test -z "$as_dir" && as_dir=.
8082    for ac_exec_ext in '' $ac_executable_extensions; do
8083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8084    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8086    break 2
8087  fi
8088done
8089  done
8090IFS=$as_save_IFS
8091
8092  ;;
8093esac
8094fi
8095MKDIR=$ac_cv_path_MKDIR
8096if test -n "$MKDIR"; then
8097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8098$as_echo "$MKDIR" >&6; }
8099else
8100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8101$as_echo "no" >&6; }
8102fi
8103
8104
8105        if test "x$MKDIR" = x; then
8106          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8107        fi
8108      else
8109        # Otherwise we believe it is a complete path. Use it as it is.
8110        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8111$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8112        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8113$as_echo_n "checking for MKDIR... " >&6; }
8114        if test ! -x "$tool_specified"; then
8115          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8116$as_echo "not found" >&6; }
8117          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8118        fi
8119        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8120$as_echo "$tool_specified" >&6; }
8121      fi
8122    fi
8123  fi
8124
8125
8126
8127  if test "x$MKDIR" = x; then
8128    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8129  fi
8130
8131
8132
8133
8134
8135  # Publish this variable in the help.
8136
8137
8138  if test "x$MKTEMP" = x; then
8139    # The variable is not set by user, try to locate tool using the code snippet
8140    for ac_prog in mktemp
8141do
8142  # Extract the first word of "$ac_prog", so it can be a program name with args.
8143set dummy $ac_prog; ac_word=$2
8144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8145$as_echo_n "checking for $ac_word... " >&6; }
8146if ${ac_cv_path_MKTEMP+:} false; then :
8147  $as_echo_n "(cached) " >&6
8148else
8149  case $MKTEMP in
8150  [\\/]* | ?:[\\/]*)
8151  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8152  ;;
8153  *)
8154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8155for as_dir in $PATH
8156do
8157  IFS=$as_save_IFS
8158  test -z "$as_dir" && as_dir=.
8159    for ac_exec_ext in '' $ac_executable_extensions; do
8160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8161    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8163    break 2
8164  fi
8165done
8166  done
8167IFS=$as_save_IFS
8168
8169  ;;
8170esac
8171fi
8172MKTEMP=$ac_cv_path_MKTEMP
8173if test -n "$MKTEMP"; then
8174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8175$as_echo "$MKTEMP" >&6; }
8176else
8177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8178$as_echo "no" >&6; }
8179fi
8180
8181
8182  test -n "$MKTEMP" && break
8183done
8184
8185  else
8186    # The variable is set, but is it from the command line or the environment?
8187
8188    # Try to remove the string !MKTEMP! from our list.
8189    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8190    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8191      # If it failed, the variable was not from the command line. Ignore it,
8192      # but warn the user (except for BASH, which is always set by the calling BASH).
8193      if test "xMKTEMP" != xBASH; then
8194        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8195$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8196      fi
8197      # Try to locate tool using the code snippet
8198      for ac_prog in mktemp
8199do
8200  # Extract the first word of "$ac_prog", so it can be a program name with args.
8201set dummy $ac_prog; ac_word=$2
8202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8203$as_echo_n "checking for $ac_word... " >&6; }
8204if ${ac_cv_path_MKTEMP+:} false; then :
8205  $as_echo_n "(cached) " >&6
8206else
8207  case $MKTEMP in
8208  [\\/]* | ?:[\\/]*)
8209  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8210  ;;
8211  *)
8212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8213for as_dir in $PATH
8214do
8215  IFS=$as_save_IFS
8216  test -z "$as_dir" && as_dir=.
8217    for ac_exec_ext in '' $ac_executable_extensions; do
8218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8219    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8221    break 2
8222  fi
8223done
8224  done
8225IFS=$as_save_IFS
8226
8227  ;;
8228esac
8229fi
8230MKTEMP=$ac_cv_path_MKTEMP
8231if test -n "$MKTEMP"; then
8232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8233$as_echo "$MKTEMP" >&6; }
8234else
8235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8236$as_echo "no" >&6; }
8237fi
8238
8239
8240  test -n "$MKTEMP" && break
8241done
8242
8243    else
8244      # If it succeeded, then it was overridden by the user. We will use it
8245      # for the tool.
8246
8247      # First remove it from the list of overridden variables, so we can test
8248      # for unknown variables in the end.
8249      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8250
8251      # Check if the provided tool contains a complete path.
8252      tool_specified="$MKTEMP"
8253      tool_basename="${tool_specified##*/}"
8254      if test "x$tool_basename" = "x$tool_specified"; then
8255        # A command without a complete path is provided, search $PATH.
8256        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8257$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8258        # Extract the first word of "$tool_basename", so it can be a program name with args.
8259set dummy $tool_basename; ac_word=$2
8260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8261$as_echo_n "checking for $ac_word... " >&6; }
8262if ${ac_cv_path_MKTEMP+:} false; then :
8263  $as_echo_n "(cached) " >&6
8264else
8265  case $MKTEMP in
8266  [\\/]* | ?:[\\/]*)
8267  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8268  ;;
8269  *)
8270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8271for as_dir in $PATH
8272do
8273  IFS=$as_save_IFS
8274  test -z "$as_dir" && as_dir=.
8275    for ac_exec_ext in '' $ac_executable_extensions; do
8276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8277    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8279    break 2
8280  fi
8281done
8282  done
8283IFS=$as_save_IFS
8284
8285  ;;
8286esac
8287fi
8288MKTEMP=$ac_cv_path_MKTEMP
8289if test -n "$MKTEMP"; then
8290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8291$as_echo "$MKTEMP" >&6; }
8292else
8293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8294$as_echo "no" >&6; }
8295fi
8296
8297
8298        if test "x$MKTEMP" = x; then
8299          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8300        fi
8301      else
8302        # Otherwise we believe it is a complete path. Use it as it is.
8303        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8304$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8305        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8306$as_echo_n "checking for MKTEMP... " >&6; }
8307        if test ! -x "$tool_specified"; then
8308          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8309$as_echo "not found" >&6; }
8310          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8311        fi
8312        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8313$as_echo "$tool_specified" >&6; }
8314      fi
8315    fi
8316  fi
8317
8318
8319
8320  if test "x$MKTEMP" = x; then
8321    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8322  fi
8323
8324
8325
8326
8327
8328  # Publish this variable in the help.
8329
8330
8331  if test "x$MV" = x; then
8332    # The variable is not set by user, try to locate tool using the code snippet
8333    for ac_prog in mv
8334do
8335  # Extract the first word of "$ac_prog", so it can be a program name with args.
8336set dummy $ac_prog; ac_word=$2
8337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8338$as_echo_n "checking for $ac_word... " >&6; }
8339if ${ac_cv_path_MV+:} false; then :
8340  $as_echo_n "(cached) " >&6
8341else
8342  case $MV in
8343  [\\/]* | ?:[\\/]*)
8344  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8345  ;;
8346  *)
8347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8348for as_dir in $PATH
8349do
8350  IFS=$as_save_IFS
8351  test -z "$as_dir" && as_dir=.
8352    for ac_exec_ext in '' $ac_executable_extensions; do
8353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8354    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8356    break 2
8357  fi
8358done
8359  done
8360IFS=$as_save_IFS
8361
8362  ;;
8363esac
8364fi
8365MV=$ac_cv_path_MV
8366if test -n "$MV"; then
8367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8368$as_echo "$MV" >&6; }
8369else
8370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8371$as_echo "no" >&6; }
8372fi
8373
8374
8375  test -n "$MV" && break
8376done
8377
8378  else
8379    # The variable is set, but is it from the command line or the environment?
8380
8381    # Try to remove the string !MV! from our list.
8382    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8383    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8384      # If it failed, the variable was not from the command line. Ignore it,
8385      # but warn the user (except for BASH, which is always set by the calling BASH).
8386      if test "xMV" != xBASH; then
8387        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8388$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8389      fi
8390      # Try to locate tool using the code snippet
8391      for ac_prog in mv
8392do
8393  # Extract the first word of "$ac_prog", so it can be a program name with args.
8394set dummy $ac_prog; ac_word=$2
8395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8396$as_echo_n "checking for $ac_word... " >&6; }
8397if ${ac_cv_path_MV+:} false; then :
8398  $as_echo_n "(cached) " >&6
8399else
8400  case $MV in
8401  [\\/]* | ?:[\\/]*)
8402  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8403  ;;
8404  *)
8405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8406for as_dir in $PATH
8407do
8408  IFS=$as_save_IFS
8409  test -z "$as_dir" && as_dir=.
8410    for ac_exec_ext in '' $ac_executable_extensions; do
8411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8412    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8414    break 2
8415  fi
8416done
8417  done
8418IFS=$as_save_IFS
8419
8420  ;;
8421esac
8422fi
8423MV=$ac_cv_path_MV
8424if test -n "$MV"; then
8425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8426$as_echo "$MV" >&6; }
8427else
8428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8429$as_echo "no" >&6; }
8430fi
8431
8432
8433  test -n "$MV" && break
8434done
8435
8436    else
8437      # If it succeeded, then it was overridden by the user. We will use it
8438      # for the tool.
8439
8440      # First remove it from the list of overridden variables, so we can test
8441      # for unknown variables in the end.
8442      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8443
8444      # Check if the provided tool contains a complete path.
8445      tool_specified="$MV"
8446      tool_basename="${tool_specified##*/}"
8447      if test "x$tool_basename" = "x$tool_specified"; then
8448        # A command without a complete path is provided, search $PATH.
8449        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8450$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8451        # Extract the first word of "$tool_basename", so it can be a program name with args.
8452set dummy $tool_basename; ac_word=$2
8453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8454$as_echo_n "checking for $ac_word... " >&6; }
8455if ${ac_cv_path_MV+:} false; then :
8456  $as_echo_n "(cached) " >&6
8457else
8458  case $MV in
8459  [\\/]* | ?:[\\/]*)
8460  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8461  ;;
8462  *)
8463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8464for as_dir in $PATH
8465do
8466  IFS=$as_save_IFS
8467  test -z "$as_dir" && as_dir=.
8468    for ac_exec_ext in '' $ac_executable_extensions; do
8469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8470    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8472    break 2
8473  fi
8474done
8475  done
8476IFS=$as_save_IFS
8477
8478  ;;
8479esac
8480fi
8481MV=$ac_cv_path_MV
8482if test -n "$MV"; then
8483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8484$as_echo "$MV" >&6; }
8485else
8486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8487$as_echo "no" >&6; }
8488fi
8489
8490
8491        if test "x$MV" = x; then
8492          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8493        fi
8494      else
8495        # Otherwise we believe it is a complete path. Use it as it is.
8496        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8497$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8498        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8499$as_echo_n "checking for MV... " >&6; }
8500        if test ! -x "$tool_specified"; then
8501          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8502$as_echo "not found" >&6; }
8503          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8504        fi
8505        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8506$as_echo "$tool_specified" >&6; }
8507      fi
8508    fi
8509  fi
8510
8511
8512
8513  if test "x$MV" = x; then
8514    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8515  fi
8516
8517
8518
8519
8520
8521  # Publish this variable in the help.
8522
8523
8524  if test "x$NAWK" = x; then
8525    # The variable is not set by user, try to locate tool using the code snippet
8526    for ac_prog in nawk gawk awk
8527do
8528  # Extract the first word of "$ac_prog", so it can be a program name with args.
8529set dummy $ac_prog; ac_word=$2
8530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8531$as_echo_n "checking for $ac_word... " >&6; }
8532if ${ac_cv_path_NAWK+:} false; then :
8533  $as_echo_n "(cached) " >&6
8534else
8535  case $NAWK in
8536  [\\/]* | ?:[\\/]*)
8537  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8538  ;;
8539  *)
8540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8541for as_dir in $PATH
8542do
8543  IFS=$as_save_IFS
8544  test -z "$as_dir" && as_dir=.
8545    for ac_exec_ext in '' $ac_executable_extensions; do
8546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8547    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8549    break 2
8550  fi
8551done
8552  done
8553IFS=$as_save_IFS
8554
8555  ;;
8556esac
8557fi
8558NAWK=$ac_cv_path_NAWK
8559if test -n "$NAWK"; then
8560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8561$as_echo "$NAWK" >&6; }
8562else
8563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8564$as_echo "no" >&6; }
8565fi
8566
8567
8568  test -n "$NAWK" && break
8569done
8570
8571  else
8572    # The variable is set, but is it from the command line or the environment?
8573
8574    # Try to remove the string !NAWK! from our list.
8575    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8576    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8577      # If it failed, the variable was not from the command line. Ignore it,
8578      # but warn the user (except for BASH, which is always set by the calling BASH).
8579      if test "xNAWK" != xBASH; then
8580        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8581$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8582      fi
8583      # Try to locate tool using the code snippet
8584      for ac_prog in nawk gawk awk
8585do
8586  # Extract the first word of "$ac_prog", so it can be a program name with args.
8587set dummy $ac_prog; ac_word=$2
8588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8589$as_echo_n "checking for $ac_word... " >&6; }
8590if ${ac_cv_path_NAWK+:} false; then :
8591  $as_echo_n "(cached) " >&6
8592else
8593  case $NAWK in
8594  [\\/]* | ?:[\\/]*)
8595  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8596  ;;
8597  *)
8598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8599for as_dir in $PATH
8600do
8601  IFS=$as_save_IFS
8602  test -z "$as_dir" && as_dir=.
8603    for ac_exec_ext in '' $ac_executable_extensions; do
8604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8605    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8607    break 2
8608  fi
8609done
8610  done
8611IFS=$as_save_IFS
8612
8613  ;;
8614esac
8615fi
8616NAWK=$ac_cv_path_NAWK
8617if test -n "$NAWK"; then
8618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8619$as_echo "$NAWK" >&6; }
8620else
8621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8622$as_echo "no" >&6; }
8623fi
8624
8625
8626  test -n "$NAWK" && break
8627done
8628
8629    else
8630      # If it succeeded, then it was overridden by the user. We will use it
8631      # for the tool.
8632
8633      # First remove it from the list of overridden variables, so we can test
8634      # for unknown variables in the end.
8635      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8636
8637      # Check if the provided tool contains a complete path.
8638      tool_specified="$NAWK"
8639      tool_basename="${tool_specified##*/}"
8640      if test "x$tool_basename" = "x$tool_specified"; then
8641        # A command without a complete path is provided, search $PATH.
8642        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8643$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8644        # Extract the first word of "$tool_basename", so it can be a program name with args.
8645set dummy $tool_basename; ac_word=$2
8646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8647$as_echo_n "checking for $ac_word... " >&6; }
8648if ${ac_cv_path_NAWK+:} false; then :
8649  $as_echo_n "(cached) " >&6
8650else
8651  case $NAWK in
8652  [\\/]* | ?:[\\/]*)
8653  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8654  ;;
8655  *)
8656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8657for as_dir in $PATH
8658do
8659  IFS=$as_save_IFS
8660  test -z "$as_dir" && as_dir=.
8661    for ac_exec_ext in '' $ac_executable_extensions; do
8662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8663    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8665    break 2
8666  fi
8667done
8668  done
8669IFS=$as_save_IFS
8670
8671  ;;
8672esac
8673fi
8674NAWK=$ac_cv_path_NAWK
8675if test -n "$NAWK"; then
8676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8677$as_echo "$NAWK" >&6; }
8678else
8679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8680$as_echo "no" >&6; }
8681fi
8682
8683
8684        if test "x$NAWK" = x; then
8685          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8686        fi
8687      else
8688        # Otherwise we believe it is a complete path. Use it as it is.
8689        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8690$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8691        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8692$as_echo_n "checking for NAWK... " >&6; }
8693        if test ! -x "$tool_specified"; then
8694          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8695$as_echo "not found" >&6; }
8696          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8697        fi
8698        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8699$as_echo "$tool_specified" >&6; }
8700      fi
8701    fi
8702  fi
8703
8704
8705
8706  if test "x$NAWK" = x; then
8707    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8708  fi
8709
8710
8711
8712
8713
8714  # Publish this variable in the help.
8715
8716
8717  if test "x$PRINTF" = x; then
8718    # The variable is not set by user, try to locate tool using the code snippet
8719    for ac_prog in printf
8720do
8721  # Extract the first word of "$ac_prog", so it can be a program name with args.
8722set dummy $ac_prog; ac_word=$2
8723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8724$as_echo_n "checking for $ac_word... " >&6; }
8725if ${ac_cv_path_PRINTF+:} false; then :
8726  $as_echo_n "(cached) " >&6
8727else
8728  case $PRINTF in
8729  [\\/]* | ?:[\\/]*)
8730  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8731  ;;
8732  *)
8733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8734for as_dir in $PATH
8735do
8736  IFS=$as_save_IFS
8737  test -z "$as_dir" && as_dir=.
8738    for ac_exec_ext in '' $ac_executable_extensions; do
8739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8740    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8742    break 2
8743  fi
8744done
8745  done
8746IFS=$as_save_IFS
8747
8748  ;;
8749esac
8750fi
8751PRINTF=$ac_cv_path_PRINTF
8752if test -n "$PRINTF"; then
8753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8754$as_echo "$PRINTF" >&6; }
8755else
8756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8757$as_echo "no" >&6; }
8758fi
8759
8760
8761  test -n "$PRINTF" && break
8762done
8763
8764  else
8765    # The variable is set, but is it from the command line or the environment?
8766
8767    # Try to remove the string !PRINTF! from our list.
8768    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8769    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8770      # If it failed, the variable was not from the command line. Ignore it,
8771      # but warn the user (except for BASH, which is always set by the calling BASH).
8772      if test "xPRINTF" != xBASH; then
8773        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8774$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8775      fi
8776      # Try to locate tool using the code snippet
8777      for ac_prog in printf
8778do
8779  # Extract the first word of "$ac_prog", so it can be a program name with args.
8780set dummy $ac_prog; ac_word=$2
8781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8782$as_echo_n "checking for $ac_word... " >&6; }
8783if ${ac_cv_path_PRINTF+:} false; then :
8784  $as_echo_n "(cached) " >&6
8785else
8786  case $PRINTF in
8787  [\\/]* | ?:[\\/]*)
8788  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8789  ;;
8790  *)
8791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8792for as_dir in $PATH
8793do
8794  IFS=$as_save_IFS
8795  test -z "$as_dir" && as_dir=.
8796    for ac_exec_ext in '' $ac_executable_extensions; do
8797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8798    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8800    break 2
8801  fi
8802done
8803  done
8804IFS=$as_save_IFS
8805
8806  ;;
8807esac
8808fi
8809PRINTF=$ac_cv_path_PRINTF
8810if test -n "$PRINTF"; then
8811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8812$as_echo "$PRINTF" >&6; }
8813else
8814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8815$as_echo "no" >&6; }
8816fi
8817
8818
8819  test -n "$PRINTF" && break
8820done
8821
8822    else
8823      # If it succeeded, then it was overridden by the user. We will use it
8824      # for the tool.
8825
8826      # First remove it from the list of overridden variables, so we can test
8827      # for unknown variables in the end.
8828      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8829
8830      # Check if the provided tool contains a complete path.
8831      tool_specified="$PRINTF"
8832      tool_basename="${tool_specified##*/}"
8833      if test "x$tool_basename" = "x$tool_specified"; then
8834        # A command without a complete path is provided, search $PATH.
8835        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8836$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8837        # Extract the first word of "$tool_basename", so it can be a program name with args.
8838set dummy $tool_basename; ac_word=$2
8839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8840$as_echo_n "checking for $ac_word... " >&6; }
8841if ${ac_cv_path_PRINTF+:} false; then :
8842  $as_echo_n "(cached) " >&6
8843else
8844  case $PRINTF in
8845  [\\/]* | ?:[\\/]*)
8846  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8847  ;;
8848  *)
8849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8850for as_dir in $PATH
8851do
8852  IFS=$as_save_IFS
8853  test -z "$as_dir" && as_dir=.
8854    for ac_exec_ext in '' $ac_executable_extensions; do
8855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8856    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8858    break 2
8859  fi
8860done
8861  done
8862IFS=$as_save_IFS
8863
8864  ;;
8865esac
8866fi
8867PRINTF=$ac_cv_path_PRINTF
8868if test -n "$PRINTF"; then
8869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8870$as_echo "$PRINTF" >&6; }
8871else
8872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8873$as_echo "no" >&6; }
8874fi
8875
8876
8877        if test "x$PRINTF" = x; then
8878          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8879        fi
8880      else
8881        # Otherwise we believe it is a complete path. Use it as it is.
8882        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8883$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8884        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8885$as_echo_n "checking for PRINTF... " >&6; }
8886        if test ! -x "$tool_specified"; then
8887          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8888$as_echo "not found" >&6; }
8889          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8890        fi
8891        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8892$as_echo "$tool_specified" >&6; }
8893      fi
8894    fi
8895  fi
8896
8897
8898
8899  if test "x$PRINTF" = x; then
8900    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8901  fi
8902
8903
8904
8905
8906
8907  # Publish this variable in the help.
8908
8909
8910  if test "x$RM" = x; then
8911    # The variable is not set by user, try to locate tool using the code snippet
8912    for ac_prog in rm
8913do
8914  # Extract the first word of "$ac_prog", so it can be a program name with args.
8915set dummy $ac_prog; ac_word=$2
8916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8917$as_echo_n "checking for $ac_word... " >&6; }
8918if ${ac_cv_path_RM+:} false; then :
8919  $as_echo_n "(cached) " >&6
8920else
8921  case $RM in
8922  [\\/]* | ?:[\\/]*)
8923  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8924  ;;
8925  *)
8926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8927for as_dir in $PATH
8928do
8929  IFS=$as_save_IFS
8930  test -z "$as_dir" && as_dir=.
8931    for ac_exec_ext in '' $ac_executable_extensions; do
8932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8933    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8935    break 2
8936  fi
8937done
8938  done
8939IFS=$as_save_IFS
8940
8941  ;;
8942esac
8943fi
8944RM=$ac_cv_path_RM
8945if test -n "$RM"; then
8946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8947$as_echo "$RM" >&6; }
8948else
8949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8950$as_echo "no" >&6; }
8951fi
8952
8953
8954  test -n "$RM" && break
8955done
8956
8957  else
8958    # The variable is set, but is it from the command line or the environment?
8959
8960    # Try to remove the string !RM! from our list.
8961    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8962    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8963      # If it failed, the variable was not from the command line. Ignore it,
8964      # but warn the user (except for BASH, which is always set by the calling BASH).
8965      if test "xRM" != xBASH; then
8966        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8967$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8968      fi
8969      # Try to locate tool using the code snippet
8970      for ac_prog in rm
8971do
8972  # Extract the first word of "$ac_prog", so it can be a program name with args.
8973set dummy $ac_prog; ac_word=$2
8974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8975$as_echo_n "checking for $ac_word... " >&6; }
8976if ${ac_cv_path_RM+:} false; then :
8977  $as_echo_n "(cached) " >&6
8978else
8979  case $RM in
8980  [\\/]* | ?:[\\/]*)
8981  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8982  ;;
8983  *)
8984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8985for as_dir in $PATH
8986do
8987  IFS=$as_save_IFS
8988  test -z "$as_dir" && as_dir=.
8989    for ac_exec_ext in '' $ac_executable_extensions; do
8990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8991    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8993    break 2
8994  fi
8995done
8996  done
8997IFS=$as_save_IFS
8998
8999  ;;
9000esac
9001fi
9002RM=$ac_cv_path_RM
9003if test -n "$RM"; then
9004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9005$as_echo "$RM" >&6; }
9006else
9007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9008$as_echo "no" >&6; }
9009fi
9010
9011
9012  test -n "$RM" && break
9013done
9014
9015    else
9016      # If it succeeded, then it was overridden by the user. We will use it
9017      # for the tool.
9018
9019      # First remove it from the list of overridden variables, so we can test
9020      # for unknown variables in the end.
9021      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9022
9023      # Check if the provided tool contains a complete path.
9024      tool_specified="$RM"
9025      tool_basename="${tool_specified##*/}"
9026      if test "x$tool_basename" = "x$tool_specified"; then
9027        # A command without a complete path is provided, search $PATH.
9028        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9029$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9030        # Extract the first word of "$tool_basename", so it can be a program name with args.
9031set dummy $tool_basename; ac_word=$2
9032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9033$as_echo_n "checking for $ac_word... " >&6; }
9034if ${ac_cv_path_RM+:} false; then :
9035  $as_echo_n "(cached) " >&6
9036else
9037  case $RM in
9038  [\\/]* | ?:[\\/]*)
9039  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9040  ;;
9041  *)
9042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9043for as_dir in $PATH
9044do
9045  IFS=$as_save_IFS
9046  test -z "$as_dir" && as_dir=.
9047    for ac_exec_ext in '' $ac_executable_extensions; do
9048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9049    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9051    break 2
9052  fi
9053done
9054  done
9055IFS=$as_save_IFS
9056
9057  ;;
9058esac
9059fi
9060RM=$ac_cv_path_RM
9061if test -n "$RM"; then
9062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9063$as_echo "$RM" >&6; }
9064else
9065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9066$as_echo "no" >&6; }
9067fi
9068
9069
9070        if test "x$RM" = x; then
9071          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9072        fi
9073      else
9074        # Otherwise we believe it is a complete path. Use it as it is.
9075        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9076$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9077        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9078$as_echo_n "checking for RM... " >&6; }
9079        if test ! -x "$tool_specified"; then
9080          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9081$as_echo "not found" >&6; }
9082          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9083        fi
9084        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9085$as_echo "$tool_specified" >&6; }
9086      fi
9087    fi
9088  fi
9089
9090
9091
9092  if test "x$RM" = x; then
9093    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9094  fi
9095
9096
9097
9098
9099
9100  # Publish this variable in the help.
9101
9102
9103  if test "x$SH" = x; then
9104    # The variable is not set by user, try to locate tool using the code snippet
9105    for ac_prog in sh
9106do
9107  # Extract the first word of "$ac_prog", so it can be a program name with args.
9108set dummy $ac_prog; ac_word=$2
9109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9110$as_echo_n "checking for $ac_word... " >&6; }
9111if ${ac_cv_path_SH+:} false; then :
9112  $as_echo_n "(cached) " >&6
9113else
9114  case $SH in
9115  [\\/]* | ?:[\\/]*)
9116  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9117  ;;
9118  *)
9119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9120for as_dir in $PATH
9121do
9122  IFS=$as_save_IFS
9123  test -z "$as_dir" && as_dir=.
9124    for ac_exec_ext in '' $ac_executable_extensions; do
9125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9126    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9128    break 2
9129  fi
9130done
9131  done
9132IFS=$as_save_IFS
9133
9134  ;;
9135esac
9136fi
9137SH=$ac_cv_path_SH
9138if test -n "$SH"; then
9139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9140$as_echo "$SH" >&6; }
9141else
9142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9143$as_echo "no" >&6; }
9144fi
9145
9146
9147  test -n "$SH" && break
9148done
9149
9150  else
9151    # The variable is set, but is it from the command line or the environment?
9152
9153    # Try to remove the string !SH! from our list.
9154    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9155    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9156      # If it failed, the variable was not from the command line. Ignore it,
9157      # but warn the user (except for BASH, which is always set by the calling BASH).
9158      if test "xSH" != xBASH; then
9159        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9160$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9161      fi
9162      # Try to locate tool using the code snippet
9163      for ac_prog in sh
9164do
9165  # Extract the first word of "$ac_prog", so it can be a program name with args.
9166set dummy $ac_prog; ac_word=$2
9167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9168$as_echo_n "checking for $ac_word... " >&6; }
9169if ${ac_cv_path_SH+:} false; then :
9170  $as_echo_n "(cached) " >&6
9171else
9172  case $SH in
9173  [\\/]* | ?:[\\/]*)
9174  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9175  ;;
9176  *)
9177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9178for as_dir in $PATH
9179do
9180  IFS=$as_save_IFS
9181  test -z "$as_dir" && as_dir=.
9182    for ac_exec_ext in '' $ac_executable_extensions; do
9183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9184    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9186    break 2
9187  fi
9188done
9189  done
9190IFS=$as_save_IFS
9191
9192  ;;
9193esac
9194fi
9195SH=$ac_cv_path_SH
9196if test -n "$SH"; then
9197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9198$as_echo "$SH" >&6; }
9199else
9200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9201$as_echo "no" >&6; }
9202fi
9203
9204
9205  test -n "$SH" && break
9206done
9207
9208    else
9209      # If it succeeded, then it was overridden by the user. We will use it
9210      # for the tool.
9211
9212      # First remove it from the list of overridden variables, so we can test
9213      # for unknown variables in the end.
9214      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9215
9216      # Check if the provided tool contains a complete path.
9217      tool_specified="$SH"
9218      tool_basename="${tool_specified##*/}"
9219      if test "x$tool_basename" = "x$tool_specified"; then
9220        # A command without a complete path is provided, search $PATH.
9221        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9222$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9223        # Extract the first word of "$tool_basename", so it can be a program name with args.
9224set dummy $tool_basename; ac_word=$2
9225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9226$as_echo_n "checking for $ac_word... " >&6; }
9227if ${ac_cv_path_SH+:} false; then :
9228  $as_echo_n "(cached) " >&6
9229else
9230  case $SH in
9231  [\\/]* | ?:[\\/]*)
9232  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9233  ;;
9234  *)
9235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9236for as_dir in $PATH
9237do
9238  IFS=$as_save_IFS
9239  test -z "$as_dir" && as_dir=.
9240    for ac_exec_ext in '' $ac_executable_extensions; do
9241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9242    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9244    break 2
9245  fi
9246done
9247  done
9248IFS=$as_save_IFS
9249
9250  ;;
9251esac
9252fi
9253SH=$ac_cv_path_SH
9254if test -n "$SH"; then
9255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9256$as_echo "$SH" >&6; }
9257else
9258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9259$as_echo "no" >&6; }
9260fi
9261
9262
9263        if test "x$SH" = x; then
9264          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9265        fi
9266      else
9267        # Otherwise we believe it is a complete path. Use it as it is.
9268        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9269$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9270        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9271$as_echo_n "checking for SH... " >&6; }
9272        if test ! -x "$tool_specified"; then
9273          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9274$as_echo "not found" >&6; }
9275          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9276        fi
9277        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9278$as_echo "$tool_specified" >&6; }
9279      fi
9280    fi
9281  fi
9282
9283
9284
9285  if test "x$SH" = x; then
9286    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9287  fi
9288
9289
9290
9291
9292
9293  # Publish this variable in the help.
9294
9295
9296  if test "x$SORT" = x; then
9297    # The variable is not set by user, try to locate tool using the code snippet
9298    for ac_prog in sort
9299do
9300  # Extract the first word of "$ac_prog", so it can be a program name with args.
9301set dummy $ac_prog; ac_word=$2
9302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9303$as_echo_n "checking for $ac_word... " >&6; }
9304if ${ac_cv_path_SORT+:} false; then :
9305  $as_echo_n "(cached) " >&6
9306else
9307  case $SORT in
9308  [\\/]* | ?:[\\/]*)
9309  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9310  ;;
9311  *)
9312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9313for as_dir in $PATH
9314do
9315  IFS=$as_save_IFS
9316  test -z "$as_dir" && as_dir=.
9317    for ac_exec_ext in '' $ac_executable_extensions; do
9318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9319    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9321    break 2
9322  fi
9323done
9324  done
9325IFS=$as_save_IFS
9326
9327  ;;
9328esac
9329fi
9330SORT=$ac_cv_path_SORT
9331if test -n "$SORT"; then
9332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9333$as_echo "$SORT" >&6; }
9334else
9335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9336$as_echo "no" >&6; }
9337fi
9338
9339
9340  test -n "$SORT" && break
9341done
9342
9343  else
9344    # The variable is set, but is it from the command line or the environment?
9345
9346    # Try to remove the string !SORT! from our list.
9347    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9348    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9349      # If it failed, the variable was not from the command line. Ignore it,
9350      # but warn the user (except for BASH, which is always set by the calling BASH).
9351      if test "xSORT" != xBASH; then
9352        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9353$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9354      fi
9355      # Try to locate tool using the code snippet
9356      for ac_prog in sort
9357do
9358  # Extract the first word of "$ac_prog", so it can be a program name with args.
9359set dummy $ac_prog; ac_word=$2
9360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9361$as_echo_n "checking for $ac_word... " >&6; }
9362if ${ac_cv_path_SORT+:} false; then :
9363  $as_echo_n "(cached) " >&6
9364else
9365  case $SORT in
9366  [\\/]* | ?:[\\/]*)
9367  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9368  ;;
9369  *)
9370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9371for as_dir in $PATH
9372do
9373  IFS=$as_save_IFS
9374  test -z "$as_dir" && as_dir=.
9375    for ac_exec_ext in '' $ac_executable_extensions; do
9376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9377    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9379    break 2
9380  fi
9381done
9382  done
9383IFS=$as_save_IFS
9384
9385  ;;
9386esac
9387fi
9388SORT=$ac_cv_path_SORT
9389if test -n "$SORT"; then
9390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9391$as_echo "$SORT" >&6; }
9392else
9393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9394$as_echo "no" >&6; }
9395fi
9396
9397
9398  test -n "$SORT" && break
9399done
9400
9401    else
9402      # If it succeeded, then it was overridden by the user. We will use it
9403      # for the tool.
9404
9405      # First remove it from the list of overridden variables, so we can test
9406      # for unknown variables in the end.
9407      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9408
9409      # Check if the provided tool contains a complete path.
9410      tool_specified="$SORT"
9411      tool_basename="${tool_specified##*/}"
9412      if test "x$tool_basename" = "x$tool_specified"; then
9413        # A command without a complete path is provided, search $PATH.
9414        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9415$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9416        # Extract the first word of "$tool_basename", so it can be a program name with args.
9417set dummy $tool_basename; ac_word=$2
9418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9419$as_echo_n "checking for $ac_word... " >&6; }
9420if ${ac_cv_path_SORT+:} false; then :
9421  $as_echo_n "(cached) " >&6
9422else
9423  case $SORT in
9424  [\\/]* | ?:[\\/]*)
9425  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9426  ;;
9427  *)
9428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9429for as_dir in $PATH
9430do
9431  IFS=$as_save_IFS
9432  test -z "$as_dir" && as_dir=.
9433    for ac_exec_ext in '' $ac_executable_extensions; do
9434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9435    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9437    break 2
9438  fi
9439done
9440  done
9441IFS=$as_save_IFS
9442
9443  ;;
9444esac
9445fi
9446SORT=$ac_cv_path_SORT
9447if test -n "$SORT"; then
9448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9449$as_echo "$SORT" >&6; }
9450else
9451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9452$as_echo "no" >&6; }
9453fi
9454
9455
9456        if test "x$SORT" = x; then
9457          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9458        fi
9459      else
9460        # Otherwise we believe it is a complete path. Use it as it is.
9461        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9462$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9463        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9464$as_echo_n "checking for SORT... " >&6; }
9465        if test ! -x "$tool_specified"; then
9466          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9467$as_echo "not found" >&6; }
9468          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9469        fi
9470        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9471$as_echo "$tool_specified" >&6; }
9472      fi
9473    fi
9474  fi
9475
9476
9477
9478  if test "x$SORT" = x; then
9479    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9480  fi
9481
9482
9483
9484
9485
9486  # Publish this variable in the help.
9487
9488
9489  if test "x$TAIL" = x; then
9490    # The variable is not set by user, try to locate tool using the code snippet
9491    for ac_prog in tail
9492do
9493  # Extract the first word of "$ac_prog", so it can be a program name with args.
9494set dummy $ac_prog; ac_word=$2
9495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9496$as_echo_n "checking for $ac_word... " >&6; }
9497if ${ac_cv_path_TAIL+:} false; then :
9498  $as_echo_n "(cached) " >&6
9499else
9500  case $TAIL in
9501  [\\/]* | ?:[\\/]*)
9502  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9503  ;;
9504  *)
9505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9506for as_dir in $PATH
9507do
9508  IFS=$as_save_IFS
9509  test -z "$as_dir" && as_dir=.
9510    for ac_exec_ext in '' $ac_executable_extensions; do
9511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9512    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9514    break 2
9515  fi
9516done
9517  done
9518IFS=$as_save_IFS
9519
9520  ;;
9521esac
9522fi
9523TAIL=$ac_cv_path_TAIL
9524if test -n "$TAIL"; then
9525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9526$as_echo "$TAIL" >&6; }
9527else
9528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9529$as_echo "no" >&6; }
9530fi
9531
9532
9533  test -n "$TAIL" && break
9534done
9535
9536  else
9537    # The variable is set, but is it from the command line or the environment?
9538
9539    # Try to remove the string !TAIL! from our list.
9540    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9541    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9542      # If it failed, the variable was not from the command line. Ignore it,
9543      # but warn the user (except for BASH, which is always set by the calling BASH).
9544      if test "xTAIL" != xBASH; then
9545        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9546$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9547      fi
9548      # Try to locate tool using the code snippet
9549      for ac_prog in tail
9550do
9551  # Extract the first word of "$ac_prog", so it can be a program name with args.
9552set dummy $ac_prog; ac_word=$2
9553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9554$as_echo_n "checking for $ac_word... " >&6; }
9555if ${ac_cv_path_TAIL+:} false; then :
9556  $as_echo_n "(cached) " >&6
9557else
9558  case $TAIL in
9559  [\\/]* | ?:[\\/]*)
9560  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9561  ;;
9562  *)
9563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9564for as_dir in $PATH
9565do
9566  IFS=$as_save_IFS
9567  test -z "$as_dir" && as_dir=.
9568    for ac_exec_ext in '' $ac_executable_extensions; do
9569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9570    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9572    break 2
9573  fi
9574done
9575  done
9576IFS=$as_save_IFS
9577
9578  ;;
9579esac
9580fi
9581TAIL=$ac_cv_path_TAIL
9582if test -n "$TAIL"; then
9583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9584$as_echo "$TAIL" >&6; }
9585else
9586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9587$as_echo "no" >&6; }
9588fi
9589
9590
9591  test -n "$TAIL" && break
9592done
9593
9594    else
9595      # If it succeeded, then it was overridden by the user. We will use it
9596      # for the tool.
9597
9598      # First remove it from the list of overridden variables, so we can test
9599      # for unknown variables in the end.
9600      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9601
9602      # Check if the provided tool contains a complete path.
9603      tool_specified="$TAIL"
9604      tool_basename="${tool_specified##*/}"
9605      if test "x$tool_basename" = "x$tool_specified"; then
9606        # A command without a complete path is provided, search $PATH.
9607        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9608$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9609        # Extract the first word of "$tool_basename", so it can be a program name with args.
9610set dummy $tool_basename; ac_word=$2
9611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9612$as_echo_n "checking for $ac_word... " >&6; }
9613if ${ac_cv_path_TAIL+:} false; then :
9614  $as_echo_n "(cached) " >&6
9615else
9616  case $TAIL in
9617  [\\/]* | ?:[\\/]*)
9618  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9619  ;;
9620  *)
9621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9622for as_dir in $PATH
9623do
9624  IFS=$as_save_IFS
9625  test -z "$as_dir" && as_dir=.
9626    for ac_exec_ext in '' $ac_executable_extensions; do
9627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9628    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9630    break 2
9631  fi
9632done
9633  done
9634IFS=$as_save_IFS
9635
9636  ;;
9637esac
9638fi
9639TAIL=$ac_cv_path_TAIL
9640if test -n "$TAIL"; then
9641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9642$as_echo "$TAIL" >&6; }
9643else
9644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9645$as_echo "no" >&6; }
9646fi
9647
9648
9649        if test "x$TAIL" = x; then
9650          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9651        fi
9652      else
9653        # Otherwise we believe it is a complete path. Use it as it is.
9654        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9655$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9656        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9657$as_echo_n "checking for TAIL... " >&6; }
9658        if test ! -x "$tool_specified"; then
9659          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9660$as_echo "not found" >&6; }
9661          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9662        fi
9663        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9664$as_echo "$tool_specified" >&6; }
9665      fi
9666    fi
9667  fi
9668
9669
9670
9671  if test "x$TAIL" = x; then
9672    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9673  fi
9674
9675
9676
9677
9678
9679  # Publish this variable in the help.
9680
9681
9682  if test "x$TAR" = x; then
9683    # The variable is not set by user, try to locate tool using the code snippet
9684    for ac_prog in tar
9685do
9686  # Extract the first word of "$ac_prog", so it can be a program name with args.
9687set dummy $ac_prog; ac_word=$2
9688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9689$as_echo_n "checking for $ac_word... " >&6; }
9690if ${ac_cv_path_TAR+:} false; then :
9691  $as_echo_n "(cached) " >&6
9692else
9693  case $TAR in
9694  [\\/]* | ?:[\\/]*)
9695  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9696  ;;
9697  *)
9698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9699for as_dir in $PATH
9700do
9701  IFS=$as_save_IFS
9702  test -z "$as_dir" && as_dir=.
9703    for ac_exec_ext in '' $ac_executable_extensions; do
9704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9705    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9707    break 2
9708  fi
9709done
9710  done
9711IFS=$as_save_IFS
9712
9713  ;;
9714esac
9715fi
9716TAR=$ac_cv_path_TAR
9717if test -n "$TAR"; then
9718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9719$as_echo "$TAR" >&6; }
9720else
9721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9722$as_echo "no" >&6; }
9723fi
9724
9725
9726  test -n "$TAR" && break
9727done
9728
9729  else
9730    # The variable is set, but is it from the command line or the environment?
9731
9732    # Try to remove the string !TAR! from our list.
9733    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9734    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9735      # If it failed, the variable was not from the command line. Ignore it,
9736      # but warn the user (except for BASH, which is always set by the calling BASH).
9737      if test "xTAR" != xBASH; then
9738        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9739$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9740      fi
9741      # Try to locate tool using the code snippet
9742      for ac_prog in tar
9743do
9744  # Extract the first word of "$ac_prog", so it can be a program name with args.
9745set dummy $ac_prog; ac_word=$2
9746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9747$as_echo_n "checking for $ac_word... " >&6; }
9748if ${ac_cv_path_TAR+:} false; then :
9749  $as_echo_n "(cached) " >&6
9750else
9751  case $TAR in
9752  [\\/]* | ?:[\\/]*)
9753  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9754  ;;
9755  *)
9756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9757for as_dir in $PATH
9758do
9759  IFS=$as_save_IFS
9760  test -z "$as_dir" && as_dir=.
9761    for ac_exec_ext in '' $ac_executable_extensions; do
9762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9763    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9765    break 2
9766  fi
9767done
9768  done
9769IFS=$as_save_IFS
9770
9771  ;;
9772esac
9773fi
9774TAR=$ac_cv_path_TAR
9775if test -n "$TAR"; then
9776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9777$as_echo "$TAR" >&6; }
9778else
9779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9780$as_echo "no" >&6; }
9781fi
9782
9783
9784  test -n "$TAR" && break
9785done
9786
9787    else
9788      # If it succeeded, then it was overridden by the user. We will use it
9789      # for the tool.
9790
9791      # First remove it from the list of overridden variables, so we can test
9792      # for unknown variables in the end.
9793      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9794
9795      # Check if the provided tool contains a complete path.
9796      tool_specified="$TAR"
9797      tool_basename="${tool_specified##*/}"
9798      if test "x$tool_basename" = "x$tool_specified"; then
9799        # A command without a complete path is provided, search $PATH.
9800        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9801$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9802        # Extract the first word of "$tool_basename", so it can be a program name with args.
9803set dummy $tool_basename; ac_word=$2
9804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9805$as_echo_n "checking for $ac_word... " >&6; }
9806if ${ac_cv_path_TAR+:} false; then :
9807  $as_echo_n "(cached) " >&6
9808else
9809  case $TAR in
9810  [\\/]* | ?:[\\/]*)
9811  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9812  ;;
9813  *)
9814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9815for as_dir in $PATH
9816do
9817  IFS=$as_save_IFS
9818  test -z "$as_dir" && as_dir=.
9819    for ac_exec_ext in '' $ac_executable_extensions; do
9820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9821    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9823    break 2
9824  fi
9825done
9826  done
9827IFS=$as_save_IFS
9828
9829  ;;
9830esac
9831fi
9832TAR=$ac_cv_path_TAR
9833if test -n "$TAR"; then
9834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9835$as_echo "$TAR" >&6; }
9836else
9837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9838$as_echo "no" >&6; }
9839fi
9840
9841
9842        if test "x$TAR" = x; then
9843          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9844        fi
9845      else
9846        # Otherwise we believe it is a complete path. Use it as it is.
9847        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9848$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9849        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9850$as_echo_n "checking for TAR... " >&6; }
9851        if test ! -x "$tool_specified"; then
9852          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9853$as_echo "not found" >&6; }
9854          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9855        fi
9856        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9857$as_echo "$tool_specified" >&6; }
9858      fi
9859    fi
9860  fi
9861
9862
9863
9864  if test "x$TAR" = x; then
9865    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9866  fi
9867
9868
9869
9870
9871
9872  # Publish this variable in the help.
9873
9874
9875  if test "x$TEE" = x; then
9876    # The variable is not set by user, try to locate tool using the code snippet
9877    for ac_prog in tee
9878do
9879  # Extract the first word of "$ac_prog", so it can be a program name with args.
9880set dummy $ac_prog; ac_word=$2
9881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9882$as_echo_n "checking for $ac_word... " >&6; }
9883if ${ac_cv_path_TEE+:} false; then :
9884  $as_echo_n "(cached) " >&6
9885else
9886  case $TEE in
9887  [\\/]* | ?:[\\/]*)
9888  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9889  ;;
9890  *)
9891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9892for as_dir in $PATH
9893do
9894  IFS=$as_save_IFS
9895  test -z "$as_dir" && as_dir=.
9896    for ac_exec_ext in '' $ac_executable_extensions; do
9897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9898    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9900    break 2
9901  fi
9902done
9903  done
9904IFS=$as_save_IFS
9905
9906  ;;
9907esac
9908fi
9909TEE=$ac_cv_path_TEE
9910if test -n "$TEE"; then
9911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9912$as_echo "$TEE" >&6; }
9913else
9914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9915$as_echo "no" >&6; }
9916fi
9917
9918
9919  test -n "$TEE" && break
9920done
9921
9922  else
9923    # The variable is set, but is it from the command line or the environment?
9924
9925    # Try to remove the string !TEE! from our list.
9926    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9927    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9928      # If it failed, the variable was not from the command line. Ignore it,
9929      # but warn the user (except for BASH, which is always set by the calling BASH).
9930      if test "xTEE" != xBASH; then
9931        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9932$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9933      fi
9934      # Try to locate tool using the code snippet
9935      for ac_prog in tee
9936do
9937  # Extract the first word of "$ac_prog", so it can be a program name with args.
9938set dummy $ac_prog; ac_word=$2
9939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9940$as_echo_n "checking for $ac_word... " >&6; }
9941if ${ac_cv_path_TEE+:} false; then :
9942  $as_echo_n "(cached) " >&6
9943else
9944  case $TEE in
9945  [\\/]* | ?:[\\/]*)
9946  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9947  ;;
9948  *)
9949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9950for as_dir in $PATH
9951do
9952  IFS=$as_save_IFS
9953  test -z "$as_dir" && as_dir=.
9954    for ac_exec_ext in '' $ac_executable_extensions; do
9955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9956    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9958    break 2
9959  fi
9960done
9961  done
9962IFS=$as_save_IFS
9963
9964  ;;
9965esac
9966fi
9967TEE=$ac_cv_path_TEE
9968if test -n "$TEE"; then
9969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9970$as_echo "$TEE" >&6; }
9971else
9972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9973$as_echo "no" >&6; }
9974fi
9975
9976
9977  test -n "$TEE" && break
9978done
9979
9980    else
9981      # If it succeeded, then it was overridden by the user. We will use it
9982      # for the tool.
9983
9984      # First remove it from the list of overridden variables, so we can test
9985      # for unknown variables in the end.
9986      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9987
9988      # Check if the provided tool contains a complete path.
9989      tool_specified="$TEE"
9990      tool_basename="${tool_specified##*/}"
9991      if test "x$tool_basename" = "x$tool_specified"; then
9992        # A command without a complete path is provided, search $PATH.
9993        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9994$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9995        # Extract the first word of "$tool_basename", so it can be a program name with args.
9996set dummy $tool_basename; ac_word=$2
9997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9998$as_echo_n "checking for $ac_word... " >&6; }
9999if ${ac_cv_path_TEE+:} false; then :
10000  $as_echo_n "(cached) " >&6
10001else
10002  case $TEE in
10003  [\\/]* | ?:[\\/]*)
10004  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10005  ;;
10006  *)
10007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10008for as_dir in $PATH
10009do
10010  IFS=$as_save_IFS
10011  test -z "$as_dir" && as_dir=.
10012    for ac_exec_ext in '' $ac_executable_extensions; do
10013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10014    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10016    break 2
10017  fi
10018done
10019  done
10020IFS=$as_save_IFS
10021
10022  ;;
10023esac
10024fi
10025TEE=$ac_cv_path_TEE
10026if test -n "$TEE"; then
10027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10028$as_echo "$TEE" >&6; }
10029else
10030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10031$as_echo "no" >&6; }
10032fi
10033
10034
10035        if test "x$TEE" = x; then
10036          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10037        fi
10038      else
10039        # Otherwise we believe it is a complete path. Use it as it is.
10040        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10041$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10042        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10043$as_echo_n "checking for TEE... " >&6; }
10044        if test ! -x "$tool_specified"; then
10045          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10046$as_echo "not found" >&6; }
10047          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10048        fi
10049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10050$as_echo "$tool_specified" >&6; }
10051      fi
10052    fi
10053  fi
10054
10055
10056
10057  if test "x$TEE" = x; then
10058    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10059  fi
10060
10061
10062
10063
10064
10065  # Publish this variable in the help.
10066
10067
10068  if test "x$TOUCH" = x; then
10069    # The variable is not set by user, try to locate tool using the code snippet
10070    for ac_prog in touch
10071do
10072  # Extract the first word of "$ac_prog", so it can be a program name with args.
10073set dummy $ac_prog; ac_word=$2
10074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10075$as_echo_n "checking for $ac_word... " >&6; }
10076if ${ac_cv_path_TOUCH+:} false; then :
10077  $as_echo_n "(cached) " >&6
10078else
10079  case $TOUCH in
10080  [\\/]* | ?:[\\/]*)
10081  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10082  ;;
10083  *)
10084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10085for as_dir in $PATH
10086do
10087  IFS=$as_save_IFS
10088  test -z "$as_dir" && as_dir=.
10089    for ac_exec_ext in '' $ac_executable_extensions; do
10090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10091    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10093    break 2
10094  fi
10095done
10096  done
10097IFS=$as_save_IFS
10098
10099  ;;
10100esac
10101fi
10102TOUCH=$ac_cv_path_TOUCH
10103if test -n "$TOUCH"; then
10104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10105$as_echo "$TOUCH" >&6; }
10106else
10107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10108$as_echo "no" >&6; }
10109fi
10110
10111
10112  test -n "$TOUCH" && break
10113done
10114
10115  else
10116    # The variable is set, but is it from the command line or the environment?
10117
10118    # Try to remove the string !TOUCH! from our list.
10119    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10120    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10121      # If it failed, the variable was not from the command line. Ignore it,
10122      # but warn the user (except for BASH, which is always set by the calling BASH).
10123      if test "xTOUCH" != xBASH; then
10124        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10125$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10126      fi
10127      # Try to locate tool using the code snippet
10128      for ac_prog in touch
10129do
10130  # Extract the first word of "$ac_prog", so it can be a program name with args.
10131set dummy $ac_prog; ac_word=$2
10132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10133$as_echo_n "checking for $ac_word... " >&6; }
10134if ${ac_cv_path_TOUCH+:} false; then :
10135  $as_echo_n "(cached) " >&6
10136else
10137  case $TOUCH in
10138  [\\/]* | ?:[\\/]*)
10139  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10140  ;;
10141  *)
10142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10143for as_dir in $PATH
10144do
10145  IFS=$as_save_IFS
10146  test -z "$as_dir" && as_dir=.
10147    for ac_exec_ext in '' $ac_executable_extensions; do
10148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10149    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10151    break 2
10152  fi
10153done
10154  done
10155IFS=$as_save_IFS
10156
10157  ;;
10158esac
10159fi
10160TOUCH=$ac_cv_path_TOUCH
10161if test -n "$TOUCH"; then
10162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10163$as_echo "$TOUCH" >&6; }
10164else
10165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10166$as_echo "no" >&6; }
10167fi
10168
10169
10170  test -n "$TOUCH" && break
10171done
10172
10173    else
10174      # If it succeeded, then it was overridden by the user. We will use it
10175      # for the tool.
10176
10177      # First remove it from the list of overridden variables, so we can test
10178      # for unknown variables in the end.
10179      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10180
10181      # Check if the provided tool contains a complete path.
10182      tool_specified="$TOUCH"
10183      tool_basename="${tool_specified##*/}"
10184      if test "x$tool_basename" = "x$tool_specified"; then
10185        # A command without a complete path is provided, search $PATH.
10186        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10187$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10188        # Extract the first word of "$tool_basename", so it can be a program name with args.
10189set dummy $tool_basename; ac_word=$2
10190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10191$as_echo_n "checking for $ac_word... " >&6; }
10192if ${ac_cv_path_TOUCH+:} false; then :
10193  $as_echo_n "(cached) " >&6
10194else
10195  case $TOUCH in
10196  [\\/]* | ?:[\\/]*)
10197  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10198  ;;
10199  *)
10200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10201for as_dir in $PATH
10202do
10203  IFS=$as_save_IFS
10204  test -z "$as_dir" && as_dir=.
10205    for ac_exec_ext in '' $ac_executable_extensions; do
10206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10207    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10209    break 2
10210  fi
10211done
10212  done
10213IFS=$as_save_IFS
10214
10215  ;;
10216esac
10217fi
10218TOUCH=$ac_cv_path_TOUCH
10219if test -n "$TOUCH"; then
10220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10221$as_echo "$TOUCH" >&6; }
10222else
10223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10224$as_echo "no" >&6; }
10225fi
10226
10227
10228        if test "x$TOUCH" = x; then
10229          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10230        fi
10231      else
10232        # Otherwise we believe it is a complete path. Use it as it is.
10233        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10234$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10235        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10236$as_echo_n "checking for TOUCH... " >&6; }
10237        if test ! -x "$tool_specified"; then
10238          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10239$as_echo "not found" >&6; }
10240          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10241        fi
10242        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10243$as_echo "$tool_specified" >&6; }
10244      fi
10245    fi
10246  fi
10247
10248
10249
10250  if test "x$TOUCH" = x; then
10251    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10252  fi
10253
10254
10255
10256
10257
10258  # Publish this variable in the help.
10259
10260
10261  if test "x$TR" = x; then
10262    # The variable is not set by user, try to locate tool using the code snippet
10263    for ac_prog in tr
10264do
10265  # Extract the first word of "$ac_prog", so it can be a program name with args.
10266set dummy $ac_prog; ac_word=$2
10267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10268$as_echo_n "checking for $ac_word... " >&6; }
10269if ${ac_cv_path_TR+:} false; then :
10270  $as_echo_n "(cached) " >&6
10271else
10272  case $TR in
10273  [\\/]* | ?:[\\/]*)
10274  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10275  ;;
10276  *)
10277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10278for as_dir in $PATH
10279do
10280  IFS=$as_save_IFS
10281  test -z "$as_dir" && as_dir=.
10282    for ac_exec_ext in '' $ac_executable_extensions; do
10283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10284    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10286    break 2
10287  fi
10288done
10289  done
10290IFS=$as_save_IFS
10291
10292  ;;
10293esac
10294fi
10295TR=$ac_cv_path_TR
10296if test -n "$TR"; then
10297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10298$as_echo "$TR" >&6; }
10299else
10300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10301$as_echo "no" >&6; }
10302fi
10303
10304
10305  test -n "$TR" && break
10306done
10307
10308  else
10309    # The variable is set, but is it from the command line or the environment?
10310
10311    # Try to remove the string !TR! from our list.
10312    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10313    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10314      # If it failed, the variable was not from the command line. Ignore it,
10315      # but warn the user (except for BASH, which is always set by the calling BASH).
10316      if test "xTR" != xBASH; then
10317        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10318$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10319      fi
10320      # Try to locate tool using the code snippet
10321      for ac_prog in tr
10322do
10323  # Extract the first word of "$ac_prog", so it can be a program name with args.
10324set dummy $ac_prog; ac_word=$2
10325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10326$as_echo_n "checking for $ac_word... " >&6; }
10327if ${ac_cv_path_TR+:} false; then :
10328  $as_echo_n "(cached) " >&6
10329else
10330  case $TR in
10331  [\\/]* | ?:[\\/]*)
10332  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10333  ;;
10334  *)
10335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10336for as_dir in $PATH
10337do
10338  IFS=$as_save_IFS
10339  test -z "$as_dir" && as_dir=.
10340    for ac_exec_ext in '' $ac_executable_extensions; do
10341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10342    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10344    break 2
10345  fi
10346done
10347  done
10348IFS=$as_save_IFS
10349
10350  ;;
10351esac
10352fi
10353TR=$ac_cv_path_TR
10354if test -n "$TR"; then
10355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10356$as_echo "$TR" >&6; }
10357else
10358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10359$as_echo "no" >&6; }
10360fi
10361
10362
10363  test -n "$TR" && break
10364done
10365
10366    else
10367      # If it succeeded, then it was overridden by the user. We will use it
10368      # for the tool.
10369
10370      # First remove it from the list of overridden variables, so we can test
10371      # for unknown variables in the end.
10372      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10373
10374      # Check if the provided tool contains a complete path.
10375      tool_specified="$TR"
10376      tool_basename="${tool_specified##*/}"
10377      if test "x$tool_basename" = "x$tool_specified"; then
10378        # A command without a complete path is provided, search $PATH.
10379        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10380$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10381        # Extract the first word of "$tool_basename", so it can be a program name with args.
10382set dummy $tool_basename; ac_word=$2
10383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10384$as_echo_n "checking for $ac_word... " >&6; }
10385if ${ac_cv_path_TR+:} false; then :
10386  $as_echo_n "(cached) " >&6
10387else
10388  case $TR in
10389  [\\/]* | ?:[\\/]*)
10390  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10391  ;;
10392  *)
10393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10394for as_dir in $PATH
10395do
10396  IFS=$as_save_IFS
10397  test -z "$as_dir" && as_dir=.
10398    for ac_exec_ext in '' $ac_executable_extensions; do
10399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10400    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10402    break 2
10403  fi
10404done
10405  done
10406IFS=$as_save_IFS
10407
10408  ;;
10409esac
10410fi
10411TR=$ac_cv_path_TR
10412if test -n "$TR"; then
10413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10414$as_echo "$TR" >&6; }
10415else
10416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10417$as_echo "no" >&6; }
10418fi
10419
10420
10421        if test "x$TR" = x; then
10422          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10423        fi
10424      else
10425        # Otherwise we believe it is a complete path. Use it as it is.
10426        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10427$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10428        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10429$as_echo_n "checking for TR... " >&6; }
10430        if test ! -x "$tool_specified"; then
10431          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10432$as_echo "not found" >&6; }
10433          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10434        fi
10435        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10436$as_echo "$tool_specified" >&6; }
10437      fi
10438    fi
10439  fi
10440
10441
10442
10443  if test "x$TR" = x; then
10444    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10445  fi
10446
10447
10448
10449
10450
10451  # Publish this variable in the help.
10452
10453
10454  if test "x$UNAME" = x; then
10455    # The variable is not set by user, try to locate tool using the code snippet
10456    for ac_prog in uname
10457do
10458  # Extract the first word of "$ac_prog", so it can be a program name with args.
10459set dummy $ac_prog; ac_word=$2
10460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10461$as_echo_n "checking for $ac_word... " >&6; }
10462if ${ac_cv_path_UNAME+:} false; then :
10463  $as_echo_n "(cached) " >&6
10464else
10465  case $UNAME in
10466  [\\/]* | ?:[\\/]*)
10467  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10468  ;;
10469  *)
10470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10471for as_dir in $PATH
10472do
10473  IFS=$as_save_IFS
10474  test -z "$as_dir" && as_dir=.
10475    for ac_exec_ext in '' $ac_executable_extensions; do
10476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10477    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10479    break 2
10480  fi
10481done
10482  done
10483IFS=$as_save_IFS
10484
10485  ;;
10486esac
10487fi
10488UNAME=$ac_cv_path_UNAME
10489if test -n "$UNAME"; then
10490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10491$as_echo "$UNAME" >&6; }
10492else
10493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10494$as_echo "no" >&6; }
10495fi
10496
10497
10498  test -n "$UNAME" && break
10499done
10500
10501  else
10502    # The variable is set, but is it from the command line or the environment?
10503
10504    # Try to remove the string !UNAME! from our list.
10505    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10506    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10507      # If it failed, the variable was not from the command line. Ignore it,
10508      # but warn the user (except for BASH, which is always set by the calling BASH).
10509      if test "xUNAME" != xBASH; then
10510        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10511$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10512      fi
10513      # Try to locate tool using the code snippet
10514      for ac_prog in uname
10515do
10516  # Extract the first word of "$ac_prog", so it can be a program name with args.
10517set dummy $ac_prog; ac_word=$2
10518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10519$as_echo_n "checking for $ac_word... " >&6; }
10520if ${ac_cv_path_UNAME+:} false; then :
10521  $as_echo_n "(cached) " >&6
10522else
10523  case $UNAME in
10524  [\\/]* | ?:[\\/]*)
10525  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10526  ;;
10527  *)
10528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10529for as_dir in $PATH
10530do
10531  IFS=$as_save_IFS
10532  test -z "$as_dir" && as_dir=.
10533    for ac_exec_ext in '' $ac_executable_extensions; do
10534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10535    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10537    break 2
10538  fi
10539done
10540  done
10541IFS=$as_save_IFS
10542
10543  ;;
10544esac
10545fi
10546UNAME=$ac_cv_path_UNAME
10547if test -n "$UNAME"; then
10548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10549$as_echo "$UNAME" >&6; }
10550else
10551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10552$as_echo "no" >&6; }
10553fi
10554
10555
10556  test -n "$UNAME" && break
10557done
10558
10559    else
10560      # If it succeeded, then it was overridden by the user. We will use it
10561      # for the tool.
10562
10563      # First remove it from the list of overridden variables, so we can test
10564      # for unknown variables in the end.
10565      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10566
10567      # Check if the provided tool contains a complete path.
10568      tool_specified="$UNAME"
10569      tool_basename="${tool_specified##*/}"
10570      if test "x$tool_basename" = "x$tool_specified"; then
10571        # A command without a complete path is provided, search $PATH.
10572        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10573$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10574        # Extract the first word of "$tool_basename", so it can be a program name with args.
10575set dummy $tool_basename; ac_word=$2
10576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10577$as_echo_n "checking for $ac_word... " >&6; }
10578if ${ac_cv_path_UNAME+:} false; then :
10579  $as_echo_n "(cached) " >&6
10580else
10581  case $UNAME in
10582  [\\/]* | ?:[\\/]*)
10583  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10584  ;;
10585  *)
10586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10587for as_dir in $PATH
10588do
10589  IFS=$as_save_IFS
10590  test -z "$as_dir" && as_dir=.
10591    for ac_exec_ext in '' $ac_executable_extensions; do
10592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10593    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10595    break 2
10596  fi
10597done
10598  done
10599IFS=$as_save_IFS
10600
10601  ;;
10602esac
10603fi
10604UNAME=$ac_cv_path_UNAME
10605if test -n "$UNAME"; then
10606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10607$as_echo "$UNAME" >&6; }
10608else
10609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10610$as_echo "no" >&6; }
10611fi
10612
10613
10614        if test "x$UNAME" = x; then
10615          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10616        fi
10617      else
10618        # Otherwise we believe it is a complete path. Use it as it is.
10619        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10620$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10621        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10622$as_echo_n "checking for UNAME... " >&6; }
10623        if test ! -x "$tool_specified"; then
10624          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10625$as_echo "not found" >&6; }
10626          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10627        fi
10628        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10629$as_echo "$tool_specified" >&6; }
10630      fi
10631    fi
10632  fi
10633
10634
10635
10636  if test "x$UNAME" = x; then
10637    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10638  fi
10639
10640
10641
10642
10643
10644  # Publish this variable in the help.
10645
10646
10647  if test "x$UNIQ" = x; then
10648    # The variable is not set by user, try to locate tool using the code snippet
10649    for ac_prog in uniq
10650do
10651  # Extract the first word of "$ac_prog", so it can be a program name with args.
10652set dummy $ac_prog; ac_word=$2
10653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10654$as_echo_n "checking for $ac_word... " >&6; }
10655if ${ac_cv_path_UNIQ+:} false; then :
10656  $as_echo_n "(cached) " >&6
10657else
10658  case $UNIQ in
10659  [\\/]* | ?:[\\/]*)
10660  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10661  ;;
10662  *)
10663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10664for as_dir in $PATH
10665do
10666  IFS=$as_save_IFS
10667  test -z "$as_dir" && as_dir=.
10668    for ac_exec_ext in '' $ac_executable_extensions; do
10669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10670    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10672    break 2
10673  fi
10674done
10675  done
10676IFS=$as_save_IFS
10677
10678  ;;
10679esac
10680fi
10681UNIQ=$ac_cv_path_UNIQ
10682if test -n "$UNIQ"; then
10683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10684$as_echo "$UNIQ" >&6; }
10685else
10686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10687$as_echo "no" >&6; }
10688fi
10689
10690
10691  test -n "$UNIQ" && break
10692done
10693
10694  else
10695    # The variable is set, but is it from the command line or the environment?
10696
10697    # Try to remove the string !UNIQ! from our list.
10698    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10699    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10700      # If it failed, the variable was not from the command line. Ignore it,
10701      # but warn the user (except for BASH, which is always set by the calling BASH).
10702      if test "xUNIQ" != xBASH; then
10703        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10704$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10705      fi
10706      # Try to locate tool using the code snippet
10707      for ac_prog in uniq
10708do
10709  # Extract the first word of "$ac_prog", so it can be a program name with args.
10710set dummy $ac_prog; ac_word=$2
10711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10712$as_echo_n "checking for $ac_word... " >&6; }
10713if ${ac_cv_path_UNIQ+:} false; then :
10714  $as_echo_n "(cached) " >&6
10715else
10716  case $UNIQ in
10717  [\\/]* | ?:[\\/]*)
10718  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10719  ;;
10720  *)
10721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10722for as_dir in $PATH
10723do
10724  IFS=$as_save_IFS
10725  test -z "$as_dir" && as_dir=.
10726    for ac_exec_ext in '' $ac_executable_extensions; do
10727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10728    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10730    break 2
10731  fi
10732done
10733  done
10734IFS=$as_save_IFS
10735
10736  ;;
10737esac
10738fi
10739UNIQ=$ac_cv_path_UNIQ
10740if test -n "$UNIQ"; then
10741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10742$as_echo "$UNIQ" >&6; }
10743else
10744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10745$as_echo "no" >&6; }
10746fi
10747
10748
10749  test -n "$UNIQ" && break
10750done
10751
10752    else
10753      # If it succeeded, then it was overridden by the user. We will use it
10754      # for the tool.
10755
10756      # First remove it from the list of overridden variables, so we can test
10757      # for unknown variables in the end.
10758      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10759
10760      # Check if the provided tool contains a complete path.
10761      tool_specified="$UNIQ"
10762      tool_basename="${tool_specified##*/}"
10763      if test "x$tool_basename" = "x$tool_specified"; then
10764        # A command without a complete path is provided, search $PATH.
10765        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10766$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10767        # Extract the first word of "$tool_basename", so it can be a program name with args.
10768set dummy $tool_basename; ac_word=$2
10769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10770$as_echo_n "checking for $ac_word... " >&6; }
10771if ${ac_cv_path_UNIQ+:} false; then :
10772  $as_echo_n "(cached) " >&6
10773else
10774  case $UNIQ in
10775  [\\/]* | ?:[\\/]*)
10776  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10777  ;;
10778  *)
10779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10780for as_dir in $PATH
10781do
10782  IFS=$as_save_IFS
10783  test -z "$as_dir" && as_dir=.
10784    for ac_exec_ext in '' $ac_executable_extensions; do
10785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10786    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10788    break 2
10789  fi
10790done
10791  done
10792IFS=$as_save_IFS
10793
10794  ;;
10795esac
10796fi
10797UNIQ=$ac_cv_path_UNIQ
10798if test -n "$UNIQ"; then
10799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10800$as_echo "$UNIQ" >&6; }
10801else
10802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10803$as_echo "no" >&6; }
10804fi
10805
10806
10807        if test "x$UNIQ" = x; then
10808          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10809        fi
10810      else
10811        # Otherwise we believe it is a complete path. Use it as it is.
10812        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10813$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10814        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10815$as_echo_n "checking for UNIQ... " >&6; }
10816        if test ! -x "$tool_specified"; then
10817          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10818$as_echo "not found" >&6; }
10819          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10820        fi
10821        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10822$as_echo "$tool_specified" >&6; }
10823      fi
10824    fi
10825  fi
10826
10827
10828
10829  if test "x$UNIQ" = x; then
10830    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10831  fi
10832
10833
10834
10835
10836
10837  # Publish this variable in the help.
10838
10839
10840  if test "x$WC" = x; then
10841    # The variable is not set by user, try to locate tool using the code snippet
10842    for ac_prog in wc
10843do
10844  # Extract the first word of "$ac_prog", so it can be a program name with args.
10845set dummy $ac_prog; ac_word=$2
10846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10847$as_echo_n "checking for $ac_word... " >&6; }
10848if ${ac_cv_path_WC+:} false; then :
10849  $as_echo_n "(cached) " >&6
10850else
10851  case $WC in
10852  [\\/]* | ?:[\\/]*)
10853  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10854  ;;
10855  *)
10856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10857for as_dir in $PATH
10858do
10859  IFS=$as_save_IFS
10860  test -z "$as_dir" && as_dir=.
10861    for ac_exec_ext in '' $ac_executable_extensions; do
10862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10863    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10865    break 2
10866  fi
10867done
10868  done
10869IFS=$as_save_IFS
10870
10871  ;;
10872esac
10873fi
10874WC=$ac_cv_path_WC
10875if test -n "$WC"; then
10876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10877$as_echo "$WC" >&6; }
10878else
10879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10880$as_echo "no" >&6; }
10881fi
10882
10883
10884  test -n "$WC" && break
10885done
10886
10887  else
10888    # The variable is set, but is it from the command line or the environment?
10889
10890    # Try to remove the string !WC! from our list.
10891    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10892    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10893      # If it failed, the variable was not from the command line. Ignore it,
10894      # but warn the user (except for BASH, which is always set by the calling BASH).
10895      if test "xWC" != xBASH; then
10896        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10897$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10898      fi
10899      # Try to locate tool using the code snippet
10900      for ac_prog in wc
10901do
10902  # Extract the first word of "$ac_prog", so it can be a program name with args.
10903set dummy $ac_prog; ac_word=$2
10904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10905$as_echo_n "checking for $ac_word... " >&6; }
10906if ${ac_cv_path_WC+:} false; then :
10907  $as_echo_n "(cached) " >&6
10908else
10909  case $WC in
10910  [\\/]* | ?:[\\/]*)
10911  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10912  ;;
10913  *)
10914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10915for as_dir in $PATH
10916do
10917  IFS=$as_save_IFS
10918  test -z "$as_dir" && as_dir=.
10919    for ac_exec_ext in '' $ac_executable_extensions; do
10920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10921    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10923    break 2
10924  fi
10925done
10926  done
10927IFS=$as_save_IFS
10928
10929  ;;
10930esac
10931fi
10932WC=$ac_cv_path_WC
10933if test -n "$WC"; then
10934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10935$as_echo "$WC" >&6; }
10936else
10937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10938$as_echo "no" >&6; }
10939fi
10940
10941
10942  test -n "$WC" && break
10943done
10944
10945    else
10946      # If it succeeded, then it was overridden by the user. We will use it
10947      # for the tool.
10948
10949      # First remove it from the list of overridden variables, so we can test
10950      # for unknown variables in the end.
10951      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10952
10953      # Check if the provided tool contains a complete path.
10954      tool_specified="$WC"
10955      tool_basename="${tool_specified##*/}"
10956      if test "x$tool_basename" = "x$tool_specified"; then
10957        # A command without a complete path is provided, search $PATH.
10958        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10959$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10960        # Extract the first word of "$tool_basename", so it can be a program name with args.
10961set dummy $tool_basename; ac_word=$2
10962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10963$as_echo_n "checking for $ac_word... " >&6; }
10964if ${ac_cv_path_WC+:} false; then :
10965  $as_echo_n "(cached) " >&6
10966else
10967  case $WC in
10968  [\\/]* | ?:[\\/]*)
10969  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10970  ;;
10971  *)
10972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10973for as_dir in $PATH
10974do
10975  IFS=$as_save_IFS
10976  test -z "$as_dir" && as_dir=.
10977    for ac_exec_ext in '' $ac_executable_extensions; do
10978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10979    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10981    break 2
10982  fi
10983done
10984  done
10985IFS=$as_save_IFS
10986
10987  ;;
10988esac
10989fi
10990WC=$ac_cv_path_WC
10991if test -n "$WC"; then
10992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10993$as_echo "$WC" >&6; }
10994else
10995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10996$as_echo "no" >&6; }
10997fi
10998
10999
11000        if test "x$WC" = x; then
11001          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11002        fi
11003      else
11004        # Otherwise we believe it is a complete path. Use it as it is.
11005        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11006$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11007        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11008$as_echo_n "checking for WC... " >&6; }
11009        if test ! -x "$tool_specified"; then
11010          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11011$as_echo "not found" >&6; }
11012          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11013        fi
11014        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11015$as_echo "$tool_specified" >&6; }
11016      fi
11017    fi
11018  fi
11019
11020
11021
11022  if test "x$WC" = x; then
11023    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11024  fi
11025
11026
11027
11028
11029
11030  # Publish this variable in the help.
11031
11032
11033  if test "x$WHICH" = x; then
11034    # The variable is not set by user, try to locate tool using the code snippet
11035    for ac_prog in which
11036do
11037  # Extract the first word of "$ac_prog", so it can be a program name with args.
11038set dummy $ac_prog; ac_word=$2
11039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11040$as_echo_n "checking for $ac_word... " >&6; }
11041if ${ac_cv_path_WHICH+:} false; then :
11042  $as_echo_n "(cached) " >&6
11043else
11044  case $WHICH in
11045  [\\/]* | ?:[\\/]*)
11046  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11047  ;;
11048  *)
11049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11050for as_dir in $PATH
11051do
11052  IFS=$as_save_IFS
11053  test -z "$as_dir" && as_dir=.
11054    for ac_exec_ext in '' $ac_executable_extensions; do
11055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11056    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11058    break 2
11059  fi
11060done
11061  done
11062IFS=$as_save_IFS
11063
11064  ;;
11065esac
11066fi
11067WHICH=$ac_cv_path_WHICH
11068if test -n "$WHICH"; then
11069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11070$as_echo "$WHICH" >&6; }
11071else
11072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11073$as_echo "no" >&6; }
11074fi
11075
11076
11077  test -n "$WHICH" && break
11078done
11079
11080  else
11081    # The variable is set, but is it from the command line or the environment?
11082
11083    # Try to remove the string !WHICH! from our list.
11084    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11085    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11086      # If it failed, the variable was not from the command line. Ignore it,
11087      # but warn the user (except for BASH, which is always set by the calling BASH).
11088      if test "xWHICH" != xBASH; then
11089        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11090$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11091      fi
11092      # Try to locate tool using the code snippet
11093      for ac_prog in which
11094do
11095  # Extract the first word of "$ac_prog", so it can be a program name with args.
11096set dummy $ac_prog; ac_word=$2
11097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11098$as_echo_n "checking for $ac_word... " >&6; }
11099if ${ac_cv_path_WHICH+:} false; then :
11100  $as_echo_n "(cached) " >&6
11101else
11102  case $WHICH in
11103  [\\/]* | ?:[\\/]*)
11104  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11105  ;;
11106  *)
11107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11108for as_dir in $PATH
11109do
11110  IFS=$as_save_IFS
11111  test -z "$as_dir" && as_dir=.
11112    for ac_exec_ext in '' $ac_executable_extensions; do
11113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11114    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11116    break 2
11117  fi
11118done
11119  done
11120IFS=$as_save_IFS
11121
11122  ;;
11123esac
11124fi
11125WHICH=$ac_cv_path_WHICH
11126if test -n "$WHICH"; then
11127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11128$as_echo "$WHICH" >&6; }
11129else
11130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11131$as_echo "no" >&6; }
11132fi
11133
11134
11135  test -n "$WHICH" && break
11136done
11137
11138    else
11139      # If it succeeded, then it was overridden by the user. We will use it
11140      # for the tool.
11141
11142      # First remove it from the list of overridden variables, so we can test
11143      # for unknown variables in the end.
11144      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11145
11146      # Check if the provided tool contains a complete path.
11147      tool_specified="$WHICH"
11148      tool_basename="${tool_specified##*/}"
11149      if test "x$tool_basename" = "x$tool_specified"; then
11150        # A command without a complete path is provided, search $PATH.
11151        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11152$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11153        # Extract the first word of "$tool_basename", so it can be a program name with args.
11154set dummy $tool_basename; ac_word=$2
11155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11156$as_echo_n "checking for $ac_word... " >&6; }
11157if ${ac_cv_path_WHICH+:} false; then :
11158  $as_echo_n "(cached) " >&6
11159else
11160  case $WHICH in
11161  [\\/]* | ?:[\\/]*)
11162  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11163  ;;
11164  *)
11165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11166for as_dir in $PATH
11167do
11168  IFS=$as_save_IFS
11169  test -z "$as_dir" && as_dir=.
11170    for ac_exec_ext in '' $ac_executable_extensions; do
11171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11172    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11174    break 2
11175  fi
11176done
11177  done
11178IFS=$as_save_IFS
11179
11180  ;;
11181esac
11182fi
11183WHICH=$ac_cv_path_WHICH
11184if test -n "$WHICH"; then
11185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11186$as_echo "$WHICH" >&6; }
11187else
11188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11189$as_echo "no" >&6; }
11190fi
11191
11192
11193        if test "x$WHICH" = x; then
11194          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11195        fi
11196      else
11197        # Otherwise we believe it is a complete path. Use it as it is.
11198        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11199$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11200        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11201$as_echo_n "checking for WHICH... " >&6; }
11202        if test ! -x "$tool_specified"; then
11203          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11204$as_echo "not found" >&6; }
11205          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11206        fi
11207        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11208$as_echo "$tool_specified" >&6; }
11209      fi
11210    fi
11211  fi
11212
11213
11214
11215  if test "x$WHICH" = x; then
11216    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11217  fi
11218
11219
11220
11221
11222
11223  # Publish this variable in the help.
11224
11225
11226  if test "x$XARGS" = x; then
11227    # The variable is not set by user, try to locate tool using the code snippet
11228    for ac_prog in xargs
11229do
11230  # Extract the first word of "$ac_prog", so it can be a program name with args.
11231set dummy $ac_prog; ac_word=$2
11232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11233$as_echo_n "checking for $ac_word... " >&6; }
11234if ${ac_cv_path_XARGS+:} false; then :
11235  $as_echo_n "(cached) " >&6
11236else
11237  case $XARGS in
11238  [\\/]* | ?:[\\/]*)
11239  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11240  ;;
11241  *)
11242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11243for as_dir in $PATH
11244do
11245  IFS=$as_save_IFS
11246  test -z "$as_dir" && as_dir=.
11247    for ac_exec_ext in '' $ac_executable_extensions; do
11248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11249    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11251    break 2
11252  fi
11253done
11254  done
11255IFS=$as_save_IFS
11256
11257  ;;
11258esac
11259fi
11260XARGS=$ac_cv_path_XARGS
11261if test -n "$XARGS"; then
11262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11263$as_echo "$XARGS" >&6; }
11264else
11265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11266$as_echo "no" >&6; }
11267fi
11268
11269
11270  test -n "$XARGS" && break
11271done
11272
11273  else
11274    # The variable is set, but is it from the command line or the environment?
11275
11276    # Try to remove the string !XARGS! from our list.
11277    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11278    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11279      # If it failed, the variable was not from the command line. Ignore it,
11280      # but warn the user (except for BASH, which is always set by the calling BASH).
11281      if test "xXARGS" != xBASH; then
11282        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11283$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11284      fi
11285      # Try to locate tool using the code snippet
11286      for ac_prog in xargs
11287do
11288  # Extract the first word of "$ac_prog", so it can be a program name with args.
11289set dummy $ac_prog; ac_word=$2
11290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11291$as_echo_n "checking for $ac_word... " >&6; }
11292if ${ac_cv_path_XARGS+:} false; then :
11293  $as_echo_n "(cached) " >&6
11294else
11295  case $XARGS in
11296  [\\/]* | ?:[\\/]*)
11297  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11298  ;;
11299  *)
11300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11301for as_dir in $PATH
11302do
11303  IFS=$as_save_IFS
11304  test -z "$as_dir" && as_dir=.
11305    for ac_exec_ext in '' $ac_executable_extensions; do
11306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11307    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11309    break 2
11310  fi
11311done
11312  done
11313IFS=$as_save_IFS
11314
11315  ;;
11316esac
11317fi
11318XARGS=$ac_cv_path_XARGS
11319if test -n "$XARGS"; then
11320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11321$as_echo "$XARGS" >&6; }
11322else
11323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11324$as_echo "no" >&6; }
11325fi
11326
11327
11328  test -n "$XARGS" && break
11329done
11330
11331    else
11332      # If it succeeded, then it was overridden by the user. We will use it
11333      # for the tool.
11334
11335      # First remove it from the list of overridden variables, so we can test
11336      # for unknown variables in the end.
11337      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11338
11339      # Check if the provided tool contains a complete path.
11340      tool_specified="$XARGS"
11341      tool_basename="${tool_specified##*/}"
11342      if test "x$tool_basename" = "x$tool_specified"; then
11343        # A command without a complete path is provided, search $PATH.
11344        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11345$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11346        # Extract the first word of "$tool_basename", so it can be a program name with args.
11347set dummy $tool_basename; ac_word=$2
11348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11349$as_echo_n "checking for $ac_word... " >&6; }
11350if ${ac_cv_path_XARGS+:} false; then :
11351  $as_echo_n "(cached) " >&6
11352else
11353  case $XARGS in
11354  [\\/]* | ?:[\\/]*)
11355  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11356  ;;
11357  *)
11358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11359for as_dir in $PATH
11360do
11361  IFS=$as_save_IFS
11362  test -z "$as_dir" && as_dir=.
11363    for ac_exec_ext in '' $ac_executable_extensions; do
11364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11365    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11367    break 2
11368  fi
11369done
11370  done
11371IFS=$as_save_IFS
11372
11373  ;;
11374esac
11375fi
11376XARGS=$ac_cv_path_XARGS
11377if test -n "$XARGS"; then
11378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11379$as_echo "$XARGS" >&6; }
11380else
11381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11382$as_echo "no" >&6; }
11383fi
11384
11385
11386        if test "x$XARGS" = x; then
11387          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11388        fi
11389      else
11390        # Otherwise we believe it is a complete path. Use it as it is.
11391        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11392$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11393        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11394$as_echo_n "checking for XARGS... " >&6; }
11395        if test ! -x "$tool_specified"; then
11396          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11397$as_echo "not found" >&6; }
11398          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11399        fi
11400        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11401$as_echo "$tool_specified" >&6; }
11402      fi
11403    fi
11404  fi
11405
11406
11407
11408  if test "x$XARGS" = x; then
11409    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11410  fi
11411
11412
11413
11414  # Then required tools that require some special treatment.
11415
11416
11417  # Publish this variable in the help.
11418
11419
11420  if test "x$AWK" = x; then
11421    # The variable is not set by user, try to locate tool using the code snippet
11422    for ac_prog in gawk mawk nawk awk
11423do
11424  # Extract the first word of "$ac_prog", so it can be a program name with args.
11425set dummy $ac_prog; ac_word=$2
11426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11427$as_echo_n "checking for $ac_word... " >&6; }
11428if ${ac_cv_prog_AWK+:} false; then :
11429  $as_echo_n "(cached) " >&6
11430else
11431  if test -n "$AWK"; then
11432  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11433else
11434as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11435for as_dir in $PATH
11436do
11437  IFS=$as_save_IFS
11438  test -z "$as_dir" && as_dir=.
11439    for ac_exec_ext in '' $ac_executable_extensions; do
11440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11441    ac_cv_prog_AWK="$ac_prog"
11442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11443    break 2
11444  fi
11445done
11446  done
11447IFS=$as_save_IFS
11448
11449fi
11450fi
11451AWK=$ac_cv_prog_AWK
11452if test -n "$AWK"; then
11453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11454$as_echo "$AWK" >&6; }
11455else
11456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11457$as_echo "no" >&6; }
11458fi
11459
11460
11461  test -n "$AWK" && break
11462done
11463
11464  else
11465    # The variable is set, but is it from the command line or the environment?
11466
11467    # Try to remove the string !AWK! from our list.
11468    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11469    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11470      # If it failed, the variable was not from the command line. Ignore it,
11471      # but warn the user (except for BASH, which is always set by the calling BASH).
11472      if test "xAWK" != xBASH; then
11473        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11474$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11475      fi
11476      # Try to locate tool using the code snippet
11477      for ac_prog in gawk mawk nawk awk
11478do
11479  # Extract the first word of "$ac_prog", so it can be a program name with args.
11480set dummy $ac_prog; ac_word=$2
11481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11482$as_echo_n "checking for $ac_word... " >&6; }
11483if ${ac_cv_prog_AWK+:} false; then :
11484  $as_echo_n "(cached) " >&6
11485else
11486  if test -n "$AWK"; then
11487  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11488else
11489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11490for as_dir in $PATH
11491do
11492  IFS=$as_save_IFS
11493  test -z "$as_dir" && as_dir=.
11494    for ac_exec_ext in '' $ac_executable_extensions; do
11495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11496    ac_cv_prog_AWK="$ac_prog"
11497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11498    break 2
11499  fi
11500done
11501  done
11502IFS=$as_save_IFS
11503
11504fi
11505fi
11506AWK=$ac_cv_prog_AWK
11507if test -n "$AWK"; then
11508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11509$as_echo "$AWK" >&6; }
11510else
11511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11512$as_echo "no" >&6; }
11513fi
11514
11515
11516  test -n "$AWK" && break
11517done
11518
11519    else
11520      # If it succeeded, then it was overridden by the user. We will use it
11521      # for the tool.
11522
11523      # First remove it from the list of overridden variables, so we can test
11524      # for unknown variables in the end.
11525      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11526
11527      # Check if the provided tool contains a complete path.
11528      tool_specified="$AWK"
11529      tool_basename="${tool_specified##*/}"
11530      if test "x$tool_basename" = "x$tool_specified"; then
11531        # A command without a complete path is provided, search $PATH.
11532        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11533$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11534        # Extract the first word of "$tool_basename", so it can be a program name with args.
11535set dummy $tool_basename; ac_word=$2
11536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11537$as_echo_n "checking for $ac_word... " >&6; }
11538if ${ac_cv_path_AWK+:} false; then :
11539  $as_echo_n "(cached) " >&6
11540else
11541  case $AWK in
11542  [\\/]* | ?:[\\/]*)
11543  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11544  ;;
11545  *)
11546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11547for as_dir in $PATH
11548do
11549  IFS=$as_save_IFS
11550  test -z "$as_dir" && as_dir=.
11551    for ac_exec_ext in '' $ac_executable_extensions; do
11552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11553    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11555    break 2
11556  fi
11557done
11558  done
11559IFS=$as_save_IFS
11560
11561  ;;
11562esac
11563fi
11564AWK=$ac_cv_path_AWK
11565if test -n "$AWK"; then
11566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11567$as_echo "$AWK" >&6; }
11568else
11569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11570$as_echo "no" >&6; }
11571fi
11572
11573
11574        if test "x$AWK" = x; then
11575          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11576        fi
11577      else
11578        # Otherwise we believe it is a complete path. Use it as it is.
11579        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11580$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11581        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11582$as_echo_n "checking for AWK... " >&6; }
11583        if test ! -x "$tool_specified"; then
11584          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11585$as_echo "not found" >&6; }
11586          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11587        fi
11588        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11589$as_echo "$tool_specified" >&6; }
11590      fi
11591    fi
11592  fi
11593
11594
11595  if test "x$AWK" = x; then
11596    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11597  fi
11598
11599
11600
11601
11602  # Publish this variable in the help.
11603
11604
11605  if test "x$GREP" = x; then
11606    # The variable is not set by user, try to locate tool using the code snippet
11607    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11608$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11609if ${ac_cv_path_GREP+:} false; then :
11610  $as_echo_n "(cached) " >&6
11611else
11612  if test -z "$GREP"; then
11613  ac_path_GREP_found=false
11614  # Loop through the user's path and test for each of PROGNAME-LIST
11615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11616for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11617do
11618  IFS=$as_save_IFS
11619  test -z "$as_dir" && as_dir=.
11620    for ac_prog in grep ggrep; do
11621    for ac_exec_ext in '' $ac_executable_extensions; do
11622      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11623      as_fn_executable_p "$ac_path_GREP" || continue
11624# Check for GNU ac_path_GREP and select it if it is found.
11625  # Check for GNU $ac_path_GREP
11626case `"$ac_path_GREP" --version 2>&1` in
11627*GNU*)
11628  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11629*)
11630  ac_count=0
11631  $as_echo_n 0123456789 >"conftest.in"
11632  while :
11633  do
11634    cat "conftest.in" "conftest.in" >"conftest.tmp"
11635    mv "conftest.tmp" "conftest.in"
11636    cp "conftest.in" "conftest.nl"
11637    $as_echo 'GREP' >> "conftest.nl"
11638    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11639    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11640    as_fn_arith $ac_count + 1 && ac_count=$as_val
11641    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11642      # Best one so far, save it but keep looking for a better one
11643      ac_cv_path_GREP="$ac_path_GREP"
11644      ac_path_GREP_max=$ac_count
11645    fi
11646    # 10*(2^10) chars as input seems more than enough
11647    test $ac_count -gt 10 && break
11648  done
11649  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11650esac
11651
11652      $ac_path_GREP_found && break 3
11653    done
11654  done
11655  done
11656IFS=$as_save_IFS
11657  if test -z "$ac_cv_path_GREP"; then
11658    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11659  fi
11660else
11661  ac_cv_path_GREP=$GREP
11662fi
11663
11664fi
11665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11666$as_echo "$ac_cv_path_GREP" >&6; }
11667 GREP="$ac_cv_path_GREP"
11668
11669
11670  else
11671    # The variable is set, but is it from the command line or the environment?
11672
11673    # Try to remove the string !GREP! from our list.
11674    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11675    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11676      # If it failed, the variable was not from the command line. Ignore it,
11677      # but warn the user (except for BASH, which is always set by the calling BASH).
11678      if test "xGREP" != xBASH; then
11679        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11680$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11681      fi
11682      # Try to locate tool using the code snippet
11683      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11684$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11685if ${ac_cv_path_GREP+:} false; then :
11686  $as_echo_n "(cached) " >&6
11687else
11688  if test -z "$GREP"; then
11689  ac_path_GREP_found=false
11690  # Loop through the user's path and test for each of PROGNAME-LIST
11691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11692for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11693do
11694  IFS=$as_save_IFS
11695  test -z "$as_dir" && as_dir=.
11696    for ac_prog in grep ggrep; do
11697    for ac_exec_ext in '' $ac_executable_extensions; do
11698      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11699      as_fn_executable_p "$ac_path_GREP" || continue
11700# Check for GNU ac_path_GREP and select it if it is found.
11701  # Check for GNU $ac_path_GREP
11702case `"$ac_path_GREP" --version 2>&1` in
11703*GNU*)
11704  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11705*)
11706  ac_count=0
11707  $as_echo_n 0123456789 >"conftest.in"
11708  while :
11709  do
11710    cat "conftest.in" "conftest.in" >"conftest.tmp"
11711    mv "conftest.tmp" "conftest.in"
11712    cp "conftest.in" "conftest.nl"
11713    $as_echo 'GREP' >> "conftest.nl"
11714    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11715    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11716    as_fn_arith $ac_count + 1 && ac_count=$as_val
11717    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11718      # Best one so far, save it but keep looking for a better one
11719      ac_cv_path_GREP="$ac_path_GREP"
11720      ac_path_GREP_max=$ac_count
11721    fi
11722    # 10*(2^10) chars as input seems more than enough
11723    test $ac_count -gt 10 && break
11724  done
11725  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11726esac
11727
11728      $ac_path_GREP_found && break 3
11729    done
11730  done
11731  done
11732IFS=$as_save_IFS
11733  if test -z "$ac_cv_path_GREP"; then
11734    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11735  fi
11736else
11737  ac_cv_path_GREP=$GREP
11738fi
11739
11740fi
11741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11742$as_echo "$ac_cv_path_GREP" >&6; }
11743 GREP="$ac_cv_path_GREP"
11744
11745
11746    else
11747      # If it succeeded, then it was overridden by the user. We will use it
11748      # for the tool.
11749
11750      # First remove it from the list of overridden variables, so we can test
11751      # for unknown variables in the end.
11752      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11753
11754      # Check if the provided tool contains a complete path.
11755      tool_specified="$GREP"
11756      tool_basename="${tool_specified##*/}"
11757      if test "x$tool_basename" = "x$tool_specified"; then
11758        # A command without a complete path is provided, search $PATH.
11759        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11760$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11761        # Extract the first word of "$tool_basename", so it can be a program name with args.
11762set dummy $tool_basename; ac_word=$2
11763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11764$as_echo_n "checking for $ac_word... " >&6; }
11765if ${ac_cv_path_GREP+:} false; then :
11766  $as_echo_n "(cached) " >&6
11767else
11768  case $GREP in
11769  [\\/]* | ?:[\\/]*)
11770  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11771  ;;
11772  *)
11773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11774for as_dir in $PATH
11775do
11776  IFS=$as_save_IFS
11777  test -z "$as_dir" && as_dir=.
11778    for ac_exec_ext in '' $ac_executable_extensions; do
11779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11780    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11782    break 2
11783  fi
11784done
11785  done
11786IFS=$as_save_IFS
11787
11788  ;;
11789esac
11790fi
11791GREP=$ac_cv_path_GREP
11792if test -n "$GREP"; then
11793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11794$as_echo "$GREP" >&6; }
11795else
11796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11797$as_echo "no" >&6; }
11798fi
11799
11800
11801        if test "x$GREP" = x; then
11802          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11803        fi
11804      else
11805        # Otherwise we believe it is a complete path. Use it as it is.
11806        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11807$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11808        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11809$as_echo_n "checking for GREP... " >&6; }
11810        if test ! -x "$tool_specified"; then
11811          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11812$as_echo "not found" >&6; }
11813          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11814        fi
11815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11816$as_echo "$tool_specified" >&6; }
11817      fi
11818    fi
11819  fi
11820
11821
11822  if test "x$GREP" = x; then
11823    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11824  fi
11825
11826
11827
11828
11829  # Publish this variable in the help.
11830
11831
11832  if test "x$EGREP" = x; then
11833    # The variable is not set by user, try to locate tool using the code snippet
11834    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11835$as_echo_n "checking for egrep... " >&6; }
11836if ${ac_cv_path_EGREP+:} false; then :
11837  $as_echo_n "(cached) " >&6
11838else
11839  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11840   then ac_cv_path_EGREP="$GREP -E"
11841   else
11842     if test -z "$EGREP"; then
11843  ac_path_EGREP_found=false
11844  # Loop through the user's path and test for each of PROGNAME-LIST
11845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11846for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11847do
11848  IFS=$as_save_IFS
11849  test -z "$as_dir" && as_dir=.
11850    for ac_prog in egrep; do
11851    for ac_exec_ext in '' $ac_executable_extensions; do
11852      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11853      as_fn_executable_p "$ac_path_EGREP" || continue
11854# Check for GNU ac_path_EGREP and select it if it is found.
11855  # Check for GNU $ac_path_EGREP
11856case `"$ac_path_EGREP" --version 2>&1` in
11857*GNU*)
11858  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11859*)
11860  ac_count=0
11861  $as_echo_n 0123456789 >"conftest.in"
11862  while :
11863  do
11864    cat "conftest.in" "conftest.in" >"conftest.tmp"
11865    mv "conftest.tmp" "conftest.in"
11866    cp "conftest.in" "conftest.nl"
11867    $as_echo 'EGREP' >> "conftest.nl"
11868    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11869    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11870    as_fn_arith $ac_count + 1 && ac_count=$as_val
11871    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11872      # Best one so far, save it but keep looking for a better one
11873      ac_cv_path_EGREP="$ac_path_EGREP"
11874      ac_path_EGREP_max=$ac_count
11875    fi
11876    # 10*(2^10) chars as input seems more than enough
11877    test $ac_count -gt 10 && break
11878  done
11879  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11880esac
11881
11882      $ac_path_EGREP_found && break 3
11883    done
11884  done
11885  done
11886IFS=$as_save_IFS
11887  if test -z "$ac_cv_path_EGREP"; then
11888    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11889  fi
11890else
11891  ac_cv_path_EGREP=$EGREP
11892fi
11893
11894   fi
11895fi
11896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11897$as_echo "$ac_cv_path_EGREP" >&6; }
11898 EGREP="$ac_cv_path_EGREP"
11899
11900
11901  else
11902    # The variable is set, but is it from the command line or the environment?
11903
11904    # Try to remove the string !EGREP! from our list.
11905    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11906    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11907      # If it failed, the variable was not from the command line. Ignore it,
11908      # but warn the user (except for BASH, which is always set by the calling BASH).
11909      if test "xEGREP" != xBASH; then
11910        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11911$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11912      fi
11913      # Try to locate tool using the code snippet
11914      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11915$as_echo_n "checking for egrep... " >&6; }
11916if ${ac_cv_path_EGREP+:} false; then :
11917  $as_echo_n "(cached) " >&6
11918else
11919  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11920   then ac_cv_path_EGREP="$GREP -E"
11921   else
11922     if test -z "$EGREP"; then
11923  ac_path_EGREP_found=false
11924  # Loop through the user's path and test for each of PROGNAME-LIST
11925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11926for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11927do
11928  IFS=$as_save_IFS
11929  test -z "$as_dir" && as_dir=.
11930    for ac_prog in egrep; do
11931    for ac_exec_ext in '' $ac_executable_extensions; do
11932      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11933      as_fn_executable_p "$ac_path_EGREP" || continue
11934# Check for GNU ac_path_EGREP and select it if it is found.
11935  # Check for GNU $ac_path_EGREP
11936case `"$ac_path_EGREP" --version 2>&1` in
11937*GNU*)
11938  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11939*)
11940  ac_count=0
11941  $as_echo_n 0123456789 >"conftest.in"
11942  while :
11943  do
11944    cat "conftest.in" "conftest.in" >"conftest.tmp"
11945    mv "conftest.tmp" "conftest.in"
11946    cp "conftest.in" "conftest.nl"
11947    $as_echo 'EGREP' >> "conftest.nl"
11948    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11949    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11950    as_fn_arith $ac_count + 1 && ac_count=$as_val
11951    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11952      # Best one so far, save it but keep looking for a better one
11953      ac_cv_path_EGREP="$ac_path_EGREP"
11954      ac_path_EGREP_max=$ac_count
11955    fi
11956    # 10*(2^10) chars as input seems more than enough
11957    test $ac_count -gt 10 && break
11958  done
11959  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11960esac
11961
11962      $ac_path_EGREP_found && break 3
11963    done
11964  done
11965  done
11966IFS=$as_save_IFS
11967  if test -z "$ac_cv_path_EGREP"; then
11968    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11969  fi
11970else
11971  ac_cv_path_EGREP=$EGREP
11972fi
11973
11974   fi
11975fi
11976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11977$as_echo "$ac_cv_path_EGREP" >&6; }
11978 EGREP="$ac_cv_path_EGREP"
11979
11980
11981    else
11982      # If it succeeded, then it was overridden by the user. We will use it
11983      # for the tool.
11984
11985      # First remove it from the list of overridden variables, so we can test
11986      # for unknown variables in the end.
11987      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11988
11989      # Check if the provided tool contains a complete path.
11990      tool_specified="$EGREP"
11991      tool_basename="${tool_specified##*/}"
11992      if test "x$tool_basename" = "x$tool_specified"; then
11993        # A command without a complete path is provided, search $PATH.
11994        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11995$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11996        # Extract the first word of "$tool_basename", so it can be a program name with args.
11997set dummy $tool_basename; ac_word=$2
11998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11999$as_echo_n "checking for $ac_word... " >&6; }
12000if ${ac_cv_path_EGREP+:} false; then :
12001  $as_echo_n "(cached) " >&6
12002else
12003  case $EGREP in
12004  [\\/]* | ?:[\\/]*)
12005  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12006  ;;
12007  *)
12008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12009for as_dir in $PATH
12010do
12011  IFS=$as_save_IFS
12012  test -z "$as_dir" && as_dir=.
12013    for ac_exec_ext in '' $ac_executable_extensions; do
12014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12015    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12017    break 2
12018  fi
12019done
12020  done
12021IFS=$as_save_IFS
12022
12023  ;;
12024esac
12025fi
12026EGREP=$ac_cv_path_EGREP
12027if test -n "$EGREP"; then
12028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12029$as_echo "$EGREP" >&6; }
12030else
12031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12032$as_echo "no" >&6; }
12033fi
12034
12035
12036        if test "x$EGREP" = x; then
12037          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12038        fi
12039      else
12040        # Otherwise we believe it is a complete path. Use it as it is.
12041        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12042$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12043        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12044$as_echo_n "checking for EGREP... " >&6; }
12045        if test ! -x "$tool_specified"; then
12046          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12047$as_echo "not found" >&6; }
12048          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12049        fi
12050        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12051$as_echo "$tool_specified" >&6; }
12052      fi
12053    fi
12054  fi
12055
12056
12057  if test "x$EGREP" = x; then
12058    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12059  fi
12060
12061
12062
12063
12064  # Publish this variable in the help.
12065
12066
12067  if test "x$FGREP" = x; then
12068    # The variable is not set by user, try to locate tool using the code snippet
12069    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12070$as_echo_n "checking for fgrep... " >&6; }
12071if ${ac_cv_path_FGREP+:} false; then :
12072  $as_echo_n "(cached) " >&6
12073else
12074  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12075   then ac_cv_path_FGREP="$GREP -F"
12076   else
12077     if test -z "$FGREP"; then
12078  ac_path_FGREP_found=false
12079  # Loop through the user's path and test for each of PROGNAME-LIST
12080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12081for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12082do
12083  IFS=$as_save_IFS
12084  test -z "$as_dir" && as_dir=.
12085    for ac_prog in fgrep; do
12086    for ac_exec_ext in '' $ac_executable_extensions; do
12087      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12088      as_fn_executable_p "$ac_path_FGREP" || continue
12089# Check for GNU ac_path_FGREP and select it if it is found.
12090  # Check for GNU $ac_path_FGREP
12091case `"$ac_path_FGREP" --version 2>&1` in
12092*GNU*)
12093  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12094*)
12095  ac_count=0
12096  $as_echo_n 0123456789 >"conftest.in"
12097  while :
12098  do
12099    cat "conftest.in" "conftest.in" >"conftest.tmp"
12100    mv "conftest.tmp" "conftest.in"
12101    cp "conftest.in" "conftest.nl"
12102    $as_echo 'FGREP' >> "conftest.nl"
12103    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12104    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12105    as_fn_arith $ac_count + 1 && ac_count=$as_val
12106    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12107      # Best one so far, save it but keep looking for a better one
12108      ac_cv_path_FGREP="$ac_path_FGREP"
12109      ac_path_FGREP_max=$ac_count
12110    fi
12111    # 10*(2^10) chars as input seems more than enough
12112    test $ac_count -gt 10 && break
12113  done
12114  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12115esac
12116
12117      $ac_path_FGREP_found && break 3
12118    done
12119  done
12120  done
12121IFS=$as_save_IFS
12122  if test -z "$ac_cv_path_FGREP"; then
12123    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12124  fi
12125else
12126  ac_cv_path_FGREP=$FGREP
12127fi
12128
12129   fi
12130fi
12131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12132$as_echo "$ac_cv_path_FGREP" >&6; }
12133 FGREP="$ac_cv_path_FGREP"
12134
12135
12136  else
12137    # The variable is set, but is it from the command line or the environment?
12138
12139    # Try to remove the string !FGREP! from our list.
12140    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12141    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12142      # If it failed, the variable was not from the command line. Ignore it,
12143      # but warn the user (except for BASH, which is always set by the calling BASH).
12144      if test "xFGREP" != xBASH; then
12145        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12146$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12147      fi
12148      # Try to locate tool using the code snippet
12149      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12150$as_echo_n "checking for fgrep... " >&6; }
12151if ${ac_cv_path_FGREP+:} false; then :
12152  $as_echo_n "(cached) " >&6
12153else
12154  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12155   then ac_cv_path_FGREP="$GREP -F"
12156   else
12157     if test -z "$FGREP"; then
12158  ac_path_FGREP_found=false
12159  # Loop through the user's path and test for each of PROGNAME-LIST
12160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12161for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12162do
12163  IFS=$as_save_IFS
12164  test -z "$as_dir" && as_dir=.
12165    for ac_prog in fgrep; do
12166    for ac_exec_ext in '' $ac_executable_extensions; do
12167      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12168      as_fn_executable_p "$ac_path_FGREP" || continue
12169# Check for GNU ac_path_FGREP and select it if it is found.
12170  # Check for GNU $ac_path_FGREP
12171case `"$ac_path_FGREP" --version 2>&1` in
12172*GNU*)
12173  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12174*)
12175  ac_count=0
12176  $as_echo_n 0123456789 >"conftest.in"
12177  while :
12178  do
12179    cat "conftest.in" "conftest.in" >"conftest.tmp"
12180    mv "conftest.tmp" "conftest.in"
12181    cp "conftest.in" "conftest.nl"
12182    $as_echo 'FGREP' >> "conftest.nl"
12183    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12184    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12185    as_fn_arith $ac_count + 1 && ac_count=$as_val
12186    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12187      # Best one so far, save it but keep looking for a better one
12188      ac_cv_path_FGREP="$ac_path_FGREP"
12189      ac_path_FGREP_max=$ac_count
12190    fi
12191    # 10*(2^10) chars as input seems more than enough
12192    test $ac_count -gt 10 && break
12193  done
12194  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12195esac
12196
12197      $ac_path_FGREP_found && break 3
12198    done
12199  done
12200  done
12201IFS=$as_save_IFS
12202  if test -z "$ac_cv_path_FGREP"; then
12203    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12204  fi
12205else
12206  ac_cv_path_FGREP=$FGREP
12207fi
12208
12209   fi
12210fi
12211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12212$as_echo "$ac_cv_path_FGREP" >&6; }
12213 FGREP="$ac_cv_path_FGREP"
12214
12215
12216    else
12217      # If it succeeded, then it was overridden by the user. We will use it
12218      # for the tool.
12219
12220      # First remove it from the list of overridden variables, so we can test
12221      # for unknown variables in the end.
12222      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12223
12224      # Check if the provided tool contains a complete path.
12225      tool_specified="$FGREP"
12226      tool_basename="${tool_specified##*/}"
12227      if test "x$tool_basename" = "x$tool_specified"; then
12228        # A command without a complete path is provided, search $PATH.
12229        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12230$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12231        # Extract the first word of "$tool_basename", so it can be a program name with args.
12232set dummy $tool_basename; ac_word=$2
12233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12234$as_echo_n "checking for $ac_word... " >&6; }
12235if ${ac_cv_path_FGREP+:} false; then :
12236  $as_echo_n "(cached) " >&6
12237else
12238  case $FGREP in
12239  [\\/]* | ?:[\\/]*)
12240  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12241  ;;
12242  *)
12243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12244for as_dir in $PATH
12245do
12246  IFS=$as_save_IFS
12247  test -z "$as_dir" && as_dir=.
12248    for ac_exec_ext in '' $ac_executable_extensions; do
12249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12250    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12252    break 2
12253  fi
12254done
12255  done
12256IFS=$as_save_IFS
12257
12258  ;;
12259esac
12260fi
12261FGREP=$ac_cv_path_FGREP
12262if test -n "$FGREP"; then
12263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12264$as_echo "$FGREP" >&6; }
12265else
12266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12267$as_echo "no" >&6; }
12268fi
12269
12270
12271        if test "x$FGREP" = x; then
12272          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12273        fi
12274      else
12275        # Otherwise we believe it is a complete path. Use it as it is.
12276        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12277$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12278        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12279$as_echo_n "checking for FGREP... " >&6; }
12280        if test ! -x "$tool_specified"; then
12281          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12282$as_echo "not found" >&6; }
12283          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12284        fi
12285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12286$as_echo "$tool_specified" >&6; }
12287      fi
12288    fi
12289  fi
12290
12291
12292  if test "x$FGREP" = x; then
12293    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12294  fi
12295
12296
12297
12298
12299  # Publish this variable in the help.
12300
12301
12302  if test "x$SED" = x; then
12303    # The variable is not set by user, try to locate tool using the code snippet
12304    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12305$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12306if ${ac_cv_path_SED+:} false; then :
12307  $as_echo_n "(cached) " >&6
12308else
12309            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12310     for ac_i in 1 2 3 4 5 6 7; do
12311       ac_script="$ac_script$as_nl$ac_script"
12312     done
12313     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12314     { ac_script=; unset ac_script;}
12315     if test -z "$SED"; then
12316  ac_path_SED_found=false
12317  # Loop through the user's path and test for each of PROGNAME-LIST
12318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12319for as_dir in $PATH
12320do
12321  IFS=$as_save_IFS
12322  test -z "$as_dir" && as_dir=.
12323    for ac_prog in sed gsed; do
12324    for ac_exec_ext in '' $ac_executable_extensions; do
12325      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12326      as_fn_executable_p "$ac_path_SED" || continue
12327# Check for GNU ac_path_SED and select it if it is found.
12328  # Check for GNU $ac_path_SED
12329case `"$ac_path_SED" --version 2>&1` in
12330*GNU*)
12331  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12332*)
12333  ac_count=0
12334  $as_echo_n 0123456789 >"conftest.in"
12335  while :
12336  do
12337    cat "conftest.in" "conftest.in" >"conftest.tmp"
12338    mv "conftest.tmp" "conftest.in"
12339    cp "conftest.in" "conftest.nl"
12340    $as_echo '' >> "conftest.nl"
12341    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12342    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12343    as_fn_arith $ac_count + 1 && ac_count=$as_val
12344    if test $ac_count -gt ${ac_path_SED_max-0}; then
12345      # Best one so far, save it but keep looking for a better one
12346      ac_cv_path_SED="$ac_path_SED"
12347      ac_path_SED_max=$ac_count
12348    fi
12349    # 10*(2^10) chars as input seems more than enough
12350    test $ac_count -gt 10 && break
12351  done
12352  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12353esac
12354
12355      $ac_path_SED_found && break 3
12356    done
12357  done
12358  done
12359IFS=$as_save_IFS
12360  if test -z "$ac_cv_path_SED"; then
12361    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12362  fi
12363else
12364  ac_cv_path_SED=$SED
12365fi
12366
12367fi
12368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12369$as_echo "$ac_cv_path_SED" >&6; }
12370 SED="$ac_cv_path_SED"
12371  rm -f conftest.sed
12372
12373  else
12374    # The variable is set, but is it from the command line or the environment?
12375
12376    # Try to remove the string !SED! from our list.
12377    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12378    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12379      # If it failed, the variable was not from the command line. Ignore it,
12380      # but warn the user (except for BASH, which is always set by the calling BASH).
12381      if test "xSED" != xBASH; then
12382        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12383$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12384      fi
12385      # Try to locate tool using the code snippet
12386      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12387$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12388if ${ac_cv_path_SED+:} false; then :
12389  $as_echo_n "(cached) " >&6
12390else
12391            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12392     for ac_i in 1 2 3 4 5 6 7; do
12393       ac_script="$ac_script$as_nl$ac_script"
12394     done
12395     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12396     { ac_script=; unset ac_script;}
12397     if test -z "$SED"; then
12398  ac_path_SED_found=false
12399  # Loop through the user's path and test for each of PROGNAME-LIST
12400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12401for as_dir in $PATH
12402do
12403  IFS=$as_save_IFS
12404  test -z "$as_dir" && as_dir=.
12405    for ac_prog in sed gsed; do
12406    for ac_exec_ext in '' $ac_executable_extensions; do
12407      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12408      as_fn_executable_p "$ac_path_SED" || continue
12409# Check for GNU ac_path_SED and select it if it is found.
12410  # Check for GNU $ac_path_SED
12411case `"$ac_path_SED" --version 2>&1` in
12412*GNU*)
12413  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12414*)
12415  ac_count=0
12416  $as_echo_n 0123456789 >"conftest.in"
12417  while :
12418  do
12419    cat "conftest.in" "conftest.in" >"conftest.tmp"
12420    mv "conftest.tmp" "conftest.in"
12421    cp "conftest.in" "conftest.nl"
12422    $as_echo '' >> "conftest.nl"
12423    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12424    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12425    as_fn_arith $ac_count + 1 && ac_count=$as_val
12426    if test $ac_count -gt ${ac_path_SED_max-0}; then
12427      # Best one so far, save it but keep looking for a better one
12428      ac_cv_path_SED="$ac_path_SED"
12429      ac_path_SED_max=$ac_count
12430    fi
12431    # 10*(2^10) chars as input seems more than enough
12432    test $ac_count -gt 10 && break
12433  done
12434  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12435esac
12436
12437      $ac_path_SED_found && break 3
12438    done
12439  done
12440  done
12441IFS=$as_save_IFS
12442  if test -z "$ac_cv_path_SED"; then
12443    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12444  fi
12445else
12446  ac_cv_path_SED=$SED
12447fi
12448
12449fi
12450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12451$as_echo "$ac_cv_path_SED" >&6; }
12452 SED="$ac_cv_path_SED"
12453  rm -f conftest.sed
12454
12455    else
12456      # If it succeeded, then it was overridden by the user. We will use it
12457      # for the tool.
12458
12459      # First remove it from the list of overridden variables, so we can test
12460      # for unknown variables in the end.
12461      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12462
12463      # Check if the provided tool contains a complete path.
12464      tool_specified="$SED"
12465      tool_basename="${tool_specified##*/}"
12466      if test "x$tool_basename" = "x$tool_specified"; then
12467        # A command without a complete path is provided, search $PATH.
12468        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12469$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12470        # Extract the first word of "$tool_basename", so it can be a program name with args.
12471set dummy $tool_basename; ac_word=$2
12472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12473$as_echo_n "checking for $ac_word... " >&6; }
12474if ${ac_cv_path_SED+:} false; then :
12475  $as_echo_n "(cached) " >&6
12476else
12477  case $SED in
12478  [\\/]* | ?:[\\/]*)
12479  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12480  ;;
12481  *)
12482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12483for as_dir in $PATH
12484do
12485  IFS=$as_save_IFS
12486  test -z "$as_dir" && as_dir=.
12487    for ac_exec_ext in '' $ac_executable_extensions; do
12488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12489    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12491    break 2
12492  fi
12493done
12494  done
12495IFS=$as_save_IFS
12496
12497  ;;
12498esac
12499fi
12500SED=$ac_cv_path_SED
12501if test -n "$SED"; then
12502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12503$as_echo "$SED" >&6; }
12504else
12505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12506$as_echo "no" >&6; }
12507fi
12508
12509
12510        if test "x$SED" = x; then
12511          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12512        fi
12513      else
12514        # Otherwise we believe it is a complete path. Use it as it is.
12515        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12516$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12517        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12518$as_echo_n "checking for SED... " >&6; }
12519        if test ! -x "$tool_specified"; then
12520          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12521$as_echo "not found" >&6; }
12522          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12523        fi
12524        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12525$as_echo "$tool_specified" >&6; }
12526      fi
12527    fi
12528  fi
12529
12530
12531  if test "x$SED" = x; then
12532    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12533  fi
12534
12535
12536
12537  # Always force rm.
12538  RM="$RM -f"
12539
12540  # pwd behaves differently on various platforms and some don't support the -L flag.
12541  # Always use the bash builtin pwd to get uniform behavior.
12542  THEPWDCMD=pwd
12543
12544  # These are not required on all platforms
12545
12546
12547  # Publish this variable in the help.
12548
12549
12550  if test "x$CYGPATH" = x; then
12551    # The variable is not set by user, try to locate tool using the code snippet
12552    for ac_prog in cygpath
12553do
12554  # Extract the first word of "$ac_prog", so it can be a program name with args.
12555set dummy $ac_prog; ac_word=$2
12556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12557$as_echo_n "checking for $ac_word... " >&6; }
12558if ${ac_cv_path_CYGPATH+:} false; then :
12559  $as_echo_n "(cached) " >&6
12560else
12561  case $CYGPATH in
12562  [\\/]* | ?:[\\/]*)
12563  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12564  ;;
12565  *)
12566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12567for as_dir in $PATH
12568do
12569  IFS=$as_save_IFS
12570  test -z "$as_dir" && as_dir=.
12571    for ac_exec_ext in '' $ac_executable_extensions; do
12572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12573    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12575    break 2
12576  fi
12577done
12578  done
12579IFS=$as_save_IFS
12580
12581  ;;
12582esac
12583fi
12584CYGPATH=$ac_cv_path_CYGPATH
12585if test -n "$CYGPATH"; then
12586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12587$as_echo "$CYGPATH" >&6; }
12588else
12589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12590$as_echo "no" >&6; }
12591fi
12592
12593
12594  test -n "$CYGPATH" && break
12595done
12596
12597  else
12598    # The variable is set, but is it from the command line or the environment?
12599
12600    # Try to remove the string !CYGPATH! from our list.
12601    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12602    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12603      # If it failed, the variable was not from the command line. Ignore it,
12604      # but warn the user (except for BASH, which is always set by the calling BASH).
12605      if test "xCYGPATH" != xBASH; then
12606        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12607$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12608      fi
12609      # Try to locate tool using the code snippet
12610      for ac_prog in cygpath
12611do
12612  # Extract the first word of "$ac_prog", so it can be a program name with args.
12613set dummy $ac_prog; ac_word=$2
12614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12615$as_echo_n "checking for $ac_word... " >&6; }
12616if ${ac_cv_path_CYGPATH+:} false; then :
12617  $as_echo_n "(cached) " >&6
12618else
12619  case $CYGPATH in
12620  [\\/]* | ?:[\\/]*)
12621  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12622  ;;
12623  *)
12624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12625for as_dir in $PATH
12626do
12627  IFS=$as_save_IFS
12628  test -z "$as_dir" && as_dir=.
12629    for ac_exec_ext in '' $ac_executable_extensions; do
12630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12631    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12633    break 2
12634  fi
12635done
12636  done
12637IFS=$as_save_IFS
12638
12639  ;;
12640esac
12641fi
12642CYGPATH=$ac_cv_path_CYGPATH
12643if test -n "$CYGPATH"; then
12644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12645$as_echo "$CYGPATH" >&6; }
12646else
12647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12648$as_echo "no" >&6; }
12649fi
12650
12651
12652  test -n "$CYGPATH" && break
12653done
12654
12655    else
12656      # If it succeeded, then it was overridden by the user. We will use it
12657      # for the tool.
12658
12659      # First remove it from the list of overridden variables, so we can test
12660      # for unknown variables in the end.
12661      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12662
12663      # Check if the provided tool contains a complete path.
12664      tool_specified="$CYGPATH"
12665      tool_basename="${tool_specified##*/}"
12666      if test "x$tool_basename" = "x$tool_specified"; then
12667        # A command without a complete path is provided, search $PATH.
12668        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12669$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12670        # Extract the first word of "$tool_basename", so it can be a program name with args.
12671set dummy $tool_basename; ac_word=$2
12672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12673$as_echo_n "checking for $ac_word... " >&6; }
12674if ${ac_cv_path_CYGPATH+:} false; then :
12675  $as_echo_n "(cached) " >&6
12676else
12677  case $CYGPATH in
12678  [\\/]* | ?:[\\/]*)
12679  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12680  ;;
12681  *)
12682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12683for as_dir in $PATH
12684do
12685  IFS=$as_save_IFS
12686  test -z "$as_dir" && as_dir=.
12687    for ac_exec_ext in '' $ac_executable_extensions; do
12688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12689    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12691    break 2
12692  fi
12693done
12694  done
12695IFS=$as_save_IFS
12696
12697  ;;
12698esac
12699fi
12700CYGPATH=$ac_cv_path_CYGPATH
12701if test -n "$CYGPATH"; then
12702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12703$as_echo "$CYGPATH" >&6; }
12704else
12705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12706$as_echo "no" >&6; }
12707fi
12708
12709
12710        if test "x$CYGPATH" = x; then
12711          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12712        fi
12713      else
12714        # Otherwise we believe it is a complete path. Use it as it is.
12715        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12716$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12717        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12718$as_echo_n "checking for CYGPATH... " >&6; }
12719        if test ! -x "$tool_specified"; then
12720          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12721$as_echo "not found" >&6; }
12722          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12723        fi
12724        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12725$as_echo "$tool_specified" >&6; }
12726      fi
12727    fi
12728  fi
12729
12730
12731
12732
12733  # Publish this variable in the help.
12734
12735
12736  if test "x$READLINK" = x; then
12737    # The variable is not set by user, try to locate tool using the code snippet
12738    for ac_prog in greadlink readlink
12739do
12740  # Extract the first word of "$ac_prog", so it can be a program name with args.
12741set dummy $ac_prog; ac_word=$2
12742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12743$as_echo_n "checking for $ac_word... " >&6; }
12744if ${ac_cv_path_READLINK+:} false; then :
12745  $as_echo_n "(cached) " >&6
12746else
12747  case $READLINK in
12748  [\\/]* | ?:[\\/]*)
12749  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12750  ;;
12751  *)
12752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12753for as_dir in $PATH
12754do
12755  IFS=$as_save_IFS
12756  test -z "$as_dir" && as_dir=.
12757    for ac_exec_ext in '' $ac_executable_extensions; do
12758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12759    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12761    break 2
12762  fi
12763done
12764  done
12765IFS=$as_save_IFS
12766
12767  ;;
12768esac
12769fi
12770READLINK=$ac_cv_path_READLINK
12771if test -n "$READLINK"; then
12772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12773$as_echo "$READLINK" >&6; }
12774else
12775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12776$as_echo "no" >&6; }
12777fi
12778
12779
12780  test -n "$READLINK" && break
12781done
12782
12783  else
12784    # The variable is set, but is it from the command line or the environment?
12785
12786    # Try to remove the string !READLINK! from our list.
12787    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12788    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12789      # If it failed, the variable was not from the command line. Ignore it,
12790      # but warn the user (except for BASH, which is always set by the calling BASH).
12791      if test "xREADLINK" != xBASH; then
12792        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12793$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12794      fi
12795      # Try to locate tool using the code snippet
12796      for ac_prog in greadlink readlink
12797do
12798  # Extract the first word of "$ac_prog", so it can be a program name with args.
12799set dummy $ac_prog; ac_word=$2
12800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12801$as_echo_n "checking for $ac_word... " >&6; }
12802if ${ac_cv_path_READLINK+:} false; then :
12803  $as_echo_n "(cached) " >&6
12804else
12805  case $READLINK in
12806  [\\/]* | ?:[\\/]*)
12807  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12808  ;;
12809  *)
12810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12811for as_dir in $PATH
12812do
12813  IFS=$as_save_IFS
12814  test -z "$as_dir" && as_dir=.
12815    for ac_exec_ext in '' $ac_executable_extensions; do
12816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12817    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12819    break 2
12820  fi
12821done
12822  done
12823IFS=$as_save_IFS
12824
12825  ;;
12826esac
12827fi
12828READLINK=$ac_cv_path_READLINK
12829if test -n "$READLINK"; then
12830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12831$as_echo "$READLINK" >&6; }
12832else
12833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12834$as_echo "no" >&6; }
12835fi
12836
12837
12838  test -n "$READLINK" && break
12839done
12840
12841    else
12842      # If it succeeded, then it was overridden by the user. We will use it
12843      # for the tool.
12844
12845      # First remove it from the list of overridden variables, so we can test
12846      # for unknown variables in the end.
12847      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12848
12849      # Check if the provided tool contains a complete path.
12850      tool_specified="$READLINK"
12851      tool_basename="${tool_specified##*/}"
12852      if test "x$tool_basename" = "x$tool_specified"; then
12853        # A command without a complete path is provided, search $PATH.
12854        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12855$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12856        # Extract the first word of "$tool_basename", so it can be a program name with args.
12857set dummy $tool_basename; ac_word=$2
12858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12859$as_echo_n "checking for $ac_word... " >&6; }
12860if ${ac_cv_path_READLINK+:} false; then :
12861  $as_echo_n "(cached) " >&6
12862else
12863  case $READLINK in
12864  [\\/]* | ?:[\\/]*)
12865  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12866  ;;
12867  *)
12868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12869for as_dir in $PATH
12870do
12871  IFS=$as_save_IFS
12872  test -z "$as_dir" && as_dir=.
12873    for ac_exec_ext in '' $ac_executable_extensions; do
12874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12875    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12877    break 2
12878  fi
12879done
12880  done
12881IFS=$as_save_IFS
12882
12883  ;;
12884esac
12885fi
12886READLINK=$ac_cv_path_READLINK
12887if test -n "$READLINK"; then
12888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12889$as_echo "$READLINK" >&6; }
12890else
12891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12892$as_echo "no" >&6; }
12893fi
12894
12895
12896        if test "x$READLINK" = x; then
12897          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12898        fi
12899      else
12900        # Otherwise we believe it is a complete path. Use it as it is.
12901        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12902$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12903        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12904$as_echo_n "checking for READLINK... " >&6; }
12905        if test ! -x "$tool_specified"; then
12906          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12907$as_echo "not found" >&6; }
12908          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12909        fi
12910        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12911$as_echo "$tool_specified" >&6; }
12912      fi
12913    fi
12914  fi
12915
12916
12917
12918
12919  # Publish this variable in the help.
12920
12921
12922  if test "x$DF" = x; then
12923    # The variable is not set by user, try to locate tool using the code snippet
12924    for ac_prog in df
12925do
12926  # Extract the first word of "$ac_prog", so it can be a program name with args.
12927set dummy $ac_prog; ac_word=$2
12928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12929$as_echo_n "checking for $ac_word... " >&6; }
12930if ${ac_cv_path_DF+:} false; then :
12931  $as_echo_n "(cached) " >&6
12932else
12933  case $DF in
12934  [\\/]* | ?:[\\/]*)
12935  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12936  ;;
12937  *)
12938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12939for as_dir in $PATH
12940do
12941  IFS=$as_save_IFS
12942  test -z "$as_dir" && as_dir=.
12943    for ac_exec_ext in '' $ac_executable_extensions; do
12944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12945    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12947    break 2
12948  fi
12949done
12950  done
12951IFS=$as_save_IFS
12952
12953  ;;
12954esac
12955fi
12956DF=$ac_cv_path_DF
12957if test -n "$DF"; then
12958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12959$as_echo "$DF" >&6; }
12960else
12961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12962$as_echo "no" >&6; }
12963fi
12964
12965
12966  test -n "$DF" && break
12967done
12968
12969  else
12970    # The variable is set, but is it from the command line or the environment?
12971
12972    # Try to remove the string !DF! from our list.
12973    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12974    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12975      # If it failed, the variable was not from the command line. Ignore it,
12976      # but warn the user (except for BASH, which is always set by the calling BASH).
12977      if test "xDF" != xBASH; then
12978        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12979$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12980      fi
12981      # Try to locate tool using the code snippet
12982      for ac_prog in df
12983do
12984  # Extract the first word of "$ac_prog", so it can be a program name with args.
12985set dummy $ac_prog; ac_word=$2
12986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12987$as_echo_n "checking for $ac_word... " >&6; }
12988if ${ac_cv_path_DF+:} false; then :
12989  $as_echo_n "(cached) " >&6
12990else
12991  case $DF in
12992  [\\/]* | ?:[\\/]*)
12993  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12994  ;;
12995  *)
12996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12997for as_dir in $PATH
12998do
12999  IFS=$as_save_IFS
13000  test -z "$as_dir" && as_dir=.
13001    for ac_exec_ext in '' $ac_executable_extensions; do
13002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13003    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13005    break 2
13006  fi
13007done
13008  done
13009IFS=$as_save_IFS
13010
13011  ;;
13012esac
13013fi
13014DF=$ac_cv_path_DF
13015if test -n "$DF"; then
13016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13017$as_echo "$DF" >&6; }
13018else
13019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13020$as_echo "no" >&6; }
13021fi
13022
13023
13024  test -n "$DF" && break
13025done
13026
13027    else
13028      # If it succeeded, then it was overridden by the user. We will use it
13029      # for the tool.
13030
13031      # First remove it from the list of overridden variables, so we can test
13032      # for unknown variables in the end.
13033      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13034
13035      # Check if the provided tool contains a complete path.
13036      tool_specified="$DF"
13037      tool_basename="${tool_specified##*/}"
13038      if test "x$tool_basename" = "x$tool_specified"; then
13039        # A command without a complete path is provided, search $PATH.
13040        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13041$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13042        # Extract the first word of "$tool_basename", so it can be a program name with args.
13043set dummy $tool_basename; ac_word=$2
13044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13045$as_echo_n "checking for $ac_word... " >&6; }
13046if ${ac_cv_path_DF+:} false; then :
13047  $as_echo_n "(cached) " >&6
13048else
13049  case $DF in
13050  [\\/]* | ?:[\\/]*)
13051  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13052  ;;
13053  *)
13054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13055for as_dir in $PATH
13056do
13057  IFS=$as_save_IFS
13058  test -z "$as_dir" && as_dir=.
13059    for ac_exec_ext in '' $ac_executable_extensions; do
13060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13061    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13063    break 2
13064  fi
13065done
13066  done
13067IFS=$as_save_IFS
13068
13069  ;;
13070esac
13071fi
13072DF=$ac_cv_path_DF
13073if test -n "$DF"; then
13074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13075$as_echo "$DF" >&6; }
13076else
13077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13078$as_echo "no" >&6; }
13079fi
13080
13081
13082        if test "x$DF" = x; then
13083          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13084        fi
13085      else
13086        # Otherwise we believe it is a complete path. Use it as it is.
13087        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13088$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13089        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13090$as_echo_n "checking for DF... " >&6; }
13091        if test ! -x "$tool_specified"; then
13092          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13093$as_echo "not found" >&6; }
13094          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13095        fi
13096        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13097$as_echo "$tool_specified" >&6; }
13098      fi
13099    fi
13100  fi
13101
13102
13103
13104
13105  # Publish this variable in the help.
13106
13107
13108  if test "x$SETFILE" = x; then
13109    # The variable is not set by user, try to locate tool using the code snippet
13110    for ac_prog in SetFile
13111do
13112  # Extract the first word of "$ac_prog", so it can be a program name with args.
13113set dummy $ac_prog; ac_word=$2
13114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13115$as_echo_n "checking for $ac_word... " >&6; }
13116if ${ac_cv_path_SETFILE+:} false; then :
13117  $as_echo_n "(cached) " >&6
13118else
13119  case $SETFILE in
13120  [\\/]* | ?:[\\/]*)
13121  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13122  ;;
13123  *)
13124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13125for as_dir in $PATH
13126do
13127  IFS=$as_save_IFS
13128  test -z "$as_dir" && as_dir=.
13129    for ac_exec_ext in '' $ac_executable_extensions; do
13130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13131    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13133    break 2
13134  fi
13135done
13136  done
13137IFS=$as_save_IFS
13138
13139  ;;
13140esac
13141fi
13142SETFILE=$ac_cv_path_SETFILE
13143if test -n "$SETFILE"; then
13144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13145$as_echo "$SETFILE" >&6; }
13146else
13147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13148$as_echo "no" >&6; }
13149fi
13150
13151
13152  test -n "$SETFILE" && break
13153done
13154
13155  else
13156    # The variable is set, but is it from the command line or the environment?
13157
13158    # Try to remove the string !SETFILE! from our list.
13159    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13160    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13161      # If it failed, the variable was not from the command line. Ignore it,
13162      # but warn the user (except for BASH, which is always set by the calling BASH).
13163      if test "xSETFILE" != xBASH; then
13164        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13165$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13166      fi
13167      # Try to locate tool using the code snippet
13168      for ac_prog in SetFile
13169do
13170  # Extract the first word of "$ac_prog", so it can be a program name with args.
13171set dummy $ac_prog; ac_word=$2
13172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13173$as_echo_n "checking for $ac_word... " >&6; }
13174if ${ac_cv_path_SETFILE+:} false; then :
13175  $as_echo_n "(cached) " >&6
13176else
13177  case $SETFILE in
13178  [\\/]* | ?:[\\/]*)
13179  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13180  ;;
13181  *)
13182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13183for as_dir in $PATH
13184do
13185  IFS=$as_save_IFS
13186  test -z "$as_dir" && as_dir=.
13187    for ac_exec_ext in '' $ac_executable_extensions; do
13188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13189    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13191    break 2
13192  fi
13193done
13194  done
13195IFS=$as_save_IFS
13196
13197  ;;
13198esac
13199fi
13200SETFILE=$ac_cv_path_SETFILE
13201if test -n "$SETFILE"; then
13202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13203$as_echo "$SETFILE" >&6; }
13204else
13205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13206$as_echo "no" >&6; }
13207fi
13208
13209
13210  test -n "$SETFILE" && break
13211done
13212
13213    else
13214      # If it succeeded, then it was overridden by the user. We will use it
13215      # for the tool.
13216
13217      # First remove it from the list of overridden variables, so we can test
13218      # for unknown variables in the end.
13219      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13220
13221      # Check if the provided tool contains a complete path.
13222      tool_specified="$SETFILE"
13223      tool_basename="${tool_specified##*/}"
13224      if test "x$tool_basename" = "x$tool_specified"; then
13225        # A command without a complete path is provided, search $PATH.
13226        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13227$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13228        # Extract the first word of "$tool_basename", so it can be a program name with args.
13229set dummy $tool_basename; ac_word=$2
13230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13231$as_echo_n "checking for $ac_word... " >&6; }
13232if ${ac_cv_path_SETFILE+:} false; then :
13233  $as_echo_n "(cached) " >&6
13234else
13235  case $SETFILE in
13236  [\\/]* | ?:[\\/]*)
13237  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13238  ;;
13239  *)
13240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13241for as_dir in $PATH
13242do
13243  IFS=$as_save_IFS
13244  test -z "$as_dir" && as_dir=.
13245    for ac_exec_ext in '' $ac_executable_extensions; do
13246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13247    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13249    break 2
13250  fi
13251done
13252  done
13253IFS=$as_save_IFS
13254
13255  ;;
13256esac
13257fi
13258SETFILE=$ac_cv_path_SETFILE
13259if test -n "$SETFILE"; then
13260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13261$as_echo "$SETFILE" >&6; }
13262else
13263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13264$as_echo "no" >&6; }
13265fi
13266
13267
13268        if test "x$SETFILE" = x; then
13269          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13270        fi
13271      else
13272        # Otherwise we believe it is a complete path. Use it as it is.
13273        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13274$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13275        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13276$as_echo_n "checking for SETFILE... " >&6; }
13277        if test ! -x "$tool_specified"; then
13278          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13279$as_echo "not found" >&6; }
13280          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13281        fi
13282        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13283$as_echo "$tool_specified" >&6; }
13284      fi
13285    fi
13286  fi
13287
13288
13289
13290
13291# Now we can determine OpenJDK build and target platforms. This is required to
13292# have early on.
13293# Make sure we can run config.sub.
13294$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13295  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13296
13297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13298$as_echo_n "checking build system type... " >&6; }
13299if ${ac_cv_build+:} false; then :
13300  $as_echo_n "(cached) " >&6
13301else
13302  ac_build_alias=$build_alias
13303test "x$ac_build_alias" = x &&
13304  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13305test "x$ac_build_alias" = x &&
13306  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13307ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13308  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13309
13310fi
13311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13312$as_echo "$ac_cv_build" >&6; }
13313case $ac_cv_build in
13314*-*-*) ;;
13315*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13316esac
13317build=$ac_cv_build
13318ac_save_IFS=$IFS; IFS='-'
13319set x $ac_cv_build
13320shift
13321build_cpu=$1
13322build_vendor=$2
13323shift; shift
13324# Remember, the first character of IFS is used to create $*,
13325# except with old shells:
13326build_os=$*
13327IFS=$ac_save_IFS
13328case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13329
13330
13331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13332$as_echo_n "checking host system type... " >&6; }
13333if ${ac_cv_host+:} false; then :
13334  $as_echo_n "(cached) " >&6
13335else
13336  if test "x$host_alias" = x; then
13337  ac_cv_host=$ac_cv_build
13338else
13339  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13340    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13341fi
13342
13343fi
13344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13345$as_echo "$ac_cv_host" >&6; }
13346case $ac_cv_host in
13347*-*-*) ;;
13348*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13349esac
13350host=$ac_cv_host
13351ac_save_IFS=$IFS; IFS='-'
13352set x $ac_cv_host
13353shift
13354host_cpu=$1
13355host_vendor=$2
13356shift; shift
13357# Remember, the first character of IFS is used to create $*,
13358# except with old shells:
13359host_os=$*
13360IFS=$ac_save_IFS
13361case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13362
13363
13364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13365$as_echo_n "checking target system type... " >&6; }
13366if ${ac_cv_target+:} false; then :
13367  $as_echo_n "(cached) " >&6
13368else
13369  if test "x$target_alias" = x; then
13370  ac_cv_target=$ac_cv_host
13371else
13372  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13373    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13374fi
13375
13376fi
13377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13378$as_echo "$ac_cv_target" >&6; }
13379case $ac_cv_target in
13380*-*-*) ;;
13381*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13382esac
13383target=$ac_cv_target
13384ac_save_IFS=$IFS; IFS='-'
13385set x $ac_cv_target
13386shift
13387target_cpu=$1
13388target_vendor=$2
13389shift; shift
13390# Remember, the first character of IFS is used to create $*,
13391# except with old shells:
13392target_os=$*
13393IFS=$ac_save_IFS
13394case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13395
13396
13397# The aliases save the names the user supplied, while $host etc.
13398# will get canonicalized.
13399test -n "$target_alias" &&
13400  test "$program_prefix$program_suffix$program_transform_name" = \
13401    NONENONEs,x,x, &&
13402  program_prefix=${target_alias}-
13403
13404  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13405  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13406  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13407  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13408  # to use the configure naming style.
13409
13410
13411
13412
13413
13414  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13415  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13416  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13417  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13418  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13419  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13420
13421
13422
13423  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13424
13425  case "$build_os" in
13426    *linux*)
13427      VAR_OS=linux
13428      VAR_OS_API=posix
13429      VAR_OS_ENV=linux
13430      ;;
13431    *solaris*)
13432      VAR_OS=solaris
13433      VAR_OS_API=posix
13434      VAR_OS_ENV=solaris
13435      ;;
13436    *darwin*)
13437      VAR_OS=macosx
13438      VAR_OS_API=posix
13439      VAR_OS_ENV=macosx
13440      ;;
13441    *bsd*)
13442      VAR_OS=bsd
13443      VAR_OS_API=posix
13444      VAR_OS_ENV=bsd
13445      ;;
13446    *cygwin*)
13447      VAR_OS=windows
13448      VAR_OS_API=winapi
13449      VAR_OS_ENV=windows.cygwin
13450      ;;
13451    *mingw*)
13452      VAR_OS=windows
13453      VAR_OS_API=winapi
13454      VAR_OS_ENV=windows.msys
13455      ;;
13456    *aix*)
13457      VAR_OS=aix
13458      VAR_OS_API=posix
13459      VAR_OS_ENV=aix
13460      ;;
13461    *)
13462      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13463      ;;
13464  esac
13465
13466
13467  # First argument is the cpu name from the trip/quad
13468  case "$build_cpu" in
13469    x86_64)
13470      VAR_CPU=x86_64
13471      VAR_CPU_ARCH=x86
13472      VAR_CPU_BITS=64
13473      VAR_CPU_ENDIAN=little
13474      ;;
13475    i?86)
13476      VAR_CPU=x86
13477      VAR_CPU_ARCH=x86
13478      VAR_CPU_BITS=32
13479      VAR_CPU_ENDIAN=little
13480      ;;
13481    arm*)
13482      VAR_CPU=arm
13483      VAR_CPU_ARCH=arm
13484      VAR_CPU_BITS=32
13485      VAR_CPU_ENDIAN=little
13486      ;;
13487    powerpc)
13488      VAR_CPU=ppc
13489      VAR_CPU_ARCH=ppc
13490      VAR_CPU_BITS=32
13491      VAR_CPU_ENDIAN=big
13492      ;;
13493    powerpc64)
13494      VAR_CPU=ppc64
13495      VAR_CPU_ARCH=ppc
13496      VAR_CPU_BITS=64
13497      VAR_CPU_ENDIAN=big
13498      ;;
13499    s390)
13500      VAR_CPU=s390
13501      VAR_CPU_ARCH=s390
13502      VAR_CPU_BITS=32
13503      VAR_CPU_ENDIAN=big
13504      ;;
13505    s390x)
13506      VAR_CPU=s390x
13507      VAR_CPU_ARCH=s390
13508      VAR_CPU_BITS=64
13509      VAR_CPU_ENDIAN=big
13510      ;;
13511    sparc)
13512      VAR_CPU=sparc
13513      VAR_CPU_ARCH=sparc
13514      VAR_CPU_BITS=32
13515      VAR_CPU_ENDIAN=big
13516      ;;
13517    sparcv9)
13518      VAR_CPU=sparcv9
13519      VAR_CPU_ARCH=sparc
13520      VAR_CPU_BITS=64
13521      VAR_CPU_ENDIAN=big
13522      ;;
13523    *)
13524      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13525      ;;
13526  esac
13527
13528  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13529  OPENJDK_BUILD_OS="$VAR_OS"
13530  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13531  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13532  OPENJDK_BUILD_CPU="$VAR_CPU"
13533  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13534  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13535  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13536
13537
13538
13539
13540
13541
13542
13543  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13544$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13546$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13547
13548  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13549
13550  case "$host_os" in
13551    *linux*)
13552      VAR_OS=linux
13553      VAR_OS_API=posix
13554      VAR_OS_ENV=linux
13555      ;;
13556    *solaris*)
13557      VAR_OS=solaris
13558      VAR_OS_API=posix
13559      VAR_OS_ENV=solaris
13560      ;;
13561    *darwin*)
13562      VAR_OS=macosx
13563      VAR_OS_API=posix
13564      VAR_OS_ENV=macosx
13565      ;;
13566    *bsd*)
13567      VAR_OS=bsd
13568      VAR_OS_API=posix
13569      VAR_OS_ENV=bsd
13570      ;;
13571    *cygwin*)
13572      VAR_OS=windows
13573      VAR_OS_API=winapi
13574      VAR_OS_ENV=windows.cygwin
13575      ;;
13576    *mingw*)
13577      VAR_OS=windows
13578      VAR_OS_API=winapi
13579      VAR_OS_ENV=windows.msys
13580      ;;
13581    *aix*)
13582      VAR_OS=aix
13583      VAR_OS_API=posix
13584      VAR_OS_ENV=aix
13585      ;;
13586    *)
13587      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13588      ;;
13589  esac
13590
13591
13592  # First argument is the cpu name from the trip/quad
13593  case "$host_cpu" in
13594    x86_64)
13595      VAR_CPU=x86_64
13596      VAR_CPU_ARCH=x86
13597      VAR_CPU_BITS=64
13598      VAR_CPU_ENDIAN=little
13599      ;;
13600    i?86)
13601      VAR_CPU=x86
13602      VAR_CPU_ARCH=x86
13603      VAR_CPU_BITS=32
13604      VAR_CPU_ENDIAN=little
13605      ;;
13606    arm*)
13607      VAR_CPU=arm
13608      VAR_CPU_ARCH=arm
13609      VAR_CPU_BITS=32
13610      VAR_CPU_ENDIAN=little
13611      ;;
13612    powerpc)
13613      VAR_CPU=ppc
13614      VAR_CPU_ARCH=ppc
13615      VAR_CPU_BITS=32
13616      VAR_CPU_ENDIAN=big
13617      ;;
13618    powerpc64)
13619      VAR_CPU=ppc64
13620      VAR_CPU_ARCH=ppc
13621      VAR_CPU_BITS=64
13622      VAR_CPU_ENDIAN=big
13623      ;;
13624    s390)
13625      VAR_CPU=s390
13626      VAR_CPU_ARCH=s390
13627      VAR_CPU_BITS=32
13628      VAR_CPU_ENDIAN=big
13629      ;;
13630    s390x)
13631      VAR_CPU=s390x
13632      VAR_CPU_ARCH=s390
13633      VAR_CPU_BITS=64
13634      VAR_CPU_ENDIAN=big
13635      ;;
13636    sparc)
13637      VAR_CPU=sparc
13638      VAR_CPU_ARCH=sparc
13639      VAR_CPU_BITS=32
13640      VAR_CPU_ENDIAN=big
13641      ;;
13642    sparcv9)
13643      VAR_CPU=sparcv9
13644      VAR_CPU_ARCH=sparc
13645      VAR_CPU_BITS=64
13646      VAR_CPU_ENDIAN=big
13647      ;;
13648    *)
13649      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13650      ;;
13651  esac
13652
13653  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13654  OPENJDK_TARGET_OS="$VAR_OS"
13655  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13656  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13657  OPENJDK_TARGET_CPU="$VAR_CPU"
13658  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13659  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13660  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13661
13662
13663
13664
13665
13666
13667
13668  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13669$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13671$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13672
13673
13674
13675# Check whether --with-target-bits was given.
13676if test "${with_target_bits+set}" = set; then :
13677  withval=$with_target_bits;
13678fi
13679
13680
13681  # We have three types of compiles:
13682  # native  == normal compilation, target system == build system
13683  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13684  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13685  #
13686  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13687    # We're doing a proper cross-compilation
13688    COMPILE_TYPE="cross"
13689  else
13690    COMPILE_TYPE="native"
13691  fi
13692
13693  if test "x$with_target_bits" != x; then
13694    if test "x$COMPILE_TYPE" = "xcross"; then
13695      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13696    fi
13697
13698    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13699      # A reduced build is requested
13700      COMPILE_TYPE="reduced"
13701      OPENJDK_TARGET_CPU_BITS=32
13702      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13703        OPENJDK_TARGET_CPU=x86
13704      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13705        OPENJDK_TARGET_CPU=sparc
13706      else
13707        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13708      fi
13709    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13710      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
13711    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13712      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13713$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13714    else
13715      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13716    fi
13717  fi
13718
13719
13720  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13721$as_echo_n "checking compilation type... " >&6; }
13722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13723$as_echo "$COMPILE_TYPE" >&6; }
13724
13725
13726  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13727    REQUIRED_OS_NAME=SunOS
13728    REQUIRED_OS_VERSION=5.10
13729  fi
13730  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13731    REQUIRED_OS_NAME=Linux
13732    REQUIRED_OS_VERSION=2.6
13733  fi
13734  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13735    REQUIRED_OS_NAME=Windows
13736    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13737      REQUIRED_OS_VERSION=5.2
13738    else
13739      REQUIRED_OS_VERSION=5.1
13740    fi
13741  fi
13742  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13743    REQUIRED_OS_NAME=Darwin
13744    REQUIRED_OS_VERSION=11.2
13745  fi
13746
13747
13748
13749
13750
13751  # Also store the legacy naming of the cpu.
13752  # Ie i586 and amd64 instead of x86 and x86_64
13753  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13754  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13755    OPENJDK_TARGET_CPU_LEGACY="i586"
13756  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13757    # On all platforms except MacOSX replace x86_64 with amd64.
13758    OPENJDK_TARGET_CPU_LEGACY="amd64"
13759  fi
13760
13761
13762  # And the second legacy naming of the cpu.
13763  # Ie i386 and amd64 instead of x86 and x86_64.
13764  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13765  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13766    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13767  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13768    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13769  fi
13770
13771
13772  # This is the name of the cpu (but using i386 and amd64 instead of
13773  # x86 and x86_64, respectively), preceeded by a /, to be used when
13774  # locating libraries. On macosx, it's empty, though.
13775  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13776  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13777    OPENJDK_TARGET_CPU_LIBDIR=""
13778  fi
13779
13780
13781  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13782  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13783  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13784  OPENJDK_TARGET_CPU_ISADIR=""
13785  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13786    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13787      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13788    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13789      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13790    fi
13791  fi
13792
13793
13794  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13795  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13796  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13797    # On linux only, we replace x86 with i386.
13798    OPENJDK_TARGET_CPU_OSARCH="i386"
13799  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13800    # On all platforms except macosx, we replace x86_64 with amd64.
13801    OPENJDK_TARGET_CPU_OSARCH="amd64"
13802  fi
13803
13804
13805  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13806  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13807    OPENJDK_TARGET_CPU_JLI="i386"
13808  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13809    # On all platforms except macosx, we replace x86_64 with amd64.
13810    OPENJDK_TARGET_CPU_JLI="amd64"
13811  fi
13812  # Now setup the -D flags for building libjli.
13813  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13814  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13815    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13816      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13817    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13818      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13819    fi
13820  fi
13821
13822
13823  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13824  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13825    OPENJDK_TARGET_OS_API_DIR="solaris"
13826  fi
13827  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13828    OPENJDK_TARGET_OS_API_DIR="windows"
13829  fi
13830
13831
13832  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13833      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13834  else
13835      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13836  fi
13837
13838
13839  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13840    A_LP64="LP64:="
13841    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13842    # unpack200.exe
13843    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13844      ADD_LP64="-D_LP64=1"
13845    fi
13846  fi
13847  LP64=$A_LP64
13848
13849
13850  if test "x$COMPILE_TYPE" = "xcross"; then
13851    # FIXME: ... or should this include reduced builds..?
13852    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13853  else
13854    DEFINE_CROSS_COMPILE_ARCH=""
13855  fi
13856
13857
13858  # ZERO_ARCHDEF is used to enable architecture-specific code
13859  case "${OPENJDK_TARGET_CPU}" in
13860    ppc*)    ZERO_ARCHDEF=PPC   ;;
13861    s390*)   ZERO_ARCHDEF=S390  ;;
13862    sparc*)  ZERO_ARCHDEF=SPARC ;;
13863    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13864    x86)     ZERO_ARCHDEF=IA32  ;;
13865    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13866  esac
13867
13868
13869
13870
13871# Continue setting up basic stuff. Most remaining code require fundamental tools.
13872
13873  # Save the current directory this script was started from
13874  CURDIR="$PWD"
13875
13876  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13877    PATH_SEP=";"
13878
13879  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13880  if test $SRC_ROOT_LENGTH -gt 100; then
13881    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13882  fi
13883
13884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13885    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13886$as_echo_n "checking cygwin release... " >&6; }
13887    CYGWIN_VERSION=`$UNAME -r`
13888    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13889$as_echo "$CYGWIN_VERSION" >&6; }
13890    WINDOWS_ENV_VENDOR='cygwin'
13891    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13892
13893    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
13894    if test "x$CYGWIN_VERSION_OK" = x; then
13895      { $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
13896$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;}
13897      as_fn_error $? "Cannot continue" "$LINENO" 5
13898    fi
13899    if test "x$CYGPATH" = x; then
13900      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13901    fi
13902    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13903$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13904    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13905    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13906    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13907    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13908    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13909$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13910    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13911    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13912    if test "x$test_cygdrive_prefix" = x; then
13913      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13914    fi
13915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13916    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13917$as_echo_n "checking msys release... " >&6; }
13918    MSYS_VERSION=`$UNAME -r`
13919    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13920$as_echo "$MSYS_VERSION" >&6; }
13921
13922    WINDOWS_ENV_VENDOR='msys'
13923    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13924
13925    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13926$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13927    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13928    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13929
13930  windows_path="$MSYS_ROOT_PATH"
13931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13932    unix_path=`$CYGPATH -u "$windows_path"`
13933    MSYS_ROOT_PATH="$unix_path"
13934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13936    MSYS_ROOT_PATH="$unix_path"
13937  fi
13938
13939    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13940$as_echo "$MSYS_ROOT_PATH" >&6; }
13941    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13942  else
13943    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13944  fi
13945
13946  # Test if windows or unix (cygwin/msys) find is first in path.
13947  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13948$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13949  FIND_BINARY_OUTPUT=`find --version 2>&1`
13950  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13951    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13952$as_echo "unix style" >&6; }
13953  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
13954    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
13955$as_echo "Windows" >&6; }
13956    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
13957$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
13958    { $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
13959$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
13960    as_fn_error $? "Cannot continue" "$LINENO" 5
13961  else
13962    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
13963$as_echo "unknown" >&6; }
13964    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
13965$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
13966  fi
13967
13968  else
13969    PATH_SEP=":"
13970  fi
13971
13972
13973  # We get the top-level directory from the supporting wrappers.
13974  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
13975$as_echo_n "checking for top-level directory... " >&6; }
13976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
13977$as_echo "$TOPDIR" >&6; }
13978
13979
13980  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
13981
13982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13983
13984  # Input might be given as Windows format, start by converting to
13985  # unix format.
13986  path="$CURDIR"
13987  new_path=`$CYGPATH -u "$path"`
13988
13989  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13990  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13991  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13992  # "foo.exe" is OK but "foo" is an error.
13993  #
13994  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13995  # It is also a way to make sure we got the proper file name for the real test later on.
13996  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13997  if test "x$test_shortpath" = x; then
13998    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
13999$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14000    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14001  fi
14002
14003  # Call helper function which possibly converts this using DOS-style short mode.
14004  # If so, the updated path is stored in $new_path.
14005
14006  input_path="$new_path"
14007  # Check if we need to convert this using DOS-style short mode. If the path
14008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14009  # take no chances and rewrite it.
14010  # Note: m4 eats our [], so we need to use [ and ] instead.
14011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14012  if test "x$has_forbidden_chars" != x; then
14013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14014    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14015    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14016    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14017      # Going to short mode and back again did indeed matter. Since short mode is
14018      # case insensitive, let's make it lowercase to improve readability.
14019      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14020      # Now convert it back to Unix-stile (cygpath)
14021      input_path=`$CYGPATH -u "$shortmode_path"`
14022      new_path="$input_path"
14023    fi
14024  fi
14025
14026  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14027  if test "x$test_cygdrive_prefix" = x; then
14028    # As a simple fix, exclude /usr/bin since it's not a real path.
14029    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14030      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14031      # a path prefixed by /cygdrive for fixpath to work.
14032      new_path="$CYGWIN_ROOT_PATH$input_path"
14033    fi
14034  fi
14035
14036
14037  if test "x$path" != "x$new_path"; then
14038    CURDIR="$new_path"
14039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14040$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14041  fi
14042
14043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14044
14045  path="$CURDIR"
14046  has_colon=`$ECHO $path | $GREP ^.:`
14047  new_path="$path"
14048  if test "x$has_colon" = x; then
14049    # Not in mixed or Windows style, start by that.
14050    new_path=`cmd //c echo $path`
14051  fi
14052
14053
14054  input_path="$new_path"
14055  # Check if we need to convert this using DOS-style short mode. If the path
14056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14057  # take no chances and rewrite it.
14058  # Note: m4 eats our [], so we need to use [ and ] instead.
14059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14060  if test "x$has_forbidden_chars" != x; then
14061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14062    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14063  fi
14064
14065
14066  windows_path="$new_path"
14067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14068    unix_path=`$CYGPATH -u "$windows_path"`
14069    new_path="$unix_path"
14070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14072    new_path="$unix_path"
14073  fi
14074
14075  if test "x$path" != "x$new_path"; then
14076    CURDIR="$new_path"
14077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14078$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14079  fi
14080
14081  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14082  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14083
14084  else
14085    # We're on a posix platform. Hooray! :)
14086    path="$CURDIR"
14087    has_space=`$ECHO "$path" | $GREP " "`
14088    if test "x$has_space" != x; then
14089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14090$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14091      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14092    fi
14093
14094    # Use eval to expand a potential ~
14095    eval path="$path"
14096    if test ! -f "$path" && test ! -d "$path"; then
14097      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14098    fi
14099
14100    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14101  fi
14102
14103
14104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14105
14106  # Input might be given as Windows format, start by converting to
14107  # unix format.
14108  path="$TOPDIR"
14109  new_path=`$CYGPATH -u "$path"`
14110
14111  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14112  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14113  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14114  # "foo.exe" is OK but "foo" is an error.
14115  #
14116  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14117  # It is also a way to make sure we got the proper file name for the real test later on.
14118  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14119  if test "x$test_shortpath" = x; then
14120    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14121$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14122    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14123  fi
14124
14125  # Call helper function which possibly converts this using DOS-style short mode.
14126  # If so, the updated path is stored in $new_path.
14127
14128  input_path="$new_path"
14129  # Check if we need to convert this using DOS-style short mode. If the path
14130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14131  # take no chances and rewrite it.
14132  # Note: m4 eats our [], so we need to use [ and ] instead.
14133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14134  if test "x$has_forbidden_chars" != x; then
14135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14136    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14137    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14138    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14139      # Going to short mode and back again did indeed matter. Since short mode is
14140      # case insensitive, let's make it lowercase to improve readability.
14141      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14142      # Now convert it back to Unix-stile (cygpath)
14143      input_path=`$CYGPATH -u "$shortmode_path"`
14144      new_path="$input_path"
14145    fi
14146  fi
14147
14148  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14149  if test "x$test_cygdrive_prefix" = x; then
14150    # As a simple fix, exclude /usr/bin since it's not a real path.
14151    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14152      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14153      # a path prefixed by /cygdrive for fixpath to work.
14154      new_path="$CYGWIN_ROOT_PATH$input_path"
14155    fi
14156  fi
14157
14158
14159  if test "x$path" != "x$new_path"; then
14160    TOPDIR="$new_path"
14161    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14162$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14163  fi
14164
14165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14166
14167  path="$TOPDIR"
14168  has_colon=`$ECHO $path | $GREP ^.:`
14169  new_path="$path"
14170  if test "x$has_colon" = x; then
14171    # Not in mixed or Windows style, start by that.
14172    new_path=`cmd //c echo $path`
14173  fi
14174
14175
14176  input_path="$new_path"
14177  # Check if we need to convert this using DOS-style short mode. If the path
14178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14179  # take no chances and rewrite it.
14180  # Note: m4 eats our [], so we need to use [ and ] instead.
14181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14182  if test "x$has_forbidden_chars" != x; then
14183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14184    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14185  fi
14186
14187
14188  windows_path="$new_path"
14189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14190    unix_path=`$CYGPATH -u "$windows_path"`
14191    new_path="$unix_path"
14192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14194    new_path="$unix_path"
14195  fi
14196
14197  if test "x$path" != "x$new_path"; then
14198    TOPDIR="$new_path"
14199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14200$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14201  fi
14202
14203  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14204  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14205
14206  else
14207    # We're on a posix platform. Hooray! :)
14208    path="$TOPDIR"
14209    has_space=`$ECHO "$path" | $GREP " "`
14210    if test "x$has_space" != x; then
14211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14212$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14213      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14214    fi
14215
14216    # Use eval to expand a potential ~
14217    eval path="$path"
14218    if test ! -f "$path" && test ! -d "$path"; then
14219      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14220    fi
14221
14222    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14223  fi
14224
14225  # SRC_ROOT is a traditional alias for TOPDIR.
14226  SRC_ROOT=$TOPDIR
14227
14228  # Locate the directory of this script.
14229  AUTOCONF_DIR=$TOPDIR/common/autoconf
14230
14231  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
14232    # Add extra search paths on solaris for utilities like ar and as etc...
14233    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
14234  fi
14235
14236  # You can force the sys-root if the sys-root encoded into the cross compiler tools
14237  # is not correct.
14238
14239# Check whether --with-sys-root was given.
14240if test "${with_sys_root+set}" = set; then :
14241  withval=$with_sys_root;
14242fi
14243
14244
14245  if test "x$with_sys_root" != x; then
14246    SYS_ROOT=$with_sys_root
14247  else
14248    SYS_ROOT=/
14249  fi
14250
14251
14252
14253# Check whether --with-tools-dir was given.
14254if test "${with_tools_dir+set}" = set; then :
14255  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
14256
14257fi
14258
14259
14260
14261# Check whether --with-devkit was given.
14262if test "${with_devkit+set}" = set; then :
14263  withval=$with_devkit;
14264        if test "x$with_sys_root" != x; then
14265          as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
14266        fi
14267
14268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14269
14270  # Input might be given as Windows format, start by converting to
14271  # unix format.
14272  path="$with_devkit"
14273  new_path=`$CYGPATH -u "$path"`
14274
14275  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14276  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14277  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14278  # "foo.exe" is OK but "foo" is an error.
14279  #
14280  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14281  # It is also a way to make sure we got the proper file name for the real test later on.
14282  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14283  if test "x$test_shortpath" = x; then
14284    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14285$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14286    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14287  fi
14288
14289  # Call helper function which possibly converts this using DOS-style short mode.
14290  # If so, the updated path is stored in $new_path.
14291
14292  input_path="$new_path"
14293  # Check if we need to convert this using DOS-style short mode. If the path
14294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14295  # take no chances and rewrite it.
14296  # Note: m4 eats our [], so we need to use [ and ] instead.
14297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14298  if test "x$has_forbidden_chars" != x; then
14299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14303      # Going to short mode and back again did indeed matter. Since short mode is
14304      # case insensitive, let's make it lowercase to improve readability.
14305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14306      # Now convert it back to Unix-stile (cygpath)
14307      input_path=`$CYGPATH -u "$shortmode_path"`
14308      new_path="$input_path"
14309    fi
14310  fi
14311
14312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14313  if test "x$test_cygdrive_prefix" = x; then
14314    # As a simple fix, exclude /usr/bin since it's not a real path.
14315    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14317      # a path prefixed by /cygdrive for fixpath to work.
14318      new_path="$CYGWIN_ROOT_PATH$input_path"
14319    fi
14320  fi
14321
14322
14323  if test "x$path" != "x$new_path"; then
14324    with_devkit="$new_path"
14325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14326$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14327  fi
14328
14329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14330
14331  path="$with_devkit"
14332  has_colon=`$ECHO $path | $GREP ^.:`
14333  new_path="$path"
14334  if test "x$has_colon" = x; then
14335    # Not in mixed or Windows style, start by that.
14336    new_path=`cmd //c echo $path`
14337  fi
14338
14339
14340  input_path="$new_path"
14341  # Check if we need to convert this using DOS-style short mode. If the path
14342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14343  # take no chances and rewrite it.
14344  # Note: m4 eats our [], so we need to use [ and ] instead.
14345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14346  if test "x$has_forbidden_chars" != x; then
14347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14348    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14349  fi
14350
14351
14352  windows_path="$new_path"
14353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14354    unix_path=`$CYGPATH -u "$windows_path"`
14355    new_path="$unix_path"
14356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14358    new_path="$unix_path"
14359  fi
14360
14361  if test "x$path" != "x$new_path"; then
14362    with_devkit="$new_path"
14363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14364$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14365  fi
14366
14367  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14368  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14369
14370  else
14371    # We're on a posix platform. Hooray! :)
14372    path="$with_devkit"
14373    has_space=`$ECHO "$path" | $GREP " "`
14374    if test "x$has_space" != x; then
14375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14376$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14377      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14378    fi
14379
14380    # Use eval to expand a potential ~
14381    eval path="$path"
14382    if test ! -f "$path" && test ! -d "$path"; then
14383      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14384    fi
14385
14386    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14387  fi
14388
14389
14390  if test "x$TOOLS_DIR" = x; then
14391    TOOLS_DIR="$with_devkit/bin"
14392  else
14393    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
14394  fi
14395
14396        if test -d "$with_devkit/$host_alias/libc"; then
14397          SYS_ROOT=$with_devkit/$host_alias/libc
14398        elif test -d "$with_devkit/$host/sys-root"; then
14399          SYS_ROOT=$with_devkit/$host/sys-root
14400        fi
14401
14402fi
14403
14404
14405
14406  # Setup default logging of stdout and stderr to build.log in the output root.
14407  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14408  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14409  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14410
14411
14412
14413
14414
14415# Check if it's a pure open build or if custom sources are to be used.
14416
14417  # Check whether --enable-openjdk-only was given.
14418if test "${enable_openjdk_only+set}" = set; then :
14419  enableval=$enable_openjdk_only;
14420else
14421  enable_openjdk_only="no"
14422fi
14423
14424
14425  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14426$as_echo_n "checking for presence of closed sources... " >&6; }
14427  if test -d "$SRC_ROOT/jdk/src/closed"; then
14428    CLOSED_SOURCE_PRESENT=yes
14429  else
14430    CLOSED_SOURCE_PRESENT=no
14431  fi
14432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14433$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14434
14435  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14436$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14437  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14439$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14440
14441  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14442    OPENJDK=true
14443    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14444      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14445$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14446    fi
14447  else
14448    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14449      OPENJDK=true
14450    else
14451      OPENJDK=false
14452    fi
14453  fi
14454
14455  if test "x$OPENJDK" = "xtrue"; then
14456    SET_OPENJDK="OPENJDK=true"
14457  fi
14458
14459
14460
14461  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14462  # the IncludeCustomExtension macro.
14463
14464
14465# Check whether --with-custom-make-dir was given.
14466if test "${with_custom_make_dir+set}" = set; then :
14467  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
14468$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14469fi
14470
14471
14472
14473
14474# These are needed to be able to create a configuration name (and thus the output directory)
14475
14476  ###############################################################################
14477  #
14478  # Check which variant of the JDK that we want to build.
14479  # Currently we have:
14480  #    normal:   standard edition
14481  # but the custom make system may add other variants
14482  #
14483  # Effectively the JDK variant gives a name to a specific set of
14484  # modules to compile into the JDK. In the future, these modules
14485  # might even be Jigsaw modules.
14486  #
14487  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14488$as_echo_n "checking which variant of the JDK to build... " >&6; }
14489
14490# Check whether --with-jdk-variant was given.
14491if test "${with_jdk_variant+set}" = set; then :
14492  withval=$with_jdk_variant;
14493fi
14494
14495
14496  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14497    JDK_VARIANT="normal"
14498  else
14499    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14500  fi
14501
14502
14503
14504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14505$as_echo "$JDK_VARIANT" >&6; }
14506
14507
14508###############################################################################
14509#
14510# Check which interpreter of the JVM we want to build.
14511# Currently we have:
14512#    template: Template interpreter (the default)
14513#    cpp     : C++ interpreter
14514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14515$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14516
14517# Check whether --with-jvm-interpreter was given.
14518if test "${with_jvm_interpreter+set}" = set; then :
14519  withval=$with_jvm_interpreter;
14520fi
14521
14522
14523if test "x$with_jvm_interpreter" = x; then
14524     with_jvm_interpreter="template"
14525fi
14526
14527JVM_INTERPRETER="$with_jvm_interpreter"
14528
14529if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14530   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14531fi
14532
14533
14534
14535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14536$as_echo "$with_jvm_interpreter" >&6; }
14537
14538
14539
14540  ###############################################################################
14541  #
14542  # Check which variants of the JVM that we want to build.
14543  # Currently we have:
14544  #    server: normal interpreter and a tiered C1/C2 compiler
14545  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14546  #    minimal1: reduced form of client with optional VM services and features stripped out
14547  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14548  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14549  #    zero: no machine code interpreter, no compiler
14550  #    zeroshark: zero interpreter and shark/llvm compiler backend
14551#    core: interpreter only, no compiler (only works on some platforms)
14552  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14553$as_echo_n "checking which variants of the JVM to build... " >&6; }
14554
14555# Check whether --with-jvm-variants was given.
14556if test "${with_jvm_variants+set}" = set; then :
14557  withval=$with_jvm_variants;
14558fi
14559
14560
14561  if test "x$with_jvm_variants" = x; then
14562    with_jvm_variants="server"
14563  fi
14564
14565  JVM_VARIANTS=",$with_jvm_variants,"
14566  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,//'`
14567
14568  if test "x$TEST_VARIANTS" != "x,"; then
14569     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14570  fi
14571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14572$as_echo "$with_jvm_variants" >&6; }
14573
14574  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14575  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14576  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14577  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14578  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14579  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14580  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14581
14582  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14583    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14584      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14585    fi
14586  fi
14587  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14588    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14589      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14590    fi
14591  fi
14592  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14593    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14594      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14595    fi
14596  fi
14597
14598  # Replace the commas with AND for use in the build directory name.
14599  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14600  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/'`
14601  if test "x$COUNT_VARIANTS" != "x,1"; then
14602    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14603  else
14604    BUILDING_MULTIPLE_JVM_VARIANTS=no
14605  fi
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616  INCLUDE_SA=true
14617  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14618    INCLUDE_SA=false
14619  fi
14620  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14621    INCLUDE_SA=false
14622  fi
14623  if test "x$VAR_CPU" = xppc64 ; then
14624    INCLUDE_SA=false
14625  fi
14626
14627
14628  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14629    MACOSX_UNIVERSAL="true"
14630  fi
14631
14632
14633
14634
14635  ###############################################################################
14636  #
14637  # Set the debug level
14638  #    release: no debug information, all optimizations, no asserts.
14639  #    fastdebug: debug information (-g), all optimizations, all asserts
14640  #    slowdebug: debug information (-g), no optimizations, all asserts
14641  #
14642  DEBUG_LEVEL="release"
14643  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14644$as_echo_n "checking which debug level to use... " >&6; }
14645  # Check whether --enable-debug was given.
14646if test "${enable_debug+set}" = set; then :
14647  enableval=$enable_debug;
14648        ENABLE_DEBUG="${enableval}"
14649        DEBUG_LEVEL="fastdebug"
14650
14651else
14652  ENABLE_DEBUG="no"
14653fi
14654
14655
14656
14657# Check whether --with-debug-level was given.
14658if test "${with_debug_level+set}" = set; then :
14659  withval=$with_debug_level;
14660        DEBUG_LEVEL="${withval}"
14661        if test "x$ENABLE_DEBUG" = xyes; then
14662          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14663        fi
14664
14665fi
14666
14667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14668$as_echo "$DEBUG_LEVEL" >&6; }
14669
14670  if test "x$DEBUG_LEVEL" != xrelease && \
14671      test "x$DEBUG_LEVEL" != xfastdebug && \
14672      test "x$DEBUG_LEVEL" != xslowdebug; then
14673    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14674  fi
14675
14676
14677  ###############################################################################
14678  #
14679  # Setup legacy vars/targets and new vars to deal with different debug levels.
14680  #
14681
14682  case $DEBUG_LEVEL in
14683    release )
14684      VARIANT="OPT"
14685      FASTDEBUG="false"
14686      DEBUG_CLASSFILES="false"
14687      BUILD_VARIANT_RELEASE=""
14688      HOTSPOT_DEBUG_LEVEL="product"
14689      HOTSPOT_EXPORT="product"
14690      ;;
14691    fastdebug )
14692      VARIANT="DBG"
14693      FASTDEBUG="true"
14694      DEBUG_CLASSFILES="true"
14695      BUILD_VARIANT_RELEASE="-fastdebug"
14696      HOTSPOT_DEBUG_LEVEL="fastdebug"
14697      HOTSPOT_EXPORT="fastdebug"
14698      ;;
14699    slowdebug )
14700      VARIANT="DBG"
14701      FASTDEBUG="false"
14702      DEBUG_CLASSFILES="true"
14703      BUILD_VARIANT_RELEASE="-debug"
14704      HOTSPOT_DEBUG_LEVEL="jvmg"
14705      HOTSPOT_EXPORT="debug"
14706      ;;
14707  esac
14708
14709  #####
14710  # Generate the legacy makefile targets for hotspot.
14711  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14712  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14713  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14714  # But until then ...
14715  HOTSPOT_TARGET=""
14716
14717  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14718    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14719  fi
14720
14721  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14722    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14723  fi
14724
14725  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14726    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14727  fi
14728
14729  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14730    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14731  fi
14732
14733  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14734    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14735  fi
14736
14737  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14738    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14739  fi
14740
14741  if test "x$JVM_VARIANT_CORE" = xtrue; then
14742    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14743  fi
14744
14745  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14746
14747  # On Macosx universal binaries are produced, but they only contain
14748  # 64 bit intel. This invalidates control of which jvms are built
14749  # from configure, but only server is valid anyway. Fix this
14750  # when hotspot makefiles are rewritten.
14751  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14752    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14753  fi
14754
14755  #####
14756
14757
14758
14759
14760
14761
14762
14763
14764# With basic setup done, call the custom early hook.
14765
14766
14767# To properly create a configuration name, we need to have the OpenJDK target
14768# and options (variants and debug level) parsed.
14769
14770
14771
14772# Check whether --with-conf-name was given.
14773if test "${with_conf_name+set}" = set; then :
14774  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
14775fi
14776
14777
14778  # Test from where we are running configure, in or outside of src root.
14779  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
14780$as_echo_n "checking where to store configuration... " >&6; }
14781  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
14782      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
14783      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
14784    # We are running configure from the src root.
14785    # Create a default ./build/target-variant-debuglevel output root.
14786    if test "x${CONF_NAME}" = x; then
14787      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
14788$as_echo "in default location" >&6; }
14789      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
14790    else
14791      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
14792$as_echo "in build directory with custom name" >&6; }
14793    fi
14794    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
14795    $MKDIR -p "$OUTPUT_ROOT"
14796    if test ! -d "$OUTPUT_ROOT"; then
14797      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
14798    fi
14799  else
14800    # We are running configure from outside of the src dir.
14801    # Then use the current directory as output dir!
14802    # If configuration is situated in normal build directory, just use the build
14803    # directory name as configuration name, otherwise use the complete path.
14804    if test "x${CONF_NAME}" = x; then
14805      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
14806    fi
14807    OUTPUT_ROOT="$CURDIR"
14808    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
14809$as_echo "in current directory" >&6; }
14810
14811    # WARNING: This might be a bad thing to do. You need to be sure you want to
14812    # have a configuration in this directory. Do some sanity checks!
14813
14814    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
14815      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
14816      # other files
14817      files_present=`$LS $OUTPUT_ROOT`
14818      # Configure has already touched config.log and confdefs.h in the current dir when this check
14819      # is performed.
14820      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
14821      | $TR -d '\n'`
14822      if test "x$filtered_files" != x; then
14823        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
14824$as_echo "$as_me: Current directory is $CURDIR." >&6;}
14825        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
14826$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
14827        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
14828$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
14829        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
14830$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
14831        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
14832$as_echo "$as_me: seriously mess up just about everything." >&6;}
14833        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
14834$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
14835        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
14836$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
14837        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
14838      fi
14839    fi
14840  fi
14841  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
14842$as_echo_n "checking what configuration name to use... " >&6; }
14843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
14844$as_echo "$CONF_NAME" >&6; }
14845
14846
14847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14848
14849  # Input might be given as Windows format, start by converting to
14850  # unix format.
14851  path="$OUTPUT_ROOT"
14852  new_path=`$CYGPATH -u "$path"`
14853
14854  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14855  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14856  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14857  # "foo.exe" is OK but "foo" is an error.
14858  #
14859  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14860  # It is also a way to make sure we got the proper file name for the real test later on.
14861  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14862  if test "x$test_shortpath" = x; then
14863    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14864$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14865    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
14866  fi
14867
14868  # Call helper function which possibly converts this using DOS-style short mode.
14869  # If so, the updated path is stored in $new_path.
14870
14871  input_path="$new_path"
14872  # Check if we need to convert this using DOS-style short mode. If the path
14873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14874  # take no chances and rewrite it.
14875  # Note: m4 eats our [], so we need to use [ and ] instead.
14876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14877  if test "x$has_forbidden_chars" != x; then
14878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14882      # Going to short mode and back again did indeed matter. Since short mode is
14883      # case insensitive, let's make it lowercase to improve readability.
14884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14885      # Now convert it back to Unix-stile (cygpath)
14886      input_path=`$CYGPATH -u "$shortmode_path"`
14887      new_path="$input_path"
14888    fi
14889  fi
14890
14891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14892  if test "x$test_cygdrive_prefix" = x; then
14893    # As a simple fix, exclude /usr/bin since it's not a real path.
14894    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14896      # a path prefixed by /cygdrive for fixpath to work.
14897      new_path="$CYGWIN_ROOT_PATH$input_path"
14898    fi
14899  fi
14900
14901
14902  if test "x$path" != "x$new_path"; then
14903    OUTPUT_ROOT="$new_path"
14904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14905$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14906  fi
14907
14908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14909
14910  path="$OUTPUT_ROOT"
14911  has_colon=`$ECHO $path | $GREP ^.:`
14912  new_path="$path"
14913  if test "x$has_colon" = x; then
14914    # Not in mixed or Windows style, start by that.
14915    new_path=`cmd //c echo $path`
14916  fi
14917
14918
14919  input_path="$new_path"
14920  # Check if we need to convert this using DOS-style short mode. If the path
14921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14922  # take no chances and rewrite it.
14923  # Note: m4 eats our [], so we need to use [ and ] instead.
14924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14925  if test "x$has_forbidden_chars" != x; then
14926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14927    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14928  fi
14929
14930
14931  windows_path="$new_path"
14932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14933    unix_path=`$CYGPATH -u "$windows_path"`
14934    new_path="$unix_path"
14935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14937    new_path="$unix_path"
14938  fi
14939
14940  if test "x$path" != "x$new_path"; then
14941    OUTPUT_ROOT="$new_path"
14942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14943$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14944  fi
14945
14946  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14947  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14948
14949  else
14950    # We're on a posix platform. Hooray! :)
14951    path="$OUTPUT_ROOT"
14952    has_space=`$ECHO "$path" | $GREP " "`
14953    if test "x$has_space" != x; then
14954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14955$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14956      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14957    fi
14958
14959    # Use eval to expand a potential ~
14960    eval path="$path"
14961    if test ! -f "$path" && test ! -d "$path"; then
14962      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
14963    fi
14964
14965    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
14966  fi
14967
14968
14969  SPEC=$OUTPUT_ROOT/spec.gmk
14970
14971  CONF_NAME=$CONF_NAME
14972
14973  OUTPUT_ROOT=$OUTPUT_ROOT
14974
14975
14976  # Most of the probed defines are put into config.h
14977  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
14978
14979  # The spec.gmk file contains all variables for the make system.
14980  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
14981
14982  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
14983  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
14984
14985  # The bootcycle-spec.gmk file contains support for boot cycle builds.
14986  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
14987
14988  # The compare.sh is used to compare the build output to other builds.
14989  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
14990
14991  # Spec.sh is currently used by compare-objects.sh
14992  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
14993
14994  # The generated Makefile knows where the spec.gmk is and where the source is.
14995  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
14996  # which will look for generated configurations
14997  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
14998
14999
15000
15001# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15002
15003  for ac_prog in apt-get yum port pkgutil pkgadd
15004do
15005  # Extract the first word of "$ac_prog", so it can be a program name with args.
15006set dummy $ac_prog; ac_word=$2
15007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15008$as_echo_n "checking for $ac_word... " >&6; }
15009if ${ac_cv_prog_PKGHANDLER+:} false; then :
15010  $as_echo_n "(cached) " >&6
15011else
15012  if test -n "$PKGHANDLER"; then
15013  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15014else
15015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15016for as_dir in $PATH
15017do
15018  IFS=$as_save_IFS
15019  test -z "$as_dir" && as_dir=.
15020    for ac_exec_ext in '' $ac_executable_extensions; do
15021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15022    ac_cv_prog_PKGHANDLER="$ac_prog"
15023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15024    break 2
15025  fi
15026done
15027  done
15028IFS=$as_save_IFS
15029
15030fi
15031fi
15032PKGHANDLER=$ac_cv_prog_PKGHANDLER
15033if test -n "$PKGHANDLER"; then
15034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15035$as_echo "$PKGHANDLER" >&6; }
15036else
15037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15038$as_echo "no" >&6; }
15039fi
15040
15041
15042  test -n "$PKGHANDLER" && break
15043done
15044
15045
15046
15047# Setup tools that requires more complex handling, or that is not needed by the configure script.
15048
15049
15050  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15051  if test "x$MAKE" != x; then
15052    # User has supplied a make, test it.
15053    if test ! -f "$MAKE"; then
15054      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15055    fi
15056
15057  MAKE_CANDIDATE=""$MAKE""
15058  DESCRIPTION="user supplied MAKE=$MAKE"
15059  if test "x$MAKE_CANDIDATE" != x; then
15060    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15061$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15062    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15063    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15064    if test "x$IS_GNU_MAKE" = x; then
15065      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15066$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15067    else
15068      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15069      if test "x$IS_MODERN_MAKE" = x; then
15070        { $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
15071$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;}
15072      else
15073        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15074          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15075            MAKE_EXPECTED_ENV='cygwin'
15076          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15077            MAKE_EXPECTED_ENV='msys'
15078          else
15079            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15080          fi
15081          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15082          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15083        else
15084          # Not relevant for non-Windows
15085          IS_MAKE_CORRECT_ENV=true
15086        fi
15087        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15088          { $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
15089$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;}
15090        else
15091          FOUND_MAKE=$MAKE_CANDIDATE
15092
15093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15094
15095  # First separate the path from the arguments. This will split at the first
15096  # space.
15097  complete="$FOUND_MAKE"
15098  path="${complete%% *}"
15099  tmp="$complete EOL"
15100  arguments="${tmp#* }"
15101
15102  # Input might be given as Windows format, start by converting to
15103  # unix format.
15104  new_path=`$CYGPATH -u "$path"`
15105
15106  # Now try to locate executable using which
15107  new_path=`$WHICH "$new_path" 2> /dev/null`
15108  # bat and cmd files are not always considered executable in cygwin causing which
15109  # to not find them
15110  if test "x$new_path" = x \
15111      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15112      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15113    new_path=`$CYGPATH -u "$path"`
15114  fi
15115  if test "x$new_path" = x; then
15116    # Oops. Which didn't find the executable.
15117    # The splitting of arguments from the executable at a space might have been incorrect,
15118    # since paths with space are more likely in Windows. Give it another try with the whole
15119    # argument.
15120    path="$complete"
15121    arguments="EOL"
15122    new_path=`$CYGPATH -u "$path"`
15123    new_path=`$WHICH "$new_path" 2> /dev/null`
15124    # bat and cmd files are not always considered executable in cygwin causing which
15125    # to not find them
15126    if test "x$new_path" = x \
15127        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15128        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15129      new_path=`$CYGPATH -u "$path"`
15130    fi
15131    if test "x$new_path" = x; then
15132      # It's still not found. Now this is an unrecoverable error.
15133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15134$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15135      has_space=`$ECHO "$complete" | $GREP " "`
15136      if test "x$has_space" != x; then
15137        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15138$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15139      fi
15140      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15141    fi
15142  fi
15143
15144  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15145  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15146  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15147  # "foo.exe" is OK but "foo" is an error.
15148  #
15149  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15150  # It is also a way to make sure we got the proper file name for the real test later on.
15151  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15152  if test "x$test_shortpath" = x; then
15153    # Short path failed, file does not exist as specified.
15154    # Try adding .exe or .cmd
15155    if test -f "${new_path}.exe"; then
15156      input_to_shortpath="${new_path}.exe"
15157    elif test -f "${new_path}.cmd"; then
15158      input_to_shortpath="${new_path}.cmd"
15159    else
15160      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15161$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15162      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15163$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15164      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15165    fi
15166  else
15167    input_to_shortpath="$new_path"
15168  fi
15169
15170  # Call helper function which possibly converts this using DOS-style short mode.
15171  # If so, the updated path is stored in $new_path.
15172  new_path="$input_to_shortpath"
15173
15174  input_path="$input_to_shortpath"
15175  # Check if we need to convert this using DOS-style short mode. If the path
15176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15177  # take no chances and rewrite it.
15178  # Note: m4 eats our [], so we need to use [ and ] instead.
15179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15180  if test "x$has_forbidden_chars" != x; then
15181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15182    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15183    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15184    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15185      # Going to short mode and back again did indeed matter. Since short mode is
15186      # case insensitive, let's make it lowercase to improve readability.
15187      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15188      # Now convert it back to Unix-stile (cygpath)
15189      input_path=`$CYGPATH -u "$shortmode_path"`
15190      new_path="$input_path"
15191    fi
15192  fi
15193
15194  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15195  if test "x$test_cygdrive_prefix" = x; then
15196    # As a simple fix, exclude /usr/bin since it's not a real path.
15197    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15198      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15199      # a path prefixed by /cygdrive for fixpath to work.
15200      new_path="$CYGWIN_ROOT_PATH$input_path"
15201    fi
15202  fi
15203
15204  # remove trailing .exe if any
15205  new_path="${new_path/%.exe/}"
15206
15207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15208
15209  # First separate the path from the arguments. This will split at the first
15210  # space.
15211  complete="$FOUND_MAKE"
15212  path="${complete%% *}"
15213  tmp="$complete EOL"
15214  arguments="${tmp#* }"
15215
15216  # Input might be given as Windows format, start by converting to
15217  # unix format.
15218  new_path="$path"
15219
15220  windows_path="$new_path"
15221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15222    unix_path=`$CYGPATH -u "$windows_path"`
15223    new_path="$unix_path"
15224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15226    new_path="$unix_path"
15227  fi
15228
15229
15230  # Now try to locate executable using which
15231  new_path=`$WHICH "$new_path" 2> /dev/null`
15232
15233  if test "x$new_path" = x; then
15234    # Oops. Which didn't find the executable.
15235    # The splitting of arguments from the executable at a space might have been incorrect,
15236    # since paths with space are more likely in Windows. Give it another try with the whole
15237    # argument.
15238    path="$complete"
15239    arguments="EOL"
15240    new_path="$path"
15241
15242  windows_path="$new_path"
15243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15244    unix_path=`$CYGPATH -u "$windows_path"`
15245    new_path="$unix_path"
15246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15248    new_path="$unix_path"
15249  fi
15250
15251
15252    new_path=`$WHICH "$new_path" 2> /dev/null`
15253
15254    if test "x$new_path" = x; then
15255      # It's still not found. Now this is an unrecoverable error.
15256      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15257$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15258      has_space=`$ECHO "$complete" | $GREP " "`
15259      if test "x$has_space" != x; then
15260        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15261$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15262      fi
15263      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15264    fi
15265  fi
15266
15267  # Now new_path has a complete unix path to the binary
15268  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15269    # Keep paths in /bin as-is, but remove trailing .exe if any
15270    new_path="${new_path/%.exe/}"
15271    # Do not save /bin paths to all_fixpath_prefixes!
15272  else
15273    # Not in mixed or Windows style, start by that.
15274    new_path=`cmd //c echo $new_path`
15275
15276  input_path="$new_path"
15277  # Check if we need to convert this using DOS-style short mode. If the path
15278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15279  # take no chances and rewrite it.
15280  # Note: m4 eats our [], so we need to use [ and ] instead.
15281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15282  if test "x$has_forbidden_chars" != x; then
15283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15284    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15285  fi
15286
15287    # Output is in $new_path
15288
15289  windows_path="$new_path"
15290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15291    unix_path=`$CYGPATH -u "$windows_path"`
15292    new_path="$unix_path"
15293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15295    new_path="$unix_path"
15296  fi
15297
15298    # remove trailing .exe if any
15299    new_path="${new_path/%.exe/}"
15300
15301    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15302    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15303  fi
15304
15305  else
15306    # We're on a posix platform. Hooray! :)
15307    # First separate the path from the arguments. This will split at the first
15308    # space.
15309    complete="$FOUND_MAKE"
15310    path="${complete%% *}"
15311    tmp="$complete EOL"
15312    arguments="${tmp#* }"
15313
15314    # Cannot rely on the command "which" here since it doesn't always work.
15315    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15316    if test -z "$is_absolute_path"; then
15317      # Path to executable is not absolute. Find it.
15318      IFS_save="$IFS"
15319      IFS=:
15320      for p in $PATH; do
15321        if test -f "$p/$path" && test -x "$p/$path"; then
15322          new_path="$p/$path"
15323          break
15324        fi
15325      done
15326      IFS="$IFS_save"
15327    else
15328      # This is an absolute path, we can use it without further modifications.
15329      new_path="$path"
15330    fi
15331
15332    if test "x$new_path" = x; then
15333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15334$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15335      has_space=`$ECHO "$complete" | $GREP " "`
15336      if test "x$has_space" != x; then
15337        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15338$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15339      fi
15340      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15341    fi
15342  fi
15343
15344  # Now join together the path and the arguments once again
15345  if test "x$arguments" != xEOL; then
15346    new_complete="$new_path ${arguments% *}"
15347  else
15348    new_complete="$new_path"
15349  fi
15350
15351  if test "x$complete" != "x$new_complete"; then
15352    FOUND_MAKE="$new_complete"
15353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15354$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15355  fi
15356
15357        fi
15358      fi
15359    fi
15360  fi
15361
15362    if test "x$FOUND_MAKE" = x; then
15363      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15364    fi
15365  else
15366    # Try our hardest to locate a correct version of GNU make
15367    for ac_prog in gmake
15368do
15369  # Extract the first word of "$ac_prog", so it can be a program name with args.
15370set dummy $ac_prog; ac_word=$2
15371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15372$as_echo_n "checking for $ac_word... " >&6; }
15373if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15374  $as_echo_n "(cached) " >&6
15375else
15376  case $CHECK_GMAKE in
15377  [\\/]* | ?:[\\/]*)
15378  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15379  ;;
15380  *)
15381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15382for as_dir in $PATH
15383do
15384  IFS=$as_save_IFS
15385  test -z "$as_dir" && as_dir=.
15386    for ac_exec_ext in '' $ac_executable_extensions; do
15387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15388    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15390    break 2
15391  fi
15392done
15393  done
15394IFS=$as_save_IFS
15395
15396  ;;
15397esac
15398fi
15399CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15400if test -n "$CHECK_GMAKE"; then
15401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15402$as_echo "$CHECK_GMAKE" >&6; }
15403else
15404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15405$as_echo "no" >&6; }
15406fi
15407
15408
15409  test -n "$CHECK_GMAKE" && break
15410done
15411
15412
15413  MAKE_CANDIDATE=""$CHECK_GMAKE""
15414  DESCRIPTION="gmake in PATH"
15415  if test "x$MAKE_CANDIDATE" != x; then
15416    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15417$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15418    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15419    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15420    if test "x$IS_GNU_MAKE" = x; then
15421      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15422$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15423    else
15424      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15425      if test "x$IS_MODERN_MAKE" = x; then
15426        { $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
15427$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;}
15428      else
15429        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15430          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15431            MAKE_EXPECTED_ENV='cygwin'
15432          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15433            MAKE_EXPECTED_ENV='msys'
15434          else
15435            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15436          fi
15437          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15438          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15439        else
15440          # Not relevant for non-Windows
15441          IS_MAKE_CORRECT_ENV=true
15442        fi
15443        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15444          { $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
15445$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;}
15446        else
15447          FOUND_MAKE=$MAKE_CANDIDATE
15448
15449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15450
15451  # First separate the path from the arguments. This will split at the first
15452  # space.
15453  complete="$FOUND_MAKE"
15454  path="${complete%% *}"
15455  tmp="$complete EOL"
15456  arguments="${tmp#* }"
15457
15458  # Input might be given as Windows format, start by converting to
15459  # unix format.
15460  new_path=`$CYGPATH -u "$path"`
15461
15462  # Now try to locate executable using which
15463  new_path=`$WHICH "$new_path" 2> /dev/null`
15464  # bat and cmd files are not always considered executable in cygwin causing which
15465  # to not find them
15466  if test "x$new_path" = x \
15467      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15468      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15469    new_path=`$CYGPATH -u "$path"`
15470  fi
15471  if test "x$new_path" = x; then
15472    # Oops. Which didn't find the executable.
15473    # The splitting of arguments from the executable at a space might have been incorrect,
15474    # since paths with space are more likely in Windows. Give it another try with the whole
15475    # argument.
15476    path="$complete"
15477    arguments="EOL"
15478    new_path=`$CYGPATH -u "$path"`
15479    new_path=`$WHICH "$new_path" 2> /dev/null`
15480    # bat and cmd files are not always considered executable in cygwin causing which
15481    # to not find them
15482    if test "x$new_path" = x \
15483        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15484        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15485      new_path=`$CYGPATH -u "$path"`
15486    fi
15487    if test "x$new_path" = x; then
15488      # It's still not found. Now this is an unrecoverable error.
15489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15490$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15491      has_space=`$ECHO "$complete" | $GREP " "`
15492      if test "x$has_space" != x; then
15493        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15494$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15495      fi
15496      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15497    fi
15498  fi
15499
15500  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15501  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15502  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15503  # "foo.exe" is OK but "foo" is an error.
15504  #
15505  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15506  # It is also a way to make sure we got the proper file name for the real test later on.
15507  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15508  if test "x$test_shortpath" = x; then
15509    # Short path failed, file does not exist as specified.
15510    # Try adding .exe or .cmd
15511    if test -f "${new_path}.exe"; then
15512      input_to_shortpath="${new_path}.exe"
15513    elif test -f "${new_path}.cmd"; then
15514      input_to_shortpath="${new_path}.cmd"
15515    else
15516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15517$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15518      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15519$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15520      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15521    fi
15522  else
15523    input_to_shortpath="$new_path"
15524  fi
15525
15526  # Call helper function which possibly converts this using DOS-style short mode.
15527  # If so, the updated path is stored in $new_path.
15528  new_path="$input_to_shortpath"
15529
15530  input_path="$input_to_shortpath"
15531  # Check if we need to convert this using DOS-style short mode. If the path
15532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15533  # take no chances and rewrite it.
15534  # Note: m4 eats our [], so we need to use [ and ] instead.
15535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15536  if test "x$has_forbidden_chars" != x; then
15537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15538    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15541      # Going to short mode and back again did indeed matter. Since short mode is
15542      # case insensitive, let's make it lowercase to improve readability.
15543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15544      # Now convert it back to Unix-stile (cygpath)
15545      input_path=`$CYGPATH -u "$shortmode_path"`
15546      new_path="$input_path"
15547    fi
15548  fi
15549
15550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15551  if test "x$test_cygdrive_prefix" = x; then
15552    # As a simple fix, exclude /usr/bin since it's not a real path.
15553    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15555      # a path prefixed by /cygdrive for fixpath to work.
15556      new_path="$CYGWIN_ROOT_PATH$input_path"
15557    fi
15558  fi
15559
15560  # remove trailing .exe if any
15561  new_path="${new_path/%.exe/}"
15562
15563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15564
15565  # First separate the path from the arguments. This will split at the first
15566  # space.
15567  complete="$FOUND_MAKE"
15568  path="${complete%% *}"
15569  tmp="$complete EOL"
15570  arguments="${tmp#* }"
15571
15572  # Input might be given as Windows format, start by converting to
15573  # unix format.
15574  new_path="$path"
15575
15576  windows_path="$new_path"
15577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15578    unix_path=`$CYGPATH -u "$windows_path"`
15579    new_path="$unix_path"
15580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15582    new_path="$unix_path"
15583  fi
15584
15585
15586  # Now try to locate executable using which
15587  new_path=`$WHICH "$new_path" 2> /dev/null`
15588
15589  if test "x$new_path" = x; then
15590    # Oops. Which didn't find the executable.
15591    # The splitting of arguments from the executable at a space might have been incorrect,
15592    # since paths with space are more likely in Windows. Give it another try with the whole
15593    # argument.
15594    path="$complete"
15595    arguments="EOL"
15596    new_path="$path"
15597
15598  windows_path="$new_path"
15599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15600    unix_path=`$CYGPATH -u "$windows_path"`
15601    new_path="$unix_path"
15602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15604    new_path="$unix_path"
15605  fi
15606
15607
15608    new_path=`$WHICH "$new_path" 2> /dev/null`
15609
15610    if test "x$new_path" = x; then
15611      # It's still not found. Now this is an unrecoverable error.
15612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15613$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15614      has_space=`$ECHO "$complete" | $GREP " "`
15615      if test "x$has_space" != x; then
15616        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15617$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15618      fi
15619      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15620    fi
15621  fi
15622
15623  # Now new_path has a complete unix path to the binary
15624  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15625    # Keep paths in /bin as-is, but remove trailing .exe if any
15626    new_path="${new_path/%.exe/}"
15627    # Do not save /bin paths to all_fixpath_prefixes!
15628  else
15629    # Not in mixed or Windows style, start by that.
15630    new_path=`cmd //c echo $new_path`
15631
15632  input_path="$new_path"
15633  # Check if we need to convert this using DOS-style short mode. If the path
15634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15635  # take no chances and rewrite it.
15636  # Note: m4 eats our [], so we need to use [ and ] instead.
15637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15638  if test "x$has_forbidden_chars" != x; then
15639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15640    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15641  fi
15642
15643    # Output is in $new_path
15644
15645  windows_path="$new_path"
15646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15647    unix_path=`$CYGPATH -u "$windows_path"`
15648    new_path="$unix_path"
15649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15651    new_path="$unix_path"
15652  fi
15653
15654    # remove trailing .exe if any
15655    new_path="${new_path/%.exe/}"
15656
15657    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15658    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15659  fi
15660
15661  else
15662    # We're on a posix platform. Hooray! :)
15663    # First separate the path from the arguments. This will split at the first
15664    # space.
15665    complete="$FOUND_MAKE"
15666    path="${complete%% *}"
15667    tmp="$complete EOL"
15668    arguments="${tmp#* }"
15669
15670    # Cannot rely on the command "which" here since it doesn't always work.
15671    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15672    if test -z "$is_absolute_path"; then
15673      # Path to executable is not absolute. Find it.
15674      IFS_save="$IFS"
15675      IFS=:
15676      for p in $PATH; do
15677        if test -f "$p/$path" && test -x "$p/$path"; then
15678          new_path="$p/$path"
15679          break
15680        fi
15681      done
15682      IFS="$IFS_save"
15683    else
15684      # This is an absolute path, we can use it without further modifications.
15685      new_path="$path"
15686    fi
15687
15688    if test "x$new_path" = x; then
15689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15690$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15691      has_space=`$ECHO "$complete" | $GREP " "`
15692      if test "x$has_space" != x; then
15693        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15694$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15695      fi
15696      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15697    fi
15698  fi
15699
15700  # Now join together the path and the arguments once again
15701  if test "x$arguments" != xEOL; then
15702    new_complete="$new_path ${arguments% *}"
15703  else
15704    new_complete="$new_path"
15705  fi
15706
15707  if test "x$complete" != "x$new_complete"; then
15708    FOUND_MAKE="$new_complete"
15709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15710$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15711  fi
15712
15713        fi
15714      fi
15715    fi
15716  fi
15717
15718
15719    if test "x$FOUND_MAKE" = x; then
15720      for ac_prog in make
15721do
15722  # Extract the first word of "$ac_prog", so it can be a program name with args.
15723set dummy $ac_prog; ac_word=$2
15724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15725$as_echo_n "checking for $ac_word... " >&6; }
15726if ${ac_cv_path_CHECK_MAKE+:} false; then :
15727  $as_echo_n "(cached) " >&6
15728else
15729  case $CHECK_MAKE in
15730  [\\/]* | ?:[\\/]*)
15731  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
15732  ;;
15733  *)
15734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15735for as_dir in $PATH
15736do
15737  IFS=$as_save_IFS
15738  test -z "$as_dir" && as_dir=.
15739    for ac_exec_ext in '' $ac_executable_extensions; do
15740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15741    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
15742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15743    break 2
15744  fi
15745done
15746  done
15747IFS=$as_save_IFS
15748
15749  ;;
15750esac
15751fi
15752CHECK_MAKE=$ac_cv_path_CHECK_MAKE
15753if test -n "$CHECK_MAKE"; then
15754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
15755$as_echo "$CHECK_MAKE" >&6; }
15756else
15757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15758$as_echo "no" >&6; }
15759fi
15760
15761
15762  test -n "$CHECK_MAKE" && break
15763done
15764
15765
15766  MAKE_CANDIDATE=""$CHECK_MAKE""
15767  DESCRIPTION="make in PATH"
15768  if test "x$MAKE_CANDIDATE" != x; then
15769    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15770$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15771    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15772    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15773    if test "x$IS_GNU_MAKE" = x; then
15774      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15775$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15776    else
15777      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15778      if test "x$IS_MODERN_MAKE" = x; then
15779        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15780$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15781      else
15782        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15783          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15784            MAKE_EXPECTED_ENV='cygwin'
15785          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15786            MAKE_EXPECTED_ENV='msys'
15787          else
15788            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15789          fi
15790          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15791          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15792        else
15793          # Not relevant for non-Windows
15794          IS_MAKE_CORRECT_ENV=true
15795        fi
15796        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15797          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
15798$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
15799        else
15800          FOUND_MAKE=$MAKE_CANDIDATE
15801
15802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15803
15804  # First separate the path from the arguments. This will split at the first
15805  # space.
15806  complete="$FOUND_MAKE"
15807  path="${complete%% *}"
15808  tmp="$complete EOL"
15809  arguments="${tmp#* }"
15810
15811  # Input might be given as Windows format, start by converting to
15812  # unix format.
15813  new_path=`$CYGPATH -u "$path"`
15814
15815  # Now try to locate executable using which
15816  new_path=`$WHICH "$new_path" 2> /dev/null`
15817  # bat and cmd files are not always considered executable in cygwin causing which
15818  # to not find them
15819  if test "x$new_path" = x \
15820      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15821      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15822    new_path=`$CYGPATH -u "$path"`
15823  fi
15824  if test "x$new_path" = x; then
15825    # Oops. Which didn't find the executable.
15826    # The splitting of arguments from the executable at a space might have been incorrect,
15827    # since paths with space are more likely in Windows. Give it another try with the whole
15828    # argument.
15829    path="$complete"
15830    arguments="EOL"
15831    new_path=`$CYGPATH -u "$path"`
15832    new_path=`$WHICH "$new_path" 2> /dev/null`
15833    # bat and cmd files are not always considered executable in cygwin causing which
15834    # to not find them
15835    if test "x$new_path" = x \
15836        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15837        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15838      new_path=`$CYGPATH -u "$path"`
15839    fi
15840    if test "x$new_path" = x; then
15841      # It's still not found. Now this is an unrecoverable error.
15842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15843$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15844      has_space=`$ECHO "$complete" | $GREP " "`
15845      if test "x$has_space" != x; then
15846        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15847$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15848      fi
15849      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15850    fi
15851  fi
15852
15853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15856  # "foo.exe" is OK but "foo" is an error.
15857  #
15858  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15859  # It is also a way to make sure we got the proper file name for the real test later on.
15860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15861  if test "x$test_shortpath" = x; then
15862    # Short path failed, file does not exist as specified.
15863    # Try adding .exe or .cmd
15864    if test -f "${new_path}.exe"; then
15865      input_to_shortpath="${new_path}.exe"
15866    elif test -f "${new_path}.cmd"; then
15867      input_to_shortpath="${new_path}.cmd"
15868    else
15869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15870$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15871      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15872$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15873      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15874    fi
15875  else
15876    input_to_shortpath="$new_path"
15877  fi
15878
15879  # Call helper function which possibly converts this using DOS-style short mode.
15880  # If so, the updated path is stored in $new_path.
15881  new_path="$input_to_shortpath"
15882
15883  input_path="$input_to_shortpath"
15884  # Check if we need to convert this using DOS-style short mode. If the path
15885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15886  # take no chances and rewrite it.
15887  # Note: m4 eats our [], so we need to use [ and ] instead.
15888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15889  if test "x$has_forbidden_chars" != x; then
15890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15894      # Going to short mode and back again did indeed matter. Since short mode is
15895      # case insensitive, let's make it lowercase to improve readability.
15896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15897      # Now convert it back to Unix-stile (cygpath)
15898      input_path=`$CYGPATH -u "$shortmode_path"`
15899      new_path="$input_path"
15900    fi
15901  fi
15902
15903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15904  if test "x$test_cygdrive_prefix" = x; then
15905    # As a simple fix, exclude /usr/bin since it's not a real path.
15906    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15908      # a path prefixed by /cygdrive for fixpath to work.
15909      new_path="$CYGWIN_ROOT_PATH$input_path"
15910    fi
15911  fi
15912
15913  # remove trailing .exe if any
15914  new_path="${new_path/%.exe/}"
15915
15916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15917
15918  # First separate the path from the arguments. This will split at the first
15919  # space.
15920  complete="$FOUND_MAKE"
15921  path="${complete%% *}"
15922  tmp="$complete EOL"
15923  arguments="${tmp#* }"
15924
15925  # Input might be given as Windows format, start by converting to
15926  # unix format.
15927  new_path="$path"
15928
15929  windows_path="$new_path"
15930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15931    unix_path=`$CYGPATH -u "$windows_path"`
15932    new_path="$unix_path"
15933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15935    new_path="$unix_path"
15936  fi
15937
15938
15939  # Now try to locate executable using which
15940  new_path=`$WHICH "$new_path" 2> /dev/null`
15941
15942  if test "x$new_path" = x; then
15943    # Oops. Which didn't find the executable.
15944    # The splitting of arguments from the executable at a space might have been incorrect,
15945    # since paths with space are more likely in Windows. Give it another try with the whole
15946    # argument.
15947    path="$complete"
15948    arguments="EOL"
15949    new_path="$path"
15950
15951  windows_path="$new_path"
15952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15953    unix_path=`$CYGPATH -u "$windows_path"`
15954    new_path="$unix_path"
15955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15957    new_path="$unix_path"
15958  fi
15959
15960
15961    new_path=`$WHICH "$new_path" 2> /dev/null`
15962
15963    if test "x$new_path" = x; then
15964      # It's still not found. Now this is an unrecoverable error.
15965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15966$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15967      has_space=`$ECHO "$complete" | $GREP " "`
15968      if test "x$has_space" != x; then
15969        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15970$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15971      fi
15972      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15973    fi
15974  fi
15975
15976  # Now new_path has a complete unix path to the binary
15977  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15978    # Keep paths in /bin as-is, but remove trailing .exe if any
15979    new_path="${new_path/%.exe/}"
15980    # Do not save /bin paths to all_fixpath_prefixes!
15981  else
15982    # Not in mixed or Windows style, start by that.
15983    new_path=`cmd //c echo $new_path`
15984
15985  input_path="$new_path"
15986  # Check if we need to convert this using DOS-style short mode. If the path
15987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15988  # take no chances and rewrite it.
15989  # Note: m4 eats our [], so we need to use [ and ] instead.
15990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15991  if test "x$has_forbidden_chars" != x; then
15992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15993    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15994  fi
15995
15996    # Output is in $new_path
15997
15998  windows_path="$new_path"
15999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16000    unix_path=`$CYGPATH -u "$windows_path"`
16001    new_path="$unix_path"
16002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16004    new_path="$unix_path"
16005  fi
16006
16007    # remove trailing .exe if any
16008    new_path="${new_path/%.exe/}"
16009
16010    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16011    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16012  fi
16013
16014  else
16015    # We're on a posix platform. Hooray! :)
16016    # First separate the path from the arguments. This will split at the first
16017    # space.
16018    complete="$FOUND_MAKE"
16019    path="${complete%% *}"
16020    tmp="$complete EOL"
16021    arguments="${tmp#* }"
16022
16023    # Cannot rely on the command "which" here since it doesn't always work.
16024    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16025    if test -z "$is_absolute_path"; then
16026      # Path to executable is not absolute. Find it.
16027      IFS_save="$IFS"
16028      IFS=:
16029      for p in $PATH; do
16030        if test -f "$p/$path" && test -x "$p/$path"; then
16031          new_path="$p/$path"
16032          break
16033        fi
16034      done
16035      IFS="$IFS_save"
16036    else
16037      # This is an absolute path, we can use it without further modifications.
16038      new_path="$path"
16039    fi
16040
16041    if test "x$new_path" = x; then
16042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16043$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16044      has_space=`$ECHO "$complete" | $GREP " "`
16045      if test "x$has_space" != x; then
16046        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16047$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16048      fi
16049      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16050    fi
16051  fi
16052
16053  # Now join together the path and the arguments once again
16054  if test "x$arguments" != xEOL; then
16055    new_complete="$new_path ${arguments% *}"
16056  else
16057    new_complete="$new_path"
16058  fi
16059
16060  if test "x$complete" != "x$new_complete"; then
16061    FOUND_MAKE="$new_complete"
16062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16063$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16064  fi
16065
16066        fi
16067      fi
16068    fi
16069  fi
16070
16071    fi
16072
16073    if test "x$FOUND_MAKE" = x; then
16074      if test "x$TOOLS_DIR" != x; then
16075        # We have a tools-dir, check that as well before giving up.
16076        OLD_PATH=$PATH
16077        PATH=$TOOLS_DIR:$PATH
16078        for ac_prog in gmake
16079do
16080  # Extract the first word of "$ac_prog", so it can be a program name with args.
16081set dummy $ac_prog; ac_word=$2
16082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16083$as_echo_n "checking for $ac_word... " >&6; }
16084if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16085  $as_echo_n "(cached) " >&6
16086else
16087  case $CHECK_TOOLSDIR_GMAKE in
16088  [\\/]* | ?:[\\/]*)
16089  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16090  ;;
16091  *)
16092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16093for as_dir in $PATH
16094do
16095  IFS=$as_save_IFS
16096  test -z "$as_dir" && as_dir=.
16097    for ac_exec_ext in '' $ac_executable_extensions; do
16098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16099    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16101    break 2
16102  fi
16103done
16104  done
16105IFS=$as_save_IFS
16106
16107  ;;
16108esac
16109fi
16110CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16111if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16113$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16114else
16115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16116$as_echo "no" >&6; }
16117fi
16118
16119
16120  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16121done
16122
16123
16124  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16125  DESCRIPTION="gmake in tools-dir"
16126  if test "x$MAKE_CANDIDATE" != x; then
16127    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16128$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16129    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16130    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16131    if test "x$IS_GNU_MAKE" = x; then
16132      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16133$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16134    else
16135      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16136      if test "x$IS_MODERN_MAKE" = x; then
16137        { $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
16138$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;}
16139      else
16140        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16141          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16142            MAKE_EXPECTED_ENV='cygwin'
16143          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16144            MAKE_EXPECTED_ENV='msys'
16145          else
16146            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16147          fi
16148          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16149          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16150        else
16151          # Not relevant for non-Windows
16152          IS_MAKE_CORRECT_ENV=true
16153        fi
16154        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16155          { $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
16156$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;}
16157        else
16158          FOUND_MAKE=$MAKE_CANDIDATE
16159
16160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16161
16162  # First separate the path from the arguments. This will split at the first
16163  # space.
16164  complete="$FOUND_MAKE"
16165  path="${complete%% *}"
16166  tmp="$complete EOL"
16167  arguments="${tmp#* }"
16168
16169  # Input might be given as Windows format, start by converting to
16170  # unix format.
16171  new_path=`$CYGPATH -u "$path"`
16172
16173  # Now try to locate executable using which
16174  new_path=`$WHICH "$new_path" 2> /dev/null`
16175  # bat and cmd files are not always considered executable in cygwin causing which
16176  # to not find them
16177  if test "x$new_path" = x \
16178      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16179      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16180    new_path=`$CYGPATH -u "$path"`
16181  fi
16182  if test "x$new_path" = x; then
16183    # Oops. Which didn't find the executable.
16184    # The splitting of arguments from the executable at a space might have been incorrect,
16185    # since paths with space are more likely in Windows. Give it another try with the whole
16186    # argument.
16187    path="$complete"
16188    arguments="EOL"
16189    new_path=`$CYGPATH -u "$path"`
16190    new_path=`$WHICH "$new_path" 2> /dev/null`
16191    # bat and cmd files are not always considered executable in cygwin causing which
16192    # to not find them
16193    if test "x$new_path" = x \
16194        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16195        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16196      new_path=`$CYGPATH -u "$path"`
16197    fi
16198    if test "x$new_path" = x; then
16199      # It's still not found. Now this is an unrecoverable error.
16200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16201$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16202      has_space=`$ECHO "$complete" | $GREP " "`
16203      if test "x$has_space" != x; then
16204        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16205$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16206      fi
16207      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16208    fi
16209  fi
16210
16211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16214  # "foo.exe" is OK but "foo" is an error.
16215  #
16216  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16217  # It is also a way to make sure we got the proper file name for the real test later on.
16218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16219  if test "x$test_shortpath" = x; then
16220    # Short path failed, file does not exist as specified.
16221    # Try adding .exe or .cmd
16222    if test -f "${new_path}.exe"; then
16223      input_to_shortpath="${new_path}.exe"
16224    elif test -f "${new_path}.cmd"; then
16225      input_to_shortpath="${new_path}.cmd"
16226    else
16227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16228$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16229      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16230$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16231      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16232    fi
16233  else
16234    input_to_shortpath="$new_path"
16235  fi
16236
16237  # Call helper function which possibly converts this using DOS-style short mode.
16238  # If so, the updated path is stored in $new_path.
16239  new_path="$input_to_shortpath"
16240
16241  input_path="$input_to_shortpath"
16242  # Check if we need to convert this using DOS-style short mode. If the path
16243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16244  # take no chances and rewrite it.
16245  # Note: m4 eats our [], so we need to use [ and ] instead.
16246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16247  if test "x$has_forbidden_chars" != x; then
16248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16252      # Going to short mode and back again did indeed matter. Since short mode is
16253      # case insensitive, let's make it lowercase to improve readability.
16254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16255      # Now convert it back to Unix-stile (cygpath)
16256      input_path=`$CYGPATH -u "$shortmode_path"`
16257      new_path="$input_path"
16258    fi
16259  fi
16260
16261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16262  if test "x$test_cygdrive_prefix" = x; then
16263    # As a simple fix, exclude /usr/bin since it's not a real path.
16264    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16266      # a path prefixed by /cygdrive for fixpath to work.
16267      new_path="$CYGWIN_ROOT_PATH$input_path"
16268    fi
16269  fi
16270
16271  # remove trailing .exe if any
16272  new_path="${new_path/%.exe/}"
16273
16274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16275
16276  # First separate the path from the arguments. This will split at the first
16277  # space.
16278  complete="$FOUND_MAKE"
16279  path="${complete%% *}"
16280  tmp="$complete EOL"
16281  arguments="${tmp#* }"
16282
16283  # Input might be given as Windows format, start by converting to
16284  # unix format.
16285  new_path="$path"
16286
16287  windows_path="$new_path"
16288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16289    unix_path=`$CYGPATH -u "$windows_path"`
16290    new_path="$unix_path"
16291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16293    new_path="$unix_path"
16294  fi
16295
16296
16297  # Now try to locate executable using which
16298  new_path=`$WHICH "$new_path" 2> /dev/null`
16299
16300  if test "x$new_path" = x; then
16301    # Oops. Which didn't find the executable.
16302    # The splitting of arguments from the executable at a space might have been incorrect,
16303    # since paths with space are more likely in Windows. Give it another try with the whole
16304    # argument.
16305    path="$complete"
16306    arguments="EOL"
16307    new_path="$path"
16308
16309  windows_path="$new_path"
16310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16311    unix_path=`$CYGPATH -u "$windows_path"`
16312    new_path="$unix_path"
16313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16315    new_path="$unix_path"
16316  fi
16317
16318
16319    new_path=`$WHICH "$new_path" 2> /dev/null`
16320
16321    if test "x$new_path" = x; then
16322      # It's still not found. Now this is an unrecoverable error.
16323      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16324$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16325      has_space=`$ECHO "$complete" | $GREP " "`
16326      if test "x$has_space" != x; then
16327        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16328$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16329      fi
16330      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16331    fi
16332  fi
16333
16334  # Now new_path has a complete unix path to the binary
16335  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16336    # Keep paths in /bin as-is, but remove trailing .exe if any
16337    new_path="${new_path/%.exe/}"
16338    # Do not save /bin paths to all_fixpath_prefixes!
16339  else
16340    # Not in mixed or Windows style, start by that.
16341    new_path=`cmd //c echo $new_path`
16342
16343  input_path="$new_path"
16344  # Check if we need to convert this using DOS-style short mode. If the path
16345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16346  # take no chances and rewrite it.
16347  # Note: m4 eats our [], so we need to use [ and ] instead.
16348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16349  if test "x$has_forbidden_chars" != x; then
16350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16351    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16352  fi
16353
16354    # Output is in $new_path
16355
16356  windows_path="$new_path"
16357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16358    unix_path=`$CYGPATH -u "$windows_path"`
16359    new_path="$unix_path"
16360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16362    new_path="$unix_path"
16363  fi
16364
16365    # remove trailing .exe if any
16366    new_path="${new_path/%.exe/}"
16367
16368    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16369    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16370  fi
16371
16372  else
16373    # We're on a posix platform. Hooray! :)
16374    # First separate the path from the arguments. This will split at the first
16375    # space.
16376    complete="$FOUND_MAKE"
16377    path="${complete%% *}"
16378    tmp="$complete EOL"
16379    arguments="${tmp#* }"
16380
16381    # Cannot rely on the command "which" here since it doesn't always work.
16382    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16383    if test -z "$is_absolute_path"; then
16384      # Path to executable is not absolute. Find it.
16385      IFS_save="$IFS"
16386      IFS=:
16387      for p in $PATH; do
16388        if test -f "$p/$path" && test -x "$p/$path"; then
16389          new_path="$p/$path"
16390          break
16391        fi
16392      done
16393      IFS="$IFS_save"
16394    else
16395      # This is an absolute path, we can use it without further modifications.
16396      new_path="$path"
16397    fi
16398
16399    if test "x$new_path" = x; then
16400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16401$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16402      has_space=`$ECHO "$complete" | $GREP " "`
16403      if test "x$has_space" != x; then
16404        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16405$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16406      fi
16407      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16408    fi
16409  fi
16410
16411  # Now join together the path and the arguments once again
16412  if test "x$arguments" != xEOL; then
16413    new_complete="$new_path ${arguments% *}"
16414  else
16415    new_complete="$new_path"
16416  fi
16417
16418  if test "x$complete" != "x$new_complete"; then
16419    FOUND_MAKE="$new_complete"
16420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16421$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16422  fi
16423
16424        fi
16425      fi
16426    fi
16427  fi
16428
16429        if test "x$FOUND_MAKE" = x; then
16430          for ac_prog in make
16431do
16432  # Extract the first word of "$ac_prog", so it can be a program name with args.
16433set dummy $ac_prog; ac_word=$2
16434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16435$as_echo_n "checking for $ac_word... " >&6; }
16436if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16437  $as_echo_n "(cached) " >&6
16438else
16439  case $CHECK_TOOLSDIR_MAKE in
16440  [\\/]* | ?:[\\/]*)
16441  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16442  ;;
16443  *)
16444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16445for as_dir in $PATH
16446do
16447  IFS=$as_save_IFS
16448  test -z "$as_dir" && as_dir=.
16449    for ac_exec_ext in '' $ac_executable_extensions; do
16450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16451    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16453    break 2
16454  fi
16455done
16456  done
16457IFS=$as_save_IFS
16458
16459  ;;
16460esac
16461fi
16462CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16463if test -n "$CHECK_TOOLSDIR_MAKE"; then
16464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16465$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16466else
16467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16468$as_echo "no" >&6; }
16469fi
16470
16471
16472  test -n "$CHECK_TOOLSDIR_MAKE" && break
16473done
16474
16475
16476  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16477  DESCRIPTION="make in tools-dir"
16478  if test "x$MAKE_CANDIDATE" != x; then
16479    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16480$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16481    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16482    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16483    if test "x$IS_GNU_MAKE" = x; then
16484      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16485$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16486    else
16487      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16488      if test "x$IS_MODERN_MAKE" = x; then
16489        { $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
16490$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;}
16491      else
16492        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16493          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16494            MAKE_EXPECTED_ENV='cygwin'
16495          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16496            MAKE_EXPECTED_ENV='msys'
16497          else
16498            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16499          fi
16500          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16501          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16502        else
16503          # Not relevant for non-Windows
16504          IS_MAKE_CORRECT_ENV=true
16505        fi
16506        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16507          { $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
16508$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;}
16509        else
16510          FOUND_MAKE=$MAKE_CANDIDATE
16511
16512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16513
16514  # First separate the path from the arguments. This will split at the first
16515  # space.
16516  complete="$FOUND_MAKE"
16517  path="${complete%% *}"
16518  tmp="$complete EOL"
16519  arguments="${tmp#* }"
16520
16521  # Input might be given as Windows format, start by converting to
16522  # unix format.
16523  new_path=`$CYGPATH -u "$path"`
16524
16525  # Now try to locate executable using which
16526  new_path=`$WHICH "$new_path" 2> /dev/null`
16527  # bat and cmd files are not always considered executable in cygwin causing which
16528  # to not find them
16529  if test "x$new_path" = x \
16530      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16531      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16532    new_path=`$CYGPATH -u "$path"`
16533  fi
16534  if test "x$new_path" = x; then
16535    # Oops. Which didn't find the executable.
16536    # The splitting of arguments from the executable at a space might have been incorrect,
16537    # since paths with space are more likely in Windows. Give it another try with the whole
16538    # argument.
16539    path="$complete"
16540    arguments="EOL"
16541    new_path=`$CYGPATH -u "$path"`
16542    new_path=`$WHICH "$new_path" 2> /dev/null`
16543    # bat and cmd files are not always considered executable in cygwin causing which
16544    # to not find them
16545    if test "x$new_path" = x \
16546        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16547        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16548      new_path=`$CYGPATH -u "$path"`
16549    fi
16550    if test "x$new_path" = x; then
16551      # It's still not found. Now this is an unrecoverable error.
16552      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16553$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16554      has_space=`$ECHO "$complete" | $GREP " "`
16555      if test "x$has_space" != x; then
16556        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16557$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16558      fi
16559      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16560    fi
16561  fi
16562
16563  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16564  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16565  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16566  # "foo.exe" is OK but "foo" is an error.
16567  #
16568  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16569  # It is also a way to make sure we got the proper file name for the real test later on.
16570  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16571  if test "x$test_shortpath" = x; then
16572    # Short path failed, file does not exist as specified.
16573    # Try adding .exe or .cmd
16574    if test -f "${new_path}.exe"; then
16575      input_to_shortpath="${new_path}.exe"
16576    elif test -f "${new_path}.cmd"; then
16577      input_to_shortpath="${new_path}.cmd"
16578    else
16579      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16580$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16581      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16582$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16583      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16584    fi
16585  else
16586    input_to_shortpath="$new_path"
16587  fi
16588
16589  # Call helper function which possibly converts this using DOS-style short mode.
16590  # If so, the updated path is stored in $new_path.
16591  new_path="$input_to_shortpath"
16592
16593  input_path="$input_to_shortpath"
16594  # Check if we need to convert this using DOS-style short mode. If the path
16595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16596  # take no chances and rewrite it.
16597  # Note: m4 eats our [], so we need to use [ and ] instead.
16598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16599  if test "x$has_forbidden_chars" != x; then
16600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16601    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16602    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16603    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16604      # Going to short mode and back again did indeed matter. Since short mode is
16605      # case insensitive, let's make it lowercase to improve readability.
16606      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16607      # Now convert it back to Unix-stile (cygpath)
16608      input_path=`$CYGPATH -u "$shortmode_path"`
16609      new_path="$input_path"
16610    fi
16611  fi
16612
16613  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16614  if test "x$test_cygdrive_prefix" = x; then
16615    # As a simple fix, exclude /usr/bin since it's not a real path.
16616    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16617      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16618      # a path prefixed by /cygdrive for fixpath to work.
16619      new_path="$CYGWIN_ROOT_PATH$input_path"
16620    fi
16621  fi
16622
16623  # remove trailing .exe if any
16624  new_path="${new_path/%.exe/}"
16625
16626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16627
16628  # First separate the path from the arguments. This will split at the first
16629  # space.
16630  complete="$FOUND_MAKE"
16631  path="${complete%% *}"
16632  tmp="$complete EOL"
16633  arguments="${tmp#* }"
16634
16635  # Input might be given as Windows format, start by converting to
16636  # unix format.
16637  new_path="$path"
16638
16639  windows_path="$new_path"
16640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16641    unix_path=`$CYGPATH -u "$windows_path"`
16642    new_path="$unix_path"
16643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16645    new_path="$unix_path"
16646  fi
16647
16648
16649  # Now try to locate executable using which
16650  new_path=`$WHICH "$new_path" 2> /dev/null`
16651
16652  if test "x$new_path" = x; then
16653    # Oops. Which didn't find the executable.
16654    # The splitting of arguments from the executable at a space might have been incorrect,
16655    # since paths with space are more likely in Windows. Give it another try with the whole
16656    # argument.
16657    path="$complete"
16658    arguments="EOL"
16659    new_path="$path"
16660
16661  windows_path="$new_path"
16662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16663    unix_path=`$CYGPATH -u "$windows_path"`
16664    new_path="$unix_path"
16665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16667    new_path="$unix_path"
16668  fi
16669
16670
16671    new_path=`$WHICH "$new_path" 2> /dev/null`
16672
16673    if test "x$new_path" = x; then
16674      # It's still not found. Now this is an unrecoverable error.
16675      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16676$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16677      has_space=`$ECHO "$complete" | $GREP " "`
16678      if test "x$has_space" != x; then
16679        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16680$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16681      fi
16682      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16683    fi
16684  fi
16685
16686  # Now new_path has a complete unix path to the binary
16687  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16688    # Keep paths in /bin as-is, but remove trailing .exe if any
16689    new_path="${new_path/%.exe/}"
16690    # Do not save /bin paths to all_fixpath_prefixes!
16691  else
16692    # Not in mixed or Windows style, start by that.
16693    new_path=`cmd //c echo $new_path`
16694
16695  input_path="$new_path"
16696  # Check if we need to convert this using DOS-style short mode. If the path
16697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16698  # take no chances and rewrite it.
16699  # Note: m4 eats our [], so we need to use [ and ] instead.
16700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16701  if test "x$has_forbidden_chars" != x; then
16702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16704  fi
16705
16706    # Output is in $new_path
16707
16708  windows_path="$new_path"
16709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16710    unix_path=`$CYGPATH -u "$windows_path"`
16711    new_path="$unix_path"
16712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16714    new_path="$unix_path"
16715  fi
16716
16717    # remove trailing .exe if any
16718    new_path="${new_path/%.exe/}"
16719
16720    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16721    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16722  fi
16723
16724  else
16725    # We're on a posix platform. Hooray! :)
16726    # First separate the path from the arguments. This will split at the first
16727    # space.
16728    complete="$FOUND_MAKE"
16729    path="${complete%% *}"
16730    tmp="$complete EOL"
16731    arguments="${tmp#* }"
16732
16733    # Cannot rely on the command "which" here since it doesn't always work.
16734    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16735    if test -z "$is_absolute_path"; then
16736      # Path to executable is not absolute. Find it.
16737      IFS_save="$IFS"
16738      IFS=:
16739      for p in $PATH; do
16740        if test -f "$p/$path" && test -x "$p/$path"; then
16741          new_path="$p/$path"
16742          break
16743        fi
16744      done
16745      IFS="$IFS_save"
16746    else
16747      # This is an absolute path, we can use it without further modifications.
16748      new_path="$path"
16749    fi
16750
16751    if test "x$new_path" = x; then
16752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16753$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16754      has_space=`$ECHO "$complete" | $GREP " "`
16755      if test "x$has_space" != x; then
16756        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16757$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16758      fi
16759      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16760    fi
16761  fi
16762
16763  # Now join together the path and the arguments once again
16764  if test "x$arguments" != xEOL; then
16765    new_complete="$new_path ${arguments% *}"
16766  else
16767    new_complete="$new_path"
16768  fi
16769
16770  if test "x$complete" != "x$new_complete"; then
16771    FOUND_MAKE="$new_complete"
16772    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16773$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16774  fi
16775
16776        fi
16777      fi
16778    fi
16779  fi
16780
16781        fi
16782        PATH=$OLD_PATH
16783      fi
16784    fi
16785
16786    if test "x$FOUND_MAKE" = x; then
16787      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
16788    fi
16789  fi
16790
16791  MAKE=$FOUND_MAKE
16792
16793  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
16794$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
16795
16796
16797
16798  # Test if find supports -delete
16799  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
16800$as_echo_n "checking if find supports -delete... " >&6; }
16801  FIND_DELETE="-delete"
16802
16803  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
16804
16805  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
16806
16807  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
16808  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
16809    # No, it does not.
16810    rm $DELETEDIR/TestIfFindSupportsDelete
16811    FIND_DELETE="-exec rm \{\} \+"
16812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16813$as_echo "no" >&6; }
16814  else
16815    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16816$as_echo "yes" >&6; }
16817  fi
16818  rmdir $DELETEDIR
16819
16820
16821
16822  # These tools might not be installed by default,
16823  # need hint on how to install them.
16824
16825
16826
16827  # Publish this variable in the help.
16828
16829
16830  if test "x$UNZIP" = x; then
16831    # The variable is not set by user, try to locate tool using the code snippet
16832    for ac_prog in unzip
16833do
16834  # Extract the first word of "$ac_prog", so it can be a program name with args.
16835set dummy $ac_prog; ac_word=$2
16836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16837$as_echo_n "checking for $ac_word... " >&6; }
16838if ${ac_cv_path_UNZIP+:} false; then :
16839  $as_echo_n "(cached) " >&6
16840else
16841  case $UNZIP in
16842  [\\/]* | ?:[\\/]*)
16843  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16844  ;;
16845  *)
16846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16847for as_dir in $PATH
16848do
16849  IFS=$as_save_IFS
16850  test -z "$as_dir" && as_dir=.
16851    for ac_exec_ext in '' $ac_executable_extensions; do
16852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16853    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16855    break 2
16856  fi
16857done
16858  done
16859IFS=$as_save_IFS
16860
16861  ;;
16862esac
16863fi
16864UNZIP=$ac_cv_path_UNZIP
16865if test -n "$UNZIP"; then
16866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16867$as_echo "$UNZIP" >&6; }
16868else
16869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16870$as_echo "no" >&6; }
16871fi
16872
16873
16874  test -n "$UNZIP" && break
16875done
16876
16877  else
16878    # The variable is set, but is it from the command line or the environment?
16879
16880    # Try to remove the string !UNZIP! from our list.
16881    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
16882    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
16883      # If it failed, the variable was not from the command line. Ignore it,
16884      # but warn the user (except for BASH, which is always set by the calling BASH).
16885      if test "xUNZIP" != xBASH; then
16886        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
16887$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
16888      fi
16889      # Try to locate tool using the code snippet
16890      for ac_prog in unzip
16891do
16892  # Extract the first word of "$ac_prog", so it can be a program name with args.
16893set dummy $ac_prog; ac_word=$2
16894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16895$as_echo_n "checking for $ac_word... " >&6; }
16896if ${ac_cv_path_UNZIP+:} false; then :
16897  $as_echo_n "(cached) " >&6
16898else
16899  case $UNZIP in
16900  [\\/]* | ?:[\\/]*)
16901  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16902  ;;
16903  *)
16904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16905for as_dir in $PATH
16906do
16907  IFS=$as_save_IFS
16908  test -z "$as_dir" && as_dir=.
16909    for ac_exec_ext in '' $ac_executable_extensions; do
16910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16911    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16913    break 2
16914  fi
16915done
16916  done
16917IFS=$as_save_IFS
16918
16919  ;;
16920esac
16921fi
16922UNZIP=$ac_cv_path_UNZIP
16923if test -n "$UNZIP"; then
16924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16925$as_echo "$UNZIP" >&6; }
16926else
16927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16928$as_echo "no" >&6; }
16929fi
16930
16931
16932  test -n "$UNZIP" && break
16933done
16934
16935    else
16936      # If it succeeded, then it was overridden by the user. We will use it
16937      # for the tool.
16938
16939      # First remove it from the list of overridden variables, so we can test
16940      # for unknown variables in the end.
16941      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
16942
16943      # Check if the provided tool contains a complete path.
16944      tool_specified="$UNZIP"
16945      tool_basename="${tool_specified##*/}"
16946      if test "x$tool_basename" = "x$tool_specified"; then
16947        # A command without a complete path is provided, search $PATH.
16948        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
16949$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
16950        # Extract the first word of "$tool_basename", so it can be a program name with args.
16951set dummy $tool_basename; ac_word=$2
16952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16953$as_echo_n "checking for $ac_word... " >&6; }
16954if ${ac_cv_path_UNZIP+:} false; then :
16955  $as_echo_n "(cached) " >&6
16956else
16957  case $UNZIP in
16958  [\\/]* | ?:[\\/]*)
16959  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16960  ;;
16961  *)
16962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16963for as_dir in $PATH
16964do
16965  IFS=$as_save_IFS
16966  test -z "$as_dir" && as_dir=.
16967    for ac_exec_ext in '' $ac_executable_extensions; do
16968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16969    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16971    break 2
16972  fi
16973done
16974  done
16975IFS=$as_save_IFS
16976
16977  ;;
16978esac
16979fi
16980UNZIP=$ac_cv_path_UNZIP
16981if test -n "$UNZIP"; then
16982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16983$as_echo "$UNZIP" >&6; }
16984else
16985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16986$as_echo "no" >&6; }
16987fi
16988
16989
16990        if test "x$UNZIP" = x; then
16991          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
16992        fi
16993      else
16994        # Otherwise we believe it is a complete path. Use it as it is.
16995        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
16996$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
16997        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
16998$as_echo_n "checking for UNZIP... " >&6; }
16999        if test ! -x "$tool_specified"; then
17000          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17001$as_echo "not found" >&6; }
17002          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17003        fi
17004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17005$as_echo "$tool_specified" >&6; }
17006      fi
17007    fi
17008  fi
17009
17010
17011
17012  if test "x$UNZIP" = x; then
17013    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17014  fi
17015
17016
17017
17018
17019
17020  # Publish this variable in the help.
17021
17022
17023  if test "x$ZIP" = x; then
17024    # The variable is not set by user, try to locate tool using the code snippet
17025    for ac_prog in zip
17026do
17027  # Extract the first word of "$ac_prog", so it can be a program name with args.
17028set dummy $ac_prog; ac_word=$2
17029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17030$as_echo_n "checking for $ac_word... " >&6; }
17031if ${ac_cv_path_ZIP+:} false; then :
17032  $as_echo_n "(cached) " >&6
17033else
17034  case $ZIP in
17035  [\\/]* | ?:[\\/]*)
17036  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17037  ;;
17038  *)
17039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17040for as_dir in $PATH
17041do
17042  IFS=$as_save_IFS
17043  test -z "$as_dir" && as_dir=.
17044    for ac_exec_ext in '' $ac_executable_extensions; do
17045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17046    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17048    break 2
17049  fi
17050done
17051  done
17052IFS=$as_save_IFS
17053
17054  ;;
17055esac
17056fi
17057ZIP=$ac_cv_path_ZIP
17058if test -n "$ZIP"; then
17059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17060$as_echo "$ZIP" >&6; }
17061else
17062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17063$as_echo "no" >&6; }
17064fi
17065
17066
17067  test -n "$ZIP" && break
17068done
17069
17070  else
17071    # The variable is set, but is it from the command line or the environment?
17072
17073    # Try to remove the string !ZIP! from our list.
17074    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17075    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17076      # If it failed, the variable was not from the command line. Ignore it,
17077      # but warn the user (except for BASH, which is always set by the calling BASH).
17078      if test "xZIP" != xBASH; then
17079        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17080$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17081      fi
17082      # Try to locate tool using the code snippet
17083      for ac_prog in zip
17084do
17085  # Extract the first word of "$ac_prog", so it can be a program name with args.
17086set dummy $ac_prog; ac_word=$2
17087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17088$as_echo_n "checking for $ac_word... " >&6; }
17089if ${ac_cv_path_ZIP+:} false; then :
17090  $as_echo_n "(cached) " >&6
17091else
17092  case $ZIP in
17093  [\\/]* | ?:[\\/]*)
17094  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17095  ;;
17096  *)
17097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17098for as_dir in $PATH
17099do
17100  IFS=$as_save_IFS
17101  test -z "$as_dir" && as_dir=.
17102    for ac_exec_ext in '' $ac_executable_extensions; do
17103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17104    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17106    break 2
17107  fi
17108done
17109  done
17110IFS=$as_save_IFS
17111
17112  ;;
17113esac
17114fi
17115ZIP=$ac_cv_path_ZIP
17116if test -n "$ZIP"; then
17117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17118$as_echo "$ZIP" >&6; }
17119else
17120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17121$as_echo "no" >&6; }
17122fi
17123
17124
17125  test -n "$ZIP" && break
17126done
17127
17128    else
17129      # If it succeeded, then it was overridden by the user. We will use it
17130      # for the tool.
17131
17132      # First remove it from the list of overridden variables, so we can test
17133      # for unknown variables in the end.
17134      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17135
17136      # Check if the provided tool contains a complete path.
17137      tool_specified="$ZIP"
17138      tool_basename="${tool_specified##*/}"
17139      if test "x$tool_basename" = "x$tool_specified"; then
17140        # A command without a complete path is provided, search $PATH.
17141        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17142$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17143        # Extract the first word of "$tool_basename", so it can be a program name with args.
17144set dummy $tool_basename; ac_word=$2
17145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17146$as_echo_n "checking for $ac_word... " >&6; }
17147if ${ac_cv_path_ZIP+:} false; then :
17148  $as_echo_n "(cached) " >&6
17149else
17150  case $ZIP in
17151  [\\/]* | ?:[\\/]*)
17152  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17153  ;;
17154  *)
17155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17156for as_dir in $PATH
17157do
17158  IFS=$as_save_IFS
17159  test -z "$as_dir" && as_dir=.
17160    for ac_exec_ext in '' $ac_executable_extensions; do
17161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17162    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17164    break 2
17165  fi
17166done
17167  done
17168IFS=$as_save_IFS
17169
17170  ;;
17171esac
17172fi
17173ZIP=$ac_cv_path_ZIP
17174if test -n "$ZIP"; then
17175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17176$as_echo "$ZIP" >&6; }
17177else
17178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17179$as_echo "no" >&6; }
17180fi
17181
17182
17183        if test "x$ZIP" = x; then
17184          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17185        fi
17186      else
17187        # Otherwise we believe it is a complete path. Use it as it is.
17188        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17189$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17190        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17191$as_echo_n "checking for ZIP... " >&6; }
17192        if test ! -x "$tool_specified"; then
17193          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17194$as_echo "not found" >&6; }
17195          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17196        fi
17197        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17198$as_echo "$tool_specified" >&6; }
17199      fi
17200    fi
17201  fi
17202
17203
17204
17205  if test "x$ZIP" = x; then
17206    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17207  fi
17208
17209
17210
17211  # Non-required basic tools
17212
17213
17214
17215  # Publish this variable in the help.
17216
17217
17218  if test "x$LDD" = x; then
17219    # The variable is not set by user, try to locate tool using the code snippet
17220    for ac_prog in ldd
17221do
17222  # Extract the first word of "$ac_prog", so it can be a program name with args.
17223set dummy $ac_prog; ac_word=$2
17224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17225$as_echo_n "checking for $ac_word... " >&6; }
17226if ${ac_cv_path_LDD+:} false; then :
17227  $as_echo_n "(cached) " >&6
17228else
17229  case $LDD in
17230  [\\/]* | ?:[\\/]*)
17231  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17232  ;;
17233  *)
17234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17235for as_dir in $PATH
17236do
17237  IFS=$as_save_IFS
17238  test -z "$as_dir" && as_dir=.
17239    for ac_exec_ext in '' $ac_executable_extensions; do
17240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17241    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17243    break 2
17244  fi
17245done
17246  done
17247IFS=$as_save_IFS
17248
17249  ;;
17250esac
17251fi
17252LDD=$ac_cv_path_LDD
17253if test -n "$LDD"; then
17254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17255$as_echo "$LDD" >&6; }
17256else
17257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17258$as_echo "no" >&6; }
17259fi
17260
17261
17262  test -n "$LDD" && break
17263done
17264
17265  else
17266    # The variable is set, but is it from the command line or the environment?
17267
17268    # Try to remove the string !LDD! from our list.
17269    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17270    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17271      # If it failed, the variable was not from the command line. Ignore it,
17272      # but warn the user (except for BASH, which is always set by the calling BASH).
17273      if test "xLDD" != xBASH; then
17274        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17275$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17276      fi
17277      # Try to locate tool using the code snippet
17278      for ac_prog in ldd
17279do
17280  # Extract the first word of "$ac_prog", so it can be a program name with args.
17281set dummy $ac_prog; ac_word=$2
17282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17283$as_echo_n "checking for $ac_word... " >&6; }
17284if ${ac_cv_path_LDD+:} false; then :
17285  $as_echo_n "(cached) " >&6
17286else
17287  case $LDD in
17288  [\\/]* | ?:[\\/]*)
17289  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17290  ;;
17291  *)
17292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17293for as_dir in $PATH
17294do
17295  IFS=$as_save_IFS
17296  test -z "$as_dir" && as_dir=.
17297    for ac_exec_ext in '' $ac_executable_extensions; do
17298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17299    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17301    break 2
17302  fi
17303done
17304  done
17305IFS=$as_save_IFS
17306
17307  ;;
17308esac
17309fi
17310LDD=$ac_cv_path_LDD
17311if test -n "$LDD"; then
17312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17313$as_echo "$LDD" >&6; }
17314else
17315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17316$as_echo "no" >&6; }
17317fi
17318
17319
17320  test -n "$LDD" && break
17321done
17322
17323    else
17324      # If it succeeded, then it was overridden by the user. We will use it
17325      # for the tool.
17326
17327      # First remove it from the list of overridden variables, so we can test
17328      # for unknown variables in the end.
17329      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17330
17331      # Check if the provided tool contains a complete path.
17332      tool_specified="$LDD"
17333      tool_basename="${tool_specified##*/}"
17334      if test "x$tool_basename" = "x$tool_specified"; then
17335        # A command without a complete path is provided, search $PATH.
17336        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17337$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17338        # Extract the first word of "$tool_basename", so it can be a program name with args.
17339set dummy $tool_basename; ac_word=$2
17340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17341$as_echo_n "checking for $ac_word... " >&6; }
17342if ${ac_cv_path_LDD+:} false; then :
17343  $as_echo_n "(cached) " >&6
17344else
17345  case $LDD in
17346  [\\/]* | ?:[\\/]*)
17347  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17348  ;;
17349  *)
17350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17351for as_dir in $PATH
17352do
17353  IFS=$as_save_IFS
17354  test -z "$as_dir" && as_dir=.
17355    for ac_exec_ext in '' $ac_executable_extensions; do
17356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17357    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17359    break 2
17360  fi
17361done
17362  done
17363IFS=$as_save_IFS
17364
17365  ;;
17366esac
17367fi
17368LDD=$ac_cv_path_LDD
17369if test -n "$LDD"; then
17370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17371$as_echo "$LDD" >&6; }
17372else
17373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17374$as_echo "no" >&6; }
17375fi
17376
17377
17378        if test "x$LDD" = x; then
17379          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17380        fi
17381      else
17382        # Otherwise we believe it is a complete path. Use it as it is.
17383        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17384$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17385        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17386$as_echo_n "checking for LDD... " >&6; }
17387        if test ! -x "$tool_specified"; then
17388          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17389$as_echo "not found" >&6; }
17390          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17391        fi
17392        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17393$as_echo "$tool_specified" >&6; }
17394      fi
17395    fi
17396  fi
17397
17398
17399  if test "x$LDD" = "x"; then
17400    # List shared lib dependencies is used for
17401    # debug output and checking for forbidden dependencies.
17402    # We can build without it.
17403    LDD="true"
17404  fi
17405
17406
17407  # Publish this variable in the help.
17408
17409
17410  if test "x$OTOOL" = x; then
17411    # The variable is not set by user, try to locate tool using the code snippet
17412    for ac_prog in otool
17413do
17414  # Extract the first word of "$ac_prog", so it can be a program name with args.
17415set dummy $ac_prog; ac_word=$2
17416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17417$as_echo_n "checking for $ac_word... " >&6; }
17418if ${ac_cv_path_OTOOL+:} false; then :
17419  $as_echo_n "(cached) " >&6
17420else
17421  case $OTOOL in
17422  [\\/]* | ?:[\\/]*)
17423  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17424  ;;
17425  *)
17426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17427for as_dir in $PATH
17428do
17429  IFS=$as_save_IFS
17430  test -z "$as_dir" && as_dir=.
17431    for ac_exec_ext in '' $ac_executable_extensions; do
17432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17433    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17435    break 2
17436  fi
17437done
17438  done
17439IFS=$as_save_IFS
17440
17441  ;;
17442esac
17443fi
17444OTOOL=$ac_cv_path_OTOOL
17445if test -n "$OTOOL"; then
17446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17447$as_echo "$OTOOL" >&6; }
17448else
17449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17450$as_echo "no" >&6; }
17451fi
17452
17453
17454  test -n "$OTOOL" && break
17455done
17456
17457  else
17458    # The variable is set, but is it from the command line or the environment?
17459
17460    # Try to remove the string !OTOOL! from our list.
17461    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17462    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17463      # If it failed, the variable was not from the command line. Ignore it,
17464      # but warn the user (except for BASH, which is always set by the calling BASH).
17465      if test "xOTOOL" != xBASH; then
17466        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17467$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17468      fi
17469      # Try to locate tool using the code snippet
17470      for ac_prog in otool
17471do
17472  # Extract the first word of "$ac_prog", so it can be a program name with args.
17473set dummy $ac_prog; ac_word=$2
17474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17475$as_echo_n "checking for $ac_word... " >&6; }
17476if ${ac_cv_path_OTOOL+:} false; then :
17477  $as_echo_n "(cached) " >&6
17478else
17479  case $OTOOL in
17480  [\\/]* | ?:[\\/]*)
17481  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17482  ;;
17483  *)
17484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17485for as_dir in $PATH
17486do
17487  IFS=$as_save_IFS
17488  test -z "$as_dir" && as_dir=.
17489    for ac_exec_ext in '' $ac_executable_extensions; do
17490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17491    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17493    break 2
17494  fi
17495done
17496  done
17497IFS=$as_save_IFS
17498
17499  ;;
17500esac
17501fi
17502OTOOL=$ac_cv_path_OTOOL
17503if test -n "$OTOOL"; then
17504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17505$as_echo "$OTOOL" >&6; }
17506else
17507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17508$as_echo "no" >&6; }
17509fi
17510
17511
17512  test -n "$OTOOL" && break
17513done
17514
17515    else
17516      # If it succeeded, then it was overridden by the user. We will use it
17517      # for the tool.
17518
17519      # First remove it from the list of overridden variables, so we can test
17520      # for unknown variables in the end.
17521      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17522
17523      # Check if the provided tool contains a complete path.
17524      tool_specified="$OTOOL"
17525      tool_basename="${tool_specified##*/}"
17526      if test "x$tool_basename" = "x$tool_specified"; then
17527        # A command without a complete path is provided, search $PATH.
17528        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
17529$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
17530        # Extract the first word of "$tool_basename", so it can be a program name with args.
17531set dummy $tool_basename; ac_word=$2
17532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17533$as_echo_n "checking for $ac_word... " >&6; }
17534if ${ac_cv_path_OTOOL+:} false; then :
17535  $as_echo_n "(cached) " >&6
17536else
17537  case $OTOOL in
17538  [\\/]* | ?:[\\/]*)
17539  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17540  ;;
17541  *)
17542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17543for as_dir in $PATH
17544do
17545  IFS=$as_save_IFS
17546  test -z "$as_dir" && as_dir=.
17547    for ac_exec_ext in '' $ac_executable_extensions; do
17548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17549    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17551    break 2
17552  fi
17553done
17554  done
17555IFS=$as_save_IFS
17556
17557  ;;
17558esac
17559fi
17560OTOOL=$ac_cv_path_OTOOL
17561if test -n "$OTOOL"; then
17562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17563$as_echo "$OTOOL" >&6; }
17564else
17565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17566$as_echo "no" >&6; }
17567fi
17568
17569
17570        if test "x$OTOOL" = x; then
17571          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17572        fi
17573      else
17574        # Otherwise we believe it is a complete path. Use it as it is.
17575        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
17576$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
17577        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
17578$as_echo_n "checking for OTOOL... " >&6; }
17579        if test ! -x "$tool_specified"; then
17580          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17581$as_echo "not found" >&6; }
17582          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
17583        fi
17584        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17585$as_echo "$tool_specified" >&6; }
17586      fi
17587    fi
17588  fi
17589
17590
17591  if test "x$OTOOL" = "x"; then
17592    OTOOL="true"
17593  fi
17594
17595
17596  # Publish this variable in the help.
17597
17598
17599  if test "x$READELF" = x; then
17600    # The variable is not set by user, try to locate tool using the code snippet
17601    for ac_prog in greadelf readelf
17602do
17603  # Extract the first word of "$ac_prog", so it can be a program name with args.
17604set dummy $ac_prog; ac_word=$2
17605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17606$as_echo_n "checking for $ac_word... " >&6; }
17607if ${ac_cv_path_READELF+:} false; then :
17608  $as_echo_n "(cached) " >&6
17609else
17610  case $READELF in
17611  [\\/]* | ?:[\\/]*)
17612  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17613  ;;
17614  *)
17615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17616for as_dir in $PATH
17617do
17618  IFS=$as_save_IFS
17619  test -z "$as_dir" && as_dir=.
17620    for ac_exec_ext in '' $ac_executable_extensions; do
17621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17622    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17624    break 2
17625  fi
17626done
17627  done
17628IFS=$as_save_IFS
17629
17630  ;;
17631esac
17632fi
17633READELF=$ac_cv_path_READELF
17634if test -n "$READELF"; then
17635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17636$as_echo "$READELF" >&6; }
17637else
17638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17639$as_echo "no" >&6; }
17640fi
17641
17642
17643  test -n "$READELF" && break
17644done
17645
17646  else
17647    # The variable is set, but is it from the command line or the environment?
17648
17649    # Try to remove the string !READELF! from our list.
17650    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
17651    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17652      # If it failed, the variable was not from the command line. Ignore it,
17653      # but warn the user (except for BASH, which is always set by the calling BASH).
17654      if test "xREADELF" != xBASH; then
17655        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
17656$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
17657      fi
17658      # Try to locate tool using the code snippet
17659      for ac_prog in greadelf readelf
17660do
17661  # Extract the first word of "$ac_prog", so it can be a program name with args.
17662set dummy $ac_prog; ac_word=$2
17663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17664$as_echo_n "checking for $ac_word... " >&6; }
17665if ${ac_cv_path_READELF+:} false; then :
17666  $as_echo_n "(cached) " >&6
17667else
17668  case $READELF in
17669  [\\/]* | ?:[\\/]*)
17670  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17671  ;;
17672  *)
17673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17674for as_dir in $PATH
17675do
17676  IFS=$as_save_IFS
17677  test -z "$as_dir" && as_dir=.
17678    for ac_exec_ext in '' $ac_executable_extensions; do
17679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17680    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17682    break 2
17683  fi
17684done
17685  done
17686IFS=$as_save_IFS
17687
17688  ;;
17689esac
17690fi
17691READELF=$ac_cv_path_READELF
17692if test -n "$READELF"; then
17693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17694$as_echo "$READELF" >&6; }
17695else
17696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17697$as_echo "no" >&6; }
17698fi
17699
17700
17701  test -n "$READELF" && break
17702done
17703
17704    else
17705      # If it succeeded, then it was overridden by the user. We will use it
17706      # for the tool.
17707
17708      # First remove it from the list of overridden variables, so we can test
17709      # for unknown variables in the end.
17710      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17711
17712      # Check if the provided tool contains a complete path.
17713      tool_specified="$READELF"
17714      tool_basename="${tool_specified##*/}"
17715      if test "x$tool_basename" = "x$tool_specified"; then
17716        # A command without a complete path is provided, search $PATH.
17717        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
17718$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
17719        # Extract the first word of "$tool_basename", so it can be a program name with args.
17720set dummy $tool_basename; ac_word=$2
17721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17722$as_echo_n "checking for $ac_word... " >&6; }
17723if ${ac_cv_path_READELF+:} false; then :
17724  $as_echo_n "(cached) " >&6
17725else
17726  case $READELF in
17727  [\\/]* | ?:[\\/]*)
17728  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17729  ;;
17730  *)
17731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17732for as_dir in $PATH
17733do
17734  IFS=$as_save_IFS
17735  test -z "$as_dir" && as_dir=.
17736    for ac_exec_ext in '' $ac_executable_extensions; do
17737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17738    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17740    break 2
17741  fi
17742done
17743  done
17744IFS=$as_save_IFS
17745
17746  ;;
17747esac
17748fi
17749READELF=$ac_cv_path_READELF
17750if test -n "$READELF"; then
17751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17752$as_echo "$READELF" >&6; }
17753else
17754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17755$as_echo "no" >&6; }
17756fi
17757
17758
17759        if test "x$READELF" = x; then
17760          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17761        fi
17762      else
17763        # Otherwise we believe it is a complete path. Use it as it is.
17764        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
17765$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
17766        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
17767$as_echo_n "checking for READELF... " >&6; }
17768        if test ! -x "$tool_specified"; then
17769          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17770$as_echo "not found" >&6; }
17771          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
17772        fi
17773        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17774$as_echo "$tool_specified" >&6; }
17775      fi
17776    fi
17777  fi
17778
17779
17780
17781
17782  # Publish this variable in the help.
17783
17784
17785  if test "x$HG" = x; then
17786    # The variable is not set by user, try to locate tool using the code snippet
17787    for ac_prog in hg
17788do
17789  # Extract the first word of "$ac_prog", so it can be a program name with args.
17790set dummy $ac_prog; ac_word=$2
17791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17792$as_echo_n "checking for $ac_word... " >&6; }
17793if ${ac_cv_path_HG+:} false; then :
17794  $as_echo_n "(cached) " >&6
17795else
17796  case $HG in
17797  [\\/]* | ?:[\\/]*)
17798  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17799  ;;
17800  *)
17801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17802for as_dir in $PATH
17803do
17804  IFS=$as_save_IFS
17805  test -z "$as_dir" && as_dir=.
17806    for ac_exec_ext in '' $ac_executable_extensions; do
17807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17808    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17810    break 2
17811  fi
17812done
17813  done
17814IFS=$as_save_IFS
17815
17816  ;;
17817esac
17818fi
17819HG=$ac_cv_path_HG
17820if test -n "$HG"; then
17821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17822$as_echo "$HG" >&6; }
17823else
17824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17825$as_echo "no" >&6; }
17826fi
17827
17828
17829  test -n "$HG" && break
17830done
17831
17832  else
17833    # The variable is set, but is it from the command line or the environment?
17834
17835    # Try to remove the string !HG! from our list.
17836    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
17837    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17838      # If it failed, the variable was not from the command line. Ignore it,
17839      # but warn the user (except for BASH, which is always set by the calling BASH).
17840      if test "xHG" != xBASH; then
17841        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
17842$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
17843      fi
17844      # Try to locate tool using the code snippet
17845      for ac_prog in hg
17846do
17847  # Extract the first word of "$ac_prog", so it can be a program name with args.
17848set dummy $ac_prog; ac_word=$2
17849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17850$as_echo_n "checking for $ac_word... " >&6; }
17851if ${ac_cv_path_HG+:} false; then :
17852  $as_echo_n "(cached) " >&6
17853else
17854  case $HG in
17855  [\\/]* | ?:[\\/]*)
17856  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17857  ;;
17858  *)
17859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17860for as_dir in $PATH
17861do
17862  IFS=$as_save_IFS
17863  test -z "$as_dir" && as_dir=.
17864    for ac_exec_ext in '' $ac_executable_extensions; do
17865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17866    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17868    break 2
17869  fi
17870done
17871  done
17872IFS=$as_save_IFS
17873
17874  ;;
17875esac
17876fi
17877HG=$ac_cv_path_HG
17878if test -n "$HG"; then
17879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17880$as_echo "$HG" >&6; }
17881else
17882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17883$as_echo "no" >&6; }
17884fi
17885
17886
17887  test -n "$HG" && break
17888done
17889
17890    else
17891      # If it succeeded, then it was overridden by the user. We will use it
17892      # for the tool.
17893
17894      # First remove it from the list of overridden variables, so we can test
17895      # for unknown variables in the end.
17896      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17897
17898      # Check if the provided tool contains a complete path.
17899      tool_specified="$HG"
17900      tool_basename="${tool_specified##*/}"
17901      if test "x$tool_basename" = "x$tool_specified"; then
17902        # A command without a complete path is provided, search $PATH.
17903        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
17904$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
17905        # Extract the first word of "$tool_basename", so it can be a program name with args.
17906set dummy $tool_basename; ac_word=$2
17907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17908$as_echo_n "checking for $ac_word... " >&6; }
17909if ${ac_cv_path_HG+:} false; then :
17910  $as_echo_n "(cached) " >&6
17911else
17912  case $HG in
17913  [\\/]* | ?:[\\/]*)
17914  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17915  ;;
17916  *)
17917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17918for as_dir in $PATH
17919do
17920  IFS=$as_save_IFS
17921  test -z "$as_dir" && as_dir=.
17922    for ac_exec_ext in '' $ac_executable_extensions; do
17923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17924    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17926    break 2
17927  fi
17928done
17929  done
17930IFS=$as_save_IFS
17931
17932  ;;
17933esac
17934fi
17935HG=$ac_cv_path_HG
17936if test -n "$HG"; then
17937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17938$as_echo "$HG" >&6; }
17939else
17940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17941$as_echo "no" >&6; }
17942fi
17943
17944
17945        if test "x$HG" = x; then
17946          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17947        fi
17948      else
17949        # Otherwise we believe it is a complete path. Use it as it is.
17950        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
17951$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
17952        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
17953$as_echo_n "checking for HG... " >&6; }
17954        if test ! -x "$tool_specified"; then
17955          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17956$as_echo "not found" >&6; }
17957          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
17958        fi
17959        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17960$as_echo "$tool_specified" >&6; }
17961      fi
17962    fi
17963  fi
17964
17965
17966
17967
17968  # Publish this variable in the help.
17969
17970
17971  if test "x$STAT" = x; then
17972    # The variable is not set by user, try to locate tool using the code snippet
17973    for ac_prog in stat
17974do
17975  # Extract the first word of "$ac_prog", so it can be a program name with args.
17976set dummy $ac_prog; ac_word=$2
17977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17978$as_echo_n "checking for $ac_word... " >&6; }
17979if ${ac_cv_path_STAT+:} false; then :
17980  $as_echo_n "(cached) " >&6
17981else
17982  case $STAT in
17983  [\\/]* | ?:[\\/]*)
17984  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
17985  ;;
17986  *)
17987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17988for as_dir in $PATH
17989do
17990  IFS=$as_save_IFS
17991  test -z "$as_dir" && as_dir=.
17992    for ac_exec_ext in '' $ac_executable_extensions; do
17993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17994    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
17995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17996    break 2
17997  fi
17998done
17999  done
18000IFS=$as_save_IFS
18001
18002  ;;
18003esac
18004fi
18005STAT=$ac_cv_path_STAT
18006if test -n "$STAT"; then
18007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18008$as_echo "$STAT" >&6; }
18009else
18010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18011$as_echo "no" >&6; }
18012fi
18013
18014
18015  test -n "$STAT" && break
18016done
18017
18018  else
18019    # The variable is set, but is it from the command line or the environment?
18020
18021    # Try to remove the string !STAT! from our list.
18022    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18023    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18024      # If it failed, the variable was not from the command line. Ignore it,
18025      # but warn the user (except for BASH, which is always set by the calling BASH).
18026      if test "xSTAT" != xBASH; then
18027        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18028$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18029      fi
18030      # Try to locate tool using the code snippet
18031      for ac_prog in stat
18032do
18033  # Extract the first word of "$ac_prog", so it can be a program name with args.
18034set dummy $ac_prog; ac_word=$2
18035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18036$as_echo_n "checking for $ac_word... " >&6; }
18037if ${ac_cv_path_STAT+:} false; then :
18038  $as_echo_n "(cached) " >&6
18039else
18040  case $STAT in
18041  [\\/]* | ?:[\\/]*)
18042  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18043  ;;
18044  *)
18045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18046for as_dir in $PATH
18047do
18048  IFS=$as_save_IFS
18049  test -z "$as_dir" && as_dir=.
18050    for ac_exec_ext in '' $ac_executable_extensions; do
18051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18052    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18054    break 2
18055  fi
18056done
18057  done
18058IFS=$as_save_IFS
18059
18060  ;;
18061esac
18062fi
18063STAT=$ac_cv_path_STAT
18064if test -n "$STAT"; then
18065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18066$as_echo "$STAT" >&6; }
18067else
18068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18069$as_echo "no" >&6; }
18070fi
18071
18072
18073  test -n "$STAT" && break
18074done
18075
18076    else
18077      # If it succeeded, then it was overridden by the user. We will use it
18078      # for the tool.
18079
18080      # First remove it from the list of overridden variables, so we can test
18081      # for unknown variables in the end.
18082      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18083
18084      # Check if the provided tool contains a complete path.
18085      tool_specified="$STAT"
18086      tool_basename="${tool_specified##*/}"
18087      if test "x$tool_basename" = "x$tool_specified"; then
18088        # A command without a complete path is provided, search $PATH.
18089        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18090$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18091        # Extract the first word of "$tool_basename", so it can be a program name with args.
18092set dummy $tool_basename; ac_word=$2
18093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18094$as_echo_n "checking for $ac_word... " >&6; }
18095if ${ac_cv_path_STAT+:} false; then :
18096  $as_echo_n "(cached) " >&6
18097else
18098  case $STAT in
18099  [\\/]* | ?:[\\/]*)
18100  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18101  ;;
18102  *)
18103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18104for as_dir in $PATH
18105do
18106  IFS=$as_save_IFS
18107  test -z "$as_dir" && as_dir=.
18108    for ac_exec_ext in '' $ac_executable_extensions; do
18109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18110    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18112    break 2
18113  fi
18114done
18115  done
18116IFS=$as_save_IFS
18117
18118  ;;
18119esac
18120fi
18121STAT=$ac_cv_path_STAT
18122if test -n "$STAT"; then
18123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18124$as_echo "$STAT" >&6; }
18125else
18126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18127$as_echo "no" >&6; }
18128fi
18129
18130
18131        if test "x$STAT" = x; then
18132          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18133        fi
18134      else
18135        # Otherwise we believe it is a complete path. Use it as it is.
18136        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18137$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18138        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18139$as_echo_n "checking for STAT... " >&6; }
18140        if test ! -x "$tool_specified"; then
18141          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18142$as_echo "not found" >&6; }
18143          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18144        fi
18145        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18146$as_echo "$tool_specified" >&6; }
18147      fi
18148    fi
18149  fi
18150
18151
18152
18153
18154  # Publish this variable in the help.
18155
18156
18157  if test "x$TIME" = x; then
18158    # The variable is not set by user, try to locate tool using the code snippet
18159    for ac_prog in time
18160do
18161  # Extract the first word of "$ac_prog", so it can be a program name with args.
18162set dummy $ac_prog; ac_word=$2
18163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18164$as_echo_n "checking for $ac_word... " >&6; }
18165if ${ac_cv_path_TIME+:} false; then :
18166  $as_echo_n "(cached) " >&6
18167else
18168  case $TIME in
18169  [\\/]* | ?:[\\/]*)
18170  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18171  ;;
18172  *)
18173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18174for as_dir in $PATH
18175do
18176  IFS=$as_save_IFS
18177  test -z "$as_dir" && as_dir=.
18178    for ac_exec_ext in '' $ac_executable_extensions; do
18179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18180    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18182    break 2
18183  fi
18184done
18185  done
18186IFS=$as_save_IFS
18187
18188  ;;
18189esac
18190fi
18191TIME=$ac_cv_path_TIME
18192if test -n "$TIME"; then
18193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18194$as_echo "$TIME" >&6; }
18195else
18196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18197$as_echo "no" >&6; }
18198fi
18199
18200
18201  test -n "$TIME" && break
18202done
18203
18204  else
18205    # The variable is set, but is it from the command line or the environment?
18206
18207    # Try to remove the string !TIME! from our list.
18208    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18209    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18210      # If it failed, the variable was not from the command line. Ignore it,
18211      # but warn the user (except for BASH, which is always set by the calling BASH).
18212      if test "xTIME" != xBASH; then
18213        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18214$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18215      fi
18216      # Try to locate tool using the code snippet
18217      for ac_prog in time
18218do
18219  # Extract the first word of "$ac_prog", so it can be a program name with args.
18220set dummy $ac_prog; ac_word=$2
18221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18222$as_echo_n "checking for $ac_word... " >&6; }
18223if ${ac_cv_path_TIME+:} false; then :
18224  $as_echo_n "(cached) " >&6
18225else
18226  case $TIME in
18227  [\\/]* | ?:[\\/]*)
18228  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18229  ;;
18230  *)
18231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18232for as_dir in $PATH
18233do
18234  IFS=$as_save_IFS
18235  test -z "$as_dir" && as_dir=.
18236    for ac_exec_ext in '' $ac_executable_extensions; do
18237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18238    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18240    break 2
18241  fi
18242done
18243  done
18244IFS=$as_save_IFS
18245
18246  ;;
18247esac
18248fi
18249TIME=$ac_cv_path_TIME
18250if test -n "$TIME"; then
18251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18252$as_echo "$TIME" >&6; }
18253else
18254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18255$as_echo "no" >&6; }
18256fi
18257
18258
18259  test -n "$TIME" && break
18260done
18261
18262    else
18263      # If it succeeded, then it was overridden by the user. We will use it
18264      # for the tool.
18265
18266      # First remove it from the list of overridden variables, so we can test
18267      # for unknown variables in the end.
18268      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18269
18270      # Check if the provided tool contains a complete path.
18271      tool_specified="$TIME"
18272      tool_basename="${tool_specified##*/}"
18273      if test "x$tool_basename" = "x$tool_specified"; then
18274        # A command without a complete path is provided, search $PATH.
18275        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18276$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18277        # Extract the first word of "$tool_basename", so it can be a program name with args.
18278set dummy $tool_basename; ac_word=$2
18279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18280$as_echo_n "checking for $ac_word... " >&6; }
18281if ${ac_cv_path_TIME+:} false; then :
18282  $as_echo_n "(cached) " >&6
18283else
18284  case $TIME in
18285  [\\/]* | ?:[\\/]*)
18286  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18287  ;;
18288  *)
18289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18290for as_dir in $PATH
18291do
18292  IFS=$as_save_IFS
18293  test -z "$as_dir" && as_dir=.
18294    for ac_exec_ext in '' $ac_executable_extensions; do
18295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18296    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18298    break 2
18299  fi
18300done
18301  done
18302IFS=$as_save_IFS
18303
18304  ;;
18305esac
18306fi
18307TIME=$ac_cv_path_TIME
18308if test -n "$TIME"; then
18309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18310$as_echo "$TIME" >&6; }
18311else
18312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18313$as_echo "no" >&6; }
18314fi
18315
18316
18317        if test "x$TIME" = x; then
18318          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18319        fi
18320      else
18321        # Otherwise we believe it is a complete path. Use it as it is.
18322        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18323$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18324        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18325$as_echo_n "checking for TIME... " >&6; }
18326        if test ! -x "$tool_specified"; then
18327          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18328$as_echo "not found" >&6; }
18329          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18330        fi
18331        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18332$as_echo "$tool_specified" >&6; }
18333      fi
18334    fi
18335  fi
18336
18337
18338  # Check if it's GNU time
18339  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18340  if test "x$IS_GNU_TIME" != x; then
18341    IS_GNU_TIME=yes
18342  else
18343    IS_GNU_TIME=no
18344  fi
18345
18346
18347  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18348
18349
18350
18351  # Publish this variable in the help.
18352
18353
18354  if test "x$COMM" = x; then
18355    # The variable is not set by user, try to locate tool using the code snippet
18356    for ac_prog in comm
18357do
18358  # Extract the first word of "$ac_prog", so it can be a program name with args.
18359set dummy $ac_prog; ac_word=$2
18360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18361$as_echo_n "checking for $ac_word... " >&6; }
18362if ${ac_cv_path_COMM+:} false; then :
18363  $as_echo_n "(cached) " >&6
18364else
18365  case $COMM in
18366  [\\/]* | ?:[\\/]*)
18367  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18368  ;;
18369  *)
18370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18371for as_dir in $PATH
18372do
18373  IFS=$as_save_IFS
18374  test -z "$as_dir" && as_dir=.
18375    for ac_exec_ext in '' $ac_executable_extensions; do
18376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18377    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18379    break 2
18380  fi
18381done
18382  done
18383IFS=$as_save_IFS
18384
18385  ;;
18386esac
18387fi
18388COMM=$ac_cv_path_COMM
18389if test -n "$COMM"; then
18390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18391$as_echo "$COMM" >&6; }
18392else
18393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18394$as_echo "no" >&6; }
18395fi
18396
18397
18398  test -n "$COMM" && break
18399done
18400
18401  else
18402    # The variable is set, but is it from the command line or the environment?
18403
18404    # Try to remove the string !COMM! from our list.
18405    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18406    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18407      # If it failed, the variable was not from the command line. Ignore it,
18408      # but warn the user (except for BASH, which is always set by the calling BASH).
18409      if test "xCOMM" != xBASH; then
18410        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18411$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18412      fi
18413      # Try to locate tool using the code snippet
18414      for ac_prog in comm
18415do
18416  # Extract the first word of "$ac_prog", so it can be a program name with args.
18417set dummy $ac_prog; ac_word=$2
18418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18419$as_echo_n "checking for $ac_word... " >&6; }
18420if ${ac_cv_path_COMM+:} false; then :
18421  $as_echo_n "(cached) " >&6
18422else
18423  case $COMM in
18424  [\\/]* | ?:[\\/]*)
18425  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18426  ;;
18427  *)
18428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18429for as_dir in $PATH
18430do
18431  IFS=$as_save_IFS
18432  test -z "$as_dir" && as_dir=.
18433    for ac_exec_ext in '' $ac_executable_extensions; do
18434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18435    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18437    break 2
18438  fi
18439done
18440  done
18441IFS=$as_save_IFS
18442
18443  ;;
18444esac
18445fi
18446COMM=$ac_cv_path_COMM
18447if test -n "$COMM"; then
18448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18449$as_echo "$COMM" >&6; }
18450else
18451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18452$as_echo "no" >&6; }
18453fi
18454
18455
18456  test -n "$COMM" && break
18457done
18458
18459    else
18460      # If it succeeded, then it was overridden by the user. We will use it
18461      # for the tool.
18462
18463      # First remove it from the list of overridden variables, so we can test
18464      # for unknown variables in the end.
18465      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18466
18467      # Check if the provided tool contains a complete path.
18468      tool_specified="$COMM"
18469      tool_basename="${tool_specified##*/}"
18470      if test "x$tool_basename" = "x$tool_specified"; then
18471        # A command without a complete path is provided, search $PATH.
18472        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18473$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18474        # Extract the first word of "$tool_basename", so it can be a program name with args.
18475set dummy $tool_basename; ac_word=$2
18476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18477$as_echo_n "checking for $ac_word... " >&6; }
18478if ${ac_cv_path_COMM+:} false; then :
18479  $as_echo_n "(cached) " >&6
18480else
18481  case $COMM in
18482  [\\/]* | ?:[\\/]*)
18483  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18484  ;;
18485  *)
18486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18487for as_dir in $PATH
18488do
18489  IFS=$as_save_IFS
18490  test -z "$as_dir" && as_dir=.
18491    for ac_exec_ext in '' $ac_executable_extensions; do
18492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18493    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18495    break 2
18496  fi
18497done
18498  done
18499IFS=$as_save_IFS
18500
18501  ;;
18502esac
18503fi
18504COMM=$ac_cv_path_COMM
18505if test -n "$COMM"; then
18506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18507$as_echo "$COMM" >&6; }
18508else
18509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18510$as_echo "no" >&6; }
18511fi
18512
18513
18514        if test "x$COMM" = x; then
18515          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18516        fi
18517      else
18518        # Otherwise we believe it is a complete path. Use it as it is.
18519        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18520$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18521        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18522$as_echo_n "checking for COMM... " >&6; }
18523        if test ! -x "$tool_specified"; then
18524          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18525$as_echo "not found" >&6; }
18526          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18527        fi
18528        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18529$as_echo "$tool_specified" >&6; }
18530      fi
18531    fi
18532  fi
18533
18534
18535
18536  if test "x$COMM" = x; then
18537    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18538  fi
18539
18540
18541  fi
18542
18543  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18544
18545
18546
18547  # Publish this variable in the help.
18548
18549
18550  if test "x$DSYMUTIL" = x; then
18551    # The variable is not set by user, try to locate tool using the code snippet
18552    for ac_prog in dsymutil
18553do
18554  # Extract the first word of "$ac_prog", so it can be a program name with args.
18555set dummy $ac_prog; ac_word=$2
18556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18557$as_echo_n "checking for $ac_word... " >&6; }
18558if ${ac_cv_path_DSYMUTIL+:} false; then :
18559  $as_echo_n "(cached) " >&6
18560else
18561  case $DSYMUTIL in
18562  [\\/]* | ?:[\\/]*)
18563  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18564  ;;
18565  *)
18566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18567for as_dir in $PATH
18568do
18569  IFS=$as_save_IFS
18570  test -z "$as_dir" && as_dir=.
18571    for ac_exec_ext in '' $ac_executable_extensions; do
18572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18573    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18575    break 2
18576  fi
18577done
18578  done
18579IFS=$as_save_IFS
18580
18581  ;;
18582esac
18583fi
18584DSYMUTIL=$ac_cv_path_DSYMUTIL
18585if test -n "$DSYMUTIL"; then
18586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18587$as_echo "$DSYMUTIL" >&6; }
18588else
18589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18590$as_echo "no" >&6; }
18591fi
18592
18593
18594  test -n "$DSYMUTIL" && break
18595done
18596
18597  else
18598    # The variable is set, but is it from the command line or the environment?
18599
18600    # Try to remove the string !DSYMUTIL! from our list.
18601    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18602    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18603      # If it failed, the variable was not from the command line. Ignore it,
18604      # but warn the user (except for BASH, which is always set by the calling BASH).
18605      if test "xDSYMUTIL" != xBASH; then
18606        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18607$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18608      fi
18609      # Try to locate tool using the code snippet
18610      for ac_prog in dsymutil
18611do
18612  # Extract the first word of "$ac_prog", so it can be a program name with args.
18613set dummy $ac_prog; ac_word=$2
18614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18615$as_echo_n "checking for $ac_word... " >&6; }
18616if ${ac_cv_path_DSYMUTIL+:} false; then :
18617  $as_echo_n "(cached) " >&6
18618else
18619  case $DSYMUTIL in
18620  [\\/]* | ?:[\\/]*)
18621  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18622  ;;
18623  *)
18624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18625for as_dir in $PATH
18626do
18627  IFS=$as_save_IFS
18628  test -z "$as_dir" && as_dir=.
18629    for ac_exec_ext in '' $ac_executable_extensions; do
18630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18631    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18633    break 2
18634  fi
18635done
18636  done
18637IFS=$as_save_IFS
18638
18639  ;;
18640esac
18641fi
18642DSYMUTIL=$ac_cv_path_DSYMUTIL
18643if test -n "$DSYMUTIL"; then
18644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18645$as_echo "$DSYMUTIL" >&6; }
18646else
18647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18648$as_echo "no" >&6; }
18649fi
18650
18651
18652  test -n "$DSYMUTIL" && break
18653done
18654
18655    else
18656      # If it succeeded, then it was overridden by the user. We will use it
18657      # for the tool.
18658
18659      # First remove it from the list of overridden variables, so we can test
18660      # for unknown variables in the end.
18661      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18662
18663      # Check if the provided tool contains a complete path.
18664      tool_specified="$DSYMUTIL"
18665      tool_basename="${tool_specified##*/}"
18666      if test "x$tool_basename" = "x$tool_specified"; then
18667        # A command without a complete path is provided, search $PATH.
18668        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
18669$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
18670        # Extract the first word of "$tool_basename", so it can be a program name with args.
18671set dummy $tool_basename; ac_word=$2
18672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18673$as_echo_n "checking for $ac_word... " >&6; }
18674if ${ac_cv_path_DSYMUTIL+:} false; then :
18675  $as_echo_n "(cached) " >&6
18676else
18677  case $DSYMUTIL in
18678  [\\/]* | ?:[\\/]*)
18679  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18680  ;;
18681  *)
18682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18683for as_dir in $PATH
18684do
18685  IFS=$as_save_IFS
18686  test -z "$as_dir" && as_dir=.
18687    for ac_exec_ext in '' $ac_executable_extensions; do
18688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18689    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18691    break 2
18692  fi
18693done
18694  done
18695IFS=$as_save_IFS
18696
18697  ;;
18698esac
18699fi
18700DSYMUTIL=$ac_cv_path_DSYMUTIL
18701if test -n "$DSYMUTIL"; then
18702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18703$as_echo "$DSYMUTIL" >&6; }
18704else
18705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18706$as_echo "no" >&6; }
18707fi
18708
18709
18710        if test "x$DSYMUTIL" = x; then
18711          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18712        fi
18713      else
18714        # Otherwise we believe it is a complete path. Use it as it is.
18715        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
18716$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
18717        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
18718$as_echo_n "checking for DSYMUTIL... " >&6; }
18719        if test ! -x "$tool_specified"; then
18720          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18721$as_echo "not found" >&6; }
18722          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
18723        fi
18724        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18725$as_echo "$tool_specified" >&6; }
18726      fi
18727    fi
18728  fi
18729
18730
18731
18732  if test "x$DSYMUTIL" = x; then
18733    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
18734  fi
18735
18736
18737
18738
18739
18740  # Publish this variable in the help.
18741
18742
18743  if test "x$XATTR" = x; then
18744    # The variable is not set by user, try to locate tool using the code snippet
18745    for ac_prog in xattr
18746do
18747  # Extract the first word of "$ac_prog", so it can be a program name with args.
18748set dummy $ac_prog; ac_word=$2
18749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18750$as_echo_n "checking for $ac_word... " >&6; }
18751if ${ac_cv_path_XATTR+:} false; then :
18752  $as_echo_n "(cached) " >&6
18753else
18754  case $XATTR in
18755  [\\/]* | ?:[\\/]*)
18756  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18757  ;;
18758  *)
18759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18760for as_dir in $PATH
18761do
18762  IFS=$as_save_IFS
18763  test -z "$as_dir" && as_dir=.
18764    for ac_exec_ext in '' $ac_executable_extensions; do
18765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18766    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18768    break 2
18769  fi
18770done
18771  done
18772IFS=$as_save_IFS
18773
18774  ;;
18775esac
18776fi
18777XATTR=$ac_cv_path_XATTR
18778if test -n "$XATTR"; then
18779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18780$as_echo "$XATTR" >&6; }
18781else
18782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18783$as_echo "no" >&6; }
18784fi
18785
18786
18787  test -n "$XATTR" && break
18788done
18789
18790  else
18791    # The variable is set, but is it from the command line or the environment?
18792
18793    # Try to remove the string !XATTR! from our list.
18794    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
18795    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18796      # If it failed, the variable was not from the command line. Ignore it,
18797      # but warn the user (except for BASH, which is always set by the calling BASH).
18798      if test "xXATTR" != xBASH; then
18799        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
18800$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
18801      fi
18802      # Try to locate tool using the code snippet
18803      for ac_prog in xattr
18804do
18805  # Extract the first word of "$ac_prog", so it can be a program name with args.
18806set dummy $ac_prog; ac_word=$2
18807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18808$as_echo_n "checking for $ac_word... " >&6; }
18809if ${ac_cv_path_XATTR+:} false; then :
18810  $as_echo_n "(cached) " >&6
18811else
18812  case $XATTR in
18813  [\\/]* | ?:[\\/]*)
18814  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18815  ;;
18816  *)
18817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18818for as_dir in $PATH
18819do
18820  IFS=$as_save_IFS
18821  test -z "$as_dir" && as_dir=.
18822    for ac_exec_ext in '' $ac_executable_extensions; do
18823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18824    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18826    break 2
18827  fi
18828done
18829  done
18830IFS=$as_save_IFS
18831
18832  ;;
18833esac
18834fi
18835XATTR=$ac_cv_path_XATTR
18836if test -n "$XATTR"; then
18837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18838$as_echo "$XATTR" >&6; }
18839else
18840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18841$as_echo "no" >&6; }
18842fi
18843
18844
18845  test -n "$XATTR" && break
18846done
18847
18848    else
18849      # If it succeeded, then it was overridden by the user. We will use it
18850      # for the tool.
18851
18852      # First remove it from the list of overridden variables, so we can test
18853      # for unknown variables in the end.
18854      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18855
18856      # Check if the provided tool contains a complete path.
18857      tool_specified="$XATTR"
18858      tool_basename="${tool_specified##*/}"
18859      if test "x$tool_basename" = "x$tool_specified"; then
18860        # A command without a complete path is provided, search $PATH.
18861        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
18862$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
18863        # Extract the first word of "$tool_basename", so it can be a program name with args.
18864set dummy $tool_basename; ac_word=$2
18865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18866$as_echo_n "checking for $ac_word... " >&6; }
18867if ${ac_cv_path_XATTR+:} false; then :
18868  $as_echo_n "(cached) " >&6
18869else
18870  case $XATTR in
18871  [\\/]* | ?:[\\/]*)
18872  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18873  ;;
18874  *)
18875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18876for as_dir in $PATH
18877do
18878  IFS=$as_save_IFS
18879  test -z "$as_dir" && as_dir=.
18880    for ac_exec_ext in '' $ac_executable_extensions; do
18881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18882    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18884    break 2
18885  fi
18886done
18887  done
18888IFS=$as_save_IFS
18889
18890  ;;
18891esac
18892fi
18893XATTR=$ac_cv_path_XATTR
18894if test -n "$XATTR"; then
18895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18896$as_echo "$XATTR" >&6; }
18897else
18898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18899$as_echo "no" >&6; }
18900fi
18901
18902
18903        if test "x$XATTR" = x; then
18904          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18905        fi
18906      else
18907        # Otherwise we believe it is a complete path. Use it as it is.
18908        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
18909$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
18910        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
18911$as_echo_n "checking for XATTR... " >&6; }
18912        if test ! -x "$tool_specified"; then
18913          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18914$as_echo "not found" >&6; }
18915          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
18916        fi
18917        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18918$as_echo "$tool_specified" >&6; }
18919      fi
18920    fi
18921  fi
18922
18923
18924
18925  if test "x$XATTR" = x; then
18926    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
18927  fi
18928
18929
18930
18931
18932  # Publish this variable in the help.
18933
18934
18935  if test "x$CODESIGN" = x; then
18936    # The variable is not set by user, try to locate tool using the code snippet
18937    for ac_prog in codesign
18938do
18939  # Extract the first word of "$ac_prog", so it can be a program name with args.
18940set dummy $ac_prog; ac_word=$2
18941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18942$as_echo_n "checking for $ac_word... " >&6; }
18943if ${ac_cv_path_CODESIGN+:} false; then :
18944  $as_echo_n "(cached) " >&6
18945else
18946  case $CODESIGN in
18947  [\\/]* | ?:[\\/]*)
18948  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18949  ;;
18950  *)
18951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18952for as_dir in $PATH
18953do
18954  IFS=$as_save_IFS
18955  test -z "$as_dir" && as_dir=.
18956    for ac_exec_ext in '' $ac_executable_extensions; do
18957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18958    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18960    break 2
18961  fi
18962done
18963  done
18964IFS=$as_save_IFS
18965
18966  ;;
18967esac
18968fi
18969CODESIGN=$ac_cv_path_CODESIGN
18970if test -n "$CODESIGN"; then
18971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
18972$as_echo "$CODESIGN" >&6; }
18973else
18974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18975$as_echo "no" >&6; }
18976fi
18977
18978
18979  test -n "$CODESIGN" && break
18980done
18981
18982  else
18983    # The variable is set, but is it from the command line or the environment?
18984
18985    # Try to remove the string !CODESIGN! from our list.
18986    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
18987    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18988      # If it failed, the variable was not from the command line. Ignore it,
18989      # but warn the user (except for BASH, which is always set by the calling BASH).
18990      if test "xCODESIGN" != xBASH; then
18991        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
18992$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
18993      fi
18994      # Try to locate tool using the code snippet
18995      for ac_prog in codesign
18996do
18997  # Extract the first word of "$ac_prog", so it can be a program name with args.
18998set dummy $ac_prog; ac_word=$2
18999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19000$as_echo_n "checking for $ac_word... " >&6; }
19001if ${ac_cv_path_CODESIGN+:} false; then :
19002  $as_echo_n "(cached) " >&6
19003else
19004  case $CODESIGN in
19005  [\\/]* | ?:[\\/]*)
19006  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19007  ;;
19008  *)
19009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19010for as_dir in $PATH
19011do
19012  IFS=$as_save_IFS
19013  test -z "$as_dir" && as_dir=.
19014    for ac_exec_ext in '' $ac_executable_extensions; do
19015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19016    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19018    break 2
19019  fi
19020done
19021  done
19022IFS=$as_save_IFS
19023
19024  ;;
19025esac
19026fi
19027CODESIGN=$ac_cv_path_CODESIGN
19028if test -n "$CODESIGN"; then
19029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19030$as_echo "$CODESIGN" >&6; }
19031else
19032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19033$as_echo "no" >&6; }
19034fi
19035
19036
19037  test -n "$CODESIGN" && break
19038done
19039
19040    else
19041      # If it succeeded, then it was overridden by the user. We will use it
19042      # for the tool.
19043
19044      # First remove it from the list of overridden variables, so we can test
19045      # for unknown variables in the end.
19046      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19047
19048      # Check if the provided tool contains a complete path.
19049      tool_specified="$CODESIGN"
19050      tool_basename="${tool_specified##*/}"
19051      if test "x$tool_basename" = "x$tool_specified"; then
19052        # A command without a complete path is provided, search $PATH.
19053        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19054$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19055        # Extract the first word of "$tool_basename", so it can be a program name with args.
19056set dummy $tool_basename; ac_word=$2
19057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19058$as_echo_n "checking for $ac_word... " >&6; }
19059if ${ac_cv_path_CODESIGN+:} false; then :
19060  $as_echo_n "(cached) " >&6
19061else
19062  case $CODESIGN in
19063  [\\/]* | ?:[\\/]*)
19064  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19065  ;;
19066  *)
19067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19068for as_dir in $PATH
19069do
19070  IFS=$as_save_IFS
19071  test -z "$as_dir" && as_dir=.
19072    for ac_exec_ext in '' $ac_executable_extensions; do
19073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19074    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19076    break 2
19077  fi
19078done
19079  done
19080IFS=$as_save_IFS
19081
19082  ;;
19083esac
19084fi
19085CODESIGN=$ac_cv_path_CODESIGN
19086if test -n "$CODESIGN"; then
19087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19088$as_echo "$CODESIGN" >&6; }
19089else
19090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19091$as_echo "no" >&6; }
19092fi
19093
19094
19095        if test "x$CODESIGN" = x; then
19096          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19097        fi
19098      else
19099        # Otherwise we believe it is a complete path. Use it as it is.
19100        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19101$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19103$as_echo_n "checking for CODESIGN... " >&6; }
19104        if test ! -x "$tool_specified"; then
19105          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19106$as_echo "not found" >&6; }
19107          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19108        fi
19109        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19110$as_echo "$tool_specified" >&6; }
19111      fi
19112    fi
19113  fi
19114
19115
19116    if test "x$CODESIGN" != "x"; then
19117      # Verify that the openjdk_codesign certificate is present
19118      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19119$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19120      rm -f codesign-testfile
19121      touch codesign-testfile
19122      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19123      rm -f codesign-testfile
19124      if test "x$CODESIGN" = x; then
19125        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19126$as_echo "no" >&6; }
19127      else
19128        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19129$as_echo "yes" >&6; }
19130      fi
19131    fi
19132  fi
19133
19134
19135# Check if pkg-config is available.
19136
19137
19138if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19139	if test -n "$ac_tool_prefix"; then
19140  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19141set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19143$as_echo_n "checking for $ac_word... " >&6; }
19144if ${ac_cv_path_PKG_CONFIG+:} false; then :
19145  $as_echo_n "(cached) " >&6
19146else
19147  case $PKG_CONFIG in
19148  [\\/]* | ?:[\\/]*)
19149  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19150  ;;
19151  *)
19152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19153for as_dir in $PATH
19154do
19155  IFS=$as_save_IFS
19156  test -z "$as_dir" && as_dir=.
19157    for ac_exec_ext in '' $ac_executable_extensions; do
19158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19159    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19161    break 2
19162  fi
19163done
19164  done
19165IFS=$as_save_IFS
19166
19167  ;;
19168esac
19169fi
19170PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19171if test -n "$PKG_CONFIG"; then
19172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19173$as_echo "$PKG_CONFIG" >&6; }
19174else
19175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19176$as_echo "no" >&6; }
19177fi
19178
19179
19180fi
19181if test -z "$ac_cv_path_PKG_CONFIG"; then
19182  ac_pt_PKG_CONFIG=$PKG_CONFIG
19183  # Extract the first word of "pkg-config", so it can be a program name with args.
19184set dummy pkg-config; ac_word=$2
19185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19186$as_echo_n "checking for $ac_word... " >&6; }
19187if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19188  $as_echo_n "(cached) " >&6
19189else
19190  case $ac_pt_PKG_CONFIG in
19191  [\\/]* | ?:[\\/]*)
19192  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19193  ;;
19194  *)
19195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19196for as_dir in $PATH
19197do
19198  IFS=$as_save_IFS
19199  test -z "$as_dir" && as_dir=.
19200    for ac_exec_ext in '' $ac_executable_extensions; do
19201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19202    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19204    break 2
19205  fi
19206done
19207  done
19208IFS=$as_save_IFS
19209
19210  ;;
19211esac
19212fi
19213ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19214if test -n "$ac_pt_PKG_CONFIG"; then
19215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19216$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19217else
19218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19219$as_echo "no" >&6; }
19220fi
19221
19222  if test "x$ac_pt_PKG_CONFIG" = x; then
19223    PKG_CONFIG=""
19224  else
19225    case $cross_compiling:$ac_tool_warned in
19226yes:)
19227{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19228$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19229ac_tool_warned=yes ;;
19230esac
19231    PKG_CONFIG=$ac_pt_PKG_CONFIG
19232  fi
19233else
19234  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19235fi
19236
19237fi
19238if test -n "$PKG_CONFIG"; then
19239	_pkg_min_version=0.9.0
19240	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19241$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19242	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19243		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19244$as_echo "yes" >&6; }
19245	else
19246		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19247$as_echo "no" >&6; }
19248		PKG_CONFIG=""
19249	fi
19250
19251fi
19252
19253# After basic tools have been setup, we can check build os specific details.
19254
19255  ###############################################################################
19256
19257  # Note that this is the build platform OS version!
19258
19259  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19260  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19261  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19262  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19263
19264
19265
19266
19267
19268# Setup builddeps, for automatic downloading of tools we need.
19269# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19270# boot-jdk setup, but we need to have basic tools setup first.
19271
19272
19273# Check whether --with-builddeps-conf was given.
19274if test "${with_builddeps_conf+set}" = set; then :
19275  withval=$with_builddeps_conf;
19276fi
19277
19278
19279
19280# Check whether --with-builddeps-server was given.
19281if test "${with_builddeps_server+set}" = set; then :
19282  withval=$with_builddeps_server;
19283fi
19284
19285
19286
19287# Check whether --with-builddeps-dir was given.
19288if test "${with_builddeps_dir+set}" = set; then :
19289  withval=$with_builddeps_dir;
19290else
19291  with_builddeps_dir=/localhome/builddeps
19292fi
19293
19294
19295
19296# Check whether --with-builddeps-group was given.
19297if test "${with_builddeps_group+set}" = set; then :
19298  withval=$with_builddeps_group;
19299fi
19300
19301
19302
19303
19304  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19305    if test "x$with_builddeps_conf" != x; then
19306      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19307$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19308      builddepsfile=$with_builddeps_conf
19309      if test -s $builddepsfile; then
19310        . $builddepsfile
19311        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19312$as_echo "loaded!" >&6; }
19313      else
19314        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19315      fi
19316    else
19317      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19318$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19319      builddepsfile=`mktemp`
19320      touch $builddepsfile
19321      # Put all found confs into a single file.
19322      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19323      # Source the file to acquire the variables
19324      if test -s $builddepsfile; then
19325        . $builddepsfile
19326        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19327$as_echo "found at least one!" >&6; }
19328      else
19329        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19330      fi
19331    fi
19332    # Create build and target names that use _ instead of "-" and ".".
19333    # This is necessary to use them in variable names.
19334    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19335    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19336    # Extract rewrite information for build and target
19337    eval rewritten_build=\${REWRITE_${build_var}}
19338    if test "x$rewritten_build" = x; then
19339      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19340      echo Build stays the same $rewritten_build
19341    else
19342      echo Rewriting build for builddeps into $rewritten_build
19343    fi
19344    eval rewritten_target=\${REWRITE_${target_var}}
19345    if test "x$rewritten_target" = x; then
19346      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19347      echo Target stays the same $rewritten_target
19348    else
19349      echo Rewriting target for builddeps into $rewritten_target
19350    fi
19351    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19352    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19353  fi
19354  for ac_prog in 7z unzip
19355do
19356  # Extract the first word of "$ac_prog", so it can be a program name with args.
19357set dummy $ac_prog; ac_word=$2
19358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19359$as_echo_n "checking for $ac_word... " >&6; }
19360if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19361  $as_echo_n "(cached) " >&6
19362else
19363  if test -n "$BDEPS_UNZIP"; then
19364  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19365else
19366as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19367for as_dir in $PATH
19368do
19369  IFS=$as_save_IFS
19370  test -z "$as_dir" && as_dir=.
19371    for ac_exec_ext in '' $ac_executable_extensions; do
19372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19373    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19375    break 2
19376  fi
19377done
19378  done
19379IFS=$as_save_IFS
19380
19381fi
19382fi
19383BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19384if test -n "$BDEPS_UNZIP"; then
19385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19386$as_echo "$BDEPS_UNZIP" >&6; }
19387else
19388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19389$as_echo "no" >&6; }
19390fi
19391
19392
19393  test -n "$BDEPS_UNZIP" && break
19394done
19395
19396  if test "x$BDEPS_UNZIP" = x7z; then
19397    BDEPS_UNZIP="7z x"
19398  fi
19399
19400  for ac_prog in wget lftp ftp
19401do
19402  # Extract the first word of "$ac_prog", so it can be a program name with args.
19403set dummy $ac_prog; ac_word=$2
19404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19405$as_echo_n "checking for $ac_word... " >&6; }
19406if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19407  $as_echo_n "(cached) " >&6
19408else
19409  if test -n "$BDEPS_FTP"; then
19410  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19411else
19412as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19413for as_dir in $PATH
19414do
19415  IFS=$as_save_IFS
19416  test -z "$as_dir" && as_dir=.
19417    for ac_exec_ext in '' $ac_executable_extensions; do
19418  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19419    ac_cv_prog_BDEPS_FTP="$ac_prog"
19420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19421    break 2
19422  fi
19423done
19424  done
19425IFS=$as_save_IFS
19426
19427fi
19428fi
19429BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19430if test -n "$BDEPS_FTP"; then
19431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19432$as_echo "$BDEPS_FTP" >&6; }
19433else
19434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19435$as_echo "no" >&6; }
19436fi
19437
19438
19439  test -n "$BDEPS_FTP" && break
19440done
19441
19442
19443
19444###############################################################################
19445#
19446# Determine OpenJDK variants, options and version numbers.
19447#
19448###############################################################################
19449
19450# We need build & target for this.
19451
19452
19453  ###############################################################################
19454  #
19455  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19456  # We always build headless support.
19457  #
19458  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19459$as_echo_n "checking headful support... " >&6; }
19460  # Check whether --enable-headful was given.
19461if test "${enable_headful+set}" = set; then :
19462  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19463else
19464  SUPPORT_HEADFUL=yes
19465fi
19466
19467
19468  SUPPORT_HEADLESS=yes
19469  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19470
19471  if test "x$SUPPORT_HEADFUL" = xyes; then
19472    # We are building both headful and headless.
19473    headful_msg="include support for both headful and headless"
19474  fi
19475
19476  if test "x$SUPPORT_HEADFUL" = xno; then
19477    # Thus we are building headless only.
19478    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19479    headful_msg="headless only"
19480  fi
19481
19482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19483$as_echo "$headful_msg" >&6; }
19484
19485
19486
19487
19488
19489  # Control wether Hotspot runs Queens test after build.
19490  # Check whether --enable-hotspot-test-in-build was given.
19491if test "${enable_hotspot_test_in_build+set}" = set; then :
19492  enableval=$enable_hotspot_test_in_build;
19493else
19494  enable_hotspot_test_in_build=no
19495fi
19496
19497  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19498    TEST_IN_BUILD=true
19499  else
19500    TEST_IN_BUILD=false
19501  fi
19502
19503
19504  ###############################################################################
19505  #
19506  # Choose cacerts source file
19507  #
19508
19509# Check whether --with-cacerts-file was given.
19510if test "${with_cacerts_file+set}" = set; then :
19511  withval=$with_cacerts_file;
19512fi
19513
19514  if test "x$with_cacerts_file" != x; then
19515    CACERTS_FILE=$with_cacerts_file
19516  else
19517    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19518  fi
19519
19520
19521  ###############################################################################
19522  #
19523  # Enable or disable unlimited crypto
19524  #
19525  # Check whether --enable-unlimited-crypto was given.
19526if test "${enable_unlimited_crypto+set}" = set; then :
19527  enableval=$enable_unlimited_crypto;
19528else
19529  enable_unlimited_crypto=no
19530fi
19531
19532  if test "x$enable_unlimited_crypto" = "xyes"; then
19533    UNLIMITED_CRYPTO=true
19534  else
19535    UNLIMITED_CRYPTO=false
19536  fi
19537
19538
19539  ###############################################################################
19540  #
19541  # Enable or disable the elliptic curve crypto implementation
19542  #
19543
19544
19545  ###############################################################################
19546  #
19547  # --enable-rmiconnector-iiop
19548  #
19549  # Check whether --enable-rmiconnector-iiop was given.
19550if test "${enable_rmiconnector_iiop+set}" = set; then :
19551  enableval=$enable_rmiconnector_iiop;
19552fi
19553
19554  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19555    RMICONNECTOR_IIOP=true
19556  else
19557    RMICONNECTOR_IIOP=false
19558  fi
19559
19560
19561  ###############################################################################
19562  #
19563  # Compress jars
19564  #
19565  COMPRESS_JARS=false
19566
19567
19568
19569
19570  # Source the version numbers
19571  . $AUTOCONF_DIR/version-numbers
19572
19573  # Get the settings from parameters
19574
19575# Check whether --with-milestone was given.
19576if test "${with_milestone+set}" = set; then :
19577  withval=$with_milestone;
19578fi
19579
19580  if test "x$with_milestone" = xyes; then
19581    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19582  elif test "x$with_milestone" != x; then
19583    MILESTONE="$with_milestone"
19584  fi
19585  if test "x$MILESTONE" = x; then
19586    MILESTONE=internal
19587  fi
19588
19589
19590# Check whether --with-update-version was given.
19591if test "${with_update_version+set}" = set; then :
19592  withval=$with_update_version;
19593fi
19594
19595  if test "x$with_update_version" = xyes; then
19596    as_fn_error $? "Update version must have a value" "$LINENO" 5
19597  elif test "x$with_update_version" != x; then
19598    JDK_UPDATE_VERSION="$with_update_version"
19599    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19600    # to a bug in expr (which reduces it to just X). To work around this, we
19601    # always add a 0 to one digit update versions.
19602    if test "${#JDK_UPDATE_VERSION}" = "1"; then
19603      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19604    fi
19605  fi
19606
19607
19608# Check whether --with-user-release-suffix was given.
19609if test "${with_user_release_suffix+set}" = set; then :
19610  withval=$with_user_release_suffix;
19611fi
19612
19613  if test "x$with_user_release_suffix" = xyes; then
19614    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19615  elif test "x$with_user_release_suffix" != x; then
19616    USER_RELEASE_SUFFIX="$with_user_release_suffix"
19617  fi
19618
19619
19620# Check whether --with-build-number was given.
19621if test "${with_build_number+set}" = set; then :
19622  withval=$with_build_number;
19623fi
19624
19625  if test "x$with_build_number" = xyes; then
19626    as_fn_error $? "Build number must have a value" "$LINENO" 5
19627  elif test "x$with_build_number" != x; then
19628    JDK_BUILD_NUMBER="$with_build_number"
19629  fi
19630  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19631  if test "x$JDK_BUILD_NUMBER" = x; then
19632    JDK_BUILD_NUMBER=b00
19633    if test "x$USER_RELEASE_SUFFIX" = x; then
19634      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19635      # Avoid [:alnum:] since it depends on the locale.
19636      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19637      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19638    fi
19639  fi
19640
19641  # Now set the JDK version, milestone, build number etc.
19642
19643
19644
19645
19646
19647
19648
19649
19650
19651
19652
19653
19654
19655
19656
19657  COPYRIGHT_YEAR=`date +'%Y'`
19658
19659
19660  if test "x$JDK_UPDATE_VERSION" != x; then
19661    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
19662  else
19663    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
19664  fi
19665
19666
19667  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
19668
19669
19670
19671###############################################################################
19672#
19673# Setup BootJDK, used to bootstrap the build.
19674#
19675###############################################################################
19676
19677
19678  BOOT_JDK_FOUND=no
19679
19680# Check whether --with-boot-jdk was given.
19681if test "${with_boot_jdk+set}" = set; then :
19682  withval=$with_boot_jdk;
19683fi
19684
19685
19686  # We look for the Boot JDK through various means, going from more certain to
19687  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
19688  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
19689  # must check if this is indeed valid; otherwise we'll continue looking.
19690
19691  # Test: Is bootjdk explicitely set by command line arguments?
19692
19693  if test "x$BOOT_JDK_FOUND" = xno; then
19694    # Now execute the test
19695
19696  if test "x$with_boot_jdk" != x; then
19697    BOOT_JDK=$with_boot_jdk
19698    BOOT_JDK_FOUND=maybe
19699    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
19700$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
19701  fi
19702
19703
19704    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19705    if test "x$BOOT_JDK_FOUND" = xmaybe; then
19706      # Do we have a bin/java?
19707      if test ! -x "$BOOT_JDK/bin/java"; then
19708        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19709$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19710        BOOT_JDK_FOUND=no
19711      else
19712        # Do we have a bin/javac?
19713        if test ! -x "$BOOT_JDK/bin/javac"; then
19714          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19715$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19716          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19717$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19718          BOOT_JDK_FOUND=no
19719        else
19720          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19721          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19722            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19723$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19724            BOOT_JDK_FOUND=no
19725          else
19726            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19727            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19728
19729            # Extra M4 quote needed to protect [] in grep expression.
19730            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
19731            if test "x$FOUND_CORRECT_VERSION" = x; then
19732              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19733$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19734              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
19735$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
19736              BOOT_JDK_FOUND=no
19737            else
19738              # We're done! :-)
19739              BOOT_JDK_FOUND=yes
19740
19741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19742
19743  # Input might be given as Windows format, start by converting to
19744  # unix format.
19745  path="$BOOT_JDK"
19746  new_path=`$CYGPATH -u "$path"`
19747
19748  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19749  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19750  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19751  # "foo.exe" is OK but "foo" is an error.
19752  #
19753  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19754  # It is also a way to make sure we got the proper file name for the real test later on.
19755  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19756  if test "x$test_shortpath" = x; then
19757    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19758$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19759    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19760  fi
19761
19762  # Call helper function which possibly converts this using DOS-style short mode.
19763  # If so, the updated path is stored in $new_path.
19764
19765  input_path="$new_path"
19766  # Check if we need to convert this using DOS-style short mode. If the path
19767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19768  # take no chances and rewrite it.
19769  # Note: m4 eats our [], so we need to use [ and ] instead.
19770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19771  if test "x$has_forbidden_chars" != x; then
19772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19776      # Going to short mode and back again did indeed matter. Since short mode is
19777      # case insensitive, let's make it lowercase to improve readability.
19778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19779      # Now convert it back to Unix-stile (cygpath)
19780      input_path=`$CYGPATH -u "$shortmode_path"`
19781      new_path="$input_path"
19782    fi
19783  fi
19784
19785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19786  if test "x$test_cygdrive_prefix" = x; then
19787    # As a simple fix, exclude /usr/bin since it's not a real path.
19788    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19790      # a path prefixed by /cygdrive for fixpath to work.
19791      new_path="$CYGWIN_ROOT_PATH$input_path"
19792    fi
19793  fi
19794
19795
19796  if test "x$path" != "x$new_path"; then
19797    BOOT_JDK="$new_path"
19798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19799$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19800  fi
19801
19802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19803
19804  path="$BOOT_JDK"
19805  has_colon=`$ECHO $path | $GREP ^.:`
19806  new_path="$path"
19807  if test "x$has_colon" = x; then
19808    # Not in mixed or Windows style, start by that.
19809    new_path=`cmd //c echo $path`
19810  fi
19811
19812
19813  input_path="$new_path"
19814  # Check if we need to convert this using DOS-style short mode. If the path
19815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19816  # take no chances and rewrite it.
19817  # Note: m4 eats our [], so we need to use [ and ] instead.
19818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19819  if test "x$has_forbidden_chars" != x; then
19820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19821    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19822  fi
19823
19824
19825  windows_path="$new_path"
19826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19827    unix_path=`$CYGPATH -u "$windows_path"`
19828    new_path="$unix_path"
19829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19831    new_path="$unix_path"
19832  fi
19833
19834  if test "x$path" != "x$new_path"; then
19835    BOOT_JDK="$new_path"
19836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19837$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19838  fi
19839
19840  # Save the first 10 bytes of this path to the storage, so fixpath can work.
19841  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19842
19843  else
19844    # We're on a posix platform. Hooray! :)
19845    path="$BOOT_JDK"
19846    has_space=`$ECHO "$path" | $GREP " "`
19847    if test "x$has_space" != x; then
19848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19849$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19850      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
19851    fi
19852
19853    # Use eval to expand a potential ~
19854    eval path="$path"
19855    if test ! -f "$path" && test ! -d "$path"; then
19856      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
19857    fi
19858
19859    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
19860  fi
19861
19862              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
19863$as_echo_n "checking for Boot JDK... " >&6; }
19864              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
19865$as_echo "$BOOT_JDK" >&6; }
19866              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
19867$as_echo_n "checking Boot JDK version... " >&6; }
19868              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
19869              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
19870$as_echo "$BOOT_JDK_VERSION" >&6; }
19871            fi # end check jdk version
19872          fi # end check rt.jar
19873        fi # end check javac
19874      fi # end check java
19875    fi # end check boot jdk found
19876  fi
19877
19878  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
19879    # Having specified an argument which is incorrect will produce an instant failure;
19880    # we should not go on looking
19881    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
19882  fi
19883
19884  # Test: Is bootjdk available from builddeps?
19885
19886  if test "x$BOOT_JDK_FOUND" = xno; then
19887    # Now execute the test
19888
19889
19890
19891  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19892    # Source the builddeps file again, to make sure it uses the latest variables!
19893    . $builddepsfile
19894    # Look for a target and build machine specific resource!
19895    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19896    if test "x$resource" = x; then
19897      # Ok, lets instead look for a target specific resource
19898      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
19899    fi
19900    if test "x$resource" = x; then
19901      # Ok, lets instead look for a build specific resource
19902      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
19903    fi
19904    if test "x$resource" = x; then
19905      # Ok, lets instead look for a generic resource
19906      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
19907      resource=${builddep_bootjdk}
19908    fi
19909    if test "x$resource" != x; then
19910      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
19911$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
19912      # If the resource in the builddeps.conf file is an existing directory,
19913      # for example /java/linux/cups
19914      if test -d ${resource}; then
19915        depdir=${resource}
19916      else
19917
19918  # bootjdk is for example mymodule
19919  # $resource is for example libs/general/libmymod_1_2_3.zip
19920  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19921  # $with_builddeps_dir is for example /localhome/builddeps
19922  # depdir is the name of the variable into which we store the depdir, eg MYMOD
19923  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19924  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19925  filename=`basename $resource`
19926  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19927  filebase=${filename%%.*}
19928  extension=${filename#*.}
19929  installdir=$with_builddeps_dir/$filebase
19930  if test ! -f $installdir/$filename.unpacked; then
19931    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
19932$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19933    if test ! -d $installdir; then
19934      mkdir -p $installdir
19935    fi
19936    if test ! -d $installdir; then
19937      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19938    fi
19939    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
19940    touch $tmpfile
19941    if test ! -f $tmpfile; then
19942      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19943    fi
19944
19945  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19946  # $tmpfile is the local file name for the downloaded file.
19947  VALID_TOOL=no
19948  if test "x$BDEPS_FTP" = xwget; then
19949    VALID_TOOL=yes
19950    wget -O $tmpfile $with_builddeps_server/$resource
19951  fi
19952  if test "x$BDEPS_FTP" = xlftp; then
19953    VALID_TOOL=yes
19954    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19955  fi
19956  if test "x$BDEPS_FTP" = xftp; then
19957    VALID_TOOL=yes
19958    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19959    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19960    FTPUSERPWD=${FTPSERVER%%@*}
19961    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19962      FTPUSER=${userpwd%%:*}
19963      FTPPWD=${userpwd#*@}
19964      FTPSERVER=${FTPSERVER#*@}
19965    else
19966      FTPUSER=ftp
19967      FTPPWD=ftp
19968    fi
19969    # the "pass" command does not work on some
19970    # ftp clients (read ftp.exe) but if it works,
19971    # passive mode is better!
19972    ( \
19973        echo "user $FTPUSER $FTPPWD"        ; \
19974        echo "pass"                         ; \
19975        echo "bin"                          ; \
19976        echo "get $FTPPATH $tmpfile"              ; \
19977    ) | ftp -in $FTPSERVER
19978  fi
19979  if test "x$VALID_TOOL" != xyes; then
19980    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19981  fi
19982
19983    mv $tmpfile $installdir/$filename
19984    if test ! -s $installdir/$filename; then
19985      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19986    fi
19987    case "$extension" in
19988      zip)  echo "Unzipping $installdir/$filename..."
19989        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19990        ;;
19991      tar.gz) echo "Untaring $installdir/$filename..."
19992        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19993        ;;
19994      tgz) echo "Untaring $installdir/$filename..."
19995        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19996        ;;
19997      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19998        ;;
19999    esac
20000  fi
20001  if test -f $installdir/$filename.unpacked; then
20002    depdir=$installdir
20003  fi
20004
20005      fi
20006      # Source the builddeps file again, because in the previous command, the depdir
20007      # was updated to point at the current build dependency install directory.
20008      . $builddepsfile
20009      # Now extract variables from the builddeps.conf files.
20010      theroot=${builddep_bootjdk_ROOT}
20011      thecflags=${builddep_bootjdk_CFLAGS}
20012      thelibs=${builddep_bootjdk_LIBS}
20013      if test "x$depdir" = x; then
20014        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20015      fi
20016      BOOT_JDK=$depdir
20017      if test "x$theroot" != x; then
20018        BOOT_JDK="$theroot"
20019      fi
20020      if test "x$thecflags" != x; then
20021        BOOT_JDK_CFLAGS="$thecflags"
20022      fi
20023      if test "x$thelibs" != x; then
20024        BOOT_JDK_LIBS="$thelibs"
20025      fi
20026      BOOT_JDK_FOUND=maybe
20027      else BOOT_JDK_FOUND=no
20028
20029    fi
20030    else BOOT_JDK_FOUND=no
20031
20032  fi
20033
20034
20035
20036    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20037    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20038      # Do we have a bin/java?
20039      if test ! -x "$BOOT_JDK/bin/java"; then
20040        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20041$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20042        BOOT_JDK_FOUND=no
20043      else
20044        # Do we have a bin/javac?
20045        if test ! -x "$BOOT_JDK/bin/javac"; then
20046          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20047$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20048          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20049$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20050          BOOT_JDK_FOUND=no
20051        else
20052          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20053          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20054            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20055$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20056            BOOT_JDK_FOUND=no
20057          else
20058            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20059            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20060
20061            # Extra M4 quote needed to protect [] in grep expression.
20062            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20063            if test "x$FOUND_CORRECT_VERSION" = x; then
20064              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20065$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20066              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20067$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20068              BOOT_JDK_FOUND=no
20069            else
20070              # We're done! :-)
20071              BOOT_JDK_FOUND=yes
20072
20073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20074
20075  # Input might be given as Windows format, start by converting to
20076  # unix format.
20077  path="$BOOT_JDK"
20078  new_path=`$CYGPATH -u "$path"`
20079
20080  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20081  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20082  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20083  # "foo.exe" is OK but "foo" is an error.
20084  #
20085  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20086  # It is also a way to make sure we got the proper file name for the real test later on.
20087  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20088  if test "x$test_shortpath" = x; then
20089    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20090$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20091    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20092  fi
20093
20094  # Call helper function which possibly converts this using DOS-style short mode.
20095  # If so, the updated path is stored in $new_path.
20096
20097  input_path="$new_path"
20098  # Check if we need to convert this using DOS-style short mode. If the path
20099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20100  # take no chances and rewrite it.
20101  # Note: m4 eats our [], so we need to use [ and ] instead.
20102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20103  if test "x$has_forbidden_chars" != x; then
20104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20105    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20106    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20107    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20108      # Going to short mode and back again did indeed matter. Since short mode is
20109      # case insensitive, let's make it lowercase to improve readability.
20110      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20111      # Now convert it back to Unix-stile (cygpath)
20112      input_path=`$CYGPATH -u "$shortmode_path"`
20113      new_path="$input_path"
20114    fi
20115  fi
20116
20117  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20118  if test "x$test_cygdrive_prefix" = x; then
20119    # As a simple fix, exclude /usr/bin since it's not a real path.
20120    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20121      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20122      # a path prefixed by /cygdrive for fixpath to work.
20123      new_path="$CYGWIN_ROOT_PATH$input_path"
20124    fi
20125  fi
20126
20127
20128  if test "x$path" != "x$new_path"; then
20129    BOOT_JDK="$new_path"
20130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20131$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20132  fi
20133
20134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20135
20136  path="$BOOT_JDK"
20137  has_colon=`$ECHO $path | $GREP ^.:`
20138  new_path="$path"
20139  if test "x$has_colon" = x; then
20140    # Not in mixed or Windows style, start by that.
20141    new_path=`cmd //c echo $path`
20142  fi
20143
20144
20145  input_path="$new_path"
20146  # Check if we need to convert this using DOS-style short mode. If the path
20147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20148  # take no chances and rewrite it.
20149  # Note: m4 eats our [], so we need to use [ and ] instead.
20150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20151  if test "x$has_forbidden_chars" != x; then
20152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20153    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20154  fi
20155
20156
20157  windows_path="$new_path"
20158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20159    unix_path=`$CYGPATH -u "$windows_path"`
20160    new_path="$unix_path"
20161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20163    new_path="$unix_path"
20164  fi
20165
20166  if test "x$path" != "x$new_path"; then
20167    BOOT_JDK="$new_path"
20168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20169$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20170  fi
20171
20172  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20173  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20174
20175  else
20176    # We're on a posix platform. Hooray! :)
20177    path="$BOOT_JDK"
20178    has_space=`$ECHO "$path" | $GREP " "`
20179    if test "x$has_space" != x; then
20180      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20181$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20182      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20183    fi
20184
20185    # Use eval to expand a potential ~
20186    eval path="$path"
20187    if test ! -f "$path" && test ! -d "$path"; then
20188      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20189    fi
20190
20191    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20192  fi
20193
20194              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20195$as_echo_n "checking for Boot JDK... " >&6; }
20196              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20197$as_echo "$BOOT_JDK" >&6; }
20198              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20199$as_echo_n "checking Boot JDK version... " >&6; }
20200              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20201              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20202$as_echo "$BOOT_JDK_VERSION" >&6; }
20203            fi # end check jdk version
20204          fi # end check rt.jar
20205        fi # end check javac
20206      fi # end check java
20207    fi # end check boot jdk found
20208  fi
20209
20210
20211  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20212
20213  if test "x$BOOT_JDK_FOUND" = xno; then
20214    # Now execute the test
20215
20216  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20217    # First check at user selected default
20218
20219  if test "x$BOOT_JDK_FOUND" = xno; then
20220    # Now execute the test
20221
20222  if test -x /usr/libexec/java_home; then
20223    BOOT_JDK=`/usr/libexec/java_home `
20224    BOOT_JDK_FOUND=maybe
20225    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20226$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20227  fi
20228
20229
20230    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20231    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20232      # Do we have a bin/java?
20233      if test ! -x "$BOOT_JDK/bin/java"; then
20234        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20235$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20236        BOOT_JDK_FOUND=no
20237      else
20238        # Do we have a bin/javac?
20239        if test ! -x "$BOOT_JDK/bin/javac"; then
20240          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20241$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20242          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20243$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20244          BOOT_JDK_FOUND=no
20245        else
20246          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20247          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20248            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20249$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20250            BOOT_JDK_FOUND=no
20251          else
20252            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20253            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20254
20255            # Extra M4 quote needed to protect [] in grep expression.
20256            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20257            if test "x$FOUND_CORRECT_VERSION" = x; then
20258              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20259$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20260              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20261$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20262              BOOT_JDK_FOUND=no
20263            else
20264              # We're done! :-)
20265              BOOT_JDK_FOUND=yes
20266
20267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20268
20269  # Input might be given as Windows format, start by converting to
20270  # unix format.
20271  path="$BOOT_JDK"
20272  new_path=`$CYGPATH -u "$path"`
20273
20274  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20275  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20276  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20277  # "foo.exe" is OK but "foo" is an error.
20278  #
20279  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20280  # It is also a way to make sure we got the proper file name for the real test later on.
20281  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20282  if test "x$test_shortpath" = x; then
20283    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20284$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20285    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20286  fi
20287
20288  # Call helper function which possibly converts this using DOS-style short mode.
20289  # If so, the updated path is stored in $new_path.
20290
20291  input_path="$new_path"
20292  # Check if we need to convert this using DOS-style short mode. If the path
20293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20294  # take no chances and rewrite it.
20295  # Note: m4 eats our [], so we need to use [ and ] instead.
20296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20297  if test "x$has_forbidden_chars" != x; then
20298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20299    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20300    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20301    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20302      # Going to short mode and back again did indeed matter. Since short mode is
20303      # case insensitive, let's make it lowercase to improve readability.
20304      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20305      # Now convert it back to Unix-stile (cygpath)
20306      input_path=`$CYGPATH -u "$shortmode_path"`
20307      new_path="$input_path"
20308    fi
20309  fi
20310
20311  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20312  if test "x$test_cygdrive_prefix" = x; then
20313    # As a simple fix, exclude /usr/bin since it's not a real path.
20314    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20315      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20316      # a path prefixed by /cygdrive for fixpath to work.
20317      new_path="$CYGWIN_ROOT_PATH$input_path"
20318    fi
20319  fi
20320
20321
20322  if test "x$path" != "x$new_path"; then
20323    BOOT_JDK="$new_path"
20324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20325$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20326  fi
20327
20328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20329
20330  path="$BOOT_JDK"
20331  has_colon=`$ECHO $path | $GREP ^.:`
20332  new_path="$path"
20333  if test "x$has_colon" = x; then
20334    # Not in mixed or Windows style, start by that.
20335    new_path=`cmd //c echo $path`
20336  fi
20337
20338
20339  input_path="$new_path"
20340  # Check if we need to convert this using DOS-style short mode. If the path
20341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20342  # take no chances and rewrite it.
20343  # Note: m4 eats our [], so we need to use [ and ] instead.
20344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20345  if test "x$has_forbidden_chars" != x; then
20346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20347    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20348  fi
20349
20350
20351  windows_path="$new_path"
20352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20353    unix_path=`$CYGPATH -u "$windows_path"`
20354    new_path="$unix_path"
20355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20357    new_path="$unix_path"
20358  fi
20359
20360  if test "x$path" != "x$new_path"; then
20361    BOOT_JDK="$new_path"
20362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20363$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20364  fi
20365
20366  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20367  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20368
20369  else
20370    # We're on a posix platform. Hooray! :)
20371    path="$BOOT_JDK"
20372    has_space=`$ECHO "$path" | $GREP " "`
20373    if test "x$has_space" != x; then
20374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20375$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20376      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20377    fi
20378
20379    # Use eval to expand a potential ~
20380    eval path="$path"
20381    if test ! -f "$path" && test ! -d "$path"; then
20382      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20383    fi
20384
20385    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20386  fi
20387
20388              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20389$as_echo_n "checking for Boot JDK... " >&6; }
20390              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20391$as_echo "$BOOT_JDK" >&6; }
20392              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20393$as_echo_n "checking Boot JDK version... " >&6; }
20394              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20395              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20396$as_echo "$BOOT_JDK_VERSION" >&6; }
20397            fi # end check jdk version
20398          fi # end check rt.jar
20399        fi # end check javac
20400      fi # end check java
20401    fi # end check boot jdk found
20402  fi
20403
20404    # If that did not work out (e.g. too old), try explicit versions instead
20405
20406  if test "x$BOOT_JDK_FOUND" = xno; then
20407    # Now execute the test
20408
20409  if test -x /usr/libexec/java_home; then
20410    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20411    BOOT_JDK_FOUND=maybe
20412    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20413$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20414  fi
20415
20416
20417    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20418    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20419      # Do we have a bin/java?
20420      if test ! -x "$BOOT_JDK/bin/java"; then
20421        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20422$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20423        BOOT_JDK_FOUND=no
20424      else
20425        # Do we have a bin/javac?
20426        if test ! -x "$BOOT_JDK/bin/javac"; then
20427          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20429          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20430$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20431          BOOT_JDK_FOUND=no
20432        else
20433          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20434          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20435            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20436$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20437            BOOT_JDK_FOUND=no
20438          else
20439            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20440            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20441
20442            # Extra M4 quote needed to protect [] in grep expression.
20443            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20444            if test "x$FOUND_CORRECT_VERSION" = x; then
20445              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20447              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20448$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20449              BOOT_JDK_FOUND=no
20450            else
20451              # We're done! :-)
20452              BOOT_JDK_FOUND=yes
20453
20454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20455
20456  # Input might be given as Windows format, start by converting to
20457  # unix format.
20458  path="$BOOT_JDK"
20459  new_path=`$CYGPATH -u "$path"`
20460
20461  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20462  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20463  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20464  # "foo.exe" is OK but "foo" is an error.
20465  #
20466  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20467  # It is also a way to make sure we got the proper file name for the real test later on.
20468  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20469  if test "x$test_shortpath" = x; then
20470    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20471$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20472    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20473  fi
20474
20475  # Call helper function which possibly converts this using DOS-style short mode.
20476  # If so, the updated path is stored in $new_path.
20477
20478  input_path="$new_path"
20479  # Check if we need to convert this using DOS-style short mode. If the path
20480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20481  # take no chances and rewrite it.
20482  # Note: m4 eats our [], so we need to use [ and ] instead.
20483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20484  if test "x$has_forbidden_chars" != x; then
20485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20486    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20487    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20488    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20489      # Going to short mode and back again did indeed matter. Since short mode is
20490      # case insensitive, let's make it lowercase to improve readability.
20491      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20492      # Now convert it back to Unix-stile (cygpath)
20493      input_path=`$CYGPATH -u "$shortmode_path"`
20494      new_path="$input_path"
20495    fi
20496  fi
20497
20498  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20499  if test "x$test_cygdrive_prefix" = x; then
20500    # As a simple fix, exclude /usr/bin since it's not a real path.
20501    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20502      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20503      # a path prefixed by /cygdrive for fixpath to work.
20504      new_path="$CYGWIN_ROOT_PATH$input_path"
20505    fi
20506  fi
20507
20508
20509  if test "x$path" != "x$new_path"; then
20510    BOOT_JDK="$new_path"
20511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20512$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20513  fi
20514
20515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20516
20517  path="$BOOT_JDK"
20518  has_colon=`$ECHO $path | $GREP ^.:`
20519  new_path="$path"
20520  if test "x$has_colon" = x; then
20521    # Not in mixed or Windows style, start by that.
20522    new_path=`cmd //c echo $path`
20523  fi
20524
20525
20526  input_path="$new_path"
20527  # Check if we need to convert this using DOS-style short mode. If the path
20528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20529  # take no chances and rewrite it.
20530  # Note: m4 eats our [], so we need to use [ and ] instead.
20531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20532  if test "x$has_forbidden_chars" != x; then
20533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20535  fi
20536
20537
20538  windows_path="$new_path"
20539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20540    unix_path=`$CYGPATH -u "$windows_path"`
20541    new_path="$unix_path"
20542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20544    new_path="$unix_path"
20545  fi
20546
20547  if test "x$path" != "x$new_path"; then
20548    BOOT_JDK="$new_path"
20549    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20550$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20551  fi
20552
20553  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20554  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20555
20556  else
20557    # We're on a posix platform. Hooray! :)
20558    path="$BOOT_JDK"
20559    has_space=`$ECHO "$path" | $GREP " "`
20560    if test "x$has_space" != x; then
20561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20562$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20563      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20564    fi
20565
20566    # Use eval to expand a potential ~
20567    eval path="$path"
20568    if test ! -f "$path" && test ! -d "$path"; then
20569      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20570    fi
20571
20572    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20573  fi
20574
20575              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20576$as_echo_n "checking for Boot JDK... " >&6; }
20577              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20578$as_echo "$BOOT_JDK" >&6; }
20579              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20580$as_echo_n "checking Boot JDK version... " >&6; }
20581              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20582              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20583$as_echo "$BOOT_JDK_VERSION" >&6; }
20584            fi # end check jdk version
20585          fi # end check rt.jar
20586        fi # end check javac
20587      fi # end check java
20588    fi # end check boot jdk found
20589  fi
20590
20591
20592  if test "x$BOOT_JDK_FOUND" = xno; then
20593    # Now execute the test
20594
20595  if test -x /usr/libexec/java_home; then
20596    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20597    BOOT_JDK_FOUND=maybe
20598    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20599$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20600  fi
20601
20602
20603    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20604    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20605      # Do we have a bin/java?
20606      if test ! -x "$BOOT_JDK/bin/java"; then
20607        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20608$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20609        BOOT_JDK_FOUND=no
20610      else
20611        # Do we have a bin/javac?
20612        if test ! -x "$BOOT_JDK/bin/javac"; then
20613          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20614$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20615          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20616$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20617          BOOT_JDK_FOUND=no
20618        else
20619          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20620          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20621            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20622$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20623            BOOT_JDK_FOUND=no
20624          else
20625            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20626            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20627
20628            # Extra M4 quote needed to protect [] in grep expression.
20629            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20630            if test "x$FOUND_CORRECT_VERSION" = x; then
20631              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20632$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20633              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20634$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20635              BOOT_JDK_FOUND=no
20636            else
20637              # We're done! :-)
20638              BOOT_JDK_FOUND=yes
20639
20640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20641
20642  # Input might be given as Windows format, start by converting to
20643  # unix format.
20644  path="$BOOT_JDK"
20645  new_path=`$CYGPATH -u "$path"`
20646
20647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20650  # "foo.exe" is OK but "foo" is an error.
20651  #
20652  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20653  # It is also a way to make sure we got the proper file name for the real test later on.
20654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20655  if test "x$test_shortpath" = x; then
20656    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20657$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20658    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20659  fi
20660
20661  # Call helper function which possibly converts this using DOS-style short mode.
20662  # If so, the updated path is stored in $new_path.
20663
20664  input_path="$new_path"
20665  # Check if we need to convert this using DOS-style short mode. If the path
20666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20667  # take no chances and rewrite it.
20668  # Note: m4 eats our [], so we need to use [ and ] instead.
20669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20670  if test "x$has_forbidden_chars" != x; then
20671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20675      # Going to short mode and back again did indeed matter. Since short mode is
20676      # case insensitive, let's make it lowercase to improve readability.
20677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20678      # Now convert it back to Unix-stile (cygpath)
20679      input_path=`$CYGPATH -u "$shortmode_path"`
20680      new_path="$input_path"
20681    fi
20682  fi
20683
20684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20685  if test "x$test_cygdrive_prefix" = x; then
20686    # As a simple fix, exclude /usr/bin since it's not a real path.
20687    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20689      # a path prefixed by /cygdrive for fixpath to work.
20690      new_path="$CYGWIN_ROOT_PATH$input_path"
20691    fi
20692  fi
20693
20694
20695  if test "x$path" != "x$new_path"; then
20696    BOOT_JDK="$new_path"
20697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20698$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20699  fi
20700
20701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20702
20703  path="$BOOT_JDK"
20704  has_colon=`$ECHO $path | $GREP ^.:`
20705  new_path="$path"
20706  if test "x$has_colon" = x; then
20707    # Not in mixed or Windows style, start by that.
20708    new_path=`cmd //c echo $path`
20709  fi
20710
20711
20712  input_path="$new_path"
20713  # Check if we need to convert this using DOS-style short mode. If the path
20714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20715  # take no chances and rewrite it.
20716  # Note: m4 eats our [], so we need to use [ and ] instead.
20717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20718  if test "x$has_forbidden_chars" != x; then
20719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20721  fi
20722
20723
20724  windows_path="$new_path"
20725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20726    unix_path=`$CYGPATH -u "$windows_path"`
20727    new_path="$unix_path"
20728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20730    new_path="$unix_path"
20731  fi
20732
20733  if test "x$path" != "x$new_path"; then
20734    BOOT_JDK="$new_path"
20735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20736$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20737  fi
20738
20739  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20740  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20741
20742  else
20743    # We're on a posix platform. Hooray! :)
20744    path="$BOOT_JDK"
20745    has_space=`$ECHO "$path" | $GREP " "`
20746    if test "x$has_space" != x; then
20747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20748$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20749      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20750    fi
20751
20752    # Use eval to expand a potential ~
20753    eval path="$path"
20754    if test ! -f "$path" && test ! -d "$path"; then
20755      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20756    fi
20757
20758    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20759  fi
20760
20761              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20762$as_echo_n "checking for Boot JDK... " >&6; }
20763              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20764$as_echo "$BOOT_JDK" >&6; }
20765              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20766$as_echo_n "checking Boot JDK version... " >&6; }
20767              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20768              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20769$as_echo "$BOOT_JDK_VERSION" >&6; }
20770            fi # end check jdk version
20771          fi # end check rt.jar
20772        fi # end check javac
20773      fi # end check java
20774    fi # end check boot jdk found
20775  fi
20776
20777
20778  if test "x$BOOT_JDK_FOUND" = xno; then
20779    # Now execute the test
20780
20781  if test -x /usr/libexec/java_home; then
20782    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
20783    BOOT_JDK_FOUND=maybe
20784    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
20785$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
20786  fi
20787
20788
20789    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20790    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20791      # Do we have a bin/java?
20792      if test ! -x "$BOOT_JDK/bin/java"; then
20793        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20795        BOOT_JDK_FOUND=no
20796      else
20797        # Do we have a bin/javac?
20798        if test ! -x "$BOOT_JDK/bin/javac"; then
20799          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20800$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20801          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20802$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20803          BOOT_JDK_FOUND=no
20804        else
20805          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20806          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20807            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20808$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20809            BOOT_JDK_FOUND=no
20810          else
20811            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20812            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20813
20814            # Extra M4 quote needed to protect [] in grep expression.
20815            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20816            if test "x$FOUND_CORRECT_VERSION" = x; then
20817              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20818$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20819              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20820$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20821              BOOT_JDK_FOUND=no
20822            else
20823              # We're done! :-)
20824              BOOT_JDK_FOUND=yes
20825
20826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20827
20828  # Input might be given as Windows format, start by converting to
20829  # unix format.
20830  path="$BOOT_JDK"
20831  new_path=`$CYGPATH -u "$path"`
20832
20833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20836  # "foo.exe" is OK but "foo" is an error.
20837  #
20838  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20839  # It is also a way to make sure we got the proper file name for the real test later on.
20840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20841  if test "x$test_shortpath" = x; then
20842    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20843$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20844    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20845  fi
20846
20847  # Call helper function which possibly converts this using DOS-style short mode.
20848  # If so, the updated path is stored in $new_path.
20849
20850  input_path="$new_path"
20851  # Check if we need to convert this using DOS-style short mode. If the path
20852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20853  # take no chances and rewrite it.
20854  # Note: m4 eats our [], so we need to use [ and ] instead.
20855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20856  if test "x$has_forbidden_chars" != x; then
20857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20858    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20859    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20860    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20861      # Going to short mode and back again did indeed matter. Since short mode is
20862      # case insensitive, let's make it lowercase to improve readability.
20863      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20864      # Now convert it back to Unix-stile (cygpath)
20865      input_path=`$CYGPATH -u "$shortmode_path"`
20866      new_path="$input_path"
20867    fi
20868  fi
20869
20870  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20871  if test "x$test_cygdrive_prefix" = x; then
20872    # As a simple fix, exclude /usr/bin since it's not a real path.
20873    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20874      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20875      # a path prefixed by /cygdrive for fixpath to work.
20876      new_path="$CYGWIN_ROOT_PATH$input_path"
20877    fi
20878  fi
20879
20880
20881  if test "x$path" != "x$new_path"; then
20882    BOOT_JDK="$new_path"
20883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20884$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20885  fi
20886
20887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20888
20889  path="$BOOT_JDK"
20890  has_colon=`$ECHO $path | $GREP ^.:`
20891  new_path="$path"
20892  if test "x$has_colon" = x; then
20893    # Not in mixed or Windows style, start by that.
20894    new_path=`cmd //c echo $path`
20895  fi
20896
20897
20898  input_path="$new_path"
20899  # Check if we need to convert this using DOS-style short mode. If the path
20900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20901  # take no chances and rewrite it.
20902  # Note: m4 eats our [], so we need to use [ and ] instead.
20903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20904  if test "x$has_forbidden_chars" != x; then
20905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20907  fi
20908
20909
20910  windows_path="$new_path"
20911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20912    unix_path=`$CYGPATH -u "$windows_path"`
20913    new_path="$unix_path"
20914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20916    new_path="$unix_path"
20917  fi
20918
20919  if test "x$path" != "x$new_path"; then
20920    BOOT_JDK="$new_path"
20921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20922$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20923  fi
20924
20925  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20926  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20927
20928  else
20929    # We're on a posix platform. Hooray! :)
20930    path="$BOOT_JDK"
20931    has_space=`$ECHO "$path" | $GREP " "`
20932    if test "x$has_space" != x; then
20933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20934$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20935      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20936    fi
20937
20938    # Use eval to expand a potential ~
20939    eval path="$path"
20940    if test ! -f "$path" && test ! -d "$path"; then
20941      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20942    fi
20943
20944    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20945  fi
20946
20947              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20948$as_echo_n "checking for Boot JDK... " >&6; }
20949              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20950$as_echo "$BOOT_JDK" >&6; }
20951              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20952$as_echo_n "checking Boot JDK version... " >&6; }
20953              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20954              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20955$as_echo "$BOOT_JDK_VERSION" >&6; }
20956            fi # end check jdk version
20957          fi # end check rt.jar
20958        fi # end check javac
20959      fi # end check java
20960    fi # end check boot jdk found
20961  fi
20962
20963  fi
20964
20965
20966    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20967    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20968      # Do we have a bin/java?
20969      if test ! -x "$BOOT_JDK/bin/java"; then
20970        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20971$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20972        BOOT_JDK_FOUND=no
20973      else
20974        # Do we have a bin/javac?
20975        if test ! -x "$BOOT_JDK/bin/javac"; then
20976          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20977$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20978          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20979$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20980          BOOT_JDK_FOUND=no
20981        else
20982          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20983          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20984            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20985$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20986            BOOT_JDK_FOUND=no
20987          else
20988            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20989            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20990
20991            # Extra M4 quote needed to protect [] in grep expression.
20992            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20993            if test "x$FOUND_CORRECT_VERSION" = x; then
20994              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20996              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20997$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20998              BOOT_JDK_FOUND=no
20999            else
21000              # We're done! :-)
21001              BOOT_JDK_FOUND=yes
21002
21003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21004
21005  # Input might be given as Windows format, start by converting to
21006  # unix format.
21007  path="$BOOT_JDK"
21008  new_path=`$CYGPATH -u "$path"`
21009
21010  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21011  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21012  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21013  # "foo.exe" is OK but "foo" is an error.
21014  #
21015  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21016  # It is also a way to make sure we got the proper file name for the real test later on.
21017  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21018  if test "x$test_shortpath" = x; then
21019    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21020$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21021    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21022  fi
21023
21024  # Call helper function which possibly converts this using DOS-style short mode.
21025  # If so, the updated path is stored in $new_path.
21026
21027  input_path="$new_path"
21028  # Check if we need to convert this using DOS-style short mode. If the path
21029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21030  # take no chances and rewrite it.
21031  # Note: m4 eats our [], so we need to use [ and ] instead.
21032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21033  if test "x$has_forbidden_chars" != x; then
21034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21035    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21036    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21037    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21038      # Going to short mode and back again did indeed matter. Since short mode is
21039      # case insensitive, let's make it lowercase to improve readability.
21040      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21041      # Now convert it back to Unix-stile (cygpath)
21042      input_path=`$CYGPATH -u "$shortmode_path"`
21043      new_path="$input_path"
21044    fi
21045  fi
21046
21047  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21048  if test "x$test_cygdrive_prefix" = x; then
21049    # As a simple fix, exclude /usr/bin since it's not a real path.
21050    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21051      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21052      # a path prefixed by /cygdrive for fixpath to work.
21053      new_path="$CYGWIN_ROOT_PATH$input_path"
21054    fi
21055  fi
21056
21057
21058  if test "x$path" != "x$new_path"; then
21059    BOOT_JDK="$new_path"
21060    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21061$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21062  fi
21063
21064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21065
21066  path="$BOOT_JDK"
21067  has_colon=`$ECHO $path | $GREP ^.:`
21068  new_path="$path"
21069  if test "x$has_colon" = x; then
21070    # Not in mixed or Windows style, start by that.
21071    new_path=`cmd //c echo $path`
21072  fi
21073
21074
21075  input_path="$new_path"
21076  # Check if we need to convert this using DOS-style short mode. If the path
21077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21078  # take no chances and rewrite it.
21079  # Note: m4 eats our [], so we need to use [ and ] instead.
21080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21081  if test "x$has_forbidden_chars" != x; then
21082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21083    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21084  fi
21085
21086
21087  windows_path="$new_path"
21088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21089    unix_path=`$CYGPATH -u "$windows_path"`
21090    new_path="$unix_path"
21091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21093    new_path="$unix_path"
21094  fi
21095
21096  if test "x$path" != "x$new_path"; then
21097    BOOT_JDK="$new_path"
21098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21099$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21100  fi
21101
21102  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21103  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21104
21105  else
21106    # We're on a posix platform. Hooray! :)
21107    path="$BOOT_JDK"
21108    has_space=`$ECHO "$path" | $GREP " "`
21109    if test "x$has_space" != x; then
21110      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21111$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21112      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21113    fi
21114
21115    # Use eval to expand a potential ~
21116    eval path="$path"
21117    if test ! -f "$path" && test ! -d "$path"; then
21118      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21119    fi
21120
21121    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21122  fi
21123
21124              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21125$as_echo_n "checking for Boot JDK... " >&6; }
21126              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21127$as_echo "$BOOT_JDK" >&6; }
21128              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21129$as_echo_n "checking Boot JDK version... " >&6; }
21130              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21131              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21132$as_echo "$BOOT_JDK_VERSION" >&6; }
21133            fi # end check jdk version
21134          fi # end check rt.jar
21135        fi # end check javac
21136      fi # end check java
21137    fi # end check boot jdk found
21138  fi
21139
21140
21141  # Test: Is $JAVA_HOME set?
21142
21143  if test "x$BOOT_JDK_FOUND" = xno; then
21144    # Now execute the test
21145
21146  if test "x$JAVA_HOME" != x; then
21147    JAVA_HOME_PROCESSED="$JAVA_HOME"
21148
21149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21150
21151  # Input might be given as Windows format, start by converting to
21152  # unix format.
21153  path="$JAVA_HOME_PROCESSED"
21154  new_path=`$CYGPATH -u "$path"`
21155
21156  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21157  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21158  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21159  # "foo.exe" is OK but "foo" is an error.
21160  #
21161  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21162  # It is also a way to make sure we got the proper file name for the real test later on.
21163  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21164  if test "x$test_shortpath" = x; then
21165    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21166$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21167    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21168  fi
21169
21170  # Call helper function which possibly converts this using DOS-style short mode.
21171  # If so, the updated path is stored in $new_path.
21172
21173  input_path="$new_path"
21174  # Check if we need to convert this using DOS-style short mode. If the path
21175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21176  # take no chances and rewrite it.
21177  # Note: m4 eats our [], so we need to use [ and ] instead.
21178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21179  if test "x$has_forbidden_chars" != x; then
21180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21181    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21182    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21183    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21184      # Going to short mode and back again did indeed matter. Since short mode is
21185      # case insensitive, let's make it lowercase to improve readability.
21186      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21187      # Now convert it back to Unix-stile (cygpath)
21188      input_path=`$CYGPATH -u "$shortmode_path"`
21189      new_path="$input_path"
21190    fi
21191  fi
21192
21193  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21194  if test "x$test_cygdrive_prefix" = x; then
21195    # As a simple fix, exclude /usr/bin since it's not a real path.
21196    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21197      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21198      # a path prefixed by /cygdrive for fixpath to work.
21199      new_path="$CYGWIN_ROOT_PATH$input_path"
21200    fi
21201  fi
21202
21203
21204  if test "x$path" != "x$new_path"; then
21205    JAVA_HOME_PROCESSED="$new_path"
21206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21207$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21208  fi
21209
21210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21211
21212  path="$JAVA_HOME_PROCESSED"
21213  has_colon=`$ECHO $path | $GREP ^.:`
21214  new_path="$path"
21215  if test "x$has_colon" = x; then
21216    # Not in mixed or Windows style, start by that.
21217    new_path=`cmd //c echo $path`
21218  fi
21219
21220
21221  input_path="$new_path"
21222  # Check if we need to convert this using DOS-style short mode. If the path
21223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21224  # take no chances and rewrite it.
21225  # Note: m4 eats our [], so we need to use [ and ] instead.
21226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21227  if test "x$has_forbidden_chars" != x; then
21228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21229    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21230  fi
21231
21232
21233  windows_path="$new_path"
21234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21235    unix_path=`$CYGPATH -u "$windows_path"`
21236    new_path="$unix_path"
21237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21239    new_path="$unix_path"
21240  fi
21241
21242  if test "x$path" != "x$new_path"; then
21243    JAVA_HOME_PROCESSED="$new_path"
21244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21245$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21246  fi
21247
21248  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21249  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21250
21251  else
21252    # We're on a posix platform. Hooray! :)
21253    path="$JAVA_HOME_PROCESSED"
21254    has_space=`$ECHO "$path" | $GREP " "`
21255    if test "x$has_space" != x; then
21256      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21257$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21258      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21259    fi
21260
21261    # Use eval to expand a potential ~
21262    eval path="$path"
21263    if test ! -f "$path" && test ! -d "$path"; then
21264      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21265    fi
21266
21267    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21268  fi
21269
21270    if test ! -d "$JAVA_HOME_PROCESSED"; then
21271      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21272$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21273    else
21274      # Aha, the user has set a JAVA_HOME
21275      # let us use that as the Boot JDK.
21276      BOOT_JDK="$JAVA_HOME_PROCESSED"
21277      BOOT_JDK_FOUND=maybe
21278      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21279$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21280    fi
21281  fi
21282
21283
21284    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21285    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21286      # Do we have a bin/java?
21287      if test ! -x "$BOOT_JDK/bin/java"; then
21288        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21289$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21290        BOOT_JDK_FOUND=no
21291      else
21292        # Do we have a bin/javac?
21293        if test ! -x "$BOOT_JDK/bin/javac"; then
21294          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21295$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21296          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21297$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21298          BOOT_JDK_FOUND=no
21299        else
21300          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21301          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21302            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21303$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21304            BOOT_JDK_FOUND=no
21305          else
21306            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21307            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21308
21309            # Extra M4 quote needed to protect [] in grep expression.
21310            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21311            if test "x$FOUND_CORRECT_VERSION" = x; then
21312              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21313$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21314              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21315$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21316              BOOT_JDK_FOUND=no
21317            else
21318              # We're done! :-)
21319              BOOT_JDK_FOUND=yes
21320
21321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21322
21323  # Input might be given as Windows format, start by converting to
21324  # unix format.
21325  path="$BOOT_JDK"
21326  new_path=`$CYGPATH -u "$path"`
21327
21328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21331  # "foo.exe" is OK but "foo" is an error.
21332  #
21333  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21334  # It is also a way to make sure we got the proper file name for the real test later on.
21335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21336  if test "x$test_shortpath" = x; then
21337    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21338$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21339    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21340  fi
21341
21342  # Call helper function which possibly converts this using DOS-style short mode.
21343  # If so, the updated path is stored in $new_path.
21344
21345  input_path="$new_path"
21346  # Check if we need to convert this using DOS-style short mode. If the path
21347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21348  # take no chances and rewrite it.
21349  # Note: m4 eats our [], so we need to use [ and ] instead.
21350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21351  if test "x$has_forbidden_chars" != x; then
21352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21353    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21354    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21355    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21356      # Going to short mode and back again did indeed matter. Since short mode is
21357      # case insensitive, let's make it lowercase to improve readability.
21358      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21359      # Now convert it back to Unix-stile (cygpath)
21360      input_path=`$CYGPATH -u "$shortmode_path"`
21361      new_path="$input_path"
21362    fi
21363  fi
21364
21365  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21366  if test "x$test_cygdrive_prefix" = x; then
21367    # As a simple fix, exclude /usr/bin since it's not a real path.
21368    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21369      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21370      # a path prefixed by /cygdrive for fixpath to work.
21371      new_path="$CYGWIN_ROOT_PATH$input_path"
21372    fi
21373  fi
21374
21375
21376  if test "x$path" != "x$new_path"; then
21377    BOOT_JDK="$new_path"
21378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21379$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21380  fi
21381
21382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21383
21384  path="$BOOT_JDK"
21385  has_colon=`$ECHO $path | $GREP ^.:`
21386  new_path="$path"
21387  if test "x$has_colon" = x; then
21388    # Not in mixed or Windows style, start by that.
21389    new_path=`cmd //c echo $path`
21390  fi
21391
21392
21393  input_path="$new_path"
21394  # Check if we need to convert this using DOS-style short mode. If the path
21395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21396  # take no chances and rewrite it.
21397  # Note: m4 eats our [], so we need to use [ and ] instead.
21398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21399  if test "x$has_forbidden_chars" != x; then
21400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21402  fi
21403
21404
21405  windows_path="$new_path"
21406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21407    unix_path=`$CYGPATH -u "$windows_path"`
21408    new_path="$unix_path"
21409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21411    new_path="$unix_path"
21412  fi
21413
21414  if test "x$path" != "x$new_path"; then
21415    BOOT_JDK="$new_path"
21416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21417$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21418  fi
21419
21420  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21421  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21422
21423  else
21424    # We're on a posix platform. Hooray! :)
21425    path="$BOOT_JDK"
21426    has_space=`$ECHO "$path" | $GREP " "`
21427    if test "x$has_space" != x; then
21428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21429$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21430      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21431    fi
21432
21433    # Use eval to expand a potential ~
21434    eval path="$path"
21435    if test ! -f "$path" && test ! -d "$path"; then
21436      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21437    fi
21438
21439    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21440  fi
21441
21442              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21443$as_echo_n "checking for Boot JDK... " >&6; }
21444              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21445$as_echo "$BOOT_JDK" >&6; }
21446              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21447$as_echo_n "checking Boot JDK version... " >&6; }
21448              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21449              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21450$as_echo "$BOOT_JDK_VERSION" >&6; }
21451            fi # end check jdk version
21452          fi # end check rt.jar
21453        fi # end check javac
21454      fi # end check java
21455    fi # end check boot jdk found
21456  fi
21457
21458
21459  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21460
21461  if test "x$BOOT_JDK_FOUND" = xno; then
21462    # Now execute the test
21463
21464  # Extract the first word of "javac", so it can be a program name with args.
21465set dummy javac; ac_word=$2
21466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21467$as_echo_n "checking for $ac_word... " >&6; }
21468if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21469  $as_echo_n "(cached) " >&6
21470else
21471  case $JAVAC_CHECK in
21472  [\\/]* | ?:[\\/]*)
21473  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21474  ;;
21475  *)
21476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21477for as_dir in $PATH
21478do
21479  IFS=$as_save_IFS
21480  test -z "$as_dir" && as_dir=.
21481    for ac_exec_ext in '' $ac_executable_extensions; do
21482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21483    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21485    break 2
21486  fi
21487done
21488  done
21489IFS=$as_save_IFS
21490
21491  ;;
21492esac
21493fi
21494JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21495if test -n "$JAVAC_CHECK"; then
21496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21497$as_echo "$JAVAC_CHECK" >&6; }
21498else
21499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21500$as_echo "no" >&6; }
21501fi
21502
21503
21504  # Extract the first word of "java", so it can be a program name with args.
21505set dummy java; ac_word=$2
21506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21507$as_echo_n "checking for $ac_word... " >&6; }
21508if ${ac_cv_path_JAVA_CHECK+:} false; then :
21509  $as_echo_n "(cached) " >&6
21510else
21511  case $JAVA_CHECK in
21512  [\\/]* | ?:[\\/]*)
21513  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21514  ;;
21515  *)
21516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21517for as_dir in $PATH
21518do
21519  IFS=$as_save_IFS
21520  test -z "$as_dir" && as_dir=.
21521    for ac_exec_ext in '' $ac_executable_extensions; do
21522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21523    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21525    break 2
21526  fi
21527done
21528  done
21529IFS=$as_save_IFS
21530
21531  ;;
21532esac
21533fi
21534JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21535if test -n "$JAVA_CHECK"; then
21536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21537$as_echo "$JAVA_CHECK" >&6; }
21538else
21539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21540$as_echo "no" >&6; }
21541fi
21542
21543
21544  BINARY="$JAVAC_CHECK"
21545  if test "x$JAVAC_CHECK" = x; then
21546    BINARY="$JAVA_CHECK"
21547  fi
21548  if test "x$BINARY" != x; then
21549    # So there is a java(c) binary, it might be part of a JDK.
21550    # Lets find the JDK/JRE directory by following symbolic links.
21551    # Linux/GNU systems often have links from /usr/bin/java to
21552    # /etc/alternatives/java to the real JDK binary.
21553
21554  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21555    # Follow a chain of symbolic links. Use readlink
21556    # where it exists, else fall back to horribly
21557    # complicated shell code.
21558    if test "x$READLINK_TESTED" != yes; then
21559      # On MacOSX there is a readlink tool with a different
21560      # purpose than the GNU readlink tool. Check the found readlink.
21561      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21562      if test "x$ISGNU" = x; then
21563        # A readlink that we do not know how to use.
21564        # Are there other non-GNU readlinks out there?
21565        READLINK_TESTED=yes
21566        READLINK=
21567      fi
21568    fi
21569
21570    if test "x$READLINK" != x; then
21571      BINARY=`$READLINK -f $BINARY`
21572    else
21573      # Save the current directory for restoring afterwards
21574      STARTDIR=$PWD
21575      COUNTER=0
21576      sym_link_dir=`$DIRNAME $BINARY`
21577      sym_link_file=`$BASENAME $BINARY`
21578      cd $sym_link_dir
21579      # Use -P flag to resolve symlinks in directories.
21580      cd `$THEPWDCMD -P`
21581      sym_link_dir=`$THEPWDCMD -P`
21582      # Resolve file symlinks
21583      while test $COUNTER -lt 20; do
21584        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21585        if test "x$ISLINK" == x; then
21586          # This is not a symbolic link! We are done!
21587          break
21588        fi
21589        # Again resolve directory symlinks since the target of the just found
21590        # link could be in a different directory
21591        cd `$DIRNAME $ISLINK`
21592        sym_link_dir=`$THEPWDCMD -P`
21593        sym_link_file=`$BASENAME $ISLINK`
21594        let COUNTER=COUNTER+1
21595      done
21596      cd $STARTDIR
21597      BINARY=$sym_link_dir/$sym_link_file
21598    fi
21599  fi
21600
21601    BOOT_JDK=`dirname "$BINARY"`
21602    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21603    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21604      # Looks like we found ourselves an JDK
21605      BOOT_JDK_FOUND=maybe
21606      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21607$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21608    fi
21609  fi
21610
21611
21612    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21613    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21614      # Do we have a bin/java?
21615      if test ! -x "$BOOT_JDK/bin/java"; then
21616        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21618        BOOT_JDK_FOUND=no
21619      else
21620        # Do we have a bin/javac?
21621        if test ! -x "$BOOT_JDK/bin/javac"; then
21622          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21623$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21624          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21625$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21626          BOOT_JDK_FOUND=no
21627        else
21628          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21629          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21630            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21631$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21632            BOOT_JDK_FOUND=no
21633          else
21634            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21635            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21636
21637            # Extra M4 quote needed to protect [] in grep expression.
21638            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21639            if test "x$FOUND_CORRECT_VERSION" = x; then
21640              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21641$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21642              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21643$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21644              BOOT_JDK_FOUND=no
21645            else
21646              # We're done! :-)
21647              BOOT_JDK_FOUND=yes
21648
21649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21650
21651  # Input might be given as Windows format, start by converting to
21652  # unix format.
21653  path="$BOOT_JDK"
21654  new_path=`$CYGPATH -u "$path"`
21655
21656  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21657  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21658  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21659  # "foo.exe" is OK but "foo" is an error.
21660  #
21661  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21662  # It is also a way to make sure we got the proper file name for the real test later on.
21663  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21664  if test "x$test_shortpath" = x; then
21665    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21666$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21667    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21668  fi
21669
21670  # Call helper function which possibly converts this using DOS-style short mode.
21671  # If so, the updated path is stored in $new_path.
21672
21673  input_path="$new_path"
21674  # Check if we need to convert this using DOS-style short mode. If the path
21675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21676  # take no chances and rewrite it.
21677  # Note: m4 eats our [], so we need to use [ and ] instead.
21678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21679  if test "x$has_forbidden_chars" != x; then
21680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21681    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21682    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21683    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21684      # Going to short mode and back again did indeed matter. Since short mode is
21685      # case insensitive, let's make it lowercase to improve readability.
21686      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21687      # Now convert it back to Unix-stile (cygpath)
21688      input_path=`$CYGPATH -u "$shortmode_path"`
21689      new_path="$input_path"
21690    fi
21691  fi
21692
21693  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21694  if test "x$test_cygdrive_prefix" = x; then
21695    # As a simple fix, exclude /usr/bin since it's not a real path.
21696    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21697      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21698      # a path prefixed by /cygdrive for fixpath to work.
21699      new_path="$CYGWIN_ROOT_PATH$input_path"
21700    fi
21701  fi
21702
21703
21704  if test "x$path" != "x$new_path"; then
21705    BOOT_JDK="$new_path"
21706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21707$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21708  fi
21709
21710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21711
21712  path="$BOOT_JDK"
21713  has_colon=`$ECHO $path | $GREP ^.:`
21714  new_path="$path"
21715  if test "x$has_colon" = x; then
21716    # Not in mixed or Windows style, start by that.
21717    new_path=`cmd //c echo $path`
21718  fi
21719
21720
21721  input_path="$new_path"
21722  # Check if we need to convert this using DOS-style short mode. If the path
21723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21724  # take no chances and rewrite it.
21725  # Note: m4 eats our [], so we need to use [ and ] instead.
21726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21727  if test "x$has_forbidden_chars" != x; then
21728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21730  fi
21731
21732
21733  windows_path="$new_path"
21734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21735    unix_path=`$CYGPATH -u "$windows_path"`
21736    new_path="$unix_path"
21737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21739    new_path="$unix_path"
21740  fi
21741
21742  if test "x$path" != "x$new_path"; then
21743    BOOT_JDK="$new_path"
21744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21745$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21746  fi
21747
21748  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21749  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21750
21751  else
21752    # We're on a posix platform. Hooray! :)
21753    path="$BOOT_JDK"
21754    has_space=`$ECHO "$path" | $GREP " "`
21755    if test "x$has_space" != x; then
21756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21757$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21758      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21759    fi
21760
21761    # Use eval to expand a potential ~
21762    eval path="$path"
21763    if test ! -f "$path" && test ! -d "$path"; then
21764      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21765    fi
21766
21767    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21768  fi
21769
21770              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21771$as_echo_n "checking for Boot JDK... " >&6; }
21772              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21773$as_echo "$BOOT_JDK" >&6; }
21774              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21775$as_echo_n "checking Boot JDK version... " >&6; }
21776              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21777              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21778$as_echo "$BOOT_JDK_VERSION" >&6; }
21779            fi # end check jdk version
21780          fi # end check rt.jar
21781        fi # end check javac
21782      fi # end check java
21783    fi # end check boot jdk found
21784  fi
21785
21786
21787  # Test: Is there a JDK installed in default, well-known locations?
21788
21789  if test "x$BOOT_JDK_FOUND" = xno; then
21790    # Now execute the test
21791
21792  if test "x$OPENJDK_TARGET_OS" = xwindows; then
21793
21794  if test "x$BOOT_JDK_FOUND" = xno; then
21795    # Now execute the test
21796
21797  if test "x$ProgramW6432" != x; then
21798    VIRTUAL_DIR="$ProgramW6432/Java"
21799
21800  windows_path="$VIRTUAL_DIR"
21801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21802    unix_path=`$CYGPATH -u "$windows_path"`
21803    VIRTUAL_DIR="$unix_path"
21804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21806    VIRTUAL_DIR="$unix_path"
21807  fi
21808
21809
21810  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21811  BOOT_JDK_SUFFIX=""
21812  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21813  if test "x$ALL_JDKS_FOUND" != x; then
21814    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21815
21816  if test "x$BOOT_JDK_FOUND" = xno; then
21817    # Now execute the test
21818
21819        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21820        if test -d "$BOOT_JDK"; then
21821          BOOT_JDK_FOUND=maybe
21822          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21823$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21824        fi
21825
21826
21827    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21828    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21829      # Do we have a bin/java?
21830      if test ! -x "$BOOT_JDK/bin/java"; then
21831        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21832$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21833        BOOT_JDK_FOUND=no
21834      else
21835        # Do we have a bin/javac?
21836        if test ! -x "$BOOT_JDK/bin/javac"; then
21837          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21838$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21839          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21840$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21841          BOOT_JDK_FOUND=no
21842        else
21843          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21844          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21845            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21846$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21847            BOOT_JDK_FOUND=no
21848          else
21849            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21850            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21851
21852            # Extra M4 quote needed to protect [] in grep expression.
21853            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21854            if test "x$FOUND_CORRECT_VERSION" = x; then
21855              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21856$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21857              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21858$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21859              BOOT_JDK_FOUND=no
21860            else
21861              # We're done! :-)
21862              BOOT_JDK_FOUND=yes
21863
21864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21865
21866  # Input might be given as Windows format, start by converting to
21867  # unix format.
21868  path="$BOOT_JDK"
21869  new_path=`$CYGPATH -u "$path"`
21870
21871  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21872  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21873  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21874  # "foo.exe" is OK but "foo" is an error.
21875  #
21876  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21877  # It is also a way to make sure we got the proper file name for the real test later on.
21878  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21879  if test "x$test_shortpath" = x; then
21880    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21881$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21882    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21883  fi
21884
21885  # Call helper function which possibly converts this using DOS-style short mode.
21886  # If so, the updated path is stored in $new_path.
21887
21888  input_path="$new_path"
21889  # Check if we need to convert this using DOS-style short mode. If the path
21890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21891  # take no chances and rewrite it.
21892  # Note: m4 eats our [], so we need to use [ and ] instead.
21893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21894  if test "x$has_forbidden_chars" != x; then
21895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21896    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21897    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21898    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21899      # Going to short mode and back again did indeed matter. Since short mode is
21900      # case insensitive, let's make it lowercase to improve readability.
21901      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21902      # Now convert it back to Unix-stile (cygpath)
21903      input_path=`$CYGPATH -u "$shortmode_path"`
21904      new_path="$input_path"
21905    fi
21906  fi
21907
21908  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21909  if test "x$test_cygdrive_prefix" = x; then
21910    # As a simple fix, exclude /usr/bin since it's not a real path.
21911    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21912      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21913      # a path prefixed by /cygdrive for fixpath to work.
21914      new_path="$CYGWIN_ROOT_PATH$input_path"
21915    fi
21916  fi
21917
21918
21919  if test "x$path" != "x$new_path"; then
21920    BOOT_JDK="$new_path"
21921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21922$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21923  fi
21924
21925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21926
21927  path="$BOOT_JDK"
21928  has_colon=`$ECHO $path | $GREP ^.:`
21929  new_path="$path"
21930  if test "x$has_colon" = x; then
21931    # Not in mixed or Windows style, start by that.
21932    new_path=`cmd //c echo $path`
21933  fi
21934
21935
21936  input_path="$new_path"
21937  # Check if we need to convert this using DOS-style short mode. If the path
21938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21939  # take no chances and rewrite it.
21940  # Note: m4 eats our [], so we need to use [ and ] instead.
21941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21942  if test "x$has_forbidden_chars" != x; then
21943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21944    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21945  fi
21946
21947
21948  windows_path="$new_path"
21949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21950    unix_path=`$CYGPATH -u "$windows_path"`
21951    new_path="$unix_path"
21952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21954    new_path="$unix_path"
21955  fi
21956
21957  if test "x$path" != "x$new_path"; then
21958    BOOT_JDK="$new_path"
21959    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21960$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21961  fi
21962
21963  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21964  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21965
21966  else
21967    # We're on a posix platform. Hooray! :)
21968    path="$BOOT_JDK"
21969    has_space=`$ECHO "$path" | $GREP " "`
21970    if test "x$has_space" != x; then
21971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21972$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21973      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21974    fi
21975
21976    # Use eval to expand a potential ~
21977    eval path="$path"
21978    if test ! -f "$path" && test ! -d "$path"; then
21979      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21980    fi
21981
21982    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21983  fi
21984
21985              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21986$as_echo_n "checking for Boot JDK... " >&6; }
21987              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21988$as_echo "$BOOT_JDK" >&6; }
21989              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21990$as_echo_n "checking Boot JDK version... " >&6; }
21991              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21992              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21993$as_echo "$BOOT_JDK_VERSION" >&6; }
21994            fi # end check jdk version
21995          fi # end check rt.jar
21996        fi # end check javac
21997      fi # end check java
21998    fi # end check boot jdk found
21999  fi
22000
22001    done
22002  fi
22003
22004  fi
22005
22006
22007    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22008    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22009      # Do we have a bin/java?
22010      if test ! -x "$BOOT_JDK/bin/java"; then
22011        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22013        BOOT_JDK_FOUND=no
22014      else
22015        # Do we have a bin/javac?
22016        if test ! -x "$BOOT_JDK/bin/javac"; then
22017          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22018$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22019          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22020$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22021          BOOT_JDK_FOUND=no
22022        else
22023          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22024          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22025            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22026$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22027            BOOT_JDK_FOUND=no
22028          else
22029            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22030            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22031
22032            # Extra M4 quote needed to protect [] in grep expression.
22033            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22034            if test "x$FOUND_CORRECT_VERSION" = x; then
22035              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22036$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22037              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22038$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22039              BOOT_JDK_FOUND=no
22040            else
22041              # We're done! :-)
22042              BOOT_JDK_FOUND=yes
22043
22044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22045
22046  # Input might be given as Windows format, start by converting to
22047  # unix format.
22048  path="$BOOT_JDK"
22049  new_path=`$CYGPATH -u "$path"`
22050
22051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22054  # "foo.exe" is OK but "foo" is an error.
22055  #
22056  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22057  # It is also a way to make sure we got the proper file name for the real test later on.
22058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22059  if test "x$test_shortpath" = x; then
22060    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22061$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22062    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22063  fi
22064
22065  # Call helper function which possibly converts this using DOS-style short mode.
22066  # If so, the updated path is stored in $new_path.
22067
22068  input_path="$new_path"
22069  # Check if we need to convert this using DOS-style short mode. If the path
22070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22071  # take no chances and rewrite it.
22072  # Note: m4 eats our [], so we need to use [ and ] instead.
22073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22074  if test "x$has_forbidden_chars" != x; then
22075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22076    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22077    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22078    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22079      # Going to short mode and back again did indeed matter. Since short mode is
22080      # case insensitive, let's make it lowercase to improve readability.
22081      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22082      # Now convert it back to Unix-stile (cygpath)
22083      input_path=`$CYGPATH -u "$shortmode_path"`
22084      new_path="$input_path"
22085    fi
22086  fi
22087
22088  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22089  if test "x$test_cygdrive_prefix" = x; then
22090    # As a simple fix, exclude /usr/bin since it's not a real path.
22091    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22092      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22093      # a path prefixed by /cygdrive for fixpath to work.
22094      new_path="$CYGWIN_ROOT_PATH$input_path"
22095    fi
22096  fi
22097
22098
22099  if test "x$path" != "x$new_path"; then
22100    BOOT_JDK="$new_path"
22101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22102$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22103  fi
22104
22105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22106
22107  path="$BOOT_JDK"
22108  has_colon=`$ECHO $path | $GREP ^.:`
22109  new_path="$path"
22110  if test "x$has_colon" = x; then
22111    # Not in mixed or Windows style, start by that.
22112    new_path=`cmd //c echo $path`
22113  fi
22114
22115
22116  input_path="$new_path"
22117  # Check if we need to convert this using DOS-style short mode. If the path
22118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22119  # take no chances and rewrite it.
22120  # Note: m4 eats our [], so we need to use [ and ] instead.
22121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22122  if test "x$has_forbidden_chars" != x; then
22123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22124    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22125  fi
22126
22127
22128  windows_path="$new_path"
22129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22130    unix_path=`$CYGPATH -u "$windows_path"`
22131    new_path="$unix_path"
22132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22134    new_path="$unix_path"
22135  fi
22136
22137  if test "x$path" != "x$new_path"; then
22138    BOOT_JDK="$new_path"
22139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22140$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22141  fi
22142
22143  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22144  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22145
22146  else
22147    # We're on a posix platform. Hooray! :)
22148    path="$BOOT_JDK"
22149    has_space=`$ECHO "$path" | $GREP " "`
22150    if test "x$has_space" != x; then
22151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22152$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22153      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22154    fi
22155
22156    # Use eval to expand a potential ~
22157    eval path="$path"
22158    if test ! -f "$path" && test ! -d "$path"; then
22159      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22160    fi
22161
22162    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22163  fi
22164
22165              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22166$as_echo_n "checking for Boot JDK... " >&6; }
22167              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22168$as_echo "$BOOT_JDK" >&6; }
22169              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22170$as_echo_n "checking Boot JDK version... " >&6; }
22171              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22172              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22173$as_echo "$BOOT_JDK_VERSION" >&6; }
22174            fi # end check jdk version
22175          fi # end check rt.jar
22176        fi # end check javac
22177      fi # end check java
22178    fi # end check boot jdk found
22179  fi
22180
22181
22182  if test "x$BOOT_JDK_FOUND" = xno; then
22183    # Now execute the test
22184
22185  if test "x$PROGRAMW6432" != x; then
22186    VIRTUAL_DIR="$PROGRAMW6432/Java"
22187
22188  windows_path="$VIRTUAL_DIR"
22189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22190    unix_path=`$CYGPATH -u "$windows_path"`
22191    VIRTUAL_DIR="$unix_path"
22192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22194    VIRTUAL_DIR="$unix_path"
22195  fi
22196
22197
22198  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22199  BOOT_JDK_SUFFIX=""
22200  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22201  if test "x$ALL_JDKS_FOUND" != x; then
22202    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22203
22204  if test "x$BOOT_JDK_FOUND" = xno; then
22205    # Now execute the test
22206
22207        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22208        if test -d "$BOOT_JDK"; then
22209          BOOT_JDK_FOUND=maybe
22210          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22211$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22212        fi
22213
22214
22215    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22216    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22217      # Do we have a bin/java?
22218      if test ! -x "$BOOT_JDK/bin/java"; then
22219        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22220$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22221        BOOT_JDK_FOUND=no
22222      else
22223        # Do we have a bin/javac?
22224        if test ! -x "$BOOT_JDK/bin/javac"; then
22225          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22226$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22227          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22228$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22229          BOOT_JDK_FOUND=no
22230        else
22231          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22232          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22233            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22234$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22235            BOOT_JDK_FOUND=no
22236          else
22237            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22238            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22239
22240            # Extra M4 quote needed to protect [] in grep expression.
22241            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22242            if test "x$FOUND_CORRECT_VERSION" = x; then
22243              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22244$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22245              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22246$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22247              BOOT_JDK_FOUND=no
22248            else
22249              # We're done! :-)
22250              BOOT_JDK_FOUND=yes
22251
22252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22253
22254  # Input might be given as Windows format, start by converting to
22255  # unix format.
22256  path="$BOOT_JDK"
22257  new_path=`$CYGPATH -u "$path"`
22258
22259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22262  # "foo.exe" is OK but "foo" is an error.
22263  #
22264  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22265  # It is also a way to make sure we got the proper file name for the real test later on.
22266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22267  if test "x$test_shortpath" = x; then
22268    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22269$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22270    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22271  fi
22272
22273  # Call helper function which possibly converts this using DOS-style short mode.
22274  # If so, the updated path is stored in $new_path.
22275
22276  input_path="$new_path"
22277  # Check if we need to convert this using DOS-style short mode. If the path
22278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22279  # take no chances and rewrite it.
22280  # Note: m4 eats our [], so we need to use [ and ] instead.
22281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22282  if test "x$has_forbidden_chars" != x; then
22283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22287      # Going to short mode and back again did indeed matter. Since short mode is
22288      # case insensitive, let's make it lowercase to improve readability.
22289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22290      # Now convert it back to Unix-stile (cygpath)
22291      input_path=`$CYGPATH -u "$shortmode_path"`
22292      new_path="$input_path"
22293    fi
22294  fi
22295
22296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22297  if test "x$test_cygdrive_prefix" = x; then
22298    # As a simple fix, exclude /usr/bin since it's not a real path.
22299    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22301      # a path prefixed by /cygdrive for fixpath to work.
22302      new_path="$CYGWIN_ROOT_PATH$input_path"
22303    fi
22304  fi
22305
22306
22307  if test "x$path" != "x$new_path"; then
22308    BOOT_JDK="$new_path"
22309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22310$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22311  fi
22312
22313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22314
22315  path="$BOOT_JDK"
22316  has_colon=`$ECHO $path | $GREP ^.:`
22317  new_path="$path"
22318  if test "x$has_colon" = x; then
22319    # Not in mixed or Windows style, start by that.
22320    new_path=`cmd //c echo $path`
22321  fi
22322
22323
22324  input_path="$new_path"
22325  # Check if we need to convert this using DOS-style short mode. If the path
22326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22327  # take no chances and rewrite it.
22328  # Note: m4 eats our [], so we need to use [ and ] instead.
22329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22330  if test "x$has_forbidden_chars" != x; then
22331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22333  fi
22334
22335
22336  windows_path="$new_path"
22337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22338    unix_path=`$CYGPATH -u "$windows_path"`
22339    new_path="$unix_path"
22340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22342    new_path="$unix_path"
22343  fi
22344
22345  if test "x$path" != "x$new_path"; then
22346    BOOT_JDK="$new_path"
22347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22348$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22349  fi
22350
22351  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22352  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22353
22354  else
22355    # We're on a posix platform. Hooray! :)
22356    path="$BOOT_JDK"
22357    has_space=`$ECHO "$path" | $GREP " "`
22358    if test "x$has_space" != x; then
22359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22360$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22361      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22362    fi
22363
22364    # Use eval to expand a potential ~
22365    eval path="$path"
22366    if test ! -f "$path" && test ! -d "$path"; then
22367      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22368    fi
22369
22370    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22371  fi
22372
22373              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22374$as_echo_n "checking for Boot JDK... " >&6; }
22375              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22376$as_echo "$BOOT_JDK" >&6; }
22377              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22378$as_echo_n "checking Boot JDK version... " >&6; }
22379              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22380              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22381$as_echo "$BOOT_JDK_VERSION" >&6; }
22382            fi # end check jdk version
22383          fi # end check rt.jar
22384        fi # end check javac
22385      fi # end check java
22386    fi # end check boot jdk found
22387  fi
22388
22389    done
22390  fi
22391
22392  fi
22393
22394
22395    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22396    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22397      # Do we have a bin/java?
22398      if test ! -x "$BOOT_JDK/bin/java"; then
22399        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22400$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22401        BOOT_JDK_FOUND=no
22402      else
22403        # Do we have a bin/javac?
22404        if test ! -x "$BOOT_JDK/bin/javac"; then
22405          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22406$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22407          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22408$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22409          BOOT_JDK_FOUND=no
22410        else
22411          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22412          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22413            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22414$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22415            BOOT_JDK_FOUND=no
22416          else
22417            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22418            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22419
22420            # Extra M4 quote needed to protect [] in grep expression.
22421            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22422            if test "x$FOUND_CORRECT_VERSION" = x; then
22423              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22424$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22425              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22426$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22427              BOOT_JDK_FOUND=no
22428            else
22429              # We're done! :-)
22430              BOOT_JDK_FOUND=yes
22431
22432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22433
22434  # Input might be given as Windows format, start by converting to
22435  # unix format.
22436  path="$BOOT_JDK"
22437  new_path=`$CYGPATH -u "$path"`
22438
22439  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22440  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22441  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22442  # "foo.exe" is OK but "foo" is an error.
22443  #
22444  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22445  # It is also a way to make sure we got the proper file name for the real test later on.
22446  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22447  if test "x$test_shortpath" = x; then
22448    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22449$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22450    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22451  fi
22452
22453  # Call helper function which possibly converts this using DOS-style short mode.
22454  # If so, the updated path is stored in $new_path.
22455
22456  input_path="$new_path"
22457  # Check if we need to convert this using DOS-style short mode. If the path
22458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22459  # take no chances and rewrite it.
22460  # Note: m4 eats our [], so we need to use [ and ] instead.
22461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22462  if test "x$has_forbidden_chars" != x; then
22463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22464    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22465    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22466    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22467      # Going to short mode and back again did indeed matter. Since short mode is
22468      # case insensitive, let's make it lowercase to improve readability.
22469      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22470      # Now convert it back to Unix-stile (cygpath)
22471      input_path=`$CYGPATH -u "$shortmode_path"`
22472      new_path="$input_path"
22473    fi
22474  fi
22475
22476  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22477  if test "x$test_cygdrive_prefix" = x; then
22478    # As a simple fix, exclude /usr/bin since it's not a real path.
22479    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22480      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22481      # a path prefixed by /cygdrive for fixpath to work.
22482      new_path="$CYGWIN_ROOT_PATH$input_path"
22483    fi
22484  fi
22485
22486
22487  if test "x$path" != "x$new_path"; then
22488    BOOT_JDK="$new_path"
22489    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22490$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22491  fi
22492
22493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22494
22495  path="$BOOT_JDK"
22496  has_colon=`$ECHO $path | $GREP ^.:`
22497  new_path="$path"
22498  if test "x$has_colon" = x; then
22499    # Not in mixed or Windows style, start by that.
22500    new_path=`cmd //c echo $path`
22501  fi
22502
22503
22504  input_path="$new_path"
22505  # Check if we need to convert this using DOS-style short mode. If the path
22506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22507  # take no chances and rewrite it.
22508  # Note: m4 eats our [], so we need to use [ and ] instead.
22509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22510  if test "x$has_forbidden_chars" != x; then
22511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22512    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22513  fi
22514
22515
22516  windows_path="$new_path"
22517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22518    unix_path=`$CYGPATH -u "$windows_path"`
22519    new_path="$unix_path"
22520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22522    new_path="$unix_path"
22523  fi
22524
22525  if test "x$path" != "x$new_path"; then
22526    BOOT_JDK="$new_path"
22527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22528$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22529  fi
22530
22531  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22532  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22533
22534  else
22535    # We're on a posix platform. Hooray! :)
22536    path="$BOOT_JDK"
22537    has_space=`$ECHO "$path" | $GREP " "`
22538    if test "x$has_space" != x; then
22539      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22540$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22541      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22542    fi
22543
22544    # Use eval to expand a potential ~
22545    eval path="$path"
22546    if test ! -f "$path" && test ! -d "$path"; then
22547      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22548    fi
22549
22550    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22551  fi
22552
22553              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22554$as_echo_n "checking for Boot JDK... " >&6; }
22555              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22556$as_echo "$BOOT_JDK" >&6; }
22557              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22558$as_echo_n "checking Boot JDK version... " >&6; }
22559              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22560              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22561$as_echo "$BOOT_JDK_VERSION" >&6; }
22562            fi # end check jdk version
22563          fi # end check rt.jar
22564        fi # end check javac
22565      fi # end check java
22566    fi # end check boot jdk found
22567  fi
22568
22569
22570  if test "x$BOOT_JDK_FOUND" = xno; then
22571    # Now execute the test
22572
22573  if test "x$PROGRAMFILES" != x; then
22574    VIRTUAL_DIR="$PROGRAMFILES/Java"
22575
22576  windows_path="$VIRTUAL_DIR"
22577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22578    unix_path=`$CYGPATH -u "$windows_path"`
22579    VIRTUAL_DIR="$unix_path"
22580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22582    VIRTUAL_DIR="$unix_path"
22583  fi
22584
22585
22586  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22587  BOOT_JDK_SUFFIX=""
22588  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22589  if test "x$ALL_JDKS_FOUND" != x; then
22590    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22591
22592  if test "x$BOOT_JDK_FOUND" = xno; then
22593    # Now execute the test
22594
22595        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22596        if test -d "$BOOT_JDK"; then
22597          BOOT_JDK_FOUND=maybe
22598          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22599$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22600        fi
22601
22602
22603    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22604    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22605      # Do we have a bin/java?
22606      if test ! -x "$BOOT_JDK/bin/java"; then
22607        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22608$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22609        BOOT_JDK_FOUND=no
22610      else
22611        # Do we have a bin/javac?
22612        if test ! -x "$BOOT_JDK/bin/javac"; then
22613          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22614$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22615          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22616$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22617          BOOT_JDK_FOUND=no
22618        else
22619          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22620          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22621            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22622$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22623            BOOT_JDK_FOUND=no
22624          else
22625            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22626            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22627
22628            # Extra M4 quote needed to protect [] in grep expression.
22629            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22630            if test "x$FOUND_CORRECT_VERSION" = x; then
22631              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22632$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22633              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22634$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22635              BOOT_JDK_FOUND=no
22636            else
22637              # We're done! :-)
22638              BOOT_JDK_FOUND=yes
22639
22640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22641
22642  # Input might be given as Windows format, start by converting to
22643  # unix format.
22644  path="$BOOT_JDK"
22645  new_path=`$CYGPATH -u "$path"`
22646
22647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22650  # "foo.exe" is OK but "foo" is an error.
22651  #
22652  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22653  # It is also a way to make sure we got the proper file name for the real test later on.
22654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22655  if test "x$test_shortpath" = x; then
22656    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22657$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22658    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22659  fi
22660
22661  # Call helper function which possibly converts this using DOS-style short mode.
22662  # If so, the updated path is stored in $new_path.
22663
22664  input_path="$new_path"
22665  # Check if we need to convert this using DOS-style short mode. If the path
22666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22667  # take no chances and rewrite it.
22668  # Note: m4 eats our [], so we need to use [ and ] instead.
22669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22670  if test "x$has_forbidden_chars" != x; then
22671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22675      # Going to short mode and back again did indeed matter. Since short mode is
22676      # case insensitive, let's make it lowercase to improve readability.
22677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22678      # Now convert it back to Unix-stile (cygpath)
22679      input_path=`$CYGPATH -u "$shortmode_path"`
22680      new_path="$input_path"
22681    fi
22682  fi
22683
22684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22685  if test "x$test_cygdrive_prefix" = x; then
22686    # As a simple fix, exclude /usr/bin since it's not a real path.
22687    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22689      # a path prefixed by /cygdrive for fixpath to work.
22690      new_path="$CYGWIN_ROOT_PATH$input_path"
22691    fi
22692  fi
22693
22694
22695  if test "x$path" != "x$new_path"; then
22696    BOOT_JDK="$new_path"
22697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22698$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22699  fi
22700
22701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22702
22703  path="$BOOT_JDK"
22704  has_colon=`$ECHO $path | $GREP ^.:`
22705  new_path="$path"
22706  if test "x$has_colon" = x; then
22707    # Not in mixed or Windows style, start by that.
22708    new_path=`cmd //c echo $path`
22709  fi
22710
22711
22712  input_path="$new_path"
22713  # Check if we need to convert this using DOS-style short mode. If the path
22714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22715  # take no chances and rewrite it.
22716  # Note: m4 eats our [], so we need to use [ and ] instead.
22717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22718  if test "x$has_forbidden_chars" != x; then
22719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22721  fi
22722
22723
22724  windows_path="$new_path"
22725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22726    unix_path=`$CYGPATH -u "$windows_path"`
22727    new_path="$unix_path"
22728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22730    new_path="$unix_path"
22731  fi
22732
22733  if test "x$path" != "x$new_path"; then
22734    BOOT_JDK="$new_path"
22735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22736$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22737  fi
22738
22739  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22740  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22741
22742  else
22743    # We're on a posix platform. Hooray! :)
22744    path="$BOOT_JDK"
22745    has_space=`$ECHO "$path" | $GREP " "`
22746    if test "x$has_space" != x; then
22747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22748$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22749      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22750    fi
22751
22752    # Use eval to expand a potential ~
22753    eval path="$path"
22754    if test ! -f "$path" && test ! -d "$path"; then
22755      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22756    fi
22757
22758    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22759  fi
22760
22761              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22762$as_echo_n "checking for Boot JDK... " >&6; }
22763              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22764$as_echo "$BOOT_JDK" >&6; }
22765              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22766$as_echo_n "checking Boot JDK version... " >&6; }
22767              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22768              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22769$as_echo "$BOOT_JDK_VERSION" >&6; }
22770            fi # end check jdk version
22771          fi # end check rt.jar
22772        fi # end check javac
22773      fi # end check java
22774    fi # end check boot jdk found
22775  fi
22776
22777    done
22778  fi
22779
22780  fi
22781
22782
22783    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22784    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22785      # Do we have a bin/java?
22786      if test ! -x "$BOOT_JDK/bin/java"; then
22787        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22789        BOOT_JDK_FOUND=no
22790      else
22791        # Do we have a bin/javac?
22792        if test ! -x "$BOOT_JDK/bin/javac"; then
22793          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22795          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22796$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22797          BOOT_JDK_FOUND=no
22798        else
22799          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22800          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22801            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22803            BOOT_JDK_FOUND=no
22804          else
22805            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22806            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22807
22808            # Extra M4 quote needed to protect [] in grep expression.
22809            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22810            if test "x$FOUND_CORRECT_VERSION" = x; then
22811              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22812$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22813              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22814$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22815              BOOT_JDK_FOUND=no
22816            else
22817              # We're done! :-)
22818              BOOT_JDK_FOUND=yes
22819
22820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22821
22822  # Input might be given as Windows format, start by converting to
22823  # unix format.
22824  path="$BOOT_JDK"
22825  new_path=`$CYGPATH -u "$path"`
22826
22827  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22828  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22829  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22830  # "foo.exe" is OK but "foo" is an error.
22831  #
22832  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22833  # It is also a way to make sure we got the proper file name for the real test later on.
22834  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22835  if test "x$test_shortpath" = x; then
22836    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22837$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22838    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22839  fi
22840
22841  # Call helper function which possibly converts this using DOS-style short mode.
22842  # If so, the updated path is stored in $new_path.
22843
22844  input_path="$new_path"
22845  # Check if we need to convert this using DOS-style short mode. If the path
22846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22847  # take no chances and rewrite it.
22848  # Note: m4 eats our [], so we need to use [ and ] instead.
22849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22850  if test "x$has_forbidden_chars" != x; then
22851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22852    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22853    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22854    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22855      # Going to short mode and back again did indeed matter. Since short mode is
22856      # case insensitive, let's make it lowercase to improve readability.
22857      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22858      # Now convert it back to Unix-stile (cygpath)
22859      input_path=`$CYGPATH -u "$shortmode_path"`
22860      new_path="$input_path"
22861    fi
22862  fi
22863
22864  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22865  if test "x$test_cygdrive_prefix" = x; then
22866    # As a simple fix, exclude /usr/bin since it's not a real path.
22867    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22868      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22869      # a path prefixed by /cygdrive for fixpath to work.
22870      new_path="$CYGWIN_ROOT_PATH$input_path"
22871    fi
22872  fi
22873
22874
22875  if test "x$path" != "x$new_path"; then
22876    BOOT_JDK="$new_path"
22877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22878$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22879  fi
22880
22881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22882
22883  path="$BOOT_JDK"
22884  has_colon=`$ECHO $path | $GREP ^.:`
22885  new_path="$path"
22886  if test "x$has_colon" = x; then
22887    # Not in mixed or Windows style, start by that.
22888    new_path=`cmd //c echo $path`
22889  fi
22890
22891
22892  input_path="$new_path"
22893  # Check if we need to convert this using DOS-style short mode. If the path
22894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22895  # take no chances and rewrite it.
22896  # Note: m4 eats our [], so we need to use [ and ] instead.
22897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22898  if test "x$has_forbidden_chars" != x; then
22899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22900    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22901  fi
22902
22903
22904  windows_path="$new_path"
22905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22906    unix_path=`$CYGPATH -u "$windows_path"`
22907    new_path="$unix_path"
22908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22910    new_path="$unix_path"
22911  fi
22912
22913  if test "x$path" != "x$new_path"; then
22914    BOOT_JDK="$new_path"
22915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22916$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22917  fi
22918
22919  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22920  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22921
22922  else
22923    # We're on a posix platform. Hooray! :)
22924    path="$BOOT_JDK"
22925    has_space=`$ECHO "$path" | $GREP " "`
22926    if test "x$has_space" != x; then
22927      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22928$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22929      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22930    fi
22931
22932    # Use eval to expand a potential ~
22933    eval path="$path"
22934    if test ! -f "$path" && test ! -d "$path"; then
22935      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22936    fi
22937
22938    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22939  fi
22940
22941              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22942$as_echo_n "checking for Boot JDK... " >&6; }
22943              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22944$as_echo "$BOOT_JDK" >&6; }
22945              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22946$as_echo_n "checking Boot JDK version... " >&6; }
22947              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22948              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22949$as_echo "$BOOT_JDK_VERSION" >&6; }
22950            fi # end check jdk version
22951          fi # end check rt.jar
22952        fi # end check javac
22953      fi # end check java
22954    fi # end check boot jdk found
22955  fi
22956
22957
22958  if test "x$BOOT_JDK_FOUND" = xno; then
22959    # Now execute the test
22960
22961  if test "x$ProgramFiles" != x; then
22962    VIRTUAL_DIR="$ProgramFiles/Java"
22963
22964  windows_path="$VIRTUAL_DIR"
22965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22966    unix_path=`$CYGPATH -u "$windows_path"`
22967    VIRTUAL_DIR="$unix_path"
22968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22970    VIRTUAL_DIR="$unix_path"
22971  fi
22972
22973
22974  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22975  BOOT_JDK_SUFFIX=""
22976  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22977  if test "x$ALL_JDKS_FOUND" != x; then
22978    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22979
22980  if test "x$BOOT_JDK_FOUND" = xno; then
22981    # Now execute the test
22982
22983        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22984        if test -d "$BOOT_JDK"; then
22985          BOOT_JDK_FOUND=maybe
22986          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22987$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22988        fi
22989
22990
22991    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22992    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22993      # Do we have a bin/java?
22994      if test ! -x "$BOOT_JDK/bin/java"; then
22995        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22996$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22997        BOOT_JDK_FOUND=no
22998      else
22999        # Do we have a bin/javac?
23000        if test ! -x "$BOOT_JDK/bin/javac"; then
23001          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23003          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23004$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23005          BOOT_JDK_FOUND=no
23006        else
23007          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23008          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23009            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23010$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23011            BOOT_JDK_FOUND=no
23012          else
23013            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23014            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23015
23016            # Extra M4 quote needed to protect [] in grep expression.
23017            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23018            if test "x$FOUND_CORRECT_VERSION" = x; then
23019              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23020$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23021              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23022$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23023              BOOT_JDK_FOUND=no
23024            else
23025              # We're done! :-)
23026              BOOT_JDK_FOUND=yes
23027
23028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23029
23030  # Input might be given as Windows format, start by converting to
23031  # unix format.
23032  path="$BOOT_JDK"
23033  new_path=`$CYGPATH -u "$path"`
23034
23035  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23036  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23037  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23038  # "foo.exe" is OK but "foo" is an error.
23039  #
23040  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23041  # It is also a way to make sure we got the proper file name for the real test later on.
23042  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23043  if test "x$test_shortpath" = x; then
23044    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23045$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23046    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23047  fi
23048
23049  # Call helper function which possibly converts this using DOS-style short mode.
23050  # If so, the updated path is stored in $new_path.
23051
23052  input_path="$new_path"
23053  # Check if we need to convert this using DOS-style short mode. If the path
23054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23055  # take no chances and rewrite it.
23056  # Note: m4 eats our [], so we need to use [ and ] instead.
23057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23058  if test "x$has_forbidden_chars" != x; then
23059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23060    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23061    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23062    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23063      # Going to short mode and back again did indeed matter. Since short mode is
23064      # case insensitive, let's make it lowercase to improve readability.
23065      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23066      # Now convert it back to Unix-stile (cygpath)
23067      input_path=`$CYGPATH -u "$shortmode_path"`
23068      new_path="$input_path"
23069    fi
23070  fi
23071
23072  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23073  if test "x$test_cygdrive_prefix" = x; then
23074    # As a simple fix, exclude /usr/bin since it's not a real path.
23075    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23076      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23077      # a path prefixed by /cygdrive for fixpath to work.
23078      new_path="$CYGWIN_ROOT_PATH$input_path"
23079    fi
23080  fi
23081
23082
23083  if test "x$path" != "x$new_path"; then
23084    BOOT_JDK="$new_path"
23085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23086$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23087  fi
23088
23089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23090
23091  path="$BOOT_JDK"
23092  has_colon=`$ECHO $path | $GREP ^.:`
23093  new_path="$path"
23094  if test "x$has_colon" = x; then
23095    # Not in mixed or Windows style, start by that.
23096    new_path=`cmd //c echo $path`
23097  fi
23098
23099
23100  input_path="$new_path"
23101  # Check if we need to convert this using DOS-style short mode. If the path
23102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23103  # take no chances and rewrite it.
23104  # Note: m4 eats our [], so we need to use [ and ] instead.
23105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23106  if test "x$has_forbidden_chars" != x; then
23107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23108    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23109  fi
23110
23111
23112  windows_path="$new_path"
23113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23114    unix_path=`$CYGPATH -u "$windows_path"`
23115    new_path="$unix_path"
23116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23118    new_path="$unix_path"
23119  fi
23120
23121  if test "x$path" != "x$new_path"; then
23122    BOOT_JDK="$new_path"
23123    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23124$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23125  fi
23126
23127  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23128  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23129
23130  else
23131    # We're on a posix platform. Hooray! :)
23132    path="$BOOT_JDK"
23133    has_space=`$ECHO "$path" | $GREP " "`
23134    if test "x$has_space" != x; then
23135      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23136$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23137      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23138    fi
23139
23140    # Use eval to expand a potential ~
23141    eval path="$path"
23142    if test ! -f "$path" && test ! -d "$path"; then
23143      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23144    fi
23145
23146    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23147  fi
23148
23149              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23150$as_echo_n "checking for Boot JDK... " >&6; }
23151              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23152$as_echo "$BOOT_JDK" >&6; }
23153              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23154$as_echo_n "checking Boot JDK version... " >&6; }
23155              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23156              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23157$as_echo "$BOOT_JDK_VERSION" >&6; }
23158            fi # end check jdk version
23159          fi # end check rt.jar
23160        fi # end check javac
23161      fi # end check java
23162    fi # end check boot jdk found
23163  fi
23164
23165    done
23166  fi
23167
23168  fi
23169
23170
23171    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23172    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23173      # Do we have a bin/java?
23174      if test ! -x "$BOOT_JDK/bin/java"; then
23175        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23177        BOOT_JDK_FOUND=no
23178      else
23179        # Do we have a bin/javac?
23180        if test ! -x "$BOOT_JDK/bin/javac"; then
23181          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23183          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23184$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23185          BOOT_JDK_FOUND=no
23186        else
23187          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23188          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23189            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23191            BOOT_JDK_FOUND=no
23192          else
23193            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23194            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23195
23196            # Extra M4 quote needed to protect [] in grep expression.
23197            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23198            if test "x$FOUND_CORRECT_VERSION" = x; then
23199              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23200$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23201              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23202$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23203              BOOT_JDK_FOUND=no
23204            else
23205              # We're done! :-)
23206              BOOT_JDK_FOUND=yes
23207
23208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23209
23210  # Input might be given as Windows format, start by converting to
23211  # unix format.
23212  path="$BOOT_JDK"
23213  new_path=`$CYGPATH -u "$path"`
23214
23215  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23216  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23217  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23218  # "foo.exe" is OK but "foo" is an error.
23219  #
23220  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23221  # It is also a way to make sure we got the proper file name for the real test later on.
23222  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23223  if test "x$test_shortpath" = x; then
23224    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23225$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23226    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23227  fi
23228
23229  # Call helper function which possibly converts this using DOS-style short mode.
23230  # If so, the updated path is stored in $new_path.
23231
23232  input_path="$new_path"
23233  # Check if we need to convert this using DOS-style short mode. If the path
23234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23235  # take no chances and rewrite it.
23236  # Note: m4 eats our [], so we need to use [ and ] instead.
23237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23238  if test "x$has_forbidden_chars" != x; then
23239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23240    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23241    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23242    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23243      # Going to short mode and back again did indeed matter. Since short mode is
23244      # case insensitive, let's make it lowercase to improve readability.
23245      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23246      # Now convert it back to Unix-stile (cygpath)
23247      input_path=`$CYGPATH -u "$shortmode_path"`
23248      new_path="$input_path"
23249    fi
23250  fi
23251
23252  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23253  if test "x$test_cygdrive_prefix" = x; then
23254    # As a simple fix, exclude /usr/bin since it's not a real path.
23255    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23256      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23257      # a path prefixed by /cygdrive for fixpath to work.
23258      new_path="$CYGWIN_ROOT_PATH$input_path"
23259    fi
23260  fi
23261
23262
23263  if test "x$path" != "x$new_path"; then
23264    BOOT_JDK="$new_path"
23265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23266$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23267  fi
23268
23269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23270
23271  path="$BOOT_JDK"
23272  has_colon=`$ECHO $path | $GREP ^.:`
23273  new_path="$path"
23274  if test "x$has_colon" = x; then
23275    # Not in mixed or Windows style, start by that.
23276    new_path=`cmd //c echo $path`
23277  fi
23278
23279
23280  input_path="$new_path"
23281  # Check if we need to convert this using DOS-style short mode. If the path
23282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23283  # take no chances and rewrite it.
23284  # Note: m4 eats our [], so we need to use [ and ] instead.
23285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23286  if test "x$has_forbidden_chars" != x; then
23287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23288    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23289  fi
23290
23291
23292  windows_path="$new_path"
23293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23294    unix_path=`$CYGPATH -u "$windows_path"`
23295    new_path="$unix_path"
23296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23298    new_path="$unix_path"
23299  fi
23300
23301  if test "x$path" != "x$new_path"; then
23302    BOOT_JDK="$new_path"
23303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23304$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23305  fi
23306
23307  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23308  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23309
23310  else
23311    # We're on a posix platform. Hooray! :)
23312    path="$BOOT_JDK"
23313    has_space=`$ECHO "$path" | $GREP " "`
23314    if test "x$has_space" != x; then
23315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23316$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23317      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23318    fi
23319
23320    # Use eval to expand a potential ~
23321    eval path="$path"
23322    if test ! -f "$path" && test ! -d "$path"; then
23323      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23324    fi
23325
23326    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23327  fi
23328
23329              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23330$as_echo_n "checking for Boot JDK... " >&6; }
23331              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23332$as_echo "$BOOT_JDK" >&6; }
23333              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23334$as_echo_n "checking Boot JDK version... " >&6; }
23335              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23336              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23337$as_echo "$BOOT_JDK_VERSION" >&6; }
23338            fi # end check jdk version
23339          fi # end check rt.jar
23340        fi # end check javac
23341      fi # end check java
23342    fi # end check boot jdk found
23343  fi
23344
23345
23346  if test "x$BOOT_JDK_FOUND" = xno; then
23347    # Now execute the test
23348
23349  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23350  BOOT_JDK_SUFFIX=""
23351  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23352  if test "x$ALL_JDKS_FOUND" != x; then
23353    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23354
23355  if test "x$BOOT_JDK_FOUND" = xno; then
23356    # Now execute the test
23357
23358        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23359        if test -d "$BOOT_JDK"; then
23360          BOOT_JDK_FOUND=maybe
23361          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23362$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23363        fi
23364
23365
23366    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23367    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23368      # Do we have a bin/java?
23369      if test ! -x "$BOOT_JDK/bin/java"; then
23370        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23371$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23372        BOOT_JDK_FOUND=no
23373      else
23374        # Do we have a bin/javac?
23375        if test ! -x "$BOOT_JDK/bin/javac"; then
23376          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23378          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23379$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23380          BOOT_JDK_FOUND=no
23381        else
23382          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23383          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23384            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23385$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23386            BOOT_JDK_FOUND=no
23387          else
23388            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23389            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23390
23391            # Extra M4 quote needed to protect [] in grep expression.
23392            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23393            if test "x$FOUND_CORRECT_VERSION" = x; then
23394              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23395$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23396              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23397$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23398              BOOT_JDK_FOUND=no
23399            else
23400              # We're done! :-)
23401              BOOT_JDK_FOUND=yes
23402
23403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23404
23405  # Input might be given as Windows format, start by converting to
23406  # unix format.
23407  path="$BOOT_JDK"
23408  new_path=`$CYGPATH -u "$path"`
23409
23410  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23411  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23412  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23413  # "foo.exe" is OK but "foo" is an error.
23414  #
23415  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23416  # It is also a way to make sure we got the proper file name for the real test later on.
23417  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23418  if test "x$test_shortpath" = x; then
23419    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23420$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23421    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23422  fi
23423
23424  # Call helper function which possibly converts this using DOS-style short mode.
23425  # If so, the updated path is stored in $new_path.
23426
23427  input_path="$new_path"
23428  # Check if we need to convert this using DOS-style short mode. If the path
23429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23430  # take no chances and rewrite it.
23431  # Note: m4 eats our [], so we need to use [ and ] instead.
23432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23433  if test "x$has_forbidden_chars" != x; then
23434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23435    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23436    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23437    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23438      # Going to short mode and back again did indeed matter. Since short mode is
23439      # case insensitive, let's make it lowercase to improve readability.
23440      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23441      # Now convert it back to Unix-stile (cygpath)
23442      input_path=`$CYGPATH -u "$shortmode_path"`
23443      new_path="$input_path"
23444    fi
23445  fi
23446
23447  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23448  if test "x$test_cygdrive_prefix" = x; then
23449    # As a simple fix, exclude /usr/bin since it's not a real path.
23450    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23451      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23452      # a path prefixed by /cygdrive for fixpath to work.
23453      new_path="$CYGWIN_ROOT_PATH$input_path"
23454    fi
23455  fi
23456
23457
23458  if test "x$path" != "x$new_path"; then
23459    BOOT_JDK="$new_path"
23460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23461$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23462  fi
23463
23464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23465
23466  path="$BOOT_JDK"
23467  has_colon=`$ECHO $path | $GREP ^.:`
23468  new_path="$path"
23469  if test "x$has_colon" = x; then
23470    # Not in mixed or Windows style, start by that.
23471    new_path=`cmd //c echo $path`
23472  fi
23473
23474
23475  input_path="$new_path"
23476  # Check if we need to convert this using DOS-style short mode. If the path
23477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23478  # take no chances and rewrite it.
23479  # Note: m4 eats our [], so we need to use [ and ] instead.
23480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23481  if test "x$has_forbidden_chars" != x; then
23482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23483    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23484  fi
23485
23486
23487  windows_path="$new_path"
23488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23489    unix_path=`$CYGPATH -u "$windows_path"`
23490    new_path="$unix_path"
23491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23493    new_path="$unix_path"
23494  fi
23495
23496  if test "x$path" != "x$new_path"; then
23497    BOOT_JDK="$new_path"
23498    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23499$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23500  fi
23501
23502  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23503  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23504
23505  else
23506    # We're on a posix platform. Hooray! :)
23507    path="$BOOT_JDK"
23508    has_space=`$ECHO "$path" | $GREP " "`
23509    if test "x$has_space" != x; then
23510      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23511$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23512      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23513    fi
23514
23515    # Use eval to expand a potential ~
23516    eval path="$path"
23517    if test ! -f "$path" && test ! -d "$path"; then
23518      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23519    fi
23520
23521    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23522  fi
23523
23524              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23525$as_echo_n "checking for Boot JDK... " >&6; }
23526              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23527$as_echo "$BOOT_JDK" >&6; }
23528              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23529$as_echo_n "checking Boot JDK version... " >&6; }
23530              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23531              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23532$as_echo "$BOOT_JDK_VERSION" >&6; }
23533            fi # end check jdk version
23534          fi # end check rt.jar
23535        fi # end check javac
23536      fi # end check java
23537    fi # end check boot jdk found
23538  fi
23539
23540    done
23541  fi
23542
23543
23544    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23545    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23546      # Do we have a bin/java?
23547      if test ! -x "$BOOT_JDK/bin/java"; then
23548        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23549$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23550        BOOT_JDK_FOUND=no
23551      else
23552        # Do we have a bin/javac?
23553        if test ! -x "$BOOT_JDK/bin/javac"; then
23554          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23555$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23556          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23557$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23558          BOOT_JDK_FOUND=no
23559        else
23560          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23561          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23562            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23563$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23564            BOOT_JDK_FOUND=no
23565          else
23566            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23567            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23568
23569            # Extra M4 quote needed to protect [] in grep expression.
23570            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23571            if test "x$FOUND_CORRECT_VERSION" = x; then
23572              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23573$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23574              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23575$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23576              BOOT_JDK_FOUND=no
23577            else
23578              # We're done! :-)
23579              BOOT_JDK_FOUND=yes
23580
23581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23582
23583  # Input might be given as Windows format, start by converting to
23584  # unix format.
23585  path="$BOOT_JDK"
23586  new_path=`$CYGPATH -u "$path"`
23587
23588  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23589  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23590  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23591  # "foo.exe" is OK but "foo" is an error.
23592  #
23593  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23594  # It is also a way to make sure we got the proper file name for the real test later on.
23595  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23596  if test "x$test_shortpath" = x; then
23597    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23598$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23599    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23600  fi
23601
23602  # Call helper function which possibly converts this using DOS-style short mode.
23603  # If so, the updated path is stored in $new_path.
23604
23605  input_path="$new_path"
23606  # Check if we need to convert this using DOS-style short mode. If the path
23607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23608  # take no chances and rewrite it.
23609  # Note: m4 eats our [], so we need to use [ and ] instead.
23610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23611  if test "x$has_forbidden_chars" != x; then
23612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23616      # Going to short mode and back again did indeed matter. Since short mode is
23617      # case insensitive, let's make it lowercase to improve readability.
23618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23619      # Now convert it back to Unix-stile (cygpath)
23620      input_path=`$CYGPATH -u "$shortmode_path"`
23621      new_path="$input_path"
23622    fi
23623  fi
23624
23625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23626  if test "x$test_cygdrive_prefix" = x; then
23627    # As a simple fix, exclude /usr/bin since it's not a real path.
23628    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23630      # a path prefixed by /cygdrive for fixpath to work.
23631      new_path="$CYGWIN_ROOT_PATH$input_path"
23632    fi
23633  fi
23634
23635
23636  if test "x$path" != "x$new_path"; then
23637    BOOT_JDK="$new_path"
23638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23639$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23640  fi
23641
23642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23643
23644  path="$BOOT_JDK"
23645  has_colon=`$ECHO $path | $GREP ^.:`
23646  new_path="$path"
23647  if test "x$has_colon" = x; then
23648    # Not in mixed or Windows style, start by that.
23649    new_path=`cmd //c echo $path`
23650  fi
23651
23652
23653  input_path="$new_path"
23654  # Check if we need to convert this using DOS-style short mode. If the path
23655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23656  # take no chances and rewrite it.
23657  # Note: m4 eats our [], so we need to use [ and ] instead.
23658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23659  if test "x$has_forbidden_chars" != x; then
23660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23661    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23662  fi
23663
23664
23665  windows_path="$new_path"
23666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23667    unix_path=`$CYGPATH -u "$windows_path"`
23668    new_path="$unix_path"
23669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23671    new_path="$unix_path"
23672  fi
23673
23674  if test "x$path" != "x$new_path"; then
23675    BOOT_JDK="$new_path"
23676    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23677$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23678  fi
23679
23680  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23681  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23682
23683  else
23684    # We're on a posix platform. Hooray! :)
23685    path="$BOOT_JDK"
23686    has_space=`$ECHO "$path" | $GREP " "`
23687    if test "x$has_space" != x; then
23688      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23689$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23690      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23691    fi
23692
23693    # Use eval to expand a potential ~
23694    eval path="$path"
23695    if test ! -f "$path" && test ! -d "$path"; then
23696      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23697    fi
23698
23699    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23700  fi
23701
23702              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23703$as_echo_n "checking for Boot JDK... " >&6; }
23704              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23705$as_echo "$BOOT_JDK" >&6; }
23706              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23707$as_echo_n "checking Boot JDK version... " >&6; }
23708              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23709              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23710$as_echo "$BOOT_JDK_VERSION" >&6; }
23711            fi # end check jdk version
23712          fi # end check rt.jar
23713        fi # end check javac
23714      fi # end check java
23715    fi # end check boot jdk found
23716  fi
23717
23718  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23719
23720  if test "x$BOOT_JDK_FOUND" = xno; then
23721    # Now execute the test
23722
23723  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23724  BOOT_JDK_SUFFIX="/Contents/Home"
23725  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23726  if test "x$ALL_JDKS_FOUND" != x; then
23727    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23728
23729  if test "x$BOOT_JDK_FOUND" = xno; then
23730    # Now execute the test
23731
23732        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23733        if test -d "$BOOT_JDK"; then
23734          BOOT_JDK_FOUND=maybe
23735          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23736$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23737        fi
23738
23739
23740    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23741    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23742      # Do we have a bin/java?
23743      if test ! -x "$BOOT_JDK/bin/java"; then
23744        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23745$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23746        BOOT_JDK_FOUND=no
23747      else
23748        # Do we have a bin/javac?
23749        if test ! -x "$BOOT_JDK/bin/javac"; then
23750          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23751$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23752          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23753$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23754          BOOT_JDK_FOUND=no
23755        else
23756          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23757          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23758            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23759$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23760            BOOT_JDK_FOUND=no
23761          else
23762            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23763            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23764
23765            # Extra M4 quote needed to protect [] in grep expression.
23766            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23767            if test "x$FOUND_CORRECT_VERSION" = x; then
23768              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23769$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23770              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23771$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23772              BOOT_JDK_FOUND=no
23773            else
23774              # We're done! :-)
23775              BOOT_JDK_FOUND=yes
23776
23777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23778
23779  # Input might be given as Windows format, start by converting to
23780  # unix format.
23781  path="$BOOT_JDK"
23782  new_path=`$CYGPATH -u "$path"`
23783
23784  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23785  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23786  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23787  # "foo.exe" is OK but "foo" is an error.
23788  #
23789  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23790  # It is also a way to make sure we got the proper file name for the real test later on.
23791  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23792  if test "x$test_shortpath" = x; then
23793    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23794$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23795    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23796  fi
23797
23798  # Call helper function which possibly converts this using DOS-style short mode.
23799  # If so, the updated path is stored in $new_path.
23800
23801  input_path="$new_path"
23802  # Check if we need to convert this using DOS-style short mode. If the path
23803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23804  # take no chances and rewrite it.
23805  # Note: m4 eats our [], so we need to use [ and ] instead.
23806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23807  if test "x$has_forbidden_chars" != x; then
23808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23809    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23810    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23811    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23812      # Going to short mode and back again did indeed matter. Since short mode is
23813      # case insensitive, let's make it lowercase to improve readability.
23814      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23815      # Now convert it back to Unix-stile (cygpath)
23816      input_path=`$CYGPATH -u "$shortmode_path"`
23817      new_path="$input_path"
23818    fi
23819  fi
23820
23821  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23822  if test "x$test_cygdrive_prefix" = x; then
23823    # As a simple fix, exclude /usr/bin since it's not a real path.
23824    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23825      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23826      # a path prefixed by /cygdrive for fixpath to work.
23827      new_path="$CYGWIN_ROOT_PATH$input_path"
23828    fi
23829  fi
23830
23831
23832  if test "x$path" != "x$new_path"; then
23833    BOOT_JDK="$new_path"
23834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23835$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23836  fi
23837
23838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23839
23840  path="$BOOT_JDK"
23841  has_colon=`$ECHO $path | $GREP ^.:`
23842  new_path="$path"
23843  if test "x$has_colon" = x; then
23844    # Not in mixed or Windows style, start by that.
23845    new_path=`cmd //c echo $path`
23846  fi
23847
23848
23849  input_path="$new_path"
23850  # Check if we need to convert this using DOS-style short mode. If the path
23851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23852  # take no chances and rewrite it.
23853  # Note: m4 eats our [], so we need to use [ and ] instead.
23854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23855  if test "x$has_forbidden_chars" != x; then
23856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23857    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23858  fi
23859
23860
23861  windows_path="$new_path"
23862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23863    unix_path=`$CYGPATH -u "$windows_path"`
23864    new_path="$unix_path"
23865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23867    new_path="$unix_path"
23868  fi
23869
23870  if test "x$path" != "x$new_path"; then
23871    BOOT_JDK="$new_path"
23872    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23873$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23874  fi
23875
23876  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23877  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23878
23879  else
23880    # We're on a posix platform. Hooray! :)
23881    path="$BOOT_JDK"
23882    has_space=`$ECHO "$path" | $GREP " "`
23883    if test "x$has_space" != x; then
23884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23885$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23886      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23887    fi
23888
23889    # Use eval to expand a potential ~
23890    eval path="$path"
23891    if test ! -f "$path" && test ! -d "$path"; then
23892      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23893    fi
23894
23895    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23896  fi
23897
23898              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23899$as_echo_n "checking for Boot JDK... " >&6; }
23900              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23901$as_echo "$BOOT_JDK" >&6; }
23902              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23903$as_echo_n "checking Boot JDK version... " >&6; }
23904              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23905              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23906$as_echo "$BOOT_JDK_VERSION" >&6; }
23907            fi # end check jdk version
23908          fi # end check rt.jar
23909        fi # end check javac
23910      fi # end check java
23911    fi # end check boot jdk found
23912  fi
23913
23914    done
23915  fi
23916
23917
23918    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23919    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23920      # Do we have a bin/java?
23921      if test ! -x "$BOOT_JDK/bin/java"; then
23922        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23923$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23924        BOOT_JDK_FOUND=no
23925      else
23926        # Do we have a bin/javac?
23927        if test ! -x "$BOOT_JDK/bin/javac"; then
23928          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23929$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23930          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23931$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23932          BOOT_JDK_FOUND=no
23933        else
23934          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23935          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23936            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23937$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23938            BOOT_JDK_FOUND=no
23939          else
23940            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23941            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23942
23943            # Extra M4 quote needed to protect [] in grep expression.
23944            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23945            if test "x$FOUND_CORRECT_VERSION" = x; then
23946              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23947$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23948              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23949$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23950              BOOT_JDK_FOUND=no
23951            else
23952              # We're done! :-)
23953              BOOT_JDK_FOUND=yes
23954
23955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23956
23957  # Input might be given as Windows format, start by converting to
23958  # unix format.
23959  path="$BOOT_JDK"
23960  new_path=`$CYGPATH -u "$path"`
23961
23962  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23963  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23964  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23965  # "foo.exe" is OK but "foo" is an error.
23966  #
23967  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23968  # It is also a way to make sure we got the proper file name for the real test later on.
23969  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23970  if test "x$test_shortpath" = x; then
23971    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23972$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23973    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23974  fi
23975
23976  # Call helper function which possibly converts this using DOS-style short mode.
23977  # If so, the updated path is stored in $new_path.
23978
23979  input_path="$new_path"
23980  # Check if we need to convert this using DOS-style short mode. If the path
23981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23982  # take no chances and rewrite it.
23983  # Note: m4 eats our [], so we need to use [ and ] instead.
23984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23985  if test "x$has_forbidden_chars" != x; then
23986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23987    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23988    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23989    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23990      # Going to short mode and back again did indeed matter. Since short mode is
23991      # case insensitive, let's make it lowercase to improve readability.
23992      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23993      # Now convert it back to Unix-stile (cygpath)
23994      input_path=`$CYGPATH -u "$shortmode_path"`
23995      new_path="$input_path"
23996    fi
23997  fi
23998
23999  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24000  if test "x$test_cygdrive_prefix" = x; then
24001    # As a simple fix, exclude /usr/bin since it's not a real path.
24002    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24003      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24004      # a path prefixed by /cygdrive for fixpath to work.
24005      new_path="$CYGWIN_ROOT_PATH$input_path"
24006    fi
24007  fi
24008
24009
24010  if test "x$path" != "x$new_path"; then
24011    BOOT_JDK="$new_path"
24012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24013$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24014  fi
24015
24016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24017
24018  path="$BOOT_JDK"
24019  has_colon=`$ECHO $path | $GREP ^.:`
24020  new_path="$path"
24021  if test "x$has_colon" = x; then
24022    # Not in mixed or Windows style, start by that.
24023    new_path=`cmd //c echo $path`
24024  fi
24025
24026
24027  input_path="$new_path"
24028  # Check if we need to convert this using DOS-style short mode. If the path
24029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24030  # take no chances and rewrite it.
24031  # Note: m4 eats our [], so we need to use [ and ] instead.
24032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24033  if test "x$has_forbidden_chars" != x; then
24034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24035    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24036  fi
24037
24038
24039  windows_path="$new_path"
24040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24041    unix_path=`$CYGPATH -u "$windows_path"`
24042    new_path="$unix_path"
24043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24045    new_path="$unix_path"
24046  fi
24047
24048  if test "x$path" != "x$new_path"; then
24049    BOOT_JDK="$new_path"
24050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24051$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24052  fi
24053
24054  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24055  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24056
24057  else
24058    # We're on a posix platform. Hooray! :)
24059    path="$BOOT_JDK"
24060    has_space=`$ECHO "$path" | $GREP " "`
24061    if test "x$has_space" != x; then
24062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24063$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24064      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24065    fi
24066
24067    # Use eval to expand a potential ~
24068    eval path="$path"
24069    if test ! -f "$path" && test ! -d "$path"; then
24070      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24071    fi
24072
24073    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24074  fi
24075
24076              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24077$as_echo_n "checking for Boot JDK... " >&6; }
24078              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24079$as_echo "$BOOT_JDK" >&6; }
24080              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24081$as_echo_n "checking Boot JDK version... " >&6; }
24082              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24083              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24084$as_echo "$BOOT_JDK_VERSION" >&6; }
24085            fi # end check jdk version
24086          fi # end check rt.jar
24087        fi # end check javac
24088      fi # end check java
24089    fi # end check boot jdk found
24090  fi
24091
24092
24093  if test "x$BOOT_JDK_FOUND" = xno; then
24094    # Now execute the test
24095
24096  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24097  BOOT_JDK_SUFFIX="/Contents/Home"
24098  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24099  if test "x$ALL_JDKS_FOUND" != x; then
24100    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24101
24102  if test "x$BOOT_JDK_FOUND" = xno; then
24103    # Now execute the test
24104
24105        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24106        if test -d "$BOOT_JDK"; then
24107          BOOT_JDK_FOUND=maybe
24108          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24109$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24110        fi
24111
24112
24113    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24114    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24115      # Do we have a bin/java?
24116      if test ! -x "$BOOT_JDK/bin/java"; then
24117        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24118$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24119        BOOT_JDK_FOUND=no
24120      else
24121        # Do we have a bin/javac?
24122        if test ! -x "$BOOT_JDK/bin/javac"; then
24123          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24124$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24125          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24126$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24127          BOOT_JDK_FOUND=no
24128        else
24129          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24130          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24131            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24133            BOOT_JDK_FOUND=no
24134          else
24135            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24136            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24137
24138            # Extra M4 quote needed to protect [] in grep expression.
24139            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24140            if test "x$FOUND_CORRECT_VERSION" = x; then
24141              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24142$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24143              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24144$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24145              BOOT_JDK_FOUND=no
24146            else
24147              # We're done! :-)
24148              BOOT_JDK_FOUND=yes
24149
24150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24151
24152  # Input might be given as Windows format, start by converting to
24153  # unix format.
24154  path="$BOOT_JDK"
24155  new_path=`$CYGPATH -u "$path"`
24156
24157  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24158  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24159  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24160  # "foo.exe" is OK but "foo" is an error.
24161  #
24162  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24163  # It is also a way to make sure we got the proper file name for the real test later on.
24164  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24165  if test "x$test_shortpath" = x; then
24166    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24167$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24168    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24169  fi
24170
24171  # Call helper function which possibly converts this using DOS-style short mode.
24172  # If so, the updated path is stored in $new_path.
24173
24174  input_path="$new_path"
24175  # Check if we need to convert this using DOS-style short mode. If the path
24176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24177  # take no chances and rewrite it.
24178  # Note: m4 eats our [], so we need to use [ and ] instead.
24179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24180  if test "x$has_forbidden_chars" != x; then
24181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24182    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24183    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24184    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24185      # Going to short mode and back again did indeed matter. Since short mode is
24186      # case insensitive, let's make it lowercase to improve readability.
24187      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24188      # Now convert it back to Unix-stile (cygpath)
24189      input_path=`$CYGPATH -u "$shortmode_path"`
24190      new_path="$input_path"
24191    fi
24192  fi
24193
24194  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24195  if test "x$test_cygdrive_prefix" = x; then
24196    # As a simple fix, exclude /usr/bin since it's not a real path.
24197    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24198      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24199      # a path prefixed by /cygdrive for fixpath to work.
24200      new_path="$CYGWIN_ROOT_PATH$input_path"
24201    fi
24202  fi
24203
24204
24205  if test "x$path" != "x$new_path"; then
24206    BOOT_JDK="$new_path"
24207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24208$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24209  fi
24210
24211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24212
24213  path="$BOOT_JDK"
24214  has_colon=`$ECHO $path | $GREP ^.:`
24215  new_path="$path"
24216  if test "x$has_colon" = x; then
24217    # Not in mixed or Windows style, start by that.
24218    new_path=`cmd //c echo $path`
24219  fi
24220
24221
24222  input_path="$new_path"
24223  # Check if we need to convert this using DOS-style short mode. If the path
24224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24225  # take no chances and rewrite it.
24226  # Note: m4 eats our [], so we need to use [ and ] instead.
24227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24228  if test "x$has_forbidden_chars" != x; then
24229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24231  fi
24232
24233
24234  windows_path="$new_path"
24235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24236    unix_path=`$CYGPATH -u "$windows_path"`
24237    new_path="$unix_path"
24238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24240    new_path="$unix_path"
24241  fi
24242
24243  if test "x$path" != "x$new_path"; then
24244    BOOT_JDK="$new_path"
24245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24246$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24247  fi
24248
24249  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24250  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24251
24252  else
24253    # We're on a posix platform. Hooray! :)
24254    path="$BOOT_JDK"
24255    has_space=`$ECHO "$path" | $GREP " "`
24256    if test "x$has_space" != x; then
24257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24258$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24259      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24260    fi
24261
24262    # Use eval to expand a potential ~
24263    eval path="$path"
24264    if test ! -f "$path" && test ! -d "$path"; then
24265      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24266    fi
24267
24268    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24269  fi
24270
24271              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24272$as_echo_n "checking for Boot JDK... " >&6; }
24273              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24274$as_echo "$BOOT_JDK" >&6; }
24275              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24276$as_echo_n "checking Boot JDK version... " >&6; }
24277              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24278              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24279$as_echo "$BOOT_JDK_VERSION" >&6; }
24280            fi # end check jdk version
24281          fi # end check rt.jar
24282        fi # end check javac
24283      fi # end check java
24284    fi # end check boot jdk found
24285  fi
24286
24287    done
24288  fi
24289
24290
24291    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24292    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24293      # Do we have a bin/java?
24294      if test ! -x "$BOOT_JDK/bin/java"; then
24295        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24296$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24297        BOOT_JDK_FOUND=no
24298      else
24299        # Do we have a bin/javac?
24300        if test ! -x "$BOOT_JDK/bin/javac"; then
24301          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24302$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24303          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24304$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24305          BOOT_JDK_FOUND=no
24306        else
24307          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24308          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24309            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24310$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24311            BOOT_JDK_FOUND=no
24312          else
24313            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24314            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24315
24316            # Extra M4 quote needed to protect [] in grep expression.
24317            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24318            if test "x$FOUND_CORRECT_VERSION" = x; then
24319              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24320$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24321              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24322$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24323              BOOT_JDK_FOUND=no
24324            else
24325              # We're done! :-)
24326              BOOT_JDK_FOUND=yes
24327
24328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24329
24330  # Input might be given as Windows format, start by converting to
24331  # unix format.
24332  path="$BOOT_JDK"
24333  new_path=`$CYGPATH -u "$path"`
24334
24335  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24336  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24337  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24338  # "foo.exe" is OK but "foo" is an error.
24339  #
24340  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24341  # It is also a way to make sure we got the proper file name for the real test later on.
24342  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24343  if test "x$test_shortpath" = x; then
24344    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24345$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24346    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24347  fi
24348
24349  # Call helper function which possibly converts this using DOS-style short mode.
24350  # If so, the updated path is stored in $new_path.
24351
24352  input_path="$new_path"
24353  # Check if we need to convert this using DOS-style short mode. If the path
24354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24355  # take no chances and rewrite it.
24356  # Note: m4 eats our [], so we need to use [ and ] instead.
24357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24358  if test "x$has_forbidden_chars" != x; then
24359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24360    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24361    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24362    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24363      # Going to short mode and back again did indeed matter. Since short mode is
24364      # case insensitive, let's make it lowercase to improve readability.
24365      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24366      # Now convert it back to Unix-stile (cygpath)
24367      input_path=`$CYGPATH -u "$shortmode_path"`
24368      new_path="$input_path"
24369    fi
24370  fi
24371
24372  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24373  if test "x$test_cygdrive_prefix" = x; then
24374    # As a simple fix, exclude /usr/bin since it's not a real path.
24375    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24376      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24377      # a path prefixed by /cygdrive for fixpath to work.
24378      new_path="$CYGWIN_ROOT_PATH$input_path"
24379    fi
24380  fi
24381
24382
24383  if test "x$path" != "x$new_path"; then
24384    BOOT_JDK="$new_path"
24385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24386$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24387  fi
24388
24389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24390
24391  path="$BOOT_JDK"
24392  has_colon=`$ECHO $path | $GREP ^.:`
24393  new_path="$path"
24394  if test "x$has_colon" = x; then
24395    # Not in mixed or Windows style, start by that.
24396    new_path=`cmd //c echo $path`
24397  fi
24398
24399
24400  input_path="$new_path"
24401  # Check if we need to convert this using DOS-style short mode. If the path
24402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24403  # take no chances and rewrite it.
24404  # Note: m4 eats our [], so we need to use [ and ] instead.
24405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24406  if test "x$has_forbidden_chars" != x; then
24407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24408    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24409  fi
24410
24411
24412  windows_path="$new_path"
24413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24414    unix_path=`$CYGPATH -u "$windows_path"`
24415    new_path="$unix_path"
24416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24418    new_path="$unix_path"
24419  fi
24420
24421  if test "x$path" != "x$new_path"; then
24422    BOOT_JDK="$new_path"
24423    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24424$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24425  fi
24426
24427  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24428  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24429
24430  else
24431    # We're on a posix platform. Hooray! :)
24432    path="$BOOT_JDK"
24433    has_space=`$ECHO "$path" | $GREP " "`
24434    if test "x$has_space" != x; then
24435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24436$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24437      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24438    fi
24439
24440    # Use eval to expand a potential ~
24441    eval path="$path"
24442    if test ! -f "$path" && test ! -d "$path"; then
24443      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24444    fi
24445
24446    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24447  fi
24448
24449              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24450$as_echo_n "checking for Boot JDK... " >&6; }
24451              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24452$as_echo "$BOOT_JDK" >&6; }
24453              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24454$as_echo_n "checking Boot JDK version... " >&6; }
24455              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24456              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24457$as_echo "$BOOT_JDK_VERSION" >&6; }
24458            fi # end check jdk version
24459          fi # end check rt.jar
24460        fi # end check javac
24461      fi # end check java
24462    fi # end check boot jdk found
24463  fi
24464
24465  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24466
24467  if test "x$BOOT_JDK_FOUND" = xno; then
24468    # Now execute the test
24469
24470  BOOT_JDK_PREFIX="/usr/lib/jvm"
24471  BOOT_JDK_SUFFIX=""
24472  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24473  if test "x$ALL_JDKS_FOUND" != x; then
24474    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24475
24476  if test "x$BOOT_JDK_FOUND" = xno; then
24477    # Now execute the test
24478
24479        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24480        if test -d "$BOOT_JDK"; then
24481          BOOT_JDK_FOUND=maybe
24482          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24483$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24484        fi
24485
24486
24487    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24488    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24489      # Do we have a bin/java?
24490      if test ! -x "$BOOT_JDK/bin/java"; then
24491        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24492$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24493        BOOT_JDK_FOUND=no
24494      else
24495        # Do we have a bin/javac?
24496        if test ! -x "$BOOT_JDK/bin/javac"; then
24497          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24498$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24499          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24500$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24501          BOOT_JDK_FOUND=no
24502        else
24503          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24504          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24505            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24506$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24507            BOOT_JDK_FOUND=no
24508          else
24509            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24510            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24511
24512            # Extra M4 quote needed to protect [] in grep expression.
24513            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24514            if test "x$FOUND_CORRECT_VERSION" = x; then
24515              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24516$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24517              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24518$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24519              BOOT_JDK_FOUND=no
24520            else
24521              # We're done! :-)
24522              BOOT_JDK_FOUND=yes
24523
24524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24525
24526  # Input might be given as Windows format, start by converting to
24527  # unix format.
24528  path="$BOOT_JDK"
24529  new_path=`$CYGPATH -u "$path"`
24530
24531  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24532  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24533  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24534  # "foo.exe" is OK but "foo" is an error.
24535  #
24536  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24537  # It is also a way to make sure we got the proper file name for the real test later on.
24538  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24539  if test "x$test_shortpath" = x; then
24540    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24541$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24542    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24543  fi
24544
24545  # Call helper function which possibly converts this using DOS-style short mode.
24546  # If so, the updated path is stored in $new_path.
24547
24548  input_path="$new_path"
24549  # Check if we need to convert this using DOS-style short mode. If the path
24550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24551  # take no chances and rewrite it.
24552  # Note: m4 eats our [], so we need to use [ and ] instead.
24553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24554  if test "x$has_forbidden_chars" != x; then
24555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24556    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24557    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24558    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24559      # Going to short mode and back again did indeed matter. Since short mode is
24560      # case insensitive, let's make it lowercase to improve readability.
24561      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24562      # Now convert it back to Unix-stile (cygpath)
24563      input_path=`$CYGPATH -u "$shortmode_path"`
24564      new_path="$input_path"
24565    fi
24566  fi
24567
24568  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24569  if test "x$test_cygdrive_prefix" = x; then
24570    # As a simple fix, exclude /usr/bin since it's not a real path.
24571    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24572      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24573      # a path prefixed by /cygdrive for fixpath to work.
24574      new_path="$CYGWIN_ROOT_PATH$input_path"
24575    fi
24576  fi
24577
24578
24579  if test "x$path" != "x$new_path"; then
24580    BOOT_JDK="$new_path"
24581    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24582$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24583  fi
24584
24585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24586
24587  path="$BOOT_JDK"
24588  has_colon=`$ECHO $path | $GREP ^.:`
24589  new_path="$path"
24590  if test "x$has_colon" = x; then
24591    # Not in mixed or Windows style, start by that.
24592    new_path=`cmd //c echo $path`
24593  fi
24594
24595
24596  input_path="$new_path"
24597  # Check if we need to convert this using DOS-style short mode. If the path
24598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24599  # take no chances and rewrite it.
24600  # Note: m4 eats our [], so we need to use [ and ] instead.
24601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24602  if test "x$has_forbidden_chars" != x; then
24603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24604    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24605  fi
24606
24607
24608  windows_path="$new_path"
24609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24610    unix_path=`$CYGPATH -u "$windows_path"`
24611    new_path="$unix_path"
24612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24614    new_path="$unix_path"
24615  fi
24616
24617  if test "x$path" != "x$new_path"; then
24618    BOOT_JDK="$new_path"
24619    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24620$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24621  fi
24622
24623  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24624  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24625
24626  else
24627    # We're on a posix platform. Hooray! :)
24628    path="$BOOT_JDK"
24629    has_space=`$ECHO "$path" | $GREP " "`
24630    if test "x$has_space" != x; then
24631      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24632$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24633      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24634    fi
24635
24636    # Use eval to expand a potential ~
24637    eval path="$path"
24638    if test ! -f "$path" && test ! -d "$path"; then
24639      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24640    fi
24641
24642    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24643  fi
24644
24645              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24646$as_echo_n "checking for Boot JDK... " >&6; }
24647              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24648$as_echo "$BOOT_JDK" >&6; }
24649              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24650$as_echo_n "checking Boot JDK version... " >&6; }
24651              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24652              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24653$as_echo "$BOOT_JDK_VERSION" >&6; }
24654            fi # end check jdk version
24655          fi # end check rt.jar
24656        fi # end check javac
24657      fi # end check java
24658    fi # end check boot jdk found
24659  fi
24660
24661    done
24662  fi
24663
24664
24665    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24666    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24667      # Do we have a bin/java?
24668      if test ! -x "$BOOT_JDK/bin/java"; then
24669        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24670$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24671        BOOT_JDK_FOUND=no
24672      else
24673        # Do we have a bin/javac?
24674        if test ! -x "$BOOT_JDK/bin/javac"; then
24675          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24676$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24677          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24678$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24679          BOOT_JDK_FOUND=no
24680        else
24681          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24682          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24683            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24684$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24685            BOOT_JDK_FOUND=no
24686          else
24687            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24688            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24689
24690            # Extra M4 quote needed to protect [] in grep expression.
24691            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24692            if test "x$FOUND_CORRECT_VERSION" = x; then
24693              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24694$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24695              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24696$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24697              BOOT_JDK_FOUND=no
24698            else
24699              # We're done! :-)
24700              BOOT_JDK_FOUND=yes
24701
24702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24703
24704  # Input might be given as Windows format, start by converting to
24705  # unix format.
24706  path="$BOOT_JDK"
24707  new_path=`$CYGPATH -u "$path"`
24708
24709  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24710  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24711  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24712  # "foo.exe" is OK but "foo" is an error.
24713  #
24714  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24715  # It is also a way to make sure we got the proper file name for the real test later on.
24716  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24717  if test "x$test_shortpath" = x; then
24718    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24719$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24720    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24721  fi
24722
24723  # Call helper function which possibly converts this using DOS-style short mode.
24724  # If so, the updated path is stored in $new_path.
24725
24726  input_path="$new_path"
24727  # Check if we need to convert this using DOS-style short mode. If the path
24728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24729  # take no chances and rewrite it.
24730  # Note: m4 eats our [], so we need to use [ and ] instead.
24731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24732  if test "x$has_forbidden_chars" != x; then
24733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24734    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24735    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24736    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24737      # Going to short mode and back again did indeed matter. Since short mode is
24738      # case insensitive, let's make it lowercase to improve readability.
24739      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24740      # Now convert it back to Unix-stile (cygpath)
24741      input_path=`$CYGPATH -u "$shortmode_path"`
24742      new_path="$input_path"
24743    fi
24744  fi
24745
24746  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24747  if test "x$test_cygdrive_prefix" = x; then
24748    # As a simple fix, exclude /usr/bin since it's not a real path.
24749    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24750      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24751      # a path prefixed by /cygdrive for fixpath to work.
24752      new_path="$CYGWIN_ROOT_PATH$input_path"
24753    fi
24754  fi
24755
24756
24757  if test "x$path" != "x$new_path"; then
24758    BOOT_JDK="$new_path"
24759    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24760$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24761  fi
24762
24763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24764
24765  path="$BOOT_JDK"
24766  has_colon=`$ECHO $path | $GREP ^.:`
24767  new_path="$path"
24768  if test "x$has_colon" = x; then
24769    # Not in mixed or Windows style, start by that.
24770    new_path=`cmd //c echo $path`
24771  fi
24772
24773
24774  input_path="$new_path"
24775  # Check if we need to convert this using DOS-style short mode. If the path
24776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24777  # take no chances and rewrite it.
24778  # Note: m4 eats our [], so we need to use [ and ] instead.
24779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24780  if test "x$has_forbidden_chars" != x; then
24781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24782    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24783  fi
24784
24785
24786  windows_path="$new_path"
24787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24788    unix_path=`$CYGPATH -u "$windows_path"`
24789    new_path="$unix_path"
24790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24792    new_path="$unix_path"
24793  fi
24794
24795  if test "x$path" != "x$new_path"; then
24796    BOOT_JDK="$new_path"
24797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24798$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24799  fi
24800
24801  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24802  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24803
24804  else
24805    # We're on a posix platform. Hooray! :)
24806    path="$BOOT_JDK"
24807    has_space=`$ECHO "$path" | $GREP " "`
24808    if test "x$has_space" != x; then
24809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24810$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24811      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24812    fi
24813
24814    # Use eval to expand a potential ~
24815    eval path="$path"
24816    if test ! -f "$path" && test ! -d "$path"; then
24817      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24818    fi
24819
24820    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24821  fi
24822
24823              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24824$as_echo_n "checking for Boot JDK... " >&6; }
24825              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24826$as_echo "$BOOT_JDK" >&6; }
24827              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24828$as_echo_n "checking Boot JDK version... " >&6; }
24829              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24830              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24831$as_echo "$BOOT_JDK_VERSION" >&6; }
24832            fi # end check jdk version
24833          fi # end check rt.jar
24834        fi # end check javac
24835      fi # end check java
24836    fi # end check boot jdk found
24837  fi
24838
24839  fi
24840
24841
24842    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24843    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24844      # Do we have a bin/java?
24845      if test ! -x "$BOOT_JDK/bin/java"; then
24846        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24847$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24848        BOOT_JDK_FOUND=no
24849      else
24850        # Do we have a bin/javac?
24851        if test ! -x "$BOOT_JDK/bin/javac"; then
24852          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24853$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24854          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24855$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24856          BOOT_JDK_FOUND=no
24857        else
24858          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24859          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24860            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24861$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24862            BOOT_JDK_FOUND=no
24863          else
24864            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24865            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24866
24867            # Extra M4 quote needed to protect [] in grep expression.
24868            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24869            if test "x$FOUND_CORRECT_VERSION" = x; then
24870              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24871$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24872              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24873$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24874              BOOT_JDK_FOUND=no
24875            else
24876              # We're done! :-)
24877              BOOT_JDK_FOUND=yes
24878
24879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24880
24881  # Input might be given as Windows format, start by converting to
24882  # unix format.
24883  path="$BOOT_JDK"
24884  new_path=`$CYGPATH -u "$path"`
24885
24886  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24887  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24888  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24889  # "foo.exe" is OK but "foo" is an error.
24890  #
24891  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24892  # It is also a way to make sure we got the proper file name for the real test later on.
24893  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24894  if test "x$test_shortpath" = x; then
24895    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24896$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24897    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24898  fi
24899
24900  # Call helper function which possibly converts this using DOS-style short mode.
24901  # If so, the updated path is stored in $new_path.
24902
24903  input_path="$new_path"
24904  # Check if we need to convert this using DOS-style short mode. If the path
24905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24906  # take no chances and rewrite it.
24907  # Note: m4 eats our [], so we need to use [ and ] instead.
24908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24909  if test "x$has_forbidden_chars" != x; then
24910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24911    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24912    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24913    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24914      # Going to short mode and back again did indeed matter. Since short mode is
24915      # case insensitive, let's make it lowercase to improve readability.
24916      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24917      # Now convert it back to Unix-stile (cygpath)
24918      input_path=`$CYGPATH -u "$shortmode_path"`
24919      new_path="$input_path"
24920    fi
24921  fi
24922
24923  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24924  if test "x$test_cygdrive_prefix" = x; then
24925    # As a simple fix, exclude /usr/bin since it's not a real path.
24926    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24927      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24928      # a path prefixed by /cygdrive for fixpath to work.
24929      new_path="$CYGWIN_ROOT_PATH$input_path"
24930    fi
24931  fi
24932
24933
24934  if test "x$path" != "x$new_path"; then
24935    BOOT_JDK="$new_path"
24936    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24937$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24938  fi
24939
24940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24941
24942  path="$BOOT_JDK"
24943  has_colon=`$ECHO $path | $GREP ^.:`
24944  new_path="$path"
24945  if test "x$has_colon" = x; then
24946    # Not in mixed or Windows style, start by that.
24947    new_path=`cmd //c echo $path`
24948  fi
24949
24950
24951  input_path="$new_path"
24952  # Check if we need to convert this using DOS-style short mode. If the path
24953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24954  # take no chances and rewrite it.
24955  # Note: m4 eats our [], so we need to use [ and ] instead.
24956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24957  if test "x$has_forbidden_chars" != x; then
24958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24959    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24960  fi
24961
24962
24963  windows_path="$new_path"
24964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24965    unix_path=`$CYGPATH -u "$windows_path"`
24966    new_path="$unix_path"
24967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24969    new_path="$unix_path"
24970  fi
24971
24972  if test "x$path" != "x$new_path"; then
24973    BOOT_JDK="$new_path"
24974    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24975$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24976  fi
24977
24978  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24979  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24980
24981  else
24982    # We're on a posix platform. Hooray! :)
24983    path="$BOOT_JDK"
24984    has_space=`$ECHO "$path" | $GREP " "`
24985    if test "x$has_space" != x; then
24986      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24987$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24988      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24989    fi
24990
24991    # Use eval to expand a potential ~
24992    eval path="$path"
24993    if test ! -f "$path" && test ! -d "$path"; then
24994      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24995    fi
24996
24997    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24998  fi
24999
25000              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25001$as_echo_n "checking for Boot JDK... " >&6; }
25002              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25003$as_echo "$BOOT_JDK" >&6; }
25004              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25005$as_echo_n "checking Boot JDK version... " >&6; }
25006              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25007              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25008$as_echo "$BOOT_JDK_VERSION" >&6; }
25009            fi # end check jdk version
25010          fi # end check rt.jar
25011        fi # end check javac
25012      fi # end check java
25013    fi # end check boot jdk found
25014  fi
25015
25016
25017  # If we haven't found anything yet, we've truly lost. Give up.
25018  if test "x$BOOT_JDK_FOUND" = xno; then
25019
25020  # Print a helpful message on how to acquire the necessary build dependency.
25021  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25022  MISSING_DEPENDENCY=openjdk
25023
25024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25025    cygwin_help $MISSING_DEPENDENCY
25026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25027    msys_help $MISSING_DEPENDENCY
25028  else
25029    PKGHANDLER_COMMAND=
25030
25031    case $PKGHANDLER in
25032      apt-get)
25033        apt_help     $MISSING_DEPENDENCY ;;
25034      yum)
25035        yum_help     $MISSING_DEPENDENCY ;;
25036      port)
25037        port_help    $MISSING_DEPENDENCY ;;
25038      pkgutil)
25039        pkgutil_help $MISSING_DEPENDENCY ;;
25040      pkgadd)
25041        pkgadd_help  $MISSING_DEPENDENCY ;;
25042    esac
25043
25044    if test "x$PKGHANDLER_COMMAND" != x; then
25045      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25046    fi
25047  fi
25048
25049    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25050$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25051    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25052$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25053    as_fn_error $? "Cannot continue" "$LINENO" 5
25054  fi
25055
25056  # Setup proper paths for what we found
25057  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
25058  if test ! -f "$BOOT_RTJAR"; then
25059    # On MacOSX it is called classes.jar
25060    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
25061    if test -f "$BOOT_RTJAR"; then
25062      # Remove the ..
25063      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
25064    fi
25065  fi
25066  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
25067  BOOT_JDK="$BOOT_JDK"
25068
25069
25070
25071
25072  # Setup tools from the Boot JDK.
25073
25074  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25075
25076  # Publish this variable in the help.
25077
25078
25079  if test "x$JAVA" = x; then
25080    # The variable is not set by user, try to locate tool using the code snippet
25081
25082      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25083$as_echo_n "checking for java in Boot JDK... " >&6; }
25084      JAVA=$BOOT_JDK/bin/java
25085      if test ! -x $JAVA; then
25086        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25087$as_echo "not found" >&6; }
25088        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25089$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25090        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25091      fi
25092      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25093$as_echo "ok" >&6; }
25094
25095
25096  else
25097    # The variable is set, but is it from the command line or the environment?
25098
25099    # Try to remove the string !JAVA! from our list.
25100    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25101    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25102      # If it failed, the variable was not from the command line. Ignore it,
25103      # but warn the user (except for BASH, which is always set by the calling BASH).
25104      if test "xJAVA" != xBASH; then
25105        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25106$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25107      fi
25108      # Try to locate tool using the code snippet
25109
25110      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25111$as_echo_n "checking for java in Boot JDK... " >&6; }
25112      JAVA=$BOOT_JDK/bin/java
25113      if test ! -x $JAVA; then
25114        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25115$as_echo "not found" >&6; }
25116        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25117$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25118        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25119      fi
25120      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25121$as_echo "ok" >&6; }
25122
25123
25124    else
25125      # If it succeeded, then it was overridden by the user. We will use it
25126      # for the tool.
25127
25128      # First remove it from the list of overridden variables, so we can test
25129      # for unknown variables in the end.
25130      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25131
25132      # Check if the provided tool contains a complete path.
25133      tool_specified="$JAVA"
25134      tool_basename="${tool_specified##*/}"
25135      if test "x$tool_basename" = "x$tool_specified"; then
25136        # A command without a complete path is provided, search $PATH.
25137        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25138$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25139        # Extract the first word of "$tool_basename", so it can be a program name with args.
25140set dummy $tool_basename; ac_word=$2
25141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25142$as_echo_n "checking for $ac_word... " >&6; }
25143if ${ac_cv_path_JAVA+:} false; then :
25144  $as_echo_n "(cached) " >&6
25145else
25146  case $JAVA in
25147  [\\/]* | ?:[\\/]*)
25148  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25149  ;;
25150  *)
25151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25152for as_dir in $PATH
25153do
25154  IFS=$as_save_IFS
25155  test -z "$as_dir" && as_dir=.
25156    for ac_exec_ext in '' $ac_executable_extensions; do
25157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25158    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25160    break 2
25161  fi
25162done
25163  done
25164IFS=$as_save_IFS
25165
25166  ;;
25167esac
25168fi
25169JAVA=$ac_cv_path_JAVA
25170if test -n "$JAVA"; then
25171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25172$as_echo "$JAVA" >&6; }
25173else
25174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25175$as_echo "no" >&6; }
25176fi
25177
25178
25179        if test "x$JAVA" = x; then
25180          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25181        fi
25182      else
25183        # Otherwise we believe it is a complete path. Use it as it is.
25184        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25185$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25186        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25187$as_echo_n "checking for JAVA... " >&6; }
25188        if test ! -x "$tool_specified"; then
25189          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25190$as_echo "not found" >&6; }
25191          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25192        fi
25193        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25194$as_echo "$tool_specified" >&6; }
25195      fi
25196    fi
25197  fi
25198
25199
25200
25201  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25202
25203  # Publish this variable in the help.
25204
25205
25206  if test "x$JAVAC" = x; then
25207    # The variable is not set by user, try to locate tool using the code snippet
25208
25209      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25210$as_echo_n "checking for javac in Boot JDK... " >&6; }
25211      JAVAC=$BOOT_JDK/bin/javac
25212      if test ! -x $JAVAC; then
25213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25214$as_echo "not found" >&6; }
25215        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25216$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25217        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25218      fi
25219      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25220$as_echo "ok" >&6; }
25221
25222
25223  else
25224    # The variable is set, but is it from the command line or the environment?
25225
25226    # Try to remove the string !JAVAC! from our list.
25227    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25228    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25229      # If it failed, the variable was not from the command line. Ignore it,
25230      # but warn the user (except for BASH, which is always set by the calling BASH).
25231      if test "xJAVAC" != xBASH; then
25232        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25233$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25234      fi
25235      # Try to locate tool using the code snippet
25236
25237      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25238$as_echo_n "checking for javac in Boot JDK... " >&6; }
25239      JAVAC=$BOOT_JDK/bin/javac
25240      if test ! -x $JAVAC; then
25241        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25242$as_echo "not found" >&6; }
25243        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25244$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25245        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25246      fi
25247      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25248$as_echo "ok" >&6; }
25249
25250
25251    else
25252      # If it succeeded, then it was overridden by the user. We will use it
25253      # for the tool.
25254
25255      # First remove it from the list of overridden variables, so we can test
25256      # for unknown variables in the end.
25257      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25258
25259      # Check if the provided tool contains a complete path.
25260      tool_specified="$JAVAC"
25261      tool_basename="${tool_specified##*/}"
25262      if test "x$tool_basename" = "x$tool_specified"; then
25263        # A command without a complete path is provided, search $PATH.
25264        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25265$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25266        # Extract the first word of "$tool_basename", so it can be a program name with args.
25267set dummy $tool_basename; ac_word=$2
25268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25269$as_echo_n "checking for $ac_word... " >&6; }
25270if ${ac_cv_path_JAVAC+:} false; then :
25271  $as_echo_n "(cached) " >&6
25272else
25273  case $JAVAC in
25274  [\\/]* | ?:[\\/]*)
25275  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25276  ;;
25277  *)
25278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25279for as_dir in $PATH
25280do
25281  IFS=$as_save_IFS
25282  test -z "$as_dir" && as_dir=.
25283    for ac_exec_ext in '' $ac_executable_extensions; do
25284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25285    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25287    break 2
25288  fi
25289done
25290  done
25291IFS=$as_save_IFS
25292
25293  ;;
25294esac
25295fi
25296JAVAC=$ac_cv_path_JAVAC
25297if test -n "$JAVAC"; then
25298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25299$as_echo "$JAVAC" >&6; }
25300else
25301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25302$as_echo "no" >&6; }
25303fi
25304
25305
25306        if test "x$JAVAC" = x; then
25307          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25308        fi
25309      else
25310        # Otherwise we believe it is a complete path. Use it as it is.
25311        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25312$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25313        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25314$as_echo_n "checking for JAVAC... " >&6; }
25315        if test ! -x "$tool_specified"; then
25316          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25317$as_echo "not found" >&6; }
25318          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25319        fi
25320        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25321$as_echo "$tool_specified" >&6; }
25322      fi
25323    fi
25324  fi
25325
25326
25327
25328  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25329
25330  # Publish this variable in the help.
25331
25332
25333  if test "x$JAVAH" = x; then
25334    # The variable is not set by user, try to locate tool using the code snippet
25335
25336      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25337$as_echo_n "checking for javah in Boot JDK... " >&6; }
25338      JAVAH=$BOOT_JDK/bin/javah
25339      if test ! -x $JAVAH; then
25340        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25341$as_echo "not found" >&6; }
25342        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25343$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25344        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25345      fi
25346      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25347$as_echo "ok" >&6; }
25348
25349
25350  else
25351    # The variable is set, but is it from the command line or the environment?
25352
25353    # Try to remove the string !JAVAH! from our list.
25354    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25355    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25356      # If it failed, the variable was not from the command line. Ignore it,
25357      # but warn the user (except for BASH, which is always set by the calling BASH).
25358      if test "xJAVAH" != xBASH; then
25359        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25360$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25361      fi
25362      # Try to locate tool using the code snippet
25363
25364      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25365$as_echo_n "checking for javah in Boot JDK... " >&6; }
25366      JAVAH=$BOOT_JDK/bin/javah
25367      if test ! -x $JAVAH; then
25368        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25369$as_echo "not found" >&6; }
25370        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25371$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25372        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25373      fi
25374      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25375$as_echo "ok" >&6; }
25376
25377
25378    else
25379      # If it succeeded, then it was overridden by the user. We will use it
25380      # for the tool.
25381
25382      # First remove it from the list of overridden variables, so we can test
25383      # for unknown variables in the end.
25384      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25385
25386      # Check if the provided tool contains a complete path.
25387      tool_specified="$JAVAH"
25388      tool_basename="${tool_specified##*/}"
25389      if test "x$tool_basename" = "x$tool_specified"; then
25390        # A command without a complete path is provided, search $PATH.
25391        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25392$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25393        # Extract the first word of "$tool_basename", so it can be a program name with args.
25394set dummy $tool_basename; ac_word=$2
25395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25396$as_echo_n "checking for $ac_word... " >&6; }
25397if ${ac_cv_path_JAVAH+:} false; then :
25398  $as_echo_n "(cached) " >&6
25399else
25400  case $JAVAH in
25401  [\\/]* | ?:[\\/]*)
25402  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25403  ;;
25404  *)
25405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25406for as_dir in $PATH
25407do
25408  IFS=$as_save_IFS
25409  test -z "$as_dir" && as_dir=.
25410    for ac_exec_ext in '' $ac_executable_extensions; do
25411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25412    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25414    break 2
25415  fi
25416done
25417  done
25418IFS=$as_save_IFS
25419
25420  ;;
25421esac
25422fi
25423JAVAH=$ac_cv_path_JAVAH
25424if test -n "$JAVAH"; then
25425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25426$as_echo "$JAVAH" >&6; }
25427else
25428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25429$as_echo "no" >&6; }
25430fi
25431
25432
25433        if test "x$JAVAH" = x; then
25434          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25435        fi
25436      else
25437        # Otherwise we believe it is a complete path. Use it as it is.
25438        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25439$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25440        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25441$as_echo_n "checking for JAVAH... " >&6; }
25442        if test ! -x "$tool_specified"; then
25443          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25444$as_echo "not found" >&6; }
25445          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25446        fi
25447        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25448$as_echo "$tool_specified" >&6; }
25449      fi
25450    fi
25451  fi
25452
25453
25454
25455  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25456
25457  # Publish this variable in the help.
25458
25459
25460  if test "x$JAR" = x; then
25461    # The variable is not set by user, try to locate tool using the code snippet
25462
25463      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25464$as_echo_n "checking for jar in Boot JDK... " >&6; }
25465      JAR=$BOOT_JDK/bin/jar
25466      if test ! -x $JAR; then
25467        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25468$as_echo "not found" >&6; }
25469        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25470$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25471        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25472      fi
25473      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25474$as_echo "ok" >&6; }
25475
25476
25477  else
25478    # The variable is set, but is it from the command line or the environment?
25479
25480    # Try to remove the string !JAR! from our list.
25481    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25482    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25483      # If it failed, the variable was not from the command line. Ignore it,
25484      # but warn the user (except for BASH, which is always set by the calling BASH).
25485      if test "xJAR" != xBASH; then
25486        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25487$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25488      fi
25489      # Try to locate tool using the code snippet
25490
25491      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25492$as_echo_n "checking for jar in Boot JDK... " >&6; }
25493      JAR=$BOOT_JDK/bin/jar
25494      if test ! -x $JAR; then
25495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25496$as_echo "not found" >&6; }
25497        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25498$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25499        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25500      fi
25501      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25502$as_echo "ok" >&6; }
25503
25504
25505    else
25506      # If it succeeded, then it was overridden by the user. We will use it
25507      # for the tool.
25508
25509      # First remove it from the list of overridden variables, so we can test
25510      # for unknown variables in the end.
25511      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25512
25513      # Check if the provided tool contains a complete path.
25514      tool_specified="$JAR"
25515      tool_basename="${tool_specified##*/}"
25516      if test "x$tool_basename" = "x$tool_specified"; then
25517        # A command without a complete path is provided, search $PATH.
25518        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25519$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25520        # Extract the first word of "$tool_basename", so it can be a program name with args.
25521set dummy $tool_basename; ac_word=$2
25522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25523$as_echo_n "checking for $ac_word... " >&6; }
25524if ${ac_cv_path_JAR+:} false; then :
25525  $as_echo_n "(cached) " >&6
25526else
25527  case $JAR in
25528  [\\/]* | ?:[\\/]*)
25529  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25530  ;;
25531  *)
25532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25533for as_dir in $PATH
25534do
25535  IFS=$as_save_IFS
25536  test -z "$as_dir" && as_dir=.
25537    for ac_exec_ext in '' $ac_executable_extensions; do
25538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25539    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25541    break 2
25542  fi
25543done
25544  done
25545IFS=$as_save_IFS
25546
25547  ;;
25548esac
25549fi
25550JAR=$ac_cv_path_JAR
25551if test -n "$JAR"; then
25552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25553$as_echo "$JAR" >&6; }
25554else
25555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25556$as_echo "no" >&6; }
25557fi
25558
25559
25560        if test "x$JAR" = x; then
25561          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25562        fi
25563      else
25564        # Otherwise we believe it is a complete path. Use it as it is.
25565        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25566$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25567        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25568$as_echo_n "checking for JAR... " >&6; }
25569        if test ! -x "$tool_specified"; then
25570          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25571$as_echo "not found" >&6; }
25572          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25573        fi
25574        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25575$as_echo "$tool_specified" >&6; }
25576      fi
25577    fi
25578  fi
25579
25580
25581
25582  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25583
25584  # Publish this variable in the help.
25585
25586
25587  if test "x$NATIVE2ASCII" = x; then
25588    # The variable is not set by user, try to locate tool using the code snippet
25589
25590      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25591$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25592      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25593      if test ! -x $NATIVE2ASCII; then
25594        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25595$as_echo "not found" >&6; }
25596        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25597$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25598        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25599      fi
25600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25601$as_echo "ok" >&6; }
25602
25603
25604  else
25605    # The variable is set, but is it from the command line or the environment?
25606
25607    # Try to remove the string !NATIVE2ASCII! from our list.
25608    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25609    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25610      # If it failed, the variable was not from the command line. Ignore it,
25611      # but warn the user (except for BASH, which is always set by the calling BASH).
25612      if test "xNATIVE2ASCII" != xBASH; then
25613        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25614$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25615      fi
25616      # Try to locate tool using the code snippet
25617
25618      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25619$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25620      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25621      if test ! -x $NATIVE2ASCII; then
25622        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25623$as_echo "not found" >&6; }
25624        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25625$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25626        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25627      fi
25628      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25629$as_echo "ok" >&6; }
25630
25631
25632    else
25633      # If it succeeded, then it was overridden by the user. We will use it
25634      # for the tool.
25635
25636      # First remove it from the list of overridden variables, so we can test
25637      # for unknown variables in the end.
25638      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25639
25640      # Check if the provided tool contains a complete path.
25641      tool_specified="$NATIVE2ASCII"
25642      tool_basename="${tool_specified##*/}"
25643      if test "x$tool_basename" = "x$tool_specified"; then
25644        # A command without a complete path is provided, search $PATH.
25645        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25646$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25647        # Extract the first word of "$tool_basename", so it can be a program name with args.
25648set dummy $tool_basename; ac_word=$2
25649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25650$as_echo_n "checking for $ac_word... " >&6; }
25651if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25652  $as_echo_n "(cached) " >&6
25653else
25654  case $NATIVE2ASCII in
25655  [\\/]* | ?:[\\/]*)
25656  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25657  ;;
25658  *)
25659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25660for as_dir in $PATH
25661do
25662  IFS=$as_save_IFS
25663  test -z "$as_dir" && as_dir=.
25664    for ac_exec_ext in '' $ac_executable_extensions; do
25665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25666    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25668    break 2
25669  fi
25670done
25671  done
25672IFS=$as_save_IFS
25673
25674  ;;
25675esac
25676fi
25677NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25678if test -n "$NATIVE2ASCII"; then
25679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25680$as_echo "$NATIVE2ASCII" >&6; }
25681else
25682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25683$as_echo "no" >&6; }
25684fi
25685
25686
25687        if test "x$NATIVE2ASCII" = x; then
25688          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25689        fi
25690      else
25691        # Otherwise we believe it is a complete path. Use it as it is.
25692        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25693$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25694        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
25695$as_echo_n "checking for NATIVE2ASCII... " >&6; }
25696        if test ! -x "$tool_specified"; then
25697          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25698$as_echo "not found" >&6; }
25699          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
25700        fi
25701        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25702$as_echo "$tool_specified" >&6; }
25703      fi
25704    fi
25705  fi
25706
25707
25708
25709  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25710
25711  # Publish this variable in the help.
25712
25713
25714  if test "x$JARSIGNER" = x; then
25715    # The variable is not set by user, try to locate tool using the code snippet
25716
25717      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25718$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25719      JARSIGNER=$BOOT_JDK/bin/jarsigner
25720      if test ! -x $JARSIGNER; then
25721        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25722$as_echo "not found" >&6; }
25723        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25724$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25725        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25726      fi
25727      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25728$as_echo "ok" >&6; }
25729
25730
25731  else
25732    # The variable is set, but is it from the command line or the environment?
25733
25734    # Try to remove the string !JARSIGNER! from our list.
25735    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
25736    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25737      # If it failed, the variable was not from the command line. Ignore it,
25738      # but warn the user (except for BASH, which is always set by the calling BASH).
25739      if test "xJARSIGNER" != xBASH; then
25740        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
25741$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
25742      fi
25743      # Try to locate tool using the code snippet
25744
25745      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25746$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25747      JARSIGNER=$BOOT_JDK/bin/jarsigner
25748      if test ! -x $JARSIGNER; then
25749        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25750$as_echo "not found" >&6; }
25751        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25752$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25753        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25754      fi
25755      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25756$as_echo "ok" >&6; }
25757
25758
25759    else
25760      # If it succeeded, then it was overridden by the user. We will use it
25761      # for the tool.
25762
25763      # First remove it from the list of overridden variables, so we can test
25764      # for unknown variables in the end.
25765      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25766
25767      # Check if the provided tool contains a complete path.
25768      tool_specified="$JARSIGNER"
25769      tool_basename="${tool_specified##*/}"
25770      if test "x$tool_basename" = "x$tool_specified"; then
25771        # A command without a complete path is provided, search $PATH.
25772        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
25773$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
25774        # Extract the first word of "$tool_basename", so it can be a program name with args.
25775set dummy $tool_basename; ac_word=$2
25776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25777$as_echo_n "checking for $ac_word... " >&6; }
25778if ${ac_cv_path_JARSIGNER+:} false; then :
25779  $as_echo_n "(cached) " >&6
25780else
25781  case $JARSIGNER in
25782  [\\/]* | ?:[\\/]*)
25783  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
25784  ;;
25785  *)
25786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25787for as_dir in $PATH
25788do
25789  IFS=$as_save_IFS
25790  test -z "$as_dir" && as_dir=.
25791    for ac_exec_ext in '' $ac_executable_extensions; do
25792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25793    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
25794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25795    break 2
25796  fi
25797done
25798  done
25799IFS=$as_save_IFS
25800
25801  ;;
25802esac
25803fi
25804JARSIGNER=$ac_cv_path_JARSIGNER
25805if test -n "$JARSIGNER"; then
25806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
25807$as_echo "$JARSIGNER" >&6; }
25808else
25809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25810$as_echo "no" >&6; }
25811fi
25812
25813
25814        if test "x$JARSIGNER" = x; then
25815          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25816        fi
25817      else
25818        # Otherwise we believe it is a complete path. Use it as it is.
25819        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
25820$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
25821        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
25822$as_echo_n "checking for JARSIGNER... " >&6; }
25823        if test ! -x "$tool_specified"; then
25824          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25825$as_echo "not found" >&6; }
25826          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
25827        fi
25828        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25829$as_echo "$tool_specified" >&6; }
25830      fi
25831    fi
25832  fi
25833
25834
25835
25836  # Finally, set some other options...
25837
25838  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
25839  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
25840
25841
25842
25843
25844  ##############################################################################
25845  #
25846  # Specify jvm options for anything that is run with the Boot JDK.
25847  # Not all JVM:s accept the same arguments on the command line.
25848  #
25849
25850# Check whether --with-boot-jdk-jvmargs was given.
25851if test "${with_boot_jdk_jvmargs+set}" = set; then :
25852  withval=$with_boot_jdk_jvmargs;
25853fi
25854
25855
25856  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
25857$as_echo_n "checking flags for boot jdk java command ... " >&6; }
25858
25859  # Starting amount of heap memory.
25860
25861  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
25862  $ECHO "Command: $JAVA -Xms64M -version" >&5
25863  OUTPUT=`$JAVA -Xms64M -version 2>&1`
25864  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25865  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25866  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25867    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
25868    JVM_ARG_OK=true
25869  else
25870    $ECHO "Arg failed:" >&5
25871    $ECHO "$OUTPUT" >&5
25872    JVM_ARG_OK=false
25873  fi
25874
25875
25876  # Maximum amount of heap memory.
25877  # Maximum stack size.
25878  if test "x$BUILD_NUM_BITS" = x32; then
25879    JVM_MAX_HEAP=1100M
25880    STACK_SIZE=768
25881  else
25882    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
25883    # pointers are used. Apparently, we need to increase the heap and stack
25884    # space for the jvm. More specifically, when running javac to build huge
25885    # jdk batch
25886    JVM_MAX_HEAP=1600M
25887    STACK_SIZE=1536
25888  fi
25889
25890  $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
25891  $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
25892  OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
25893  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25894  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25895  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25896    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx$JVM_MAX_HEAP"
25897    JVM_ARG_OK=true
25898  else
25899    $ECHO "Arg failed:" >&5
25900    $ECHO "$OUTPUT" >&5
25901    JVM_ARG_OK=false
25902  fi
25903
25904
25905  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
25906  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
25907  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
25908  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25909  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25910  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25911    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
25912    JVM_ARG_OK=true
25913  else
25914    $ECHO "Arg failed:" >&5
25915    $ECHO "$OUTPUT" >&5
25916    JVM_ARG_OK=false
25917  fi
25918
25919
25920  # Disable special log output when a debug build is used as Boot JDK...
25921
25922  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
25923  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
25924  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
25925  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25926  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25927  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25928    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
25929    JVM_ARG_OK=true
25930  else
25931    $ECHO "Arg failed:" >&5
25932    $ECHO "$OUTPUT" >&5
25933    JVM_ARG_OK=false
25934  fi
25935
25936
25937  # Apply user provided options.
25938
25939  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
25940  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
25941  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
25942  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25943  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25944  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25945    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
25946    JVM_ARG_OK=true
25947  else
25948    $ECHO "Arg failed:" >&5
25949    $ECHO "$OUTPUT" >&5
25950    JVM_ARG_OK=false
25951  fi
25952
25953
25954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
25955$as_echo "$boot_jdk_jvmargs" >&6; }
25956
25957  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
25958  JAVA_FLAGS=$boot_jdk_jvmargs
25959
25960  BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
25961
25962  JAVA_FLAGS=$JAVA_FLAGS
25963
25964
25965
25966###############################################################################
25967#
25968# Configure the sources to use. We can add or override individual directories.
25969#
25970###############################################################################
25971
25972
25973  # Where are the sources. Any of these can be overridden
25974  # using --with-override-corba and the likes.
25975  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
25976  CORBA_TOPDIR="$SRC_ROOT/corba"
25977  JAXP_TOPDIR="$SRC_ROOT/jaxp"
25978  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
25979  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
25980  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
25981  JDK_TOPDIR="$SRC_ROOT/jdk"
25982
25983
25984
25985
25986
25987
25988
25989
25990
25991
25992  ###############################################################################
25993  #
25994  # Pickup additional source for a component from outside of the source root
25995  # or override source for a component.
25996  #
25997
25998# Check whether --with-add-source-root was given.
25999if test "${with_add_source_root+set}" = set; then :
26000  withval=$with_add_source_root;
26001fi
26002
26003
26004
26005# Check whether --with-override-source-root was given.
26006if test "${with_override_source_root+set}" = set; then :
26007  withval=$with_override_source_root;
26008fi
26009
26010
26011
26012# Check whether --with-adds-and-overrides was given.
26013if test "${with_adds_and_overrides+set}" = set; then :
26014  withval=$with_adds_and_overrides;
26015fi
26016
26017
26018  if test "x$with_adds_and_overrides" != x; then
26019    with_add_source_root="$with_adds_and_overrides/adds"
26020    with_override_source_root="$with_adds_and_overrides/overrides"
26021  fi
26022
26023  if test "x$with_add_source_root" != x; then
26024    if ! test -d $with_add_source_root; then
26025      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26026    fi
26027    CURDIR="$PWD"
26028    cd "$with_add_source_root"
26029    ADD_SRC_ROOT="`pwd`"
26030    cd "$CURDIR"
26031    # Verify that the addon source root does not have any root makefiles.
26032    # If it does, then it is usually an error, prevent this.
26033    if test -f $with_add_source_root/langtools/make/Makefile; then
26034      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
26035    fi
26036    if test -f $with_add_source_root/corba/make/Makefile; then
26037      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
26038    fi
26039    if test -f $with_add_source_root/jaxp/make/Makefile; then
26040      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
26041    fi
26042    if test -f $with_add_source_root/jaxws/make/Makefile; then
26043      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
26044    fi
26045    if test -f $with_add_source_root/hotspot/make/Makefile; then
26046      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
26047    fi
26048    if test -f $with_add_source_root/nashorn/make/Makefile; then
26049      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
26050    fi
26051    if test -f $with_add_source_root/jdk/make/Makefile; then
26052      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
26053    fi
26054  fi
26055
26056
26057  if test "x$with_override_source_root" != x; then
26058    if ! test -d $with_override_source_root; then
26059      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26060    fi
26061    CURDIR="$PWD"
26062    cd "$with_override_source_root"
26063    OVERRIDE_SRC_ROOT="`pwd`"
26064    cd "$CURDIR"
26065    if test -f $with_override_source_root/langtools/make/Makefile; then
26066      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
26067    fi
26068    if test -f $with_override_source_root/corba/make/Makefile; then
26069      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
26070    fi
26071    if test -f $with_override_source_root/jaxp/make/Makefile; then
26072      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
26073    fi
26074    if test -f $with_override_source_root/jaxws/make/Makefile; then
26075      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
26076    fi
26077    if test -f $with_override_source_root/hotspot/make/Makefile; then
26078      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
26079    fi
26080    if test -f $with_override_source_root/nashorn/make/Makefile; then
26081      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
26082    fi
26083    if test -f $with_override_source_root/jdk/make/Makefile; then
26084      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
26085    fi
26086  fi
26087
26088
26089  ###############################################################################
26090  #
26091  # Override a repo completely, this is used for example when you have 3 small
26092  # development sandboxes of the langtools sources and want to avoid having 3 full
26093  # OpenJDK sources checked out on disk.
26094  #
26095  # Assuming that the 3 langtools sandboxes are located here:
26096  # /home/fredrik/sandbox1/langtools
26097  # /home/fredrik/sandbox2/langtools
26098  # /home/fredrik/sandbox3/langtools
26099  #
26100  # From the source root you create build subdirs manually:
26101  #     mkdir -p build1 build2 build3
26102  # in each build directory run:
26103  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26104  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26105  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26106  #
26107
26108
26109# Check whether --with-override-langtools was given.
26110if test "${with_override_langtools+set}" = set; then :
26111  withval=$with_override_langtools;
26112fi
26113
26114
26115
26116# Check whether --with-override-corba was given.
26117if test "${with_override_corba+set}" = set; then :
26118  withval=$with_override_corba;
26119fi
26120
26121
26122
26123# Check whether --with-override-jaxp was given.
26124if test "${with_override_jaxp+set}" = set; then :
26125  withval=$with_override_jaxp;
26126fi
26127
26128
26129
26130# Check whether --with-override-jaxws was given.
26131if test "${with_override_jaxws+set}" = set; then :
26132  withval=$with_override_jaxws;
26133fi
26134
26135
26136
26137# Check whether --with-override-hotspot was given.
26138if test "${with_override_hotspot+set}" = set; then :
26139  withval=$with_override_hotspot;
26140fi
26141
26142
26143
26144# Check whether --with-override-nashorn was given.
26145if test "${with_override_nashorn+set}" = set; then :
26146  withval=$with_override_nashorn;
26147fi
26148
26149
26150
26151# Check whether --with-override-jdk was given.
26152if test "${with_override_jdk+set}" = set; then :
26153  withval=$with_override_jdk;
26154fi
26155
26156
26157  if test "x$with_override_langtools" != x; then
26158    CURDIR="$PWD"
26159    cd "$with_override_langtools"
26160    LANGTOOLS_TOPDIR="`pwd`"
26161    cd "$CURDIR"
26162    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26163      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26164    fi
26165    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26166$as_echo_n "checking if langtools should be overridden... " >&6; }
26167    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26168$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26169  fi
26170  if test "x$with_override_corba" != x; then
26171    CURDIR="$PWD"
26172    cd "$with_override_corba"
26173    CORBA_TOPDIR="`pwd`"
26174    cd "$CURDIR"
26175    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26176      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26177    fi
26178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26179$as_echo_n "checking if corba should be overridden... " >&6; }
26180    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26181$as_echo "yes with $CORBA_TOPDIR" >&6; }
26182  fi
26183  if test "x$with_override_jaxp" != x; then
26184    CURDIR="$PWD"
26185    cd "$with_override_jaxp"
26186    JAXP_TOPDIR="`pwd`"
26187    cd "$CURDIR"
26188    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26189      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26190    fi
26191    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26192$as_echo_n "checking if jaxp should be overridden... " >&6; }
26193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26194$as_echo "yes with $JAXP_TOPDIR" >&6; }
26195  fi
26196  if test "x$with_override_jaxws" != x; then
26197    CURDIR="$PWD"
26198    cd "$with_override_jaxws"
26199    JAXWS_TOPDIR="`pwd`"
26200    cd "$CURDIR"
26201    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26202      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26203    fi
26204    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26205$as_echo_n "checking if jaxws should be overridden... " >&6; }
26206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26207$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26208  fi
26209  if test "x$with_override_hotspot" != x; then
26210    CURDIR="$PWD"
26211    cd "$with_override_hotspot"
26212    HOTSPOT_TOPDIR="`pwd`"
26213    cd "$CURDIR"
26214    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26215      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26216    fi
26217    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26218$as_echo_n "checking if hotspot should be overridden... " >&6; }
26219    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26220$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26221  fi
26222  if test "x$with_override_nashorn" != x; then
26223    CURDIR="$PWD"
26224    cd "$with_override_nashorn"
26225    NASHORN_TOPDIR="`pwd`"
26226    cd "$CURDIR"
26227    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26228      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26229    fi
26230    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26231$as_echo_n "checking if nashorn should be overridden... " >&6; }
26232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26233$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26234  fi
26235  if test "x$with_override_jdk" != x; then
26236    CURDIR="$PWD"
26237    cd "$with_override_jdk"
26238    JDK_TOPDIR="`pwd`"
26239    cd "$CURDIR"
26240    if ! test -f $JDK_TOPDIR/make/Makefile; then
26241      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26242    fi
26243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26244$as_echo_n "checking if JDK should be overridden... " >&6; }
26245    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26246$as_echo "yes with $JDK_TOPDIR" >&6; }
26247  fi
26248
26249
26250  BUILD_OUTPUT="$OUTPUT_ROOT"
26251
26252
26253  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26254  BUILD_HOTSPOT=true
26255
26256
26257
26258# Check whether --with-import-hotspot was given.
26259if test "${with_import_hotspot+set}" = set; then :
26260  withval=$with_import_hotspot;
26261fi
26262
26263  if test "x$with_import_hotspot" != x; then
26264    CURDIR="$PWD"
26265    cd "$with_import_hotspot"
26266    HOTSPOT_DIST="`pwd`"
26267    cd "$CURDIR"
26268    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26269      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26270    fi
26271    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26272$as_echo_n "checking if hotspot should be imported... " >&6; }
26273    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26274$as_echo "yes from $HOTSPOT_DIST" >&6; }
26275    BUILD_HOTSPOT=false
26276  fi
26277
26278  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26279
26280
26281###############################################################################
26282#
26283# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26284# native code.
26285#
26286###############################################################################
26287
26288# First determine the toolchain type (compiler family)
26289
26290
26291# Check whether --with-toolchain-type was given.
26292if test "${with_toolchain_type+set}" = set; then :
26293  withval=$with_toolchain_type;
26294fi
26295
26296
26297  # Use indirect variable referencing
26298  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26299  VALID_TOOLCHAINS=${!toolchain_var_name}
26300  # First toolchain type in the list is the default
26301  DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26302
26303  if test "x$with_toolchain_type" = xlist; then
26304    # List all toolchains
26305    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26306$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26307    for toolchain in $VALID_TOOLCHAINS; do
26308      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26309      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26310      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26311    done
26312
26313    exit 0
26314  elif test "x$with_toolchain_type" != x; then
26315    # User override; check that it is valid
26316    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26317      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26318$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26319      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26320$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26321      as_fn_error $? "Cannot continue." "$LINENO" 5
26322    fi
26323    TOOLCHAIN_TYPE=$with_toolchain_type
26324  else
26325    # No flag given, use default
26326    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26327  fi
26328
26329
26330  TOOLCHAIN_CC_BINARY_clang="clang"
26331  TOOLCHAIN_CC_BINARY_gcc="gcc"
26332  TOOLCHAIN_CC_BINARY_microsoft="cl"
26333  TOOLCHAIN_CC_BINARY_solstudio="cc"
26334  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26335
26336  TOOLCHAIN_CXX_BINARY_clang="clang++"
26337  TOOLCHAIN_CXX_BINARY_gcc="g++"
26338  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26339  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26340  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26341
26342  # Use indirect variable referencing
26343  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26344  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26345  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26346  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26347  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26348  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26349
26350
26351  # Define filename patterns
26352  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26353    LIBRARY_PREFIX=
26354    SHARED_LIBRARY_SUFFIX='.dll'
26355    STATIC_LIBRARY_SUFFIX='.lib'
26356    SHARED_LIBRARY='$1.dll'
26357    STATIC_LIBRARY='$1.lib'
26358    OBJ_SUFFIX='.obj'
26359    EXE_SUFFIX='.exe'
26360  else
26361    LIBRARY_PREFIX=lib
26362    SHARED_LIBRARY_SUFFIX='.so'
26363    STATIC_LIBRARY_SUFFIX='.a'
26364    SHARED_LIBRARY='lib$1.so'
26365    STATIC_LIBRARY='lib$1.a'
26366    OBJ_SUFFIX='.o'
26367    EXE_SUFFIX=''
26368    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26369      SHARED_LIBRARY='lib$1.dylib'
26370      SHARED_LIBRARY_SUFFIX='.dylib'
26371    fi
26372  fi
26373
26374
26375
26376
26377
26378
26379
26380
26381
26382
26383  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26384    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26385$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26386  else
26387    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26388$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26389  fi
26390
26391
26392# Then detect the actual binaries needed
26393
26394  # FIXME: Is this needed?
26395  ac_ext=cpp
26396ac_cpp='$CXXCPP $CPPFLAGS'
26397ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26398ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26399ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26400
26401
26402  # Store the CFLAGS etc passed to the configure script.
26403  ORG_CFLAGS="$CFLAGS"
26404  ORG_CXXFLAGS="$CXXFLAGS"
26405  ORG_OBJCFLAGS="$OBJCFLAGS"
26406
26407  # On Windows, we need to detect the visual studio installation first.
26408  # This will change the PATH, but we need to keep that new PATH even
26409  # after toolchain detection is done, since the compiler (on x86) uses
26410  # it for DLL resolution in runtime.
26411  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26412
26413  # Store path to cygwin link.exe to help excluding it when searching for
26414  # VS linker. This must be done before changing the PATH when looking for VS.
26415  # Extract the first word of "link", so it can be a program name with args.
26416set dummy link; ac_word=$2
26417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26418$as_echo_n "checking for $ac_word... " >&6; }
26419if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26420  $as_echo_n "(cached) " >&6
26421else
26422  case $CYGWIN_LINK in
26423  [\\/]* | ?:[\\/]*)
26424  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26425  ;;
26426  *)
26427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26428for as_dir in $PATH
26429do
26430  IFS=$as_save_IFS
26431  test -z "$as_dir" && as_dir=.
26432    for ac_exec_ext in '' $ac_executable_extensions; do
26433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26434    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26436    break 2
26437  fi
26438done
26439  done
26440IFS=$as_save_IFS
26441
26442  ;;
26443esac
26444fi
26445CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26446if test -n "$CYGWIN_LINK"; then
26447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26448$as_echo "$CYGWIN_LINK" >&6; }
26449else
26450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26451$as_echo "no" >&6; }
26452fi
26453
26454
26455  if test "x$CYGWIN_LINK" != x; then
26456    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26457$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26458    "$CYGWIN_LINK" --version > /dev/null
26459    if test $? -eq 0 ; then
26460      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26461$as_echo "yes" >&6; }
26462    else
26463      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26464$as_echo "no" >&6; }
26465      # This might be the VS linker. Don't exclude it later on.
26466      CYGWIN_LINK=""
26467    fi
26468  fi
26469
26470  # First-hand choice is to locate and run the vsvars bat file.
26471
26472  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26473    VCVARSFILE="vc/bin/vcvars32.bat"
26474  else
26475    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26476  fi
26477
26478  VS_ENV_CMD=""
26479  VS_ENV_ARGS=""
26480  if test "x$with_toolsdir" != x; then
26481
26482  if test "x$VS_ENV_CMD" = x; then
26483    VS100BASE="$with_toolsdir/../.."
26484    METHOD="--with-tools-dir"
26485
26486  windows_path="$VS100BASE"
26487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26488    unix_path=`$CYGPATH -u "$windows_path"`
26489    VS100BASE="$unix_path"
26490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26492    VS100BASE="$unix_path"
26493  fi
26494
26495    if test -d "$VS100BASE"; then
26496      if test -f "$VS100BASE/$VCVARSFILE"; then
26497        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26498$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26499        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26500      else
26501        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26502$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26503        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26504$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26505      fi
26506    fi
26507  fi
26508
26509  fi
26510
26511  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26512    # Having specified an argument which is incorrect will produce an instant failure;
26513    # we should not go on looking
26514    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26515$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26516    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26517$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26518    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26519  fi
26520
26521  if test "x$VS100COMNTOOLS" != x; then
26522
26523  if test "x$VS_ENV_CMD" = x; then
26524    VS100BASE="$VS100COMNTOOLS/../.."
26525    METHOD="VS100COMNTOOLS variable"
26526
26527  windows_path="$VS100BASE"
26528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26529    unix_path=`$CYGPATH -u "$windows_path"`
26530    VS100BASE="$unix_path"
26531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26533    VS100BASE="$unix_path"
26534  fi
26535
26536    if test -d "$VS100BASE"; then
26537      if test -f "$VS100BASE/$VCVARSFILE"; then
26538        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26539$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26540        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26541      else
26542        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26543$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26544        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26545$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26546      fi
26547    fi
26548  fi
26549
26550  fi
26551  if test "x$PROGRAMFILES" != x; then
26552
26553  if test "x$VS_ENV_CMD" = x; then
26554    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26555    METHOD="well-known name"
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
26582  if test "x$VS_ENV_CMD" = x; then
26583    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26584    METHOD="well-known name"
26585
26586  windows_path="$VS100BASE"
26587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26588    unix_path=`$CYGPATH -u "$windows_path"`
26589    VS100BASE="$unix_path"
26590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26592    VS100BASE="$unix_path"
26593  fi
26594
26595    if test -d "$VS100BASE"; then
26596      if test -f "$VS100BASE/$VCVARSFILE"; then
26597        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26598$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26599        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26600      else
26601        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26602$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26603        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26604$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26605      fi
26606    fi
26607  fi
26608
26609
26610  if test "x$VS_ENV_CMD" = x; then
26611    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26612    METHOD="well-known name"
26613
26614  windows_path="$VS100BASE"
26615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26616    unix_path=`$CYGPATH -u "$windows_path"`
26617    VS100BASE="$unix_path"
26618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26620    VS100BASE="$unix_path"
26621  fi
26622
26623    if test -d "$VS100BASE"; then
26624      if test -f "$VS100BASE/$VCVARSFILE"; then
26625        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26626$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26627        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26628      else
26629        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26630$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26631        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26632$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26633      fi
26634    fi
26635  fi
26636
26637
26638  if test "x$ProgramW6432" != x; then
26639
26640  if test "x$VS_ENV_CMD" = x; then
26641    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
26642    METHOD="well-known name"
26643
26644  windows_path="$WIN_SDK_BASE"
26645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26646    unix_path=`$CYGPATH -u "$windows_path"`
26647    WIN_SDK_BASE="$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    WIN_SDK_BASE="$unix_path"
26651  fi
26652
26653    if test -d "$WIN_SDK_BASE"; then
26654      # There have been cases of partial or broken SDK installations. A missing
26655      # lib dir is not going to work.
26656      if test ! -d "$WIN_SDK_BASE/../lib"; then
26657        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26658$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26659        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26660$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26661      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26662        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26663$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26664        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26665        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26666          VS_ENV_ARGS="/x86"
26667        else
26668          VS_ENV_ARGS="/x64"
26669        fi
26670      else
26671        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26672$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26673        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26674$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26675      fi
26676    fi
26677  fi
26678
26679  fi
26680  if test "x$PROGRAMW6432" != x; then
26681
26682  if test "x$VS_ENV_CMD" = x; then
26683    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
26684    METHOD="well-known name"
26685
26686  windows_path="$WIN_SDK_BASE"
26687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26688    unix_path=`$CYGPATH -u "$windows_path"`
26689    WIN_SDK_BASE="$unix_path"
26690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26692    WIN_SDK_BASE="$unix_path"
26693  fi
26694
26695    if test -d "$WIN_SDK_BASE"; then
26696      # There have been cases of partial or broken SDK installations. A missing
26697      # lib dir is not going to work.
26698      if test ! -d "$WIN_SDK_BASE/../lib"; then
26699        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26700$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26701        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26702$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26703      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26704        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26705$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26706        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26707        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26708          VS_ENV_ARGS="/x86"
26709        else
26710          VS_ENV_ARGS="/x64"
26711        fi
26712      else
26713        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26714$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26715        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26716$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26717      fi
26718    fi
26719  fi
26720
26721  fi
26722  if test "x$PROGRAMFILES" != x; then
26723
26724  if test "x$VS_ENV_CMD" = x; then
26725    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
26726    METHOD="well-known name"
26727
26728  windows_path="$WIN_SDK_BASE"
26729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26730    unix_path=`$CYGPATH -u "$windows_path"`
26731    WIN_SDK_BASE="$unix_path"
26732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26734    WIN_SDK_BASE="$unix_path"
26735  fi
26736
26737    if test -d "$WIN_SDK_BASE"; then
26738      # There have been cases of partial or broken SDK installations. A missing
26739      # lib dir is not going to work.
26740      if test ! -d "$WIN_SDK_BASE/../lib"; then
26741        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26742$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26743        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26744$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26745      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26746        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26747$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26748        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26749        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26750          VS_ENV_ARGS="/x86"
26751        else
26752          VS_ENV_ARGS="/x64"
26753        fi
26754      else
26755        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26756$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26757        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26758$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26759      fi
26760    fi
26761  fi
26762
26763  fi
26764
26765  if test "x$VS_ENV_CMD" = x; then
26766    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
26767    METHOD="well-known name"
26768
26769  windows_path="$WIN_SDK_BASE"
26770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26771    unix_path=`$CYGPATH -u "$windows_path"`
26772    WIN_SDK_BASE="$unix_path"
26773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26775    WIN_SDK_BASE="$unix_path"
26776  fi
26777
26778    if test -d "$WIN_SDK_BASE"; then
26779      # There have been cases of partial or broken SDK installations. A missing
26780      # lib dir is not going to work.
26781      if test ! -d "$WIN_SDK_BASE/../lib"; then
26782        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26783$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26784        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26785$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26786      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26787        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26788$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26789        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26790        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26791          VS_ENV_ARGS="/x86"
26792        else
26793          VS_ENV_ARGS="/x64"
26794        fi
26795      else
26796        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26797$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26798        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26799$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26800      fi
26801    fi
26802  fi
26803
26804
26805  if test "x$VS_ENV_CMD" = x; then
26806    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
26807    METHOD="well-known name"
26808
26809  windows_path="$WIN_SDK_BASE"
26810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26811    unix_path=`$CYGPATH -u "$windows_path"`
26812    WIN_SDK_BASE="$unix_path"
26813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26815    WIN_SDK_BASE="$unix_path"
26816  fi
26817
26818    if test -d "$WIN_SDK_BASE"; then
26819      # There have been cases of partial or broken SDK installations. A missing
26820      # lib dir is not going to work.
26821      if test ! -d "$WIN_SDK_BASE/../lib"; then
26822        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26823$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26824        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26825$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26826      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26827        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26828$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26829        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26830        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26831          VS_ENV_ARGS="/x86"
26832        else
26833          VS_ENV_ARGS="/x64"
26834        fi
26835      else
26836        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26837$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26838        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26839$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26840      fi
26841    fi
26842  fi
26843
26844
26845  if test "x$VS_ENV_CMD" != x; then
26846    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
26847
26848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26849
26850  # First separate the path from the arguments. This will split at the first
26851  # space.
26852  complete="$VS_ENV_CMD"
26853  path="${complete%% *}"
26854  tmp="$complete EOL"
26855  arguments="${tmp#* }"
26856
26857  # Input might be given as Windows format, start by converting to
26858  # unix format.
26859  new_path=`$CYGPATH -u "$path"`
26860
26861  # Now try to locate executable using which
26862  new_path=`$WHICH "$new_path" 2> /dev/null`
26863  # bat and cmd files are not always considered executable in cygwin causing which
26864  # to not find them
26865  if test "x$new_path" = x \
26866      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26867      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26868    new_path=`$CYGPATH -u "$path"`
26869  fi
26870  if test "x$new_path" = x; then
26871    # Oops. Which didn't find the executable.
26872    # The splitting of arguments from the executable at a space might have been incorrect,
26873    # since paths with space are more likely in Windows. Give it another try with the whole
26874    # argument.
26875    path="$complete"
26876    arguments="EOL"
26877    new_path=`$CYGPATH -u "$path"`
26878    new_path=`$WHICH "$new_path" 2> /dev/null`
26879    # bat and cmd files are not always considered executable in cygwin causing which
26880    # to not find them
26881    if test "x$new_path" = x \
26882        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26883        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26884      new_path=`$CYGPATH -u "$path"`
26885    fi
26886    if test "x$new_path" = x; then
26887      # It's still not found. Now this is an unrecoverable error.
26888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26889$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26890      has_space=`$ECHO "$complete" | $GREP " "`
26891      if test "x$has_space" != x; then
26892        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26893$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26894      fi
26895      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26896    fi
26897  fi
26898
26899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26902  # "foo.exe" is OK but "foo" is an error.
26903  #
26904  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26905  # It is also a way to make sure we got the proper file name for the real test later on.
26906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26907  if test "x$test_shortpath" = x; then
26908    # Short path failed, file does not exist as specified.
26909    # Try adding .exe or .cmd
26910    if test -f "${new_path}.exe"; then
26911      input_to_shortpath="${new_path}.exe"
26912    elif test -f "${new_path}.cmd"; then
26913      input_to_shortpath="${new_path}.cmd"
26914    else
26915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
26916$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
26917      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26918$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26919      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26920    fi
26921  else
26922    input_to_shortpath="$new_path"
26923  fi
26924
26925  # Call helper function which possibly converts this using DOS-style short mode.
26926  # If so, the updated path is stored in $new_path.
26927  new_path="$input_to_shortpath"
26928
26929  input_path="$input_to_shortpath"
26930  # Check if we need to convert this using DOS-style short mode. If the path
26931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26932  # take no chances and rewrite it.
26933  # Note: m4 eats our [], so we need to use [ and ] instead.
26934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26935  if test "x$has_forbidden_chars" != x; then
26936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26937    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26938    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26939    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26940      # Going to short mode and back again did indeed matter. Since short mode is
26941      # case insensitive, let's make it lowercase to improve readability.
26942      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26943      # Now convert it back to Unix-stile (cygpath)
26944      input_path=`$CYGPATH -u "$shortmode_path"`
26945      new_path="$input_path"
26946    fi
26947  fi
26948
26949  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26950  if test "x$test_cygdrive_prefix" = x; then
26951    # As a simple fix, exclude /usr/bin since it's not a real path.
26952    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26953      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26954      # a path prefixed by /cygdrive for fixpath to work.
26955      new_path="$CYGWIN_ROOT_PATH$input_path"
26956    fi
26957  fi
26958
26959  # remove trailing .exe if any
26960  new_path="${new_path/%.exe/}"
26961
26962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26963
26964  # First separate the path from the arguments. This will split at the first
26965  # space.
26966  complete="$VS_ENV_CMD"
26967  path="${complete%% *}"
26968  tmp="$complete EOL"
26969  arguments="${tmp#* }"
26970
26971  # Input might be given as Windows format, start by converting to
26972  # unix format.
26973  new_path="$path"
26974
26975  windows_path="$new_path"
26976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26977    unix_path=`$CYGPATH -u "$windows_path"`
26978    new_path="$unix_path"
26979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26981    new_path="$unix_path"
26982  fi
26983
26984
26985  # Now try to locate executable using which
26986  new_path=`$WHICH "$new_path" 2> /dev/null`
26987
26988  if test "x$new_path" = x; then
26989    # Oops. Which didn't find the executable.
26990    # The splitting of arguments from the executable at a space might have been incorrect,
26991    # since paths with space are more likely in Windows. Give it another try with the whole
26992    # argument.
26993    path="$complete"
26994    arguments="EOL"
26995    new_path="$path"
26996
26997  windows_path="$new_path"
26998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26999    unix_path=`$CYGPATH -u "$windows_path"`
27000    new_path="$unix_path"
27001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27003    new_path="$unix_path"
27004  fi
27005
27006
27007    new_path=`$WHICH "$new_path" 2> /dev/null`
27008
27009    if test "x$new_path" = x; then
27010      # It's still not found. Now this is an unrecoverable error.
27011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27012$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27013      has_space=`$ECHO "$complete" | $GREP " "`
27014      if test "x$has_space" != x; then
27015        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27016$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27017      fi
27018      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27019    fi
27020  fi
27021
27022  # Now new_path has a complete unix path to the binary
27023  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27024    # Keep paths in /bin as-is, but remove trailing .exe if any
27025    new_path="${new_path/%.exe/}"
27026    # Do not save /bin paths to all_fixpath_prefixes!
27027  else
27028    # Not in mixed or Windows style, start by that.
27029    new_path=`cmd //c echo $new_path`
27030
27031  input_path="$new_path"
27032  # Check if we need to convert this using DOS-style short mode. If the path
27033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27034  # take no chances and rewrite it.
27035  # Note: m4 eats our [], so we need to use [ and ] instead.
27036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27037  if test "x$has_forbidden_chars" != x; then
27038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27039    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27040  fi
27041
27042    # Output is in $new_path
27043
27044  windows_path="$new_path"
27045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27046    unix_path=`$CYGPATH -u "$windows_path"`
27047    new_path="$unix_path"
27048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27050    new_path="$unix_path"
27051  fi
27052
27053    # remove trailing .exe if any
27054    new_path="${new_path/%.exe/}"
27055
27056    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27057    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27058  fi
27059
27060  else
27061    # We're on a posix platform. Hooray! :)
27062    # First separate the path from the arguments. This will split at the first
27063    # space.
27064    complete="$VS_ENV_CMD"
27065    path="${complete%% *}"
27066    tmp="$complete EOL"
27067    arguments="${tmp#* }"
27068
27069    # Cannot rely on the command "which" here since it doesn't always work.
27070    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27071    if test -z "$is_absolute_path"; then
27072      # Path to executable is not absolute. Find it.
27073      IFS_save="$IFS"
27074      IFS=:
27075      for p in $PATH; do
27076        if test -f "$p/$path" && test -x "$p/$path"; then
27077          new_path="$p/$path"
27078          break
27079        fi
27080      done
27081      IFS="$IFS_save"
27082    else
27083      # This is an absolute path, we can use it without further modifications.
27084      new_path="$path"
27085    fi
27086
27087    if test "x$new_path" = x; then
27088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27089$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27090      has_space=`$ECHO "$complete" | $GREP " "`
27091      if test "x$has_space" != x; then
27092        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27093$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27094      fi
27095      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27096    fi
27097  fi
27098
27099  # Now join together the path and the arguments once again
27100  if test "x$arguments" != xEOL; then
27101    new_complete="$new_path ${arguments% *}"
27102  else
27103    new_complete="$new_path"
27104  fi
27105
27106  if test "x$complete" != "x$new_complete"; then
27107    VS_ENV_CMD="$new_complete"
27108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27109$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27110  fi
27111
27112
27113    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27114    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27115$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27116    cd $OUTPUT_ROOT
27117    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
27118    # to autoconf standards.
27119
27120    #----
27121
27122    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
27123    # but calculate the difference in Cygwin environment before/after running it and then
27124    # apply the diff.
27125
27126    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
27127      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
27128      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
27129      _dosbash=`cygpath -a -w -s \`which bash\`.*`
27130    else
27131      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
27132      _dosbash=`cmd //c echo \`which bash\``
27133    fi
27134
27135    # generate the set of exported vars before/after the vs10 setup
27136    $ECHO "@echo off"                                           >  localdevenvtmp.bat
27137    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
27138    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
27139    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
27140
27141    # Now execute the newly created bat file.
27142    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
27143    cmd /c localdevenvtmp.bat | cat
27144
27145    # apply the diff (less some non-vs10 vars named by "!")
27146    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
27147    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
27148    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
27149
27150    # cleanup
27151    $RM localdevenvtmp*
27152    #----
27153    cd $CURDIR
27154    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
27155      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27156$as_echo "no" >&6; }
27157      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27158$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27159      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27160$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27161      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27162$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27163      as_fn_error $? "Cannot continue" "$LINENO" 5
27164    fi
27165
27166    # Now set all paths and other env variables. This will allow the rest of
27167    # the configure script to find and run the compiler in the proper way.
27168    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27169$as_echo "$as_me: Setting extracted environment variables" >&6;}
27170    . $OUTPUT_ROOT/localdevenv.sh
27171  else
27172    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27173    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27174$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27175  fi
27176
27177  # At this point, we should have corrent variables in the environment, or we can't continue.
27178  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27179$as_echo_n "checking for Visual Studio variables... " >&6; }
27180
27181  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27182    if test "x$INCLUDE" = x || test "x$LIB" = x; then
27183      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27184$as_echo "present but broken" >&6; }
27185      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27186    else
27187      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27188$as_echo "ok" >&6; }
27189      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
27190      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
27191      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
27192      # Remove any paths containing # (typically F#) as that messes up make
27193      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
27194      VS_PATH="$PATH"
27195
27196
27197
27198    fi
27199  else
27200    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27201$as_echo "not found" >&6; }
27202
27203    if test "x$VS_ENV_CMD" = x; then
27204      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27205$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27206      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27207$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27208    else
27209      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27210$as_echo "$as_me: Running the extraction script failed." >&6;}
27211    fi
27212    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27213$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27214    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27215$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27216    as_fn_error $? "Cannot continue" "$LINENO" 5
27217  fi
27218
27219  fi
27220
27221  # autoconf magic only relies on PATH, so update it if tools dir is specified
27222  OLD_PATH="$PATH"
27223
27224  # For solaris we really need solaris tools, and not the GNU equivalent.
27225  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27226  # so add that to path before starting to probe.
27227  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27228  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27229    PATH="/usr/ccs/bin:$PATH"
27230  fi
27231
27232  # Finally add TOOLS_DIR at the beginning, to allow --with-tools-dir to
27233  # override all other locations.
27234  if test "x$TOOLS_DIR" != x; then
27235    PATH=$TOOLS_DIR:$PATH
27236  fi
27237
27238  # If a devkit is found on the builddeps server, then prepend its path to the
27239  # PATH variable. If there are cross compilers available in the devkit, these
27240  # will be found by AC_PROG_CC et al.
27241  DEVKIT=
27242
27243
27244  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
27245    # Source the builddeps file again, to make sure it uses the latest variables!
27246    . $builddepsfile
27247    # Look for a target and build machine specific resource!
27248    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
27249    if test "x$resource" = x; then
27250      # Ok, lets instead look for a target specific resource
27251      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
27252    fi
27253    if test "x$resource" = x; then
27254      # Ok, lets instead look for a build specific resource
27255      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
27256    fi
27257    if test "x$resource" = x; then
27258      # Ok, lets instead look for a generic resource
27259      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
27260      resource=${builddep_devkit}
27261    fi
27262    if test "x$resource" != x; then
27263      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
27264$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
27265      # If the resource in the builddeps.conf file is an existing directory,
27266      # for example /java/linux/cups
27267      if test -d ${resource}; then
27268        depdir=${resource}
27269      else
27270
27271  # devkit is for example mymodule
27272  # $resource is for example libs/general/libmymod_1_2_3.zip
27273  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
27274  # $with_builddeps_dir is for example /localhome/builddeps
27275  # depdir is the name of the variable into which we store the depdir, eg MYMOD
27276  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
27277  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
27278  filename=`basename $resource`
27279  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
27280  filebase=${filename%%.*}
27281  extension=${filename#*.}
27282  installdir=$with_builddeps_dir/$filebase
27283  if test ! -f $installdir/$filename.unpacked; then
27284    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
27285$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
27286    if test ! -d $installdir; then
27287      mkdir -p $installdir
27288    fi
27289    if test ! -d $installdir; then
27290      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
27291    fi
27292    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
27293    touch $tmpfile
27294    if test ! -f $tmpfile; then
27295      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
27296    fi
27297
27298  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
27299  # $tmpfile is the local file name for the downloaded file.
27300  VALID_TOOL=no
27301  if test "x$BDEPS_FTP" = xwget; then
27302    VALID_TOOL=yes
27303    wget -O $tmpfile $with_builddeps_server/$resource
27304  fi
27305  if test "x$BDEPS_FTP" = xlftp; then
27306    VALID_TOOL=yes
27307    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
27308  fi
27309  if test "x$BDEPS_FTP" = xftp; then
27310    VALID_TOOL=yes
27311    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
27312    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
27313    FTPUSERPWD=${FTPSERVER%%@*}
27314    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
27315      FTPUSER=${userpwd%%:*}
27316      FTPPWD=${userpwd#*@}
27317      FTPSERVER=${FTPSERVER#*@}
27318    else
27319      FTPUSER=ftp
27320      FTPPWD=ftp
27321    fi
27322    # the "pass" command does not work on some
27323    # ftp clients (read ftp.exe) but if it works,
27324    # passive mode is better!
27325    ( \
27326        echo "user $FTPUSER $FTPPWD"        ; \
27327        echo "pass"                         ; \
27328        echo "bin"                          ; \
27329        echo "get $FTPPATH $tmpfile"              ; \
27330    ) | ftp -in $FTPSERVER
27331  fi
27332  if test "x$VALID_TOOL" != xyes; then
27333    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
27334  fi
27335
27336    mv $tmpfile $installdir/$filename
27337    if test ! -s $installdir/$filename; then
27338      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
27339    fi
27340    case "$extension" in
27341      zip)  echo "Unzipping $installdir/$filename..."
27342        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
27343        ;;
27344      tar.gz) echo "Untaring $installdir/$filename..."
27345        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
27346        ;;
27347      tgz) echo "Untaring $installdir/$filename..."
27348        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
27349        ;;
27350      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
27351        ;;
27352    esac
27353  fi
27354  if test -f $installdir/$filename.unpacked; then
27355    depdir=$installdir
27356  fi
27357
27358      fi
27359      # Source the builddeps file again, because in the previous command, the depdir
27360      # was updated to point at the current build dependency install directory.
27361      . $builddepsfile
27362      # Now extract variables from the builddeps.conf files.
27363      theroot=${builddep_devkit_ROOT}
27364      thecflags=${builddep_devkit_CFLAGS}
27365      thelibs=${builddep_devkit_LIBS}
27366      if test "x$depdir" = x; then
27367        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
27368      fi
27369      DEVKIT=$depdir
27370      if test "x$theroot" != x; then
27371        DEVKIT="$theroot"
27372      fi
27373      if test "x$thecflags" != x; then
27374        DEVKIT_CFLAGS="$thecflags"
27375      fi
27376      if test "x$thelibs" != x; then
27377        DEVKIT_LIBS="$thelibs"
27378      fi
27379
27380        # Found devkit
27381        PATH="$DEVKIT/bin:$PATH"
27382        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
27383        if test "x$x_includes" = "xNONE"; then
27384          x_includes="$SYS_ROOT/usr/include/X11"
27385        fi
27386        if test "x$x_libraries" = "xNONE"; then
27387          x_libraries="$SYS_ROOT/usr/lib"
27388        fi
27389
27390
27391    fi
27392
27393  fi
27394
27395
27396
27397  #
27398  # Setup the compilers (CC and CXX)
27399  #
27400
27401  COMPILER_NAME=C
27402  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27403
27404  if test "x$CC" != x; then
27405    # User has supplied compiler name already, always let that override.
27406    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27407$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27408    if test "x`basename $CC`" = "x$CC"; then
27409      # A command without a complete path is provided, search $PATH.
27410
27411      for ac_prog in $CC
27412do
27413  # Extract the first word of "$ac_prog", so it can be a program name with args.
27414set dummy $ac_prog; ac_word=$2
27415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27416$as_echo_n "checking for $ac_word... " >&6; }
27417if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27418  $as_echo_n "(cached) " >&6
27419else
27420  case $POTENTIAL_CC in
27421  [\\/]* | ?:[\\/]*)
27422  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27423  ;;
27424  *)
27425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27426for as_dir in $PATH
27427do
27428  IFS=$as_save_IFS
27429  test -z "$as_dir" && as_dir=.
27430    for ac_exec_ext in '' $ac_executable_extensions; do
27431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27432    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27434    break 2
27435  fi
27436done
27437  done
27438IFS=$as_save_IFS
27439
27440  ;;
27441esac
27442fi
27443POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27444if test -n "$POTENTIAL_CC"; then
27445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27446$as_echo "$POTENTIAL_CC" >&6; }
27447else
27448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27449$as_echo "no" >&6; }
27450fi
27451
27452
27453  test -n "$POTENTIAL_CC" && break
27454done
27455
27456      if test "x$POTENTIAL_CC" != x; then
27457        CC=$POTENTIAL_CC
27458      else
27459        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27460      fi
27461    else
27462      # Otherwise it might already be a complete path
27463      if test ! -x "$CC"; then
27464        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27465      fi
27466    fi
27467  else
27468    # No user supplied value. Locate compiler ourselves.
27469
27470    # If we are cross compiling, assume cross compilation tools follows the
27471    # cross compilation standard where they are prefixed with the autoconf
27472    # standard name for the target. For example the binary
27473    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27474    # If we are not cross compiling, then the default compiler name will be
27475    # used.
27476
27477    CC=
27478    # If TOOLS_DIR is set, check for all compiler names in there first
27479    # before checking the rest of the PATH.
27480    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27481    # step, this should not be necessary.
27482    if test -n "$TOOLS_DIR"; then
27483      PATH_save="$PATH"
27484      PATH="$TOOLS_DIR"
27485      for ac_prog in $SEARCH_LIST
27486do
27487  # Extract the first word of "$ac_prog", so it can be a program name with args.
27488set dummy $ac_prog; ac_word=$2
27489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27490$as_echo_n "checking for $ac_word... " >&6; }
27491if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
27492  $as_echo_n "(cached) " >&6
27493else
27494  case $TOOLS_DIR_CC in
27495  [\\/]* | ?:[\\/]*)
27496  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
27497  ;;
27498  *)
27499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27500for as_dir in $PATH
27501do
27502  IFS=$as_save_IFS
27503  test -z "$as_dir" && as_dir=.
27504    for ac_exec_ext in '' $ac_executable_extensions; do
27505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27506    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
27507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27508    break 2
27509  fi
27510done
27511  done
27512IFS=$as_save_IFS
27513
27514  ;;
27515esac
27516fi
27517TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
27518if test -n "$TOOLS_DIR_CC"; then
27519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
27520$as_echo "$TOOLS_DIR_CC" >&6; }
27521else
27522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27523$as_echo "no" >&6; }
27524fi
27525
27526
27527  test -n "$TOOLS_DIR_CC" && break
27528done
27529
27530      CC=$TOOLS_DIR_CC
27531      PATH="$PATH_save"
27532    fi
27533
27534    # AC_PATH_PROGS can't be run multiple times with the same variable,
27535    # so create a new name for this run.
27536    if test "x$CC" = x; then
27537      for ac_prog in $SEARCH_LIST
27538do
27539  # Extract the first word of "$ac_prog", so it can be a program name with args.
27540set dummy $ac_prog; ac_word=$2
27541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27542$as_echo_n "checking for $ac_word... " >&6; }
27543if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27544  $as_echo_n "(cached) " >&6
27545else
27546  case $POTENTIAL_CC in
27547  [\\/]* | ?:[\\/]*)
27548  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27549  ;;
27550  *)
27551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27552for as_dir in $PATH
27553do
27554  IFS=$as_save_IFS
27555  test -z "$as_dir" && as_dir=.
27556    for ac_exec_ext in '' $ac_executable_extensions; do
27557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27558    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27560    break 2
27561  fi
27562done
27563  done
27564IFS=$as_save_IFS
27565
27566  ;;
27567esac
27568fi
27569POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27570if test -n "$POTENTIAL_CC"; then
27571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27572$as_echo "$POTENTIAL_CC" >&6; }
27573else
27574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27575$as_echo "no" >&6; }
27576fi
27577
27578
27579  test -n "$POTENTIAL_CC" && break
27580done
27581
27582      CC=$POTENTIAL_CC
27583    fi
27584
27585    if test "x$CC" = x; then
27586
27587  # Print a helpful message on how to acquire the necessary build dependency.
27588  # devkit is the help tag: freetype, cups, pulse, alsa etc
27589  MISSING_DEPENDENCY=devkit
27590
27591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27592    cygwin_help $MISSING_DEPENDENCY
27593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27594    msys_help $MISSING_DEPENDENCY
27595  else
27596    PKGHANDLER_COMMAND=
27597
27598    case $PKGHANDLER in
27599      apt-get)
27600        apt_help     $MISSING_DEPENDENCY ;;
27601      yum)
27602        yum_help     $MISSING_DEPENDENCY ;;
27603      port)
27604        port_help    $MISSING_DEPENDENCY ;;
27605      pkgutil)
27606        pkgutil_help $MISSING_DEPENDENCY ;;
27607      pkgadd)
27608        pkgadd_help  $MISSING_DEPENDENCY ;;
27609    esac
27610
27611    if test "x$PKGHANDLER_COMMAND" != x; then
27612      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27613    fi
27614  fi
27615
27616      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27617    fi
27618  fi
27619
27620  # Now we have a compiler binary in CC. Make sure it's okay.
27621
27622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27623
27624  # First separate the path from the arguments. This will split at the first
27625  # space.
27626  complete="$CC"
27627  path="${complete%% *}"
27628  tmp="$complete EOL"
27629  arguments="${tmp#* }"
27630
27631  # Input might be given as Windows format, start by converting to
27632  # unix format.
27633  new_path=`$CYGPATH -u "$path"`
27634
27635  # Now try to locate executable using which
27636  new_path=`$WHICH "$new_path" 2> /dev/null`
27637  # bat and cmd files are not always considered executable in cygwin causing which
27638  # to not find them
27639  if test "x$new_path" = x \
27640      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27641      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27642    new_path=`$CYGPATH -u "$path"`
27643  fi
27644  if test "x$new_path" = x; then
27645    # Oops. Which didn't find the executable.
27646    # The splitting of arguments from the executable at a space might have been incorrect,
27647    # since paths with space are more likely in Windows. Give it another try with the whole
27648    # argument.
27649    path="$complete"
27650    arguments="EOL"
27651    new_path=`$CYGPATH -u "$path"`
27652    new_path=`$WHICH "$new_path" 2> /dev/null`
27653    # bat and cmd files are not always considered executable in cygwin causing which
27654    # to not find them
27655    if test "x$new_path" = x \
27656        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27657        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27658      new_path=`$CYGPATH -u "$path"`
27659    fi
27660    if test "x$new_path" = x; then
27661      # It's still not found. Now this is an unrecoverable error.
27662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27663$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27664      has_space=`$ECHO "$complete" | $GREP " "`
27665      if test "x$has_space" != x; then
27666        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27667$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27668      fi
27669      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27670    fi
27671  fi
27672
27673  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27674  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27675  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27676  # "foo.exe" is OK but "foo" is an error.
27677  #
27678  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27679  # It is also a way to make sure we got the proper file name for the real test later on.
27680  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27681  if test "x$test_shortpath" = x; then
27682    # Short path failed, file does not exist as specified.
27683    # Try adding .exe or .cmd
27684    if test -f "${new_path}.exe"; then
27685      input_to_shortpath="${new_path}.exe"
27686    elif test -f "${new_path}.cmd"; then
27687      input_to_shortpath="${new_path}.cmd"
27688    else
27689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27690$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27691      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27692$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27693      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27694    fi
27695  else
27696    input_to_shortpath="$new_path"
27697  fi
27698
27699  # Call helper function which possibly converts this using DOS-style short mode.
27700  # If so, the updated path is stored in $new_path.
27701  new_path="$input_to_shortpath"
27702
27703  input_path="$input_to_shortpath"
27704  # Check if we need to convert this using DOS-style short mode. If the path
27705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27706  # take no chances and rewrite it.
27707  # Note: m4 eats our [], so we need to use [ and ] instead.
27708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27709  if test "x$has_forbidden_chars" != x; then
27710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27711    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27712    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27713    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27714      # Going to short mode and back again did indeed matter. Since short mode is
27715      # case insensitive, let's make it lowercase to improve readability.
27716      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27717      # Now convert it back to Unix-stile (cygpath)
27718      input_path=`$CYGPATH -u "$shortmode_path"`
27719      new_path="$input_path"
27720    fi
27721  fi
27722
27723  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27724  if test "x$test_cygdrive_prefix" = x; then
27725    # As a simple fix, exclude /usr/bin since it's not a real path.
27726    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27727      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27728      # a path prefixed by /cygdrive for fixpath to work.
27729      new_path="$CYGWIN_ROOT_PATH$input_path"
27730    fi
27731  fi
27732
27733  # remove trailing .exe if any
27734  new_path="${new_path/%.exe/}"
27735
27736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27737
27738  # First separate the path from the arguments. This will split at the first
27739  # space.
27740  complete="$CC"
27741  path="${complete%% *}"
27742  tmp="$complete EOL"
27743  arguments="${tmp#* }"
27744
27745  # Input might be given as Windows format, start by converting to
27746  # unix format.
27747  new_path="$path"
27748
27749  windows_path="$new_path"
27750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27751    unix_path=`$CYGPATH -u "$windows_path"`
27752    new_path="$unix_path"
27753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27755    new_path="$unix_path"
27756  fi
27757
27758
27759  # Now try to locate executable using which
27760  new_path=`$WHICH "$new_path" 2> /dev/null`
27761
27762  if test "x$new_path" = x; then
27763    # Oops. Which didn't find the executable.
27764    # The splitting of arguments from the executable at a space might have been incorrect,
27765    # since paths with space are more likely in Windows. Give it another try with the whole
27766    # argument.
27767    path="$complete"
27768    arguments="EOL"
27769    new_path="$path"
27770
27771  windows_path="$new_path"
27772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27773    unix_path=`$CYGPATH -u "$windows_path"`
27774    new_path="$unix_path"
27775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27777    new_path="$unix_path"
27778  fi
27779
27780
27781    new_path=`$WHICH "$new_path" 2> /dev/null`
27782
27783    if test "x$new_path" = x; then
27784      # It's still not found. Now this is an unrecoverable error.
27785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27786$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27787      has_space=`$ECHO "$complete" | $GREP " "`
27788      if test "x$has_space" != x; then
27789        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27790$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27791      fi
27792      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27793    fi
27794  fi
27795
27796  # Now new_path has a complete unix path to the binary
27797  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27798    # Keep paths in /bin as-is, but remove trailing .exe if any
27799    new_path="${new_path/%.exe/}"
27800    # Do not save /bin paths to all_fixpath_prefixes!
27801  else
27802    # Not in mixed or Windows style, start by that.
27803    new_path=`cmd //c echo $new_path`
27804
27805  input_path="$new_path"
27806  # Check if we need to convert this using DOS-style short mode. If the path
27807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27808  # take no chances and rewrite it.
27809  # Note: m4 eats our [], so we need to use [ and ] instead.
27810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27811  if test "x$has_forbidden_chars" != x; then
27812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27813    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27814  fi
27815
27816    # Output is in $new_path
27817
27818  windows_path="$new_path"
27819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27820    unix_path=`$CYGPATH -u "$windows_path"`
27821    new_path="$unix_path"
27822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27824    new_path="$unix_path"
27825  fi
27826
27827    # remove trailing .exe if any
27828    new_path="${new_path/%.exe/}"
27829
27830    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27831    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27832  fi
27833
27834  else
27835    # We're on a posix platform. Hooray! :)
27836    # First separate the path from the arguments. This will split at the first
27837    # space.
27838    complete="$CC"
27839    path="${complete%% *}"
27840    tmp="$complete EOL"
27841    arguments="${tmp#* }"
27842
27843    # Cannot rely on the command "which" here since it doesn't always work.
27844    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27845    if test -z "$is_absolute_path"; then
27846      # Path to executable is not absolute. Find it.
27847      IFS_save="$IFS"
27848      IFS=:
27849      for p in $PATH; do
27850        if test -f "$p/$path" && test -x "$p/$path"; then
27851          new_path="$p/$path"
27852          break
27853        fi
27854      done
27855      IFS="$IFS_save"
27856    else
27857      # This is an absolute path, we can use it without further modifications.
27858      new_path="$path"
27859    fi
27860
27861    if test "x$new_path" = x; then
27862      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27863$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27864      has_space=`$ECHO "$complete" | $GREP " "`
27865      if test "x$has_space" != x; then
27866        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27867$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27868      fi
27869      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27870    fi
27871  fi
27872
27873  # Now join together the path and the arguments once again
27874  if test "x$arguments" != xEOL; then
27875    new_complete="$new_path ${arguments% *}"
27876  else
27877    new_complete="$new_path"
27878  fi
27879
27880  if test "x$complete" != "x$new_complete"; then
27881    CC="$new_complete"
27882    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
27883$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
27884  fi
27885
27886  TEST_COMPILER="$CC"
27887  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
27888  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
27889  if test "x$OPENJDK_BUILD_OS" != xaix; then
27890    # FIXME: This test should not be needed anymore; we don't do that for any platform.
27891    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
27892$as_echo_n "checking resolved symbolic links for CC... " >&6; }
27893
27894  if test "x$OPENJDK_BUILD_OS" != xwindows; then
27895    # Follow a chain of symbolic links. Use readlink
27896    # where it exists, else fall back to horribly
27897    # complicated shell code.
27898    if test "x$READLINK_TESTED" != yes; then
27899      # On MacOSX there is a readlink tool with a different
27900      # purpose than the GNU readlink tool. Check the found readlink.
27901      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27902      if test "x$ISGNU" = x; then
27903        # A readlink that we do not know how to use.
27904        # Are there other non-GNU readlinks out there?
27905        READLINK_TESTED=yes
27906        READLINK=
27907      fi
27908    fi
27909
27910    if test "x$READLINK" != x; then
27911      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
27912    else
27913      # Save the current directory for restoring afterwards
27914      STARTDIR=$PWD
27915      COUNTER=0
27916      sym_link_dir=`$DIRNAME $TEST_COMPILER`
27917      sym_link_file=`$BASENAME $TEST_COMPILER`
27918      cd $sym_link_dir
27919      # Use -P flag to resolve symlinks in directories.
27920      cd `$THEPWDCMD -P`
27921      sym_link_dir=`$THEPWDCMD -P`
27922      # Resolve file symlinks
27923      while test $COUNTER -lt 20; do
27924        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27925        if test "x$ISLINK" == x; then
27926          # This is not a symbolic link! We are done!
27927          break
27928        fi
27929        # Again resolve directory symlinks since the target of the just found
27930        # link could be in a different directory
27931        cd `$DIRNAME $ISLINK`
27932        sym_link_dir=`$THEPWDCMD -P`
27933        sym_link_file=`$BASENAME $ISLINK`
27934        let COUNTER=COUNTER+1
27935      done
27936      cd $STARTDIR
27937      TEST_COMPILER=$sym_link_dir/$sym_link_file
27938    fi
27939  fi
27940
27941    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
27942$as_echo "$TEST_COMPILER" >&6; }
27943  fi
27944  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
27945$as_echo_n "checking if CC is disguised ccache... " >&6; }
27946
27947  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
27948  if test "x$COMPILER_BASENAME" = "xccache"; then
27949    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
27950$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
27951    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
27952    # We want to control ccache invocation ourselves, so ignore this cc and try
27953    # searching again.
27954
27955    # Remove the path to the fake ccache cc from the PATH
27956    RETRY_COMPILER_SAVED_PATH="$PATH"
27957    COMPILER_DIRNAME=`$DIRNAME $CC`
27958    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
27959
27960    # Try again looking for our compiler
27961    if test -n "$ac_tool_prefix"; then
27962  for ac_prog in $TOOLCHAIN_CC_BINARY
27963  do
27964    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27965set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27967$as_echo_n "checking for $ac_word... " >&6; }
27968if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
27969  $as_echo_n "(cached) " >&6
27970else
27971  if test -n "$PROPER_COMPILER_CC"; then
27972  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
27973else
27974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27975for as_dir in $PATH
27976do
27977  IFS=$as_save_IFS
27978  test -z "$as_dir" && as_dir=.
27979    for ac_exec_ext in '' $ac_executable_extensions; do
27980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27981    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
27982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27983    break 2
27984  fi
27985done
27986  done
27987IFS=$as_save_IFS
27988
27989fi
27990fi
27991PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
27992if test -n "$PROPER_COMPILER_CC"; then
27993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
27994$as_echo "$PROPER_COMPILER_CC" >&6; }
27995else
27996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27997$as_echo "no" >&6; }
27998fi
27999
28000
28001    test -n "$PROPER_COMPILER_CC" && break
28002  done
28003fi
28004if test -z "$PROPER_COMPILER_CC"; then
28005  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28006  for ac_prog in $TOOLCHAIN_CC_BINARY
28007do
28008  # Extract the first word of "$ac_prog", so it can be a program name with args.
28009set dummy $ac_prog; ac_word=$2
28010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28011$as_echo_n "checking for $ac_word... " >&6; }
28012if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28013  $as_echo_n "(cached) " >&6
28014else
28015  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28016  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28017else
28018as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28019for as_dir in $PATH
28020do
28021  IFS=$as_save_IFS
28022  test -z "$as_dir" && as_dir=.
28023    for ac_exec_ext in '' $ac_executable_extensions; do
28024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28025    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28027    break 2
28028  fi
28029done
28030  done
28031IFS=$as_save_IFS
28032
28033fi
28034fi
28035ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28036if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28038$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28039else
28040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28041$as_echo "no" >&6; }
28042fi
28043
28044
28045  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28046done
28047
28048  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28049    PROPER_COMPILER_CC=""
28050  else
28051    case $cross_compiling:$ac_tool_warned in
28052yes:)
28053{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28054$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28055ac_tool_warned=yes ;;
28056esac
28057    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28058  fi
28059fi
28060
28061
28062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28063
28064  # First separate the path from the arguments. This will split at the first
28065  # space.
28066  complete="$PROPER_COMPILER_CC"
28067  path="${complete%% *}"
28068  tmp="$complete EOL"
28069  arguments="${tmp#* }"
28070
28071  # Input might be given as Windows format, start by converting to
28072  # unix format.
28073  new_path=`$CYGPATH -u "$path"`
28074
28075  # Now try to locate executable using which
28076  new_path=`$WHICH "$new_path" 2> /dev/null`
28077  # bat and cmd files are not always considered executable in cygwin causing which
28078  # to not find them
28079  if test "x$new_path" = x \
28080      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28081      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28082    new_path=`$CYGPATH -u "$path"`
28083  fi
28084  if test "x$new_path" = x; then
28085    # Oops. Which didn't find the executable.
28086    # The splitting of arguments from the executable at a space might have been incorrect,
28087    # since paths with space are more likely in Windows. Give it another try with the whole
28088    # argument.
28089    path="$complete"
28090    arguments="EOL"
28091    new_path=`$CYGPATH -u "$path"`
28092    new_path=`$WHICH "$new_path" 2> /dev/null`
28093    # bat and cmd files are not always considered executable in cygwin causing which
28094    # to not find them
28095    if test "x$new_path" = x \
28096        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28097        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28098      new_path=`$CYGPATH -u "$path"`
28099    fi
28100    if test "x$new_path" = x; then
28101      # It's still not found. Now this is an unrecoverable error.
28102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28103$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28104      has_space=`$ECHO "$complete" | $GREP " "`
28105      if test "x$has_space" != x; then
28106        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28107$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28108      fi
28109      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28110    fi
28111  fi
28112
28113  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28114  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28115  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28116  # "foo.exe" is OK but "foo" is an error.
28117  #
28118  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28119  # It is also a way to make sure we got the proper file name for the real test later on.
28120  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28121  if test "x$test_shortpath" = x; then
28122    # Short path failed, file does not exist as specified.
28123    # Try adding .exe or .cmd
28124    if test -f "${new_path}.exe"; then
28125      input_to_shortpath="${new_path}.exe"
28126    elif test -f "${new_path}.cmd"; then
28127      input_to_shortpath="${new_path}.cmd"
28128    else
28129      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28130$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28131      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28132$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28133      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28134    fi
28135  else
28136    input_to_shortpath="$new_path"
28137  fi
28138
28139  # Call helper function which possibly converts this using DOS-style short mode.
28140  # If so, the updated path is stored in $new_path.
28141  new_path="$input_to_shortpath"
28142
28143  input_path="$input_to_shortpath"
28144  # Check if we need to convert this using DOS-style short mode. If the path
28145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28146  # take no chances and rewrite it.
28147  # Note: m4 eats our [], so we need to use [ and ] instead.
28148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28149  if test "x$has_forbidden_chars" != x; then
28150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28151    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28152    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28153    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28154      # Going to short mode and back again did indeed matter. Since short mode is
28155      # case insensitive, let's make it lowercase to improve readability.
28156      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28157      # Now convert it back to Unix-stile (cygpath)
28158      input_path=`$CYGPATH -u "$shortmode_path"`
28159      new_path="$input_path"
28160    fi
28161  fi
28162
28163  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28164  if test "x$test_cygdrive_prefix" = x; then
28165    # As a simple fix, exclude /usr/bin since it's not a real path.
28166    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28167      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28168      # a path prefixed by /cygdrive for fixpath to work.
28169      new_path="$CYGWIN_ROOT_PATH$input_path"
28170    fi
28171  fi
28172
28173  # remove trailing .exe if any
28174  new_path="${new_path/%.exe/}"
28175
28176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28177
28178  # First separate the path from the arguments. This will split at the first
28179  # space.
28180  complete="$PROPER_COMPILER_CC"
28181  path="${complete%% *}"
28182  tmp="$complete EOL"
28183  arguments="${tmp#* }"
28184
28185  # Input might be given as Windows format, start by converting to
28186  # unix format.
28187  new_path="$path"
28188
28189  windows_path="$new_path"
28190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28191    unix_path=`$CYGPATH -u "$windows_path"`
28192    new_path="$unix_path"
28193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28195    new_path="$unix_path"
28196  fi
28197
28198
28199  # Now try to locate executable using which
28200  new_path=`$WHICH "$new_path" 2> /dev/null`
28201
28202  if test "x$new_path" = x; then
28203    # Oops. Which didn't find the executable.
28204    # The splitting of arguments from the executable at a space might have been incorrect,
28205    # since paths with space are more likely in Windows. Give it another try with the whole
28206    # argument.
28207    path="$complete"
28208    arguments="EOL"
28209    new_path="$path"
28210
28211  windows_path="$new_path"
28212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28213    unix_path=`$CYGPATH -u "$windows_path"`
28214    new_path="$unix_path"
28215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28217    new_path="$unix_path"
28218  fi
28219
28220
28221    new_path=`$WHICH "$new_path" 2> /dev/null`
28222
28223    if test "x$new_path" = x; then
28224      # It's still not found. Now this is an unrecoverable error.
28225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28226$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28227      has_space=`$ECHO "$complete" | $GREP " "`
28228      if test "x$has_space" != x; then
28229        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28230$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28231      fi
28232      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28233    fi
28234  fi
28235
28236  # Now new_path has a complete unix path to the binary
28237  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28238    # Keep paths in /bin as-is, but remove trailing .exe if any
28239    new_path="${new_path/%.exe/}"
28240    # Do not save /bin paths to all_fixpath_prefixes!
28241  else
28242    # Not in mixed or Windows style, start by that.
28243    new_path=`cmd //c echo $new_path`
28244
28245  input_path="$new_path"
28246  # Check if we need to convert this using DOS-style short mode. If the path
28247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28248  # take no chances and rewrite it.
28249  # Note: m4 eats our [], so we need to use [ and ] instead.
28250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28251  if test "x$has_forbidden_chars" != x; then
28252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28254  fi
28255
28256    # Output is in $new_path
28257
28258  windows_path="$new_path"
28259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28260    unix_path=`$CYGPATH -u "$windows_path"`
28261    new_path="$unix_path"
28262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28264    new_path="$unix_path"
28265  fi
28266
28267    # remove trailing .exe if any
28268    new_path="${new_path/%.exe/}"
28269
28270    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28271    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28272  fi
28273
28274  else
28275    # We're on a posix platform. Hooray! :)
28276    # First separate the path from the arguments. This will split at the first
28277    # space.
28278    complete="$PROPER_COMPILER_CC"
28279    path="${complete%% *}"
28280    tmp="$complete EOL"
28281    arguments="${tmp#* }"
28282
28283    # Cannot rely on the command "which" here since it doesn't always work.
28284    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28285    if test -z "$is_absolute_path"; then
28286      # Path to executable is not absolute. Find it.
28287      IFS_save="$IFS"
28288      IFS=:
28289      for p in $PATH; do
28290        if test -f "$p/$path" && test -x "$p/$path"; then
28291          new_path="$p/$path"
28292          break
28293        fi
28294      done
28295      IFS="$IFS_save"
28296    else
28297      # This is an absolute path, we can use it without further modifications.
28298      new_path="$path"
28299    fi
28300
28301    if test "x$new_path" = x; then
28302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28303$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28304      has_space=`$ECHO "$complete" | $GREP " "`
28305      if test "x$has_space" != x; then
28306        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28307$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28308      fi
28309      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28310    fi
28311  fi
28312
28313  # Now join together the path and the arguments once again
28314  if test "x$arguments" != xEOL; then
28315    new_complete="$new_path ${arguments% *}"
28316  else
28317    new_complete="$new_path"
28318  fi
28319
28320  if test "x$complete" != "x$new_complete"; then
28321    PROPER_COMPILER_CC="$new_complete"
28322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28323$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28324  fi
28325
28326    PATH="$RETRY_COMPILER_SAVED_PATH"
28327
28328    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28329$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28330
28331  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28332    # Follow a chain of symbolic links. Use readlink
28333    # where it exists, else fall back to horribly
28334    # complicated shell code.
28335    if test "x$READLINK_TESTED" != yes; then
28336      # On MacOSX there is a readlink tool with a different
28337      # purpose than the GNU readlink tool. Check the found readlink.
28338      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28339      if test "x$ISGNU" = x; then
28340        # A readlink that we do not know how to use.
28341        # Are there other non-GNU readlinks out there?
28342        READLINK_TESTED=yes
28343        READLINK=
28344      fi
28345    fi
28346
28347    if test "x$READLINK" != x; then
28348      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28349    else
28350      # Save the current directory for restoring afterwards
28351      STARTDIR=$PWD
28352      COUNTER=0
28353      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28354      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28355      cd $sym_link_dir
28356      # Use -P flag to resolve symlinks in directories.
28357      cd `$THEPWDCMD -P`
28358      sym_link_dir=`$THEPWDCMD -P`
28359      # Resolve file symlinks
28360      while test $COUNTER -lt 20; do
28361        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28362        if test "x$ISLINK" == x; then
28363          # This is not a symbolic link! We are done!
28364          break
28365        fi
28366        # Again resolve directory symlinks since the target of the just found
28367        # link could be in a different directory
28368        cd `$DIRNAME $ISLINK`
28369        sym_link_dir=`$THEPWDCMD -P`
28370        sym_link_file=`$BASENAME $ISLINK`
28371        let COUNTER=COUNTER+1
28372      done
28373      cd $STARTDIR
28374      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28375    fi
28376  fi
28377
28378    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28379$as_echo "$PROPER_COMPILER_CC" >&6; }
28380    CC="$PROPER_COMPILER_CC"
28381  else
28382    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28383$as_echo "no, keeping CC" >&6; }
28384  fi
28385
28386
28387  COMPILER=$CC
28388  COMPILER_NAME=$COMPILER_NAME
28389
28390  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28391    # cc -V output typically looks like
28392    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28393    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28394    # Check that this is likely to be the Solaris Studio cc.
28395    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28396    if test $? -ne 0; then
28397      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28398      { $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
28399$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28400      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28401$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28402      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28403$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28404      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28405    fi
28406    # Remove usage instructions (if present), and
28407    # collapse compiler output into a single line
28408    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28409        $SED -e 's/ *[Uu]sage:.*//'`
28410    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28411        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28412  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28413    # xlc -qversion output typically looks like
28414    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28415    #     Version: 11.01.0000.0015
28416    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28417    # Check that this is likely to be the IBM XL C compiler.
28418    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28419    if test $? -ne 0; then
28420      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28421      { $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
28422$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28423      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28424$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28425      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28426$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28427      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28428    fi
28429    # Collapse compiler output into a single line
28430    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28431    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28432        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28433  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28434    # There is no specific version flag, but all output starts with a version string.
28435    # First line typically looks something like:
28436    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28437    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28438    # Check that this is likely to be Microsoft CL.EXE.
28439    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28440    if test $? -ne 0; then
28441      { $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
28442$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28443      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28444$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28445      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28446    fi
28447    # Collapse compiler output into a single line
28448    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28449    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28450        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28451  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28452    # gcc --version output typically looks like
28453    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28454    #     Copyright (C) 2013 Free Software Foundation, Inc.
28455    #     This is free software; see the source for copying conditions.  There is NO
28456    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28457    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28458    # Check that this is likely to be GCC.
28459    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28460    if test $? -ne 0; then
28461      { $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
28462$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28463      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28464$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28465      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28466    fi
28467    # Remove Copyright and legalese from version string, and
28468    # collapse into a single line
28469    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28470        $SED -e 's/ *Copyright .*//'`
28471    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28472        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28473  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28474    # clang --version output typically looks like
28475    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28476    #    clang version 3.3 (tags/RELEASE_33/final)
28477    # or
28478    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28479    #    Target: x86_64-pc-linux-gnu
28480    #    Thread model: posix
28481    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28482    # Check that this is likely to be clang
28483    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28484    if test $? -ne 0; then
28485      { $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
28486$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28487      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28488$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28489      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28490    fi
28491    # Collapse compiler output into a single line
28492    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28493    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28494        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28495  else
28496      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28497  fi
28498  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28499  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28500  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28501  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28502
28503  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28504$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28505
28506
28507  # Now that we have resolved CC ourself, let autoconf have its go at it
28508  ac_ext=c
28509ac_cpp='$CPP $CPPFLAGS'
28510ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28511ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28512ac_compiler_gnu=$ac_cv_c_compiler_gnu
28513if test -n "$ac_tool_prefix"; then
28514  for ac_prog in $CC
28515  do
28516    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28517set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28519$as_echo_n "checking for $ac_word... " >&6; }
28520if ${ac_cv_prog_CC+:} false; then :
28521  $as_echo_n "(cached) " >&6
28522else
28523  if test -n "$CC"; then
28524  ac_cv_prog_CC="$CC" # Let the user override the test.
28525else
28526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28527for as_dir in $PATH
28528do
28529  IFS=$as_save_IFS
28530  test -z "$as_dir" && as_dir=.
28531    for ac_exec_ext in '' $ac_executable_extensions; do
28532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28533    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28535    break 2
28536  fi
28537done
28538  done
28539IFS=$as_save_IFS
28540
28541fi
28542fi
28543CC=$ac_cv_prog_CC
28544if test -n "$CC"; then
28545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28546$as_echo "$CC" >&6; }
28547else
28548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28549$as_echo "no" >&6; }
28550fi
28551
28552
28553    test -n "$CC" && break
28554  done
28555fi
28556if test -z "$CC"; then
28557  ac_ct_CC=$CC
28558  for ac_prog in $CC
28559do
28560  # Extract the first word of "$ac_prog", so it can be a program name with args.
28561set dummy $ac_prog; ac_word=$2
28562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28563$as_echo_n "checking for $ac_word... " >&6; }
28564if ${ac_cv_prog_ac_ct_CC+:} false; then :
28565  $as_echo_n "(cached) " >&6
28566else
28567  if test -n "$ac_ct_CC"; then
28568  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28569else
28570as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28571for as_dir in $PATH
28572do
28573  IFS=$as_save_IFS
28574  test -z "$as_dir" && as_dir=.
28575    for ac_exec_ext in '' $ac_executable_extensions; do
28576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28577    ac_cv_prog_ac_ct_CC="$ac_prog"
28578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28579    break 2
28580  fi
28581done
28582  done
28583IFS=$as_save_IFS
28584
28585fi
28586fi
28587ac_ct_CC=$ac_cv_prog_ac_ct_CC
28588if test -n "$ac_ct_CC"; then
28589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28590$as_echo "$ac_ct_CC" >&6; }
28591else
28592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28593$as_echo "no" >&6; }
28594fi
28595
28596
28597  test -n "$ac_ct_CC" && break
28598done
28599
28600  if test "x$ac_ct_CC" = x; then
28601    CC=""
28602  else
28603    case $cross_compiling:$ac_tool_warned in
28604yes:)
28605{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28606$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28607ac_tool_warned=yes ;;
28608esac
28609    CC=$ac_ct_CC
28610  fi
28611fi
28612
28613
28614test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28615$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28616as_fn_error $? "no acceptable C compiler found in \$PATH
28617See \`config.log' for more details" "$LINENO" 5; }
28618
28619# Provide some information about the compiler.
28620$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28621set X $ac_compile
28622ac_compiler=$2
28623for ac_option in --version -v -V -qversion; do
28624  { { ac_try="$ac_compiler $ac_option >&5"
28625case "(($ac_try" in
28626  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28627  *) ac_try_echo=$ac_try;;
28628esac
28629eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28630$as_echo "$ac_try_echo"; } >&5
28631  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28632  ac_status=$?
28633  if test -s conftest.err; then
28634    sed '10a\
28635... rest of stderr output deleted ...
28636         10q' conftest.err >conftest.er1
28637    cat conftest.er1 >&5
28638  fi
28639  rm -f conftest.er1 conftest.err
28640  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28641  test $ac_status = 0; }
28642done
28643
28644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28645/* end confdefs.h.  */
28646
28647int
28648main ()
28649{
28650
28651  ;
28652  return 0;
28653}
28654_ACEOF
28655ac_clean_files_save=$ac_clean_files
28656ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28657# Try to create an executable without -o first, disregard a.out.
28658# It will help us diagnose broken compilers, and finding out an intuition
28659# of exeext.
28660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28661$as_echo_n "checking whether the C compiler works... " >&6; }
28662ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28663
28664# The possible output files:
28665ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28666
28667ac_rmfiles=
28668for ac_file in $ac_files
28669do
28670  case $ac_file in
28671    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28672    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28673  esac
28674done
28675rm -f $ac_rmfiles
28676
28677if { { ac_try="$ac_link_default"
28678case "(($ac_try" in
28679  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28680  *) ac_try_echo=$ac_try;;
28681esac
28682eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28683$as_echo "$ac_try_echo"; } >&5
28684  (eval "$ac_link_default") 2>&5
28685  ac_status=$?
28686  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28687  test $ac_status = 0; }; then :
28688  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28689# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28690# in a Makefile.  We should not override ac_cv_exeext if it was cached,
28691# so that the user can short-circuit this test for compilers unknown to
28692# Autoconf.
28693for ac_file in $ac_files ''
28694do
28695  test -f "$ac_file" || continue
28696  case $ac_file in
28697    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28698	;;
28699    [ab].out )
28700	# We found the default executable, but exeext='' is most
28701	# certainly right.
28702	break;;
28703    *.* )
28704	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28705	then :; else
28706	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28707	fi
28708	# We set ac_cv_exeext here because the later test for it is not
28709	# safe: cross compilers may not add the suffix if given an `-o'
28710	# argument, so we may need to know it at that point already.
28711	# Even if this section looks crufty: it has the advantage of
28712	# actually working.
28713	break;;
28714    * )
28715	break;;
28716  esac
28717done
28718test "$ac_cv_exeext" = no && ac_cv_exeext=
28719
28720else
28721  ac_file=''
28722fi
28723if test -z "$ac_file"; then :
28724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28725$as_echo "no" >&6; }
28726$as_echo "$as_me: failed program was:" >&5
28727sed 's/^/| /' conftest.$ac_ext >&5
28728
28729{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28730$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28731as_fn_error 77 "C compiler cannot create executables
28732See \`config.log' for more details" "$LINENO" 5; }
28733else
28734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28735$as_echo "yes" >&6; }
28736fi
28737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28738$as_echo_n "checking for C compiler default output file name... " >&6; }
28739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28740$as_echo "$ac_file" >&6; }
28741ac_exeext=$ac_cv_exeext
28742
28743rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28744ac_clean_files=$ac_clean_files_save
28745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28746$as_echo_n "checking for suffix of executables... " >&6; }
28747if { { ac_try="$ac_link"
28748case "(($ac_try" in
28749  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28750  *) ac_try_echo=$ac_try;;
28751esac
28752eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28753$as_echo "$ac_try_echo"; } >&5
28754  (eval "$ac_link") 2>&5
28755  ac_status=$?
28756  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28757  test $ac_status = 0; }; then :
28758  # If both `conftest.exe' and `conftest' are `present' (well, observable)
28759# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28760# work properly (i.e., refer to `conftest.exe'), while it won't with
28761# `rm'.
28762for ac_file in conftest.exe conftest conftest.*; do
28763  test -f "$ac_file" || continue
28764  case $ac_file in
28765    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28766    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28767	  break;;
28768    * ) break;;
28769  esac
28770done
28771else
28772  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28773$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28774as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28775See \`config.log' for more details" "$LINENO" 5; }
28776fi
28777rm -f conftest conftest$ac_cv_exeext
28778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
28779$as_echo "$ac_cv_exeext" >&6; }
28780
28781rm -f conftest.$ac_ext
28782EXEEXT=$ac_cv_exeext
28783ac_exeext=$EXEEXT
28784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28785/* end confdefs.h.  */
28786#include <stdio.h>
28787int
28788main ()
28789{
28790FILE *f = fopen ("conftest.out", "w");
28791 return ferror (f) || fclose (f) != 0;
28792
28793  ;
28794  return 0;
28795}
28796_ACEOF
28797ac_clean_files="$ac_clean_files conftest.out"
28798# Check that the compiler produces executables we can run.  If not, either
28799# the compiler is broken, or we cross compile.
28800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
28801$as_echo_n "checking whether we are cross compiling... " >&6; }
28802if test "$cross_compiling" != yes; then
28803  { { ac_try="$ac_link"
28804case "(($ac_try" in
28805  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28806  *) ac_try_echo=$ac_try;;
28807esac
28808eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28809$as_echo "$ac_try_echo"; } >&5
28810  (eval "$ac_link") 2>&5
28811  ac_status=$?
28812  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28813  test $ac_status = 0; }
28814  if { ac_try='./conftest$ac_cv_exeext'
28815  { { case "(($ac_try" in
28816  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28817  *) ac_try_echo=$ac_try;;
28818esac
28819eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28820$as_echo "$ac_try_echo"; } >&5
28821  (eval "$ac_try") 2>&5
28822  ac_status=$?
28823  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28824  test $ac_status = 0; }; }; then
28825    cross_compiling=no
28826  else
28827    if test "$cross_compiling" = maybe; then
28828	cross_compiling=yes
28829    else
28830	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28831$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28832as_fn_error $? "cannot run C compiled programs.
28833If you meant to cross compile, use \`--host'.
28834See \`config.log' for more details" "$LINENO" 5; }
28835    fi
28836  fi
28837fi
28838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
28839$as_echo "$cross_compiling" >&6; }
28840
28841rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
28842ac_clean_files=$ac_clean_files_save
28843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
28844$as_echo_n "checking for suffix of object files... " >&6; }
28845if ${ac_cv_objext+:} false; then :
28846  $as_echo_n "(cached) " >&6
28847else
28848  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28849/* end confdefs.h.  */
28850
28851int
28852main ()
28853{
28854
28855  ;
28856  return 0;
28857}
28858_ACEOF
28859rm -f conftest.o conftest.obj
28860if { { ac_try="$ac_compile"
28861case "(($ac_try" in
28862  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28863  *) ac_try_echo=$ac_try;;
28864esac
28865eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28866$as_echo "$ac_try_echo"; } >&5
28867  (eval "$ac_compile") 2>&5
28868  ac_status=$?
28869  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28870  test $ac_status = 0; }; then :
28871  for ac_file in conftest.o conftest.obj conftest.*; do
28872  test -f "$ac_file" || continue;
28873  case $ac_file in
28874    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
28875    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
28876       break;;
28877  esac
28878done
28879else
28880  $as_echo "$as_me: failed program was:" >&5
28881sed 's/^/| /' conftest.$ac_ext >&5
28882
28883{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28884$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28885as_fn_error $? "cannot compute suffix of object files: cannot compile
28886See \`config.log' for more details" "$LINENO" 5; }
28887fi
28888rm -f conftest.$ac_cv_objext conftest.$ac_ext
28889fi
28890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
28891$as_echo "$ac_cv_objext" >&6; }
28892OBJEXT=$ac_cv_objext
28893ac_objext=$OBJEXT
28894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
28895$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
28896if ${ac_cv_c_compiler_gnu+:} false; then :
28897  $as_echo_n "(cached) " >&6
28898else
28899  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28900/* end confdefs.h.  */
28901
28902int
28903main ()
28904{
28905#ifndef __GNUC__
28906       choke me
28907#endif
28908
28909  ;
28910  return 0;
28911}
28912_ACEOF
28913if ac_fn_c_try_compile "$LINENO"; then :
28914  ac_compiler_gnu=yes
28915else
28916  ac_compiler_gnu=no
28917fi
28918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28919ac_cv_c_compiler_gnu=$ac_compiler_gnu
28920
28921fi
28922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
28923$as_echo "$ac_cv_c_compiler_gnu" >&6; }
28924if test $ac_compiler_gnu = yes; then
28925  GCC=yes
28926else
28927  GCC=
28928fi
28929ac_test_CFLAGS=${CFLAGS+set}
28930ac_save_CFLAGS=$CFLAGS
28931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
28932$as_echo_n "checking whether $CC accepts -g... " >&6; }
28933if ${ac_cv_prog_cc_g+:} false; then :
28934  $as_echo_n "(cached) " >&6
28935else
28936  ac_save_c_werror_flag=$ac_c_werror_flag
28937   ac_c_werror_flag=yes
28938   ac_cv_prog_cc_g=no
28939   CFLAGS="-g"
28940   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28941/* end confdefs.h.  */
28942
28943int
28944main ()
28945{
28946
28947  ;
28948  return 0;
28949}
28950_ACEOF
28951if ac_fn_c_try_compile "$LINENO"; then :
28952  ac_cv_prog_cc_g=yes
28953else
28954  CFLAGS=""
28955      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28956/* end confdefs.h.  */
28957
28958int
28959main ()
28960{
28961
28962  ;
28963  return 0;
28964}
28965_ACEOF
28966if ac_fn_c_try_compile "$LINENO"; then :
28967
28968else
28969  ac_c_werror_flag=$ac_save_c_werror_flag
28970	 CFLAGS="-g"
28971	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28972/* end confdefs.h.  */
28973
28974int
28975main ()
28976{
28977
28978  ;
28979  return 0;
28980}
28981_ACEOF
28982if ac_fn_c_try_compile "$LINENO"; then :
28983  ac_cv_prog_cc_g=yes
28984fi
28985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28986fi
28987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28988fi
28989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28990   ac_c_werror_flag=$ac_save_c_werror_flag
28991fi
28992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
28993$as_echo "$ac_cv_prog_cc_g" >&6; }
28994if test "$ac_test_CFLAGS" = set; then
28995  CFLAGS=$ac_save_CFLAGS
28996elif test $ac_cv_prog_cc_g = yes; then
28997  if test "$GCC" = yes; then
28998    CFLAGS="-g -O2"
28999  else
29000    CFLAGS="-g"
29001  fi
29002else
29003  if test "$GCC" = yes; then
29004    CFLAGS="-O2"
29005  else
29006    CFLAGS=
29007  fi
29008fi
29009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29010$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29011if ${ac_cv_prog_cc_c89+:} false; then :
29012  $as_echo_n "(cached) " >&6
29013else
29014  ac_cv_prog_cc_c89=no
29015ac_save_CC=$CC
29016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29017/* end confdefs.h.  */
29018#include <stdarg.h>
29019#include <stdio.h>
29020struct stat;
29021/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29022struct buf { int x; };
29023FILE * (*rcsopen) (struct buf *, struct stat *, int);
29024static char *e (p, i)
29025     char **p;
29026     int i;
29027{
29028  return p[i];
29029}
29030static char *f (char * (*g) (char **, int), char **p, ...)
29031{
29032  char *s;
29033  va_list v;
29034  va_start (v,p);
29035  s = g (p, va_arg (v,int));
29036  va_end (v);
29037  return s;
29038}
29039
29040/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29041   function prototypes and stuff, but not '\xHH' hex character constants.
29042   These don't provoke an error unfortunately, instead are silently treated
29043   as 'x'.  The following induces an error, until -std is added to get
29044   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29045   array size at least.  It's necessary to write '\x00'==0 to get something
29046   that's true only with -std.  */
29047int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29048
29049/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29050   inside strings and character constants.  */
29051#define FOO(x) 'x'
29052int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29053
29054int test (int i, double x);
29055struct s1 {int (*f) (int a);};
29056struct s2 {int (*f) (double a);};
29057int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29058int argc;
29059char **argv;
29060int
29061main ()
29062{
29063return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29064  ;
29065  return 0;
29066}
29067_ACEOF
29068for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29069	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29070do
29071  CC="$ac_save_CC $ac_arg"
29072  if ac_fn_c_try_compile "$LINENO"; then :
29073  ac_cv_prog_cc_c89=$ac_arg
29074fi
29075rm -f core conftest.err conftest.$ac_objext
29076  test "x$ac_cv_prog_cc_c89" != "xno" && break
29077done
29078rm -f conftest.$ac_ext
29079CC=$ac_save_CC
29080
29081fi
29082# AC_CACHE_VAL
29083case "x$ac_cv_prog_cc_c89" in
29084  x)
29085    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29086$as_echo "none needed" >&6; } ;;
29087  xno)
29088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29089$as_echo "unsupported" >&6; } ;;
29090  *)
29091    CC="$CC $ac_cv_prog_cc_c89"
29092    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29093$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29094esac
29095if test "x$ac_cv_prog_cc_c89" != xno; then :
29096
29097fi
29098
29099ac_ext=cpp
29100ac_cpp='$CXXCPP $CPPFLAGS'
29101ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29102ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29103ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29104
29105
29106
29107  COMPILER_NAME=C++
29108  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29109
29110  if test "x$CXX" != x; then
29111    # User has supplied compiler name already, always let that override.
29112    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29113$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29114    if test "x`basename $CXX`" = "x$CXX"; then
29115      # A command without a complete path is provided, search $PATH.
29116
29117      for ac_prog in $CXX
29118do
29119  # Extract the first word of "$ac_prog", so it can be a program name with args.
29120set dummy $ac_prog; ac_word=$2
29121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29122$as_echo_n "checking for $ac_word... " >&6; }
29123if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29124  $as_echo_n "(cached) " >&6
29125else
29126  case $POTENTIAL_CXX in
29127  [\\/]* | ?:[\\/]*)
29128  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29129  ;;
29130  *)
29131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29132for as_dir in $PATH
29133do
29134  IFS=$as_save_IFS
29135  test -z "$as_dir" && as_dir=.
29136    for ac_exec_ext in '' $ac_executable_extensions; do
29137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29138    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29140    break 2
29141  fi
29142done
29143  done
29144IFS=$as_save_IFS
29145
29146  ;;
29147esac
29148fi
29149POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29150if test -n "$POTENTIAL_CXX"; then
29151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29152$as_echo "$POTENTIAL_CXX" >&6; }
29153else
29154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29155$as_echo "no" >&6; }
29156fi
29157
29158
29159  test -n "$POTENTIAL_CXX" && break
29160done
29161
29162      if test "x$POTENTIAL_CXX" != x; then
29163        CXX=$POTENTIAL_CXX
29164      else
29165        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29166      fi
29167    else
29168      # Otherwise it might already be a complete path
29169      if test ! -x "$CXX"; then
29170        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29171      fi
29172    fi
29173  else
29174    # No user supplied value. Locate compiler ourselves.
29175
29176    # If we are cross compiling, assume cross compilation tools follows the
29177    # cross compilation standard where they are prefixed with the autoconf
29178    # standard name for the target. For example the binary
29179    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29180    # If we are not cross compiling, then the default compiler name will be
29181    # used.
29182
29183    CXX=
29184    # If TOOLS_DIR is set, check for all compiler names in there first
29185    # before checking the rest of the PATH.
29186    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29187    # step, this should not be necessary.
29188    if test -n "$TOOLS_DIR"; then
29189      PATH_save="$PATH"
29190      PATH="$TOOLS_DIR"
29191      for ac_prog in $SEARCH_LIST
29192do
29193  # Extract the first word of "$ac_prog", so it can be a program name with args.
29194set dummy $ac_prog; ac_word=$2
29195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29196$as_echo_n "checking for $ac_word... " >&6; }
29197if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
29198  $as_echo_n "(cached) " >&6
29199else
29200  case $TOOLS_DIR_CXX in
29201  [\\/]* | ?:[\\/]*)
29202  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
29203  ;;
29204  *)
29205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29206for as_dir in $PATH
29207do
29208  IFS=$as_save_IFS
29209  test -z "$as_dir" && as_dir=.
29210    for ac_exec_ext in '' $ac_executable_extensions; do
29211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29212    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
29213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29214    break 2
29215  fi
29216done
29217  done
29218IFS=$as_save_IFS
29219
29220  ;;
29221esac
29222fi
29223TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
29224if test -n "$TOOLS_DIR_CXX"; then
29225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
29226$as_echo "$TOOLS_DIR_CXX" >&6; }
29227else
29228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29229$as_echo "no" >&6; }
29230fi
29231
29232
29233  test -n "$TOOLS_DIR_CXX" && break
29234done
29235
29236      CXX=$TOOLS_DIR_CXX
29237      PATH="$PATH_save"
29238    fi
29239
29240    # AC_PATH_PROGS can't be run multiple times with the same variable,
29241    # so create a new name for this run.
29242    if test "x$CXX" = x; then
29243      for ac_prog in $SEARCH_LIST
29244do
29245  # Extract the first word of "$ac_prog", so it can be a program name with args.
29246set dummy $ac_prog; ac_word=$2
29247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29248$as_echo_n "checking for $ac_word... " >&6; }
29249if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29250  $as_echo_n "(cached) " >&6
29251else
29252  case $POTENTIAL_CXX in
29253  [\\/]* | ?:[\\/]*)
29254  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29255  ;;
29256  *)
29257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29258for as_dir in $PATH
29259do
29260  IFS=$as_save_IFS
29261  test -z "$as_dir" && as_dir=.
29262    for ac_exec_ext in '' $ac_executable_extensions; do
29263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29264    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29266    break 2
29267  fi
29268done
29269  done
29270IFS=$as_save_IFS
29271
29272  ;;
29273esac
29274fi
29275POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29276if test -n "$POTENTIAL_CXX"; then
29277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29278$as_echo "$POTENTIAL_CXX" >&6; }
29279else
29280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29281$as_echo "no" >&6; }
29282fi
29283
29284
29285  test -n "$POTENTIAL_CXX" && break
29286done
29287
29288      CXX=$POTENTIAL_CXX
29289    fi
29290
29291    if test "x$CXX" = x; then
29292
29293  # Print a helpful message on how to acquire the necessary build dependency.
29294  # devkit is the help tag: freetype, cups, pulse, alsa etc
29295  MISSING_DEPENDENCY=devkit
29296
29297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29298    cygwin_help $MISSING_DEPENDENCY
29299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29300    msys_help $MISSING_DEPENDENCY
29301  else
29302    PKGHANDLER_COMMAND=
29303
29304    case $PKGHANDLER in
29305      apt-get)
29306        apt_help     $MISSING_DEPENDENCY ;;
29307      yum)
29308        yum_help     $MISSING_DEPENDENCY ;;
29309      port)
29310        port_help    $MISSING_DEPENDENCY ;;
29311      pkgutil)
29312        pkgutil_help $MISSING_DEPENDENCY ;;
29313      pkgadd)
29314        pkgadd_help  $MISSING_DEPENDENCY ;;
29315    esac
29316
29317    if test "x$PKGHANDLER_COMMAND" != x; then
29318      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29319    fi
29320  fi
29321
29322      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29323    fi
29324  fi
29325
29326  # Now we have a compiler binary in CXX. Make sure it's okay.
29327
29328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29329
29330  # First separate the path from the arguments. This will split at the first
29331  # space.
29332  complete="$CXX"
29333  path="${complete%% *}"
29334  tmp="$complete EOL"
29335  arguments="${tmp#* }"
29336
29337  # Input might be given as Windows format, start by converting to
29338  # unix format.
29339  new_path=`$CYGPATH -u "$path"`
29340
29341  # Now try to locate executable using which
29342  new_path=`$WHICH "$new_path" 2> /dev/null`
29343  # bat and cmd files are not always considered executable in cygwin causing which
29344  # to not find them
29345  if test "x$new_path" = x \
29346      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29347      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29348    new_path=`$CYGPATH -u "$path"`
29349  fi
29350  if test "x$new_path" = x; then
29351    # Oops. Which didn't find the executable.
29352    # The splitting of arguments from the executable at a space might have been incorrect,
29353    # since paths with space are more likely in Windows. Give it another try with the whole
29354    # argument.
29355    path="$complete"
29356    arguments="EOL"
29357    new_path=`$CYGPATH -u "$path"`
29358    new_path=`$WHICH "$new_path" 2> /dev/null`
29359    # bat and cmd files are not always considered executable in cygwin causing which
29360    # to not find them
29361    if test "x$new_path" = x \
29362        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29363        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29364      new_path=`$CYGPATH -u "$path"`
29365    fi
29366    if test "x$new_path" = x; then
29367      # It's still not found. Now this is an unrecoverable error.
29368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29369$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29370      has_space=`$ECHO "$complete" | $GREP " "`
29371      if test "x$has_space" != x; then
29372        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29373$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29374      fi
29375      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29376    fi
29377  fi
29378
29379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29382  # "foo.exe" is OK but "foo" is an error.
29383  #
29384  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29385  # It is also a way to make sure we got the proper file name for the real test later on.
29386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29387  if test "x$test_shortpath" = x; then
29388    # Short path failed, file does not exist as specified.
29389    # Try adding .exe or .cmd
29390    if test -f "${new_path}.exe"; then
29391      input_to_shortpath="${new_path}.exe"
29392    elif test -f "${new_path}.cmd"; then
29393      input_to_shortpath="${new_path}.cmd"
29394    else
29395      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29396$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29397      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29398$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29399      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29400    fi
29401  else
29402    input_to_shortpath="$new_path"
29403  fi
29404
29405  # Call helper function which possibly converts this using DOS-style short mode.
29406  # If so, the updated path is stored in $new_path.
29407  new_path="$input_to_shortpath"
29408
29409  input_path="$input_to_shortpath"
29410  # Check if we need to convert this using DOS-style short mode. If the path
29411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29412  # take no chances and rewrite it.
29413  # Note: m4 eats our [], so we need to use [ and ] instead.
29414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29415  if test "x$has_forbidden_chars" != x; then
29416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29420      # Going to short mode and back again did indeed matter. Since short mode is
29421      # case insensitive, let's make it lowercase to improve readability.
29422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29423      # Now convert it back to Unix-stile (cygpath)
29424      input_path=`$CYGPATH -u "$shortmode_path"`
29425      new_path="$input_path"
29426    fi
29427  fi
29428
29429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29430  if test "x$test_cygdrive_prefix" = x; then
29431    # As a simple fix, exclude /usr/bin since it's not a real path.
29432    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29434      # a path prefixed by /cygdrive for fixpath to work.
29435      new_path="$CYGWIN_ROOT_PATH$input_path"
29436    fi
29437  fi
29438
29439  # remove trailing .exe if any
29440  new_path="${new_path/%.exe/}"
29441
29442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29443
29444  # First separate the path from the arguments. This will split at the first
29445  # space.
29446  complete="$CXX"
29447  path="${complete%% *}"
29448  tmp="$complete EOL"
29449  arguments="${tmp#* }"
29450
29451  # Input might be given as Windows format, start by converting to
29452  # unix format.
29453  new_path="$path"
29454
29455  windows_path="$new_path"
29456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29457    unix_path=`$CYGPATH -u "$windows_path"`
29458    new_path="$unix_path"
29459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29461    new_path="$unix_path"
29462  fi
29463
29464
29465  # Now try to locate executable using which
29466  new_path=`$WHICH "$new_path" 2> /dev/null`
29467
29468  if test "x$new_path" = x; then
29469    # Oops. Which didn't find the executable.
29470    # The splitting of arguments from the executable at a space might have been incorrect,
29471    # since paths with space are more likely in Windows. Give it another try with the whole
29472    # argument.
29473    path="$complete"
29474    arguments="EOL"
29475    new_path="$path"
29476
29477  windows_path="$new_path"
29478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29479    unix_path=`$CYGPATH -u "$windows_path"`
29480    new_path="$unix_path"
29481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29483    new_path="$unix_path"
29484  fi
29485
29486
29487    new_path=`$WHICH "$new_path" 2> /dev/null`
29488
29489    if test "x$new_path" = x; then
29490      # It's still not found. Now this is an unrecoverable error.
29491      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29492$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29493      has_space=`$ECHO "$complete" | $GREP " "`
29494      if test "x$has_space" != x; then
29495        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29496$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29497      fi
29498      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29499    fi
29500  fi
29501
29502  # Now new_path has a complete unix path to the binary
29503  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29504    # Keep paths in /bin as-is, but remove trailing .exe if any
29505    new_path="${new_path/%.exe/}"
29506    # Do not save /bin paths to all_fixpath_prefixes!
29507  else
29508    # Not in mixed or Windows style, start by that.
29509    new_path=`cmd //c echo $new_path`
29510
29511  input_path="$new_path"
29512  # Check if we need to convert this using DOS-style short mode. If the path
29513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29514  # take no chances and rewrite it.
29515  # Note: m4 eats our [], so we need to use [ and ] instead.
29516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29517  if test "x$has_forbidden_chars" != x; then
29518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29519    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29520  fi
29521
29522    # Output is in $new_path
29523
29524  windows_path="$new_path"
29525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29526    unix_path=`$CYGPATH -u "$windows_path"`
29527    new_path="$unix_path"
29528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29530    new_path="$unix_path"
29531  fi
29532
29533    # remove trailing .exe if any
29534    new_path="${new_path/%.exe/}"
29535
29536    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29537    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29538  fi
29539
29540  else
29541    # We're on a posix platform. Hooray! :)
29542    # First separate the path from the arguments. This will split at the first
29543    # space.
29544    complete="$CXX"
29545    path="${complete%% *}"
29546    tmp="$complete EOL"
29547    arguments="${tmp#* }"
29548
29549    # Cannot rely on the command "which" here since it doesn't always work.
29550    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29551    if test -z "$is_absolute_path"; then
29552      # Path to executable is not absolute. Find it.
29553      IFS_save="$IFS"
29554      IFS=:
29555      for p in $PATH; do
29556        if test -f "$p/$path" && test -x "$p/$path"; then
29557          new_path="$p/$path"
29558          break
29559        fi
29560      done
29561      IFS="$IFS_save"
29562    else
29563      # This is an absolute path, we can use it without further modifications.
29564      new_path="$path"
29565    fi
29566
29567    if test "x$new_path" = x; then
29568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29569$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29570      has_space=`$ECHO "$complete" | $GREP " "`
29571      if test "x$has_space" != x; then
29572        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29573$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29574      fi
29575      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29576    fi
29577  fi
29578
29579  # Now join together the path and the arguments once again
29580  if test "x$arguments" != xEOL; then
29581    new_complete="$new_path ${arguments% *}"
29582  else
29583    new_complete="$new_path"
29584  fi
29585
29586  if test "x$complete" != "x$new_complete"; then
29587    CXX="$new_complete"
29588    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29589$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29590  fi
29591
29592  TEST_COMPILER="$CXX"
29593  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29594  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29595  if test "x$OPENJDK_BUILD_OS" != xaix; then
29596    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29597    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29598$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29599
29600  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29601    # Follow a chain of symbolic links. Use readlink
29602    # where it exists, else fall back to horribly
29603    # complicated shell code.
29604    if test "x$READLINK_TESTED" != yes; then
29605      # On MacOSX there is a readlink tool with a different
29606      # purpose than the GNU readlink tool. Check the found readlink.
29607      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29608      if test "x$ISGNU" = x; then
29609        # A readlink that we do not know how to use.
29610        # Are there other non-GNU readlinks out there?
29611        READLINK_TESTED=yes
29612        READLINK=
29613      fi
29614    fi
29615
29616    if test "x$READLINK" != x; then
29617      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29618    else
29619      # Save the current directory for restoring afterwards
29620      STARTDIR=$PWD
29621      COUNTER=0
29622      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29623      sym_link_file=`$BASENAME $TEST_COMPILER`
29624      cd $sym_link_dir
29625      # Use -P flag to resolve symlinks in directories.
29626      cd `$THEPWDCMD -P`
29627      sym_link_dir=`$THEPWDCMD -P`
29628      # Resolve file symlinks
29629      while test $COUNTER -lt 20; do
29630        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29631        if test "x$ISLINK" == x; then
29632          # This is not a symbolic link! We are done!
29633          break
29634        fi
29635        # Again resolve directory symlinks since the target of the just found
29636        # link could be in a different directory
29637        cd `$DIRNAME $ISLINK`
29638        sym_link_dir=`$THEPWDCMD -P`
29639        sym_link_file=`$BASENAME $ISLINK`
29640        let COUNTER=COUNTER+1
29641      done
29642      cd $STARTDIR
29643      TEST_COMPILER=$sym_link_dir/$sym_link_file
29644    fi
29645  fi
29646
29647    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29648$as_echo "$TEST_COMPILER" >&6; }
29649  fi
29650  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29651$as_echo_n "checking if CXX is disguised ccache... " >&6; }
29652
29653  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29654  if test "x$COMPILER_BASENAME" = "xccache"; then
29655    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29656$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29657    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29658    # We want to control ccache invocation ourselves, so ignore this cc and try
29659    # searching again.
29660
29661    # Remove the path to the fake ccache cc from the PATH
29662    RETRY_COMPILER_SAVED_PATH="$PATH"
29663    COMPILER_DIRNAME=`$DIRNAME $CXX`
29664    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29665
29666    # Try again looking for our compiler
29667    if test -n "$ac_tool_prefix"; then
29668  for ac_prog in $TOOLCHAIN_CXX_BINARY
29669  do
29670    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29671set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29673$as_echo_n "checking for $ac_word... " >&6; }
29674if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29675  $as_echo_n "(cached) " >&6
29676else
29677  if test -n "$PROPER_COMPILER_CXX"; then
29678  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29679else
29680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29681for as_dir in $PATH
29682do
29683  IFS=$as_save_IFS
29684  test -z "$as_dir" && as_dir=.
29685    for ac_exec_ext in '' $ac_executable_extensions; do
29686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29687    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29689    break 2
29690  fi
29691done
29692  done
29693IFS=$as_save_IFS
29694
29695fi
29696fi
29697PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29698if test -n "$PROPER_COMPILER_CXX"; then
29699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29700$as_echo "$PROPER_COMPILER_CXX" >&6; }
29701else
29702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29703$as_echo "no" >&6; }
29704fi
29705
29706
29707    test -n "$PROPER_COMPILER_CXX" && break
29708  done
29709fi
29710if test -z "$PROPER_COMPILER_CXX"; then
29711  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29712  for ac_prog in $TOOLCHAIN_CXX_BINARY
29713do
29714  # Extract the first word of "$ac_prog", so it can be a program name with args.
29715set dummy $ac_prog; ac_word=$2
29716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29717$as_echo_n "checking for $ac_word... " >&6; }
29718if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29719  $as_echo_n "(cached) " >&6
29720else
29721  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29722  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29723else
29724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29725for as_dir in $PATH
29726do
29727  IFS=$as_save_IFS
29728  test -z "$as_dir" && as_dir=.
29729    for ac_exec_ext in '' $ac_executable_extensions; do
29730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29731    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29733    break 2
29734  fi
29735done
29736  done
29737IFS=$as_save_IFS
29738
29739fi
29740fi
29741ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29742if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29744$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29745else
29746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29747$as_echo "no" >&6; }
29748fi
29749
29750
29751  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29752done
29753
29754  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29755    PROPER_COMPILER_CXX=""
29756  else
29757    case $cross_compiling:$ac_tool_warned in
29758yes:)
29759{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29760$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29761ac_tool_warned=yes ;;
29762esac
29763    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
29764  fi
29765fi
29766
29767
29768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29769
29770  # First separate the path from the arguments. This will split at the first
29771  # space.
29772  complete="$PROPER_COMPILER_CXX"
29773  path="${complete%% *}"
29774  tmp="$complete EOL"
29775  arguments="${tmp#* }"
29776
29777  # Input might be given as Windows format, start by converting to
29778  # unix format.
29779  new_path=`$CYGPATH -u "$path"`
29780
29781  # Now try to locate executable using which
29782  new_path=`$WHICH "$new_path" 2> /dev/null`
29783  # bat and cmd files are not always considered executable in cygwin causing which
29784  # to not find them
29785  if test "x$new_path" = x \
29786      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29787      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29788    new_path=`$CYGPATH -u "$path"`
29789  fi
29790  if test "x$new_path" = x; then
29791    # Oops. Which didn't find the executable.
29792    # The splitting of arguments from the executable at a space might have been incorrect,
29793    # since paths with space are more likely in Windows. Give it another try with the whole
29794    # argument.
29795    path="$complete"
29796    arguments="EOL"
29797    new_path=`$CYGPATH -u "$path"`
29798    new_path=`$WHICH "$new_path" 2> /dev/null`
29799    # bat and cmd files are not always considered executable in cygwin causing which
29800    # to not find them
29801    if test "x$new_path" = x \
29802        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29803        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29804      new_path=`$CYGPATH -u "$path"`
29805    fi
29806    if test "x$new_path" = x; then
29807      # It's still not found. Now this is an unrecoverable error.
29808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29809$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29810      has_space=`$ECHO "$complete" | $GREP " "`
29811      if test "x$has_space" != x; then
29812        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29813$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29814      fi
29815      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29816    fi
29817  fi
29818
29819  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29820  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29821  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29822  # "foo.exe" is OK but "foo" is an error.
29823  #
29824  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29825  # It is also a way to make sure we got the proper file name for the real test later on.
29826  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29827  if test "x$test_shortpath" = x; then
29828    # Short path failed, file does not exist as specified.
29829    # Try adding .exe or .cmd
29830    if test -f "${new_path}.exe"; then
29831      input_to_shortpath="${new_path}.exe"
29832    elif test -f "${new_path}.cmd"; then
29833      input_to_shortpath="${new_path}.cmd"
29834    else
29835      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
29836$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
29837      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29838$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29839      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29840    fi
29841  else
29842    input_to_shortpath="$new_path"
29843  fi
29844
29845  # Call helper function which possibly converts this using DOS-style short mode.
29846  # If so, the updated path is stored in $new_path.
29847  new_path="$input_to_shortpath"
29848
29849  input_path="$input_to_shortpath"
29850  # Check if we need to convert this using DOS-style short mode. If the path
29851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29852  # take no chances and rewrite it.
29853  # Note: m4 eats our [], so we need to use [ and ] instead.
29854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29855  if test "x$has_forbidden_chars" != x; then
29856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29857    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29858    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29859    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29860      # Going to short mode and back again did indeed matter. Since short mode is
29861      # case insensitive, let's make it lowercase to improve readability.
29862      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29863      # Now convert it back to Unix-stile (cygpath)
29864      input_path=`$CYGPATH -u "$shortmode_path"`
29865      new_path="$input_path"
29866    fi
29867  fi
29868
29869  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29870  if test "x$test_cygdrive_prefix" = x; then
29871    # As a simple fix, exclude /usr/bin since it's not a real path.
29872    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29873      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29874      # a path prefixed by /cygdrive for fixpath to work.
29875      new_path="$CYGWIN_ROOT_PATH$input_path"
29876    fi
29877  fi
29878
29879  # remove trailing .exe if any
29880  new_path="${new_path/%.exe/}"
29881
29882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29883
29884  # First separate the path from the arguments. This will split at the first
29885  # space.
29886  complete="$PROPER_COMPILER_CXX"
29887  path="${complete%% *}"
29888  tmp="$complete EOL"
29889  arguments="${tmp#* }"
29890
29891  # Input might be given as Windows format, start by converting to
29892  # unix format.
29893  new_path="$path"
29894
29895  windows_path="$new_path"
29896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29897    unix_path=`$CYGPATH -u "$windows_path"`
29898    new_path="$unix_path"
29899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29901    new_path="$unix_path"
29902  fi
29903
29904
29905  # Now try to locate executable using which
29906  new_path=`$WHICH "$new_path" 2> /dev/null`
29907
29908  if test "x$new_path" = x; then
29909    # Oops. Which didn't find the executable.
29910    # The splitting of arguments from the executable at a space might have been incorrect,
29911    # since paths with space are more likely in Windows. Give it another try with the whole
29912    # argument.
29913    path="$complete"
29914    arguments="EOL"
29915    new_path="$path"
29916
29917  windows_path="$new_path"
29918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29919    unix_path=`$CYGPATH -u "$windows_path"`
29920    new_path="$unix_path"
29921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29923    new_path="$unix_path"
29924  fi
29925
29926
29927    new_path=`$WHICH "$new_path" 2> /dev/null`
29928
29929    if test "x$new_path" = x; then
29930      # It's still not found. Now this is an unrecoverable error.
29931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29932$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29933      has_space=`$ECHO "$complete" | $GREP " "`
29934      if test "x$has_space" != x; then
29935        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29936$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29937      fi
29938      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29939    fi
29940  fi
29941
29942  # Now new_path has a complete unix path to the binary
29943  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29944    # Keep paths in /bin as-is, but remove trailing .exe if any
29945    new_path="${new_path/%.exe/}"
29946    # Do not save /bin paths to all_fixpath_prefixes!
29947  else
29948    # Not in mixed or Windows style, start by that.
29949    new_path=`cmd //c echo $new_path`
29950
29951  input_path="$new_path"
29952  # Check if we need to convert this using DOS-style short mode. If the path
29953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29954  # take no chances and rewrite it.
29955  # Note: m4 eats our [], so we need to use [ and ] instead.
29956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29957  if test "x$has_forbidden_chars" != x; then
29958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29959    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29960  fi
29961
29962    # Output is in $new_path
29963
29964  windows_path="$new_path"
29965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29966    unix_path=`$CYGPATH -u "$windows_path"`
29967    new_path="$unix_path"
29968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29970    new_path="$unix_path"
29971  fi
29972
29973    # remove trailing .exe if any
29974    new_path="${new_path/%.exe/}"
29975
29976    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29977    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29978  fi
29979
29980  else
29981    # We're on a posix platform. Hooray! :)
29982    # First separate the path from the arguments. This will split at the first
29983    # space.
29984    complete="$PROPER_COMPILER_CXX"
29985    path="${complete%% *}"
29986    tmp="$complete EOL"
29987    arguments="${tmp#* }"
29988
29989    # Cannot rely on the command "which" here since it doesn't always work.
29990    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29991    if test -z "$is_absolute_path"; then
29992      # Path to executable is not absolute. Find it.
29993      IFS_save="$IFS"
29994      IFS=:
29995      for p in $PATH; do
29996        if test -f "$p/$path" && test -x "$p/$path"; then
29997          new_path="$p/$path"
29998          break
29999        fi
30000      done
30001      IFS="$IFS_save"
30002    else
30003      # This is an absolute path, we can use it without further modifications.
30004      new_path="$path"
30005    fi
30006
30007    if test "x$new_path" = x; then
30008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30009$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30010      has_space=`$ECHO "$complete" | $GREP " "`
30011      if test "x$has_space" != x; then
30012        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30013$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30014      fi
30015      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30016    fi
30017  fi
30018
30019  # Now join together the path and the arguments once again
30020  if test "x$arguments" != xEOL; then
30021    new_complete="$new_path ${arguments% *}"
30022  else
30023    new_complete="$new_path"
30024  fi
30025
30026  if test "x$complete" != "x$new_complete"; then
30027    PROPER_COMPILER_CXX="$new_complete"
30028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30029$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30030  fi
30031
30032    PATH="$RETRY_COMPILER_SAVED_PATH"
30033
30034    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30035$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30036
30037  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30038    # Follow a chain of symbolic links. Use readlink
30039    # where it exists, else fall back to horribly
30040    # complicated shell code.
30041    if test "x$READLINK_TESTED" != yes; then
30042      # On MacOSX there is a readlink tool with a different
30043      # purpose than the GNU readlink tool. Check the found readlink.
30044      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30045      if test "x$ISGNU" = x; then
30046        # A readlink that we do not know how to use.
30047        # Are there other non-GNU readlinks out there?
30048        READLINK_TESTED=yes
30049        READLINK=
30050      fi
30051    fi
30052
30053    if test "x$READLINK" != x; then
30054      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30055    else
30056      # Save the current directory for restoring afterwards
30057      STARTDIR=$PWD
30058      COUNTER=0
30059      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30060      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30061      cd $sym_link_dir
30062      # Use -P flag to resolve symlinks in directories.
30063      cd `$THEPWDCMD -P`
30064      sym_link_dir=`$THEPWDCMD -P`
30065      # Resolve file symlinks
30066      while test $COUNTER -lt 20; do
30067        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30068        if test "x$ISLINK" == x; then
30069          # This is not a symbolic link! We are done!
30070          break
30071        fi
30072        # Again resolve directory symlinks since the target of the just found
30073        # link could be in a different directory
30074        cd `$DIRNAME $ISLINK`
30075        sym_link_dir=`$THEPWDCMD -P`
30076        sym_link_file=`$BASENAME $ISLINK`
30077        let COUNTER=COUNTER+1
30078      done
30079      cd $STARTDIR
30080      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30081    fi
30082  fi
30083
30084    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30085$as_echo "$PROPER_COMPILER_CXX" >&6; }
30086    CXX="$PROPER_COMPILER_CXX"
30087  else
30088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30089$as_echo "no, keeping CXX" >&6; }
30090  fi
30091
30092
30093  COMPILER=$CXX
30094  COMPILER_NAME=$COMPILER_NAME
30095
30096  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30097    # cc -V output typically looks like
30098    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30099    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30100    # Check that this is likely to be the Solaris Studio cc.
30101    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30102    if test $? -ne 0; then
30103      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30104      { $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
30105$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30106      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30107$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30108      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30109$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30110      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30111    fi
30112    # Remove usage instructions (if present), and
30113    # collapse compiler output into a single line
30114    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30115        $SED -e 's/ *[Uu]sage:.*//'`
30116    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30117        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30118  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30119    # xlc -qversion output typically looks like
30120    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30121    #     Version: 11.01.0000.0015
30122    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30123    # Check that this is likely to be the IBM XL C compiler.
30124    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30125    if test $? -ne 0; then
30126      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30127      { $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
30128$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30129      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30130$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30131      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30132$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30133      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30134    fi
30135    # Collapse compiler output into a single line
30136    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30137    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30138        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30139  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30140    # There is no specific version flag, but all output starts with a version string.
30141    # First line typically looks something like:
30142    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30143    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30144    # Check that this is likely to be Microsoft CL.EXE.
30145    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30146    if test $? -ne 0; then
30147      { $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
30148$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30149      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30150$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30151      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30152    fi
30153    # Collapse compiler output into a single line
30154    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30155    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30156        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30157  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30158    # gcc --version output typically looks like
30159    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30160    #     Copyright (C) 2013 Free Software Foundation, Inc.
30161    #     This is free software; see the source for copying conditions.  There is NO
30162    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30163    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30164    # Check that this is likely to be GCC.
30165    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30166    if test $? -ne 0; then
30167      { $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
30168$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30169      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30170$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30171      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30172    fi
30173    # Remove Copyright and legalese from version string, and
30174    # collapse into a single line
30175    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30176        $SED -e 's/ *Copyright .*//'`
30177    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30178        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30179  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30180    # clang --version output typically looks like
30181    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30182    #    clang version 3.3 (tags/RELEASE_33/final)
30183    # or
30184    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30185    #    Target: x86_64-pc-linux-gnu
30186    #    Thread model: posix
30187    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30188    # Check that this is likely to be clang
30189    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30190    if test $? -ne 0; then
30191      { $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
30192$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30193      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30194$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30195      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30196    fi
30197    # Collapse compiler output into a single line
30198    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30199    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30200        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30201  else
30202      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30203  fi
30204  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30205  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30206  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30207  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30208
30209  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30210$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30211
30212
30213  # Now that we have resolved CXX ourself, let autoconf have its go at it
30214  ac_ext=cpp
30215ac_cpp='$CXXCPP $CPPFLAGS'
30216ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30217ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30218ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30219if test -z "$CXX"; then
30220  if test -n "$CCC"; then
30221    CXX=$CCC
30222  else
30223    if test -n "$ac_tool_prefix"; then
30224  for ac_prog in $CXX
30225  do
30226    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30227set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30229$as_echo_n "checking for $ac_word... " >&6; }
30230if ${ac_cv_prog_CXX+:} false; then :
30231  $as_echo_n "(cached) " >&6
30232else
30233  if test -n "$CXX"; then
30234  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30235else
30236as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30237for as_dir in $PATH
30238do
30239  IFS=$as_save_IFS
30240  test -z "$as_dir" && as_dir=.
30241    for ac_exec_ext in '' $ac_executable_extensions; do
30242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30243    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30245    break 2
30246  fi
30247done
30248  done
30249IFS=$as_save_IFS
30250
30251fi
30252fi
30253CXX=$ac_cv_prog_CXX
30254if test -n "$CXX"; then
30255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30256$as_echo "$CXX" >&6; }
30257else
30258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30259$as_echo "no" >&6; }
30260fi
30261
30262
30263    test -n "$CXX" && break
30264  done
30265fi
30266if test -z "$CXX"; then
30267  ac_ct_CXX=$CXX
30268  for ac_prog in $CXX
30269do
30270  # Extract the first word of "$ac_prog", so it can be a program name with args.
30271set dummy $ac_prog; ac_word=$2
30272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30273$as_echo_n "checking for $ac_word... " >&6; }
30274if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30275  $as_echo_n "(cached) " >&6
30276else
30277  if test -n "$ac_ct_CXX"; then
30278  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30279else
30280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30281for as_dir in $PATH
30282do
30283  IFS=$as_save_IFS
30284  test -z "$as_dir" && as_dir=.
30285    for ac_exec_ext in '' $ac_executable_extensions; do
30286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30287    ac_cv_prog_ac_ct_CXX="$ac_prog"
30288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30289    break 2
30290  fi
30291done
30292  done
30293IFS=$as_save_IFS
30294
30295fi
30296fi
30297ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30298if test -n "$ac_ct_CXX"; then
30299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30300$as_echo "$ac_ct_CXX" >&6; }
30301else
30302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30303$as_echo "no" >&6; }
30304fi
30305
30306
30307  test -n "$ac_ct_CXX" && break
30308done
30309
30310  if test "x$ac_ct_CXX" = x; then
30311    CXX="g++"
30312  else
30313    case $cross_compiling:$ac_tool_warned in
30314yes:)
30315{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30316$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30317ac_tool_warned=yes ;;
30318esac
30319    CXX=$ac_ct_CXX
30320  fi
30321fi
30322
30323  fi
30324fi
30325# Provide some information about the compiler.
30326$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30327set X $ac_compile
30328ac_compiler=$2
30329for ac_option in --version -v -V -qversion; do
30330  { { ac_try="$ac_compiler $ac_option >&5"
30331case "(($ac_try" in
30332  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30333  *) ac_try_echo=$ac_try;;
30334esac
30335eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30336$as_echo "$ac_try_echo"; } >&5
30337  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30338  ac_status=$?
30339  if test -s conftest.err; then
30340    sed '10a\
30341... rest of stderr output deleted ...
30342         10q' conftest.err >conftest.er1
30343    cat conftest.er1 >&5
30344  fi
30345  rm -f conftest.er1 conftest.err
30346  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30347  test $ac_status = 0; }
30348done
30349
30350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30351$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30352if ${ac_cv_cxx_compiler_gnu+:} false; then :
30353  $as_echo_n "(cached) " >&6
30354else
30355  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30356/* end confdefs.h.  */
30357
30358int
30359main ()
30360{
30361#ifndef __GNUC__
30362       choke me
30363#endif
30364
30365  ;
30366  return 0;
30367}
30368_ACEOF
30369if ac_fn_cxx_try_compile "$LINENO"; then :
30370  ac_compiler_gnu=yes
30371else
30372  ac_compiler_gnu=no
30373fi
30374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30375ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30376
30377fi
30378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30379$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30380if test $ac_compiler_gnu = yes; then
30381  GXX=yes
30382else
30383  GXX=
30384fi
30385ac_test_CXXFLAGS=${CXXFLAGS+set}
30386ac_save_CXXFLAGS=$CXXFLAGS
30387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30388$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30389if ${ac_cv_prog_cxx_g+:} false; then :
30390  $as_echo_n "(cached) " >&6
30391else
30392  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30393   ac_cxx_werror_flag=yes
30394   ac_cv_prog_cxx_g=no
30395   CXXFLAGS="-g"
30396   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30397/* end confdefs.h.  */
30398
30399int
30400main ()
30401{
30402
30403  ;
30404  return 0;
30405}
30406_ACEOF
30407if ac_fn_cxx_try_compile "$LINENO"; then :
30408  ac_cv_prog_cxx_g=yes
30409else
30410  CXXFLAGS=""
30411      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30412/* end confdefs.h.  */
30413
30414int
30415main ()
30416{
30417
30418  ;
30419  return 0;
30420}
30421_ACEOF
30422if ac_fn_cxx_try_compile "$LINENO"; then :
30423
30424else
30425  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30426	 CXXFLAGS="-g"
30427	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30428/* end confdefs.h.  */
30429
30430int
30431main ()
30432{
30433
30434  ;
30435  return 0;
30436}
30437_ACEOF
30438if ac_fn_cxx_try_compile "$LINENO"; then :
30439  ac_cv_prog_cxx_g=yes
30440fi
30441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30442fi
30443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30444fi
30445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30446   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30447fi
30448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30449$as_echo "$ac_cv_prog_cxx_g" >&6; }
30450if test "$ac_test_CXXFLAGS" = set; then
30451  CXXFLAGS=$ac_save_CXXFLAGS
30452elif test $ac_cv_prog_cxx_g = yes; then
30453  if test "$GXX" = yes; then
30454    CXXFLAGS="-g -O2"
30455  else
30456    CXXFLAGS="-g"
30457  fi
30458else
30459  if test "$GXX" = yes; then
30460    CXXFLAGS="-O2"
30461  else
30462    CXXFLAGS=
30463  fi
30464fi
30465ac_ext=cpp
30466ac_cpp='$CXXCPP $CPPFLAGS'
30467ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30468ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30469ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30470
30471
30472  #
30473  # Setup the preprocessor (CPP and CXXCPP)
30474  #
30475  ac_ext=c
30476ac_cpp='$CPP $CPPFLAGS'
30477ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30478ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30479ac_compiler_gnu=$ac_cv_c_compiler_gnu
30480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30481$as_echo_n "checking how to run the C preprocessor... " >&6; }
30482# On Suns, sometimes $CPP names a directory.
30483if test -n "$CPP" && test -d "$CPP"; then
30484  CPP=
30485fi
30486if test -z "$CPP"; then
30487  if ${ac_cv_prog_CPP+:} false; then :
30488  $as_echo_n "(cached) " >&6
30489else
30490      # Double quotes because CPP needs to be expanded
30491    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30492    do
30493      ac_preproc_ok=false
30494for ac_c_preproc_warn_flag in '' yes
30495do
30496  # Use a header file that comes with gcc, so configuring glibc
30497  # with a fresh cross-compiler works.
30498  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30499  # <limits.h> exists even on freestanding compilers.
30500  # On the NeXT, cc -E runs the code through the compiler's parser,
30501  # not just through cpp. "Syntax error" is here to catch this case.
30502  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30503/* end confdefs.h.  */
30504#ifdef __STDC__
30505# include <limits.h>
30506#else
30507# include <assert.h>
30508#endif
30509		     Syntax error
30510_ACEOF
30511if ac_fn_c_try_cpp "$LINENO"; then :
30512
30513else
30514  # Broken: fails on valid input.
30515continue
30516fi
30517rm -f conftest.err conftest.i conftest.$ac_ext
30518
30519  # OK, works on sane cases.  Now check whether nonexistent headers
30520  # can be detected and how.
30521  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30522/* end confdefs.h.  */
30523#include <ac_nonexistent.h>
30524_ACEOF
30525if ac_fn_c_try_cpp "$LINENO"; then :
30526  # Broken: success on invalid input.
30527continue
30528else
30529  # Passes both tests.
30530ac_preproc_ok=:
30531break
30532fi
30533rm -f conftest.err conftest.i conftest.$ac_ext
30534
30535done
30536# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30537rm -f conftest.i conftest.err conftest.$ac_ext
30538if $ac_preproc_ok; then :
30539  break
30540fi
30541
30542    done
30543    ac_cv_prog_CPP=$CPP
30544
30545fi
30546  CPP=$ac_cv_prog_CPP
30547else
30548  ac_cv_prog_CPP=$CPP
30549fi
30550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30551$as_echo "$CPP" >&6; }
30552ac_preproc_ok=false
30553for ac_c_preproc_warn_flag in '' yes
30554do
30555  # Use a header file that comes with gcc, so configuring glibc
30556  # with a fresh cross-compiler works.
30557  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30558  # <limits.h> exists even on freestanding compilers.
30559  # On the NeXT, cc -E runs the code through the compiler's parser,
30560  # not just through cpp. "Syntax error" is here to catch this case.
30561  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30562/* end confdefs.h.  */
30563#ifdef __STDC__
30564# include <limits.h>
30565#else
30566# include <assert.h>
30567#endif
30568		     Syntax error
30569_ACEOF
30570if ac_fn_c_try_cpp "$LINENO"; then :
30571
30572else
30573  # Broken: fails on valid input.
30574continue
30575fi
30576rm -f conftest.err conftest.i conftest.$ac_ext
30577
30578  # OK, works on sane cases.  Now check whether nonexistent headers
30579  # can be detected and how.
30580  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30581/* end confdefs.h.  */
30582#include <ac_nonexistent.h>
30583_ACEOF
30584if ac_fn_c_try_cpp "$LINENO"; then :
30585  # Broken: success on invalid input.
30586continue
30587else
30588  # Passes both tests.
30589ac_preproc_ok=:
30590break
30591fi
30592rm -f conftest.err conftest.i conftest.$ac_ext
30593
30594done
30595# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30596rm -f conftest.i conftest.err conftest.$ac_ext
30597if $ac_preproc_ok; then :
30598
30599else
30600  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30602as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30603See \`config.log' for more details" "$LINENO" 5; }
30604fi
30605
30606ac_ext=cpp
30607ac_cpp='$CXXCPP $CPPFLAGS'
30608ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30609ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30610ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30611
30612
30613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30614
30615  # First separate the path from the arguments. This will split at the first
30616  # space.
30617  complete="$CPP"
30618  path="${complete%% *}"
30619  tmp="$complete EOL"
30620  arguments="${tmp#* }"
30621
30622  # Input might be given as Windows format, start by converting to
30623  # unix format.
30624  new_path=`$CYGPATH -u "$path"`
30625
30626  # Now try to locate executable using which
30627  new_path=`$WHICH "$new_path" 2> /dev/null`
30628  # bat and cmd files are not always considered executable in cygwin causing which
30629  # to not find them
30630  if test "x$new_path" = x \
30631      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30632      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30633    new_path=`$CYGPATH -u "$path"`
30634  fi
30635  if test "x$new_path" = x; then
30636    # Oops. Which didn't find the executable.
30637    # The splitting of arguments from the executable at a space might have been incorrect,
30638    # since paths with space are more likely in Windows. Give it another try with the whole
30639    # argument.
30640    path="$complete"
30641    arguments="EOL"
30642    new_path=`$CYGPATH -u "$path"`
30643    new_path=`$WHICH "$new_path" 2> /dev/null`
30644    # bat and cmd files are not always considered executable in cygwin causing which
30645    # to not find them
30646    if test "x$new_path" = x \
30647        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30648        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30649      new_path=`$CYGPATH -u "$path"`
30650    fi
30651    if test "x$new_path" = x; then
30652      # It's still not found. Now this is an unrecoverable error.
30653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30654$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30655      has_space=`$ECHO "$complete" | $GREP " "`
30656      if test "x$has_space" != x; then
30657        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30658$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30659      fi
30660      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30661    fi
30662  fi
30663
30664  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30665  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30666  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30667  # "foo.exe" is OK but "foo" is an error.
30668  #
30669  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30670  # It is also a way to make sure we got the proper file name for the real test later on.
30671  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30672  if test "x$test_shortpath" = x; then
30673    # Short path failed, file does not exist as specified.
30674    # Try adding .exe or .cmd
30675    if test -f "${new_path}.exe"; then
30676      input_to_shortpath="${new_path}.exe"
30677    elif test -f "${new_path}.cmd"; then
30678      input_to_shortpath="${new_path}.cmd"
30679    else
30680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30681$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30682      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30683$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30684      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30685    fi
30686  else
30687    input_to_shortpath="$new_path"
30688  fi
30689
30690  # Call helper function which possibly converts this using DOS-style short mode.
30691  # If so, the updated path is stored in $new_path.
30692  new_path="$input_to_shortpath"
30693
30694  input_path="$input_to_shortpath"
30695  # Check if we need to convert this using DOS-style short mode. If the path
30696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30697  # take no chances and rewrite it.
30698  # Note: m4 eats our [], so we need to use [ and ] instead.
30699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30700  if test "x$has_forbidden_chars" != x; then
30701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30702    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30703    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30704    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30705      # Going to short mode and back again did indeed matter. Since short mode is
30706      # case insensitive, let's make it lowercase to improve readability.
30707      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30708      # Now convert it back to Unix-stile (cygpath)
30709      input_path=`$CYGPATH -u "$shortmode_path"`
30710      new_path="$input_path"
30711    fi
30712  fi
30713
30714  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30715  if test "x$test_cygdrive_prefix" = x; then
30716    # As a simple fix, exclude /usr/bin since it's not a real path.
30717    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30718      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30719      # a path prefixed by /cygdrive for fixpath to work.
30720      new_path="$CYGWIN_ROOT_PATH$input_path"
30721    fi
30722  fi
30723
30724  # remove trailing .exe if any
30725  new_path="${new_path/%.exe/}"
30726
30727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30728
30729  # First separate the path from the arguments. This will split at the first
30730  # space.
30731  complete="$CPP"
30732  path="${complete%% *}"
30733  tmp="$complete EOL"
30734  arguments="${tmp#* }"
30735
30736  # Input might be given as Windows format, start by converting to
30737  # unix format.
30738  new_path="$path"
30739
30740  windows_path="$new_path"
30741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30742    unix_path=`$CYGPATH -u "$windows_path"`
30743    new_path="$unix_path"
30744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30746    new_path="$unix_path"
30747  fi
30748
30749
30750  # Now try to locate executable using which
30751  new_path=`$WHICH "$new_path" 2> /dev/null`
30752
30753  if test "x$new_path" = x; then
30754    # Oops. Which didn't find the executable.
30755    # The splitting of arguments from the executable at a space might have been incorrect,
30756    # since paths with space are more likely in Windows. Give it another try with the whole
30757    # argument.
30758    path="$complete"
30759    arguments="EOL"
30760    new_path="$path"
30761
30762  windows_path="$new_path"
30763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30764    unix_path=`$CYGPATH -u "$windows_path"`
30765    new_path="$unix_path"
30766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30768    new_path="$unix_path"
30769  fi
30770
30771
30772    new_path=`$WHICH "$new_path" 2> /dev/null`
30773
30774    if test "x$new_path" = x; then
30775      # It's still not found. Now this is an unrecoverable error.
30776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30777$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30778      has_space=`$ECHO "$complete" | $GREP " "`
30779      if test "x$has_space" != x; then
30780        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30781$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30782      fi
30783      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30784    fi
30785  fi
30786
30787  # Now new_path has a complete unix path to the binary
30788  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30789    # Keep paths in /bin as-is, but remove trailing .exe if any
30790    new_path="${new_path/%.exe/}"
30791    # Do not save /bin paths to all_fixpath_prefixes!
30792  else
30793    # Not in mixed or Windows style, start by that.
30794    new_path=`cmd //c echo $new_path`
30795
30796  input_path="$new_path"
30797  # Check if we need to convert this using DOS-style short mode. If the path
30798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30799  # take no chances and rewrite it.
30800  # Note: m4 eats our [], so we need to use [ and ] instead.
30801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30802  if test "x$has_forbidden_chars" != x; then
30803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30804    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30805  fi
30806
30807    # Output is in $new_path
30808
30809  windows_path="$new_path"
30810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30811    unix_path=`$CYGPATH -u "$windows_path"`
30812    new_path="$unix_path"
30813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30815    new_path="$unix_path"
30816  fi
30817
30818    # remove trailing .exe if any
30819    new_path="${new_path/%.exe/}"
30820
30821    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30822    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30823  fi
30824
30825  else
30826    # We're on a posix platform. Hooray! :)
30827    # First separate the path from the arguments. This will split at the first
30828    # space.
30829    complete="$CPP"
30830    path="${complete%% *}"
30831    tmp="$complete EOL"
30832    arguments="${tmp#* }"
30833
30834    # Cannot rely on the command "which" here since it doesn't always work.
30835    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30836    if test -z "$is_absolute_path"; then
30837      # Path to executable is not absolute. Find it.
30838      IFS_save="$IFS"
30839      IFS=:
30840      for p in $PATH; do
30841        if test -f "$p/$path" && test -x "$p/$path"; then
30842          new_path="$p/$path"
30843          break
30844        fi
30845      done
30846      IFS="$IFS_save"
30847    else
30848      # This is an absolute path, we can use it without further modifications.
30849      new_path="$path"
30850    fi
30851
30852    if test "x$new_path" = x; then
30853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30854$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30855      has_space=`$ECHO "$complete" | $GREP " "`
30856      if test "x$has_space" != x; then
30857        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30858$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30859      fi
30860      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30861    fi
30862  fi
30863
30864  # Now join together the path and the arguments once again
30865  if test "x$arguments" != xEOL; then
30866    new_complete="$new_path ${arguments% *}"
30867  else
30868    new_complete="$new_path"
30869  fi
30870
30871  if test "x$complete" != "x$new_complete"; then
30872    CPP="$new_complete"
30873    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
30874$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
30875  fi
30876
30877  ac_ext=cpp
30878ac_cpp='$CXXCPP $CPPFLAGS'
30879ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30880ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30881ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
30883$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
30884if test -z "$CXXCPP"; then
30885  if ${ac_cv_prog_CXXCPP+:} false; then :
30886  $as_echo_n "(cached) " >&6
30887else
30888      # Double quotes because CXXCPP needs to be expanded
30889    for CXXCPP in "$CXX -E" "/lib/cpp"
30890    do
30891      ac_preproc_ok=false
30892for ac_cxx_preproc_warn_flag in '' yes
30893do
30894  # Use a header file that comes with gcc, so configuring glibc
30895  # with a fresh cross-compiler works.
30896  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30897  # <limits.h> exists even on freestanding compilers.
30898  # On the NeXT, cc -E runs the code through the compiler's parser,
30899  # not just through cpp. "Syntax error" is here to catch this case.
30900  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30901/* end confdefs.h.  */
30902#ifdef __STDC__
30903# include <limits.h>
30904#else
30905# include <assert.h>
30906#endif
30907		     Syntax error
30908_ACEOF
30909if ac_fn_cxx_try_cpp "$LINENO"; then :
30910
30911else
30912  # Broken: fails on valid input.
30913continue
30914fi
30915rm -f conftest.err conftest.i conftest.$ac_ext
30916
30917  # OK, works on sane cases.  Now check whether nonexistent headers
30918  # can be detected and how.
30919  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30920/* end confdefs.h.  */
30921#include <ac_nonexistent.h>
30922_ACEOF
30923if ac_fn_cxx_try_cpp "$LINENO"; then :
30924  # Broken: success on invalid input.
30925continue
30926else
30927  # Passes both tests.
30928ac_preproc_ok=:
30929break
30930fi
30931rm -f conftest.err conftest.i conftest.$ac_ext
30932
30933done
30934# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30935rm -f conftest.i conftest.err conftest.$ac_ext
30936if $ac_preproc_ok; then :
30937  break
30938fi
30939
30940    done
30941    ac_cv_prog_CXXCPP=$CXXCPP
30942
30943fi
30944  CXXCPP=$ac_cv_prog_CXXCPP
30945else
30946  ac_cv_prog_CXXCPP=$CXXCPP
30947fi
30948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
30949$as_echo "$CXXCPP" >&6; }
30950ac_preproc_ok=false
30951for ac_cxx_preproc_warn_flag in '' yes
30952do
30953  # Use a header file that comes with gcc, so configuring glibc
30954  # with a fresh cross-compiler works.
30955  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30956  # <limits.h> exists even on freestanding compilers.
30957  # On the NeXT, cc -E runs the code through the compiler's parser,
30958  # not just through cpp. "Syntax error" is here to catch this case.
30959  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30960/* end confdefs.h.  */
30961#ifdef __STDC__
30962# include <limits.h>
30963#else
30964# include <assert.h>
30965#endif
30966		     Syntax error
30967_ACEOF
30968if ac_fn_cxx_try_cpp "$LINENO"; then :
30969
30970else
30971  # Broken: fails on valid input.
30972continue
30973fi
30974rm -f conftest.err conftest.i conftest.$ac_ext
30975
30976  # OK, works on sane cases.  Now check whether nonexistent headers
30977  # can be detected and how.
30978  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30979/* end confdefs.h.  */
30980#include <ac_nonexistent.h>
30981_ACEOF
30982if ac_fn_cxx_try_cpp "$LINENO"; then :
30983  # Broken: success on invalid input.
30984continue
30985else
30986  # Passes both tests.
30987ac_preproc_ok=:
30988break
30989fi
30990rm -f conftest.err conftest.i conftest.$ac_ext
30991
30992done
30993# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30994rm -f conftest.i conftest.err conftest.$ac_ext
30995if $ac_preproc_ok; then :
30996
30997else
30998  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30999$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31000as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31001See \`config.log' for more details" "$LINENO" 5; }
31002fi
31003
31004ac_ext=cpp
31005ac_cpp='$CXXCPP $CPPFLAGS'
31006ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31007ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31008ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31009
31010
31011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31012
31013  # First separate the path from the arguments. This will split at the first
31014  # space.
31015  complete="$CXXCPP"
31016  path="${complete%% *}"
31017  tmp="$complete EOL"
31018  arguments="${tmp#* }"
31019
31020  # Input might be given as Windows format, start by converting to
31021  # unix format.
31022  new_path=`$CYGPATH -u "$path"`
31023
31024  # Now try to locate executable using which
31025  new_path=`$WHICH "$new_path" 2> /dev/null`
31026  # bat and cmd files are not always considered executable in cygwin causing which
31027  # to not find them
31028  if test "x$new_path" = x \
31029      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31030      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31031    new_path=`$CYGPATH -u "$path"`
31032  fi
31033  if test "x$new_path" = x; then
31034    # Oops. Which didn't find the executable.
31035    # The splitting of arguments from the executable at a space might have been incorrect,
31036    # since paths with space are more likely in Windows. Give it another try with the whole
31037    # argument.
31038    path="$complete"
31039    arguments="EOL"
31040    new_path=`$CYGPATH -u "$path"`
31041    new_path=`$WHICH "$new_path" 2> /dev/null`
31042    # bat and cmd files are not always considered executable in cygwin causing which
31043    # to not find them
31044    if test "x$new_path" = x \
31045        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31046        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31047      new_path=`$CYGPATH -u "$path"`
31048    fi
31049    if test "x$new_path" = x; then
31050      # It's still not found. Now this is an unrecoverable error.
31051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31052$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31053      has_space=`$ECHO "$complete" | $GREP " "`
31054      if test "x$has_space" != x; then
31055        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31056$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31057      fi
31058      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31059    fi
31060  fi
31061
31062  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31063  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31064  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31065  # "foo.exe" is OK but "foo" is an error.
31066  #
31067  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31068  # It is also a way to make sure we got the proper file name for the real test later on.
31069  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31070  if test "x$test_shortpath" = x; then
31071    # Short path failed, file does not exist as specified.
31072    # Try adding .exe or .cmd
31073    if test -f "${new_path}.exe"; then
31074      input_to_shortpath="${new_path}.exe"
31075    elif test -f "${new_path}.cmd"; then
31076      input_to_shortpath="${new_path}.cmd"
31077    else
31078      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31079$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31080      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31081$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31082      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31083    fi
31084  else
31085    input_to_shortpath="$new_path"
31086  fi
31087
31088  # Call helper function which possibly converts this using DOS-style short mode.
31089  # If so, the updated path is stored in $new_path.
31090  new_path="$input_to_shortpath"
31091
31092  input_path="$input_to_shortpath"
31093  # Check if we need to convert this using DOS-style short mode. If the path
31094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31095  # take no chances and rewrite it.
31096  # Note: m4 eats our [], so we need to use [ and ] instead.
31097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31098  if test "x$has_forbidden_chars" != x; then
31099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31100    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31101    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31102    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31103      # Going to short mode and back again did indeed matter. Since short mode is
31104      # case insensitive, let's make it lowercase to improve readability.
31105      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31106      # Now convert it back to Unix-stile (cygpath)
31107      input_path=`$CYGPATH -u "$shortmode_path"`
31108      new_path="$input_path"
31109    fi
31110  fi
31111
31112  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31113  if test "x$test_cygdrive_prefix" = x; then
31114    # As a simple fix, exclude /usr/bin since it's not a real path.
31115    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31116      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31117      # a path prefixed by /cygdrive for fixpath to work.
31118      new_path="$CYGWIN_ROOT_PATH$input_path"
31119    fi
31120  fi
31121
31122  # remove trailing .exe if any
31123  new_path="${new_path/%.exe/}"
31124
31125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31126
31127  # First separate the path from the arguments. This will split at the first
31128  # space.
31129  complete="$CXXCPP"
31130  path="${complete%% *}"
31131  tmp="$complete EOL"
31132  arguments="${tmp#* }"
31133
31134  # Input might be given as Windows format, start by converting to
31135  # unix format.
31136  new_path="$path"
31137
31138  windows_path="$new_path"
31139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31140    unix_path=`$CYGPATH -u "$windows_path"`
31141    new_path="$unix_path"
31142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31144    new_path="$unix_path"
31145  fi
31146
31147
31148  # Now try to locate executable using which
31149  new_path=`$WHICH "$new_path" 2> /dev/null`
31150
31151  if test "x$new_path" = x; then
31152    # Oops. Which didn't find the executable.
31153    # The splitting of arguments from the executable at a space might have been incorrect,
31154    # since paths with space are more likely in Windows. Give it another try with the whole
31155    # argument.
31156    path="$complete"
31157    arguments="EOL"
31158    new_path="$path"
31159
31160  windows_path="$new_path"
31161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31162    unix_path=`$CYGPATH -u "$windows_path"`
31163    new_path="$unix_path"
31164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31166    new_path="$unix_path"
31167  fi
31168
31169
31170    new_path=`$WHICH "$new_path" 2> /dev/null`
31171
31172    if test "x$new_path" = x; then
31173      # It's still not found. Now this is an unrecoverable error.
31174      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31175$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31176      has_space=`$ECHO "$complete" | $GREP " "`
31177      if test "x$has_space" != x; then
31178        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31179$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31180      fi
31181      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31182    fi
31183  fi
31184
31185  # Now new_path has a complete unix path to the binary
31186  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31187    # Keep paths in /bin as-is, but remove trailing .exe if any
31188    new_path="${new_path/%.exe/}"
31189    # Do not save /bin paths to all_fixpath_prefixes!
31190  else
31191    # Not in mixed or Windows style, start by that.
31192    new_path=`cmd //c echo $new_path`
31193
31194  input_path="$new_path"
31195  # Check if we need to convert this using DOS-style short mode. If the path
31196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31197  # take no chances and rewrite it.
31198  # Note: m4 eats our [], so we need to use [ and ] instead.
31199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31200  if test "x$has_forbidden_chars" != x; then
31201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31202    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31203  fi
31204
31205    # Output is in $new_path
31206
31207  windows_path="$new_path"
31208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31209    unix_path=`$CYGPATH -u "$windows_path"`
31210    new_path="$unix_path"
31211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31213    new_path="$unix_path"
31214  fi
31215
31216    # remove trailing .exe if any
31217    new_path="${new_path/%.exe/}"
31218
31219    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31220    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31221  fi
31222
31223  else
31224    # We're on a posix platform. Hooray! :)
31225    # First separate the path from the arguments. This will split at the first
31226    # space.
31227    complete="$CXXCPP"
31228    path="${complete%% *}"
31229    tmp="$complete EOL"
31230    arguments="${tmp#* }"
31231
31232    # Cannot rely on the command "which" here since it doesn't always work.
31233    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31234    if test -z "$is_absolute_path"; then
31235      # Path to executable is not absolute. Find it.
31236      IFS_save="$IFS"
31237      IFS=:
31238      for p in $PATH; do
31239        if test -f "$p/$path" && test -x "$p/$path"; then
31240          new_path="$p/$path"
31241          break
31242        fi
31243      done
31244      IFS="$IFS_save"
31245    else
31246      # This is an absolute path, we can use it without further modifications.
31247      new_path="$path"
31248    fi
31249
31250    if test "x$new_path" = x; then
31251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31252$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31253      has_space=`$ECHO "$complete" | $GREP " "`
31254      if test "x$has_space" != x; then
31255        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31256$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31257      fi
31258      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31259    fi
31260  fi
31261
31262  # Now join together the path and the arguments once again
31263  if test "x$arguments" != xEOL; then
31264    new_complete="$new_path ${arguments% *}"
31265  else
31266    new_complete="$new_path"
31267  fi
31268
31269  if test "x$complete" != "x$new_complete"; then
31270    CXXCPP="$new_complete"
31271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31272$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31273  fi
31274
31275
31276  #
31277  # Setup the linker (LD)
31278  #
31279  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31280    # In the Microsoft toolchain we have a separate LD command "link".
31281    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31282    # a cygwin program for something completely different.
31283    # Extract the first word of "link", so it can be a program name with args.
31284set dummy link; ac_word=$2
31285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31286$as_echo_n "checking for $ac_word... " >&6; }
31287if ${ac_cv_prog_LD+:} false; then :
31288  $as_echo_n "(cached) " >&6
31289else
31290  if test -n "$LD"; then
31291  ac_cv_prog_LD="$LD" # Let the user override the test.
31292else
31293  ac_prog_rejected=no
31294as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31295for as_dir in $PATH
31296do
31297  IFS=$as_save_IFS
31298  test -z "$as_dir" && as_dir=.
31299    for ac_exec_ext in '' $ac_executable_extensions; do
31300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31301    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31302       ac_prog_rejected=yes
31303       continue
31304     fi
31305    ac_cv_prog_LD="link"
31306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31307    break 2
31308  fi
31309done
31310  done
31311IFS=$as_save_IFS
31312
31313if test $ac_prog_rejected = yes; then
31314  # We found a bogon in the path, so make sure we never use it.
31315  set dummy $ac_cv_prog_LD
31316  shift
31317  if test $# != 0; then
31318    # We chose a different compiler from the bogus one.
31319    # However, it has the same basename, so the bogon will be chosen
31320    # first if we set LD to just the basename; use the full file name.
31321    shift
31322    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31323  fi
31324fi
31325fi
31326fi
31327LD=$ac_cv_prog_LD
31328if test -n "$LD"; then
31329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31330$as_echo "$LD" >&6; }
31331else
31332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31333$as_echo "no" >&6; }
31334fi
31335
31336
31337
31338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31339
31340  # First separate the path from the arguments. This will split at the first
31341  # space.
31342  complete="$LD"
31343  path="${complete%% *}"
31344  tmp="$complete EOL"
31345  arguments="${tmp#* }"
31346
31347  # Input might be given as Windows format, start by converting to
31348  # unix format.
31349  new_path=`$CYGPATH -u "$path"`
31350
31351  # Now try to locate executable using which
31352  new_path=`$WHICH "$new_path" 2> /dev/null`
31353  # bat and cmd files are not always considered executable in cygwin causing which
31354  # to not find them
31355  if test "x$new_path" = x \
31356      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31357      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31358    new_path=`$CYGPATH -u "$path"`
31359  fi
31360  if test "x$new_path" = x; then
31361    # Oops. Which didn't find the executable.
31362    # The splitting of arguments from the executable at a space might have been incorrect,
31363    # since paths with space are more likely in Windows. Give it another try with the whole
31364    # argument.
31365    path="$complete"
31366    arguments="EOL"
31367    new_path=`$CYGPATH -u "$path"`
31368    new_path=`$WHICH "$new_path" 2> /dev/null`
31369    # bat and cmd files are not always considered executable in cygwin causing which
31370    # to not find them
31371    if test "x$new_path" = x \
31372        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31373        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31374      new_path=`$CYGPATH -u "$path"`
31375    fi
31376    if test "x$new_path" = x; then
31377      # It's still not found. Now this is an unrecoverable error.
31378      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31379$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31380      has_space=`$ECHO "$complete" | $GREP " "`
31381      if test "x$has_space" != x; then
31382        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31383$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31384      fi
31385      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31386    fi
31387  fi
31388
31389  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31390  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31391  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31392  # "foo.exe" is OK but "foo" is an error.
31393  #
31394  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31395  # It is also a way to make sure we got the proper file name for the real test later on.
31396  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31397  if test "x$test_shortpath" = x; then
31398    # Short path failed, file does not exist as specified.
31399    # Try adding .exe or .cmd
31400    if test -f "${new_path}.exe"; then
31401      input_to_shortpath="${new_path}.exe"
31402    elif test -f "${new_path}.cmd"; then
31403      input_to_shortpath="${new_path}.cmd"
31404    else
31405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31406$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31407      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31408$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31409      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31410    fi
31411  else
31412    input_to_shortpath="$new_path"
31413  fi
31414
31415  # Call helper function which possibly converts this using DOS-style short mode.
31416  # If so, the updated path is stored in $new_path.
31417  new_path="$input_to_shortpath"
31418
31419  input_path="$input_to_shortpath"
31420  # Check if we need to convert this using DOS-style short mode. If the path
31421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31422  # take no chances and rewrite it.
31423  # Note: m4 eats our [], so we need to use [ and ] instead.
31424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31425  if test "x$has_forbidden_chars" != x; then
31426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31430      # Going to short mode and back again did indeed matter. Since short mode is
31431      # case insensitive, let's make it lowercase to improve readability.
31432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31433      # Now convert it back to Unix-stile (cygpath)
31434      input_path=`$CYGPATH -u "$shortmode_path"`
31435      new_path="$input_path"
31436    fi
31437  fi
31438
31439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31440  if test "x$test_cygdrive_prefix" = x; then
31441    # As a simple fix, exclude /usr/bin since it's not a real path.
31442    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31444      # a path prefixed by /cygdrive for fixpath to work.
31445      new_path="$CYGWIN_ROOT_PATH$input_path"
31446    fi
31447  fi
31448
31449  # remove trailing .exe if any
31450  new_path="${new_path/%.exe/}"
31451
31452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31453
31454  # First separate the path from the arguments. This will split at the first
31455  # space.
31456  complete="$LD"
31457  path="${complete%% *}"
31458  tmp="$complete EOL"
31459  arguments="${tmp#* }"
31460
31461  # Input might be given as Windows format, start by converting to
31462  # unix format.
31463  new_path="$path"
31464
31465  windows_path="$new_path"
31466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31467    unix_path=`$CYGPATH -u "$windows_path"`
31468    new_path="$unix_path"
31469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31471    new_path="$unix_path"
31472  fi
31473
31474
31475  # Now try to locate executable using which
31476  new_path=`$WHICH "$new_path" 2> /dev/null`
31477
31478  if test "x$new_path" = x; then
31479    # Oops. Which didn't find the executable.
31480    # The splitting of arguments from the executable at a space might have been incorrect,
31481    # since paths with space are more likely in Windows. Give it another try with the whole
31482    # argument.
31483    path="$complete"
31484    arguments="EOL"
31485    new_path="$path"
31486
31487  windows_path="$new_path"
31488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31489    unix_path=`$CYGPATH -u "$windows_path"`
31490    new_path="$unix_path"
31491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31493    new_path="$unix_path"
31494  fi
31495
31496
31497    new_path=`$WHICH "$new_path" 2> /dev/null`
31498
31499    if test "x$new_path" = x; then
31500      # It's still not found. Now this is an unrecoverable error.
31501      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31502$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31503      has_space=`$ECHO "$complete" | $GREP " "`
31504      if test "x$has_space" != x; then
31505        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31506$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31507      fi
31508      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31509    fi
31510  fi
31511
31512  # Now new_path has a complete unix path to the binary
31513  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31514    # Keep paths in /bin as-is, but remove trailing .exe if any
31515    new_path="${new_path/%.exe/}"
31516    # Do not save /bin paths to all_fixpath_prefixes!
31517  else
31518    # Not in mixed or Windows style, start by that.
31519    new_path=`cmd //c echo $new_path`
31520
31521  input_path="$new_path"
31522  # Check if we need to convert this using DOS-style short mode. If the path
31523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31524  # take no chances and rewrite it.
31525  # Note: m4 eats our [], so we need to use [ and ] instead.
31526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31527  if test "x$has_forbidden_chars" != x; then
31528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31529    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31530  fi
31531
31532    # Output is in $new_path
31533
31534  windows_path="$new_path"
31535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31536    unix_path=`$CYGPATH -u "$windows_path"`
31537    new_path="$unix_path"
31538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31540    new_path="$unix_path"
31541  fi
31542
31543    # remove trailing .exe if any
31544    new_path="${new_path/%.exe/}"
31545
31546    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31547    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31548  fi
31549
31550  else
31551    # We're on a posix platform. Hooray! :)
31552    # First separate the path from the arguments. This will split at the first
31553    # space.
31554    complete="$LD"
31555    path="${complete%% *}"
31556    tmp="$complete EOL"
31557    arguments="${tmp#* }"
31558
31559    # Cannot rely on the command "which" here since it doesn't always work.
31560    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31561    if test -z "$is_absolute_path"; then
31562      # Path to executable is not absolute. Find it.
31563      IFS_save="$IFS"
31564      IFS=:
31565      for p in $PATH; do
31566        if test -f "$p/$path" && test -x "$p/$path"; then
31567          new_path="$p/$path"
31568          break
31569        fi
31570      done
31571      IFS="$IFS_save"
31572    else
31573      # This is an absolute path, we can use it without further modifications.
31574      new_path="$path"
31575    fi
31576
31577    if test "x$new_path" = x; then
31578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31579$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31580      has_space=`$ECHO "$complete" | $GREP " "`
31581      if test "x$has_space" != x; then
31582        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31583$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31584      fi
31585      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31586    fi
31587  fi
31588
31589  # Now join together the path and the arguments once again
31590  if test "x$arguments" != xEOL; then
31591    new_complete="$new_path ${arguments% *}"
31592  else
31593    new_complete="$new_path"
31594  fi
31595
31596  if test "x$complete" != "x$new_complete"; then
31597    LD="$new_complete"
31598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31599$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31600  fi
31601
31602    # Verify that we indeed succeeded with this trick.
31603    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31604$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31605    "$LD" --version > /dev/null
31606    if test $? -eq 0 ; then
31607      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31608$as_echo "no" >&6; }
31609      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31610    else
31611      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31612$as_echo "yes" >&6; }
31613    fi
31614    LDCXX="$LD"
31615  else
31616    # All other toolchains use the compiler to link.
31617    LD="$CC"
31618    LDCXX="$CXX"
31619  fi
31620
31621  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31622
31623
31624  #
31625  # Setup the assembler (AS)
31626  #
31627  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31628    # FIXME: should this really be solaris, or solstudio?
31629
31630
31631  # Publish this variable in the help.
31632
31633
31634  if test "x$AS" = x; then
31635    # The variable is not set by user, try to locate tool using the code snippet
31636    for ac_prog in as
31637do
31638  # Extract the first word of "$ac_prog", so it can be a program name with args.
31639set dummy $ac_prog; ac_word=$2
31640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31641$as_echo_n "checking for $ac_word... " >&6; }
31642if ${ac_cv_path_AS+:} false; then :
31643  $as_echo_n "(cached) " >&6
31644else
31645  case $AS in
31646  [\\/]* | ?:[\\/]*)
31647  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31648  ;;
31649  *)
31650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31651for as_dir in $PATH
31652do
31653  IFS=$as_save_IFS
31654  test -z "$as_dir" && as_dir=.
31655    for ac_exec_ext in '' $ac_executable_extensions; do
31656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31657    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31659    break 2
31660  fi
31661done
31662  done
31663IFS=$as_save_IFS
31664
31665  ;;
31666esac
31667fi
31668AS=$ac_cv_path_AS
31669if test -n "$AS"; then
31670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31671$as_echo "$AS" >&6; }
31672else
31673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31674$as_echo "no" >&6; }
31675fi
31676
31677
31678  test -n "$AS" && break
31679done
31680
31681  else
31682    # The variable is set, but is it from the command line or the environment?
31683
31684    # Try to remove the string !AS! from our list.
31685    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31686    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31687      # If it failed, the variable was not from the command line. Ignore it,
31688      # but warn the user (except for BASH, which is always set by the calling BASH).
31689      if test "xAS" != xBASH; then
31690        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
31691$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
31692      fi
31693      # Try to locate tool using the code snippet
31694      for ac_prog in as
31695do
31696  # Extract the first word of "$ac_prog", so it can be a program name with args.
31697set dummy $ac_prog; ac_word=$2
31698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31699$as_echo_n "checking for $ac_word... " >&6; }
31700if ${ac_cv_path_AS+:} false; then :
31701  $as_echo_n "(cached) " >&6
31702else
31703  case $AS in
31704  [\\/]* | ?:[\\/]*)
31705  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31706  ;;
31707  *)
31708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31709for as_dir in $PATH
31710do
31711  IFS=$as_save_IFS
31712  test -z "$as_dir" && as_dir=.
31713    for ac_exec_ext in '' $ac_executable_extensions; do
31714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31715    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31717    break 2
31718  fi
31719done
31720  done
31721IFS=$as_save_IFS
31722
31723  ;;
31724esac
31725fi
31726AS=$ac_cv_path_AS
31727if test -n "$AS"; then
31728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31729$as_echo "$AS" >&6; }
31730else
31731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31732$as_echo "no" >&6; }
31733fi
31734
31735
31736  test -n "$AS" && break
31737done
31738
31739    else
31740      # If it succeeded, then it was overridden by the user. We will use it
31741      # for the tool.
31742
31743      # First remove it from the list of overridden variables, so we can test
31744      # for unknown variables in the end.
31745      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31746
31747      # Check if the provided tool contains a complete path.
31748      tool_specified="$AS"
31749      tool_basename="${tool_specified##*/}"
31750      if test "x$tool_basename" = "x$tool_specified"; then
31751        # A command without a complete path is provided, search $PATH.
31752        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
31753$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
31754        # Extract the first word of "$tool_basename", so it can be a program name with args.
31755set dummy $tool_basename; ac_word=$2
31756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31757$as_echo_n "checking for $ac_word... " >&6; }
31758if ${ac_cv_path_AS+:} false; then :
31759  $as_echo_n "(cached) " >&6
31760else
31761  case $AS in
31762  [\\/]* | ?:[\\/]*)
31763  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31764  ;;
31765  *)
31766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31767for as_dir in $PATH
31768do
31769  IFS=$as_save_IFS
31770  test -z "$as_dir" && as_dir=.
31771    for ac_exec_ext in '' $ac_executable_extensions; do
31772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31773    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31775    break 2
31776  fi
31777done
31778  done
31779IFS=$as_save_IFS
31780
31781  ;;
31782esac
31783fi
31784AS=$ac_cv_path_AS
31785if test -n "$AS"; then
31786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31787$as_echo "$AS" >&6; }
31788else
31789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31790$as_echo "no" >&6; }
31791fi
31792
31793
31794        if test "x$AS" = x; then
31795          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31796        fi
31797      else
31798        # Otherwise we believe it is a complete path. Use it as it is.
31799        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
31800$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
31801        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
31802$as_echo_n "checking for AS... " >&6; }
31803        if test ! -x "$tool_specified"; then
31804          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31805$as_echo "not found" >&6; }
31806          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
31807        fi
31808        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31809$as_echo "$tool_specified" >&6; }
31810      fi
31811    fi
31812  fi
31813
31814
31815
31816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31817
31818  # First separate the path from the arguments. This will split at the first
31819  # space.
31820  complete="$AS"
31821  path="${complete%% *}"
31822  tmp="$complete EOL"
31823  arguments="${tmp#* }"
31824
31825  # Input might be given as Windows format, start by converting to
31826  # unix format.
31827  new_path=`$CYGPATH -u "$path"`
31828
31829  # Now try to locate executable using which
31830  new_path=`$WHICH "$new_path" 2> /dev/null`
31831  # bat and cmd files are not always considered executable in cygwin causing which
31832  # to not find them
31833  if test "x$new_path" = x \
31834      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31835      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31836    new_path=`$CYGPATH -u "$path"`
31837  fi
31838  if test "x$new_path" = x; then
31839    # Oops. Which didn't find the executable.
31840    # The splitting of arguments from the executable at a space might have been incorrect,
31841    # since paths with space are more likely in Windows. Give it another try with the whole
31842    # argument.
31843    path="$complete"
31844    arguments="EOL"
31845    new_path=`$CYGPATH -u "$path"`
31846    new_path=`$WHICH "$new_path" 2> /dev/null`
31847    # bat and cmd files are not always considered executable in cygwin causing which
31848    # to not find them
31849    if test "x$new_path" = x \
31850        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31851        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31852      new_path=`$CYGPATH -u "$path"`
31853    fi
31854    if test "x$new_path" = x; then
31855      # It's still not found. Now this is an unrecoverable error.
31856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31857$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31858      has_space=`$ECHO "$complete" | $GREP " "`
31859      if test "x$has_space" != x; then
31860        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31861$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31862      fi
31863      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31864    fi
31865  fi
31866
31867  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31868  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31869  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31870  # "foo.exe" is OK but "foo" is an error.
31871  #
31872  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31873  # It is also a way to make sure we got the proper file name for the real test later on.
31874  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31875  if test "x$test_shortpath" = x; then
31876    # Short path failed, file does not exist as specified.
31877    # Try adding .exe or .cmd
31878    if test -f "${new_path}.exe"; then
31879      input_to_shortpath="${new_path}.exe"
31880    elif test -f "${new_path}.cmd"; then
31881      input_to_shortpath="${new_path}.cmd"
31882    else
31883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
31884$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
31885      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31886$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31887      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31888    fi
31889  else
31890    input_to_shortpath="$new_path"
31891  fi
31892
31893  # Call helper function which possibly converts this using DOS-style short mode.
31894  # If so, the updated path is stored in $new_path.
31895  new_path="$input_to_shortpath"
31896
31897  input_path="$input_to_shortpath"
31898  # Check if we need to convert this using DOS-style short mode. If the path
31899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31900  # take no chances and rewrite it.
31901  # Note: m4 eats our [], so we need to use [ and ] instead.
31902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31903  if test "x$has_forbidden_chars" != x; then
31904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31905    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31906    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31907    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31908      # Going to short mode and back again did indeed matter. Since short mode is
31909      # case insensitive, let's make it lowercase to improve readability.
31910      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31911      # Now convert it back to Unix-stile (cygpath)
31912      input_path=`$CYGPATH -u "$shortmode_path"`
31913      new_path="$input_path"
31914    fi
31915  fi
31916
31917  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31918  if test "x$test_cygdrive_prefix" = x; then
31919    # As a simple fix, exclude /usr/bin since it's not a real path.
31920    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31921      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31922      # a path prefixed by /cygdrive for fixpath to work.
31923      new_path="$CYGWIN_ROOT_PATH$input_path"
31924    fi
31925  fi
31926
31927  # remove trailing .exe if any
31928  new_path="${new_path/%.exe/}"
31929
31930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31931
31932  # First separate the path from the arguments. This will split at the first
31933  # space.
31934  complete="$AS"
31935  path="${complete%% *}"
31936  tmp="$complete EOL"
31937  arguments="${tmp#* }"
31938
31939  # Input might be given as Windows format, start by converting to
31940  # unix format.
31941  new_path="$path"
31942
31943  windows_path="$new_path"
31944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31945    unix_path=`$CYGPATH -u "$windows_path"`
31946    new_path="$unix_path"
31947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31949    new_path="$unix_path"
31950  fi
31951
31952
31953  # Now try to locate executable using which
31954  new_path=`$WHICH "$new_path" 2> /dev/null`
31955
31956  if test "x$new_path" = x; then
31957    # Oops. Which didn't find the executable.
31958    # The splitting of arguments from the executable at a space might have been incorrect,
31959    # since paths with space are more likely in Windows. Give it another try with the whole
31960    # argument.
31961    path="$complete"
31962    arguments="EOL"
31963    new_path="$path"
31964
31965  windows_path="$new_path"
31966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31967    unix_path=`$CYGPATH -u "$windows_path"`
31968    new_path="$unix_path"
31969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31971    new_path="$unix_path"
31972  fi
31973
31974
31975    new_path=`$WHICH "$new_path" 2> /dev/null`
31976
31977    if test "x$new_path" = x; then
31978      # It's still not found. Now this is an unrecoverable error.
31979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31980$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31981      has_space=`$ECHO "$complete" | $GREP " "`
31982      if test "x$has_space" != x; then
31983        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31984$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31985      fi
31986      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31987    fi
31988  fi
31989
31990  # Now new_path has a complete unix path to the binary
31991  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31992    # Keep paths in /bin as-is, but remove trailing .exe if any
31993    new_path="${new_path/%.exe/}"
31994    # Do not save /bin paths to all_fixpath_prefixes!
31995  else
31996    # Not in mixed or Windows style, start by that.
31997    new_path=`cmd //c echo $new_path`
31998
31999  input_path="$new_path"
32000  # Check if we need to convert this using DOS-style short mode. If the path
32001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32002  # take no chances and rewrite it.
32003  # Note: m4 eats our [], so we need to use [ and ] instead.
32004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32005  if test "x$has_forbidden_chars" != x; then
32006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32008  fi
32009
32010    # Output is in $new_path
32011
32012  windows_path="$new_path"
32013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32014    unix_path=`$CYGPATH -u "$windows_path"`
32015    new_path="$unix_path"
32016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32018    new_path="$unix_path"
32019  fi
32020
32021    # remove trailing .exe if any
32022    new_path="${new_path/%.exe/}"
32023
32024    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32025    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32026  fi
32027
32028  else
32029    # We're on a posix platform. Hooray! :)
32030    # First separate the path from the arguments. This will split at the first
32031    # space.
32032    complete="$AS"
32033    path="${complete%% *}"
32034    tmp="$complete EOL"
32035    arguments="${tmp#* }"
32036
32037    # Cannot rely on the command "which" here since it doesn't always work.
32038    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32039    if test -z "$is_absolute_path"; then
32040      # Path to executable is not absolute. Find it.
32041      IFS_save="$IFS"
32042      IFS=:
32043      for p in $PATH; do
32044        if test -f "$p/$path" && test -x "$p/$path"; then
32045          new_path="$p/$path"
32046          break
32047        fi
32048      done
32049      IFS="$IFS_save"
32050    else
32051      # This is an absolute path, we can use it without further modifications.
32052      new_path="$path"
32053    fi
32054
32055    if test "x$new_path" = x; then
32056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32057$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32058      has_space=`$ECHO "$complete" | $GREP " "`
32059      if test "x$has_space" != x; then
32060        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32061$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32062      fi
32063      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32064    fi
32065  fi
32066
32067  # Now join together the path and the arguments once again
32068  if test "x$arguments" != xEOL; then
32069    new_complete="$new_path ${arguments% *}"
32070  else
32071    new_complete="$new_path"
32072  fi
32073
32074  if test "x$complete" != "x$new_complete"; then
32075    AS="$new_complete"
32076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32077$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32078  fi
32079
32080  else
32081    # FIXME: is this correct for microsoft?
32082    AS="$CC -c"
32083  fi
32084
32085
32086  #
32087  # Setup the archiver (AR)
32088  #
32089  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32090    # The corresponding ar tool is lib.exe (used to create static libraries)
32091    # Extract the first word of "lib", so it can be a program name with args.
32092set dummy lib; ac_word=$2
32093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32094$as_echo_n "checking for $ac_word... " >&6; }
32095if ${ac_cv_prog_AR+:} false; then :
32096  $as_echo_n "(cached) " >&6
32097else
32098  if test -n "$AR"; then
32099  ac_cv_prog_AR="$AR" # Let the user override the test.
32100else
32101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32102for as_dir in $PATH
32103do
32104  IFS=$as_save_IFS
32105  test -z "$as_dir" && as_dir=.
32106    for ac_exec_ext in '' $ac_executable_extensions; do
32107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32108    ac_cv_prog_AR="lib"
32109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32110    break 2
32111  fi
32112done
32113  done
32114IFS=$as_save_IFS
32115
32116fi
32117fi
32118AR=$ac_cv_prog_AR
32119if test -n "$AR"; then
32120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32121$as_echo "$AR" >&6; }
32122else
32123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32124$as_echo "no" >&6; }
32125fi
32126
32127
32128  else
32129
32130
32131  # Publish this variable in the help.
32132
32133
32134  if test "x$AR" = x; then
32135    # The variable is not set by user, try to locate tool using the code snippet
32136    if test -n "$ac_tool_prefix"; then
32137  for ac_prog in ar
32138  do
32139    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32140set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32142$as_echo_n "checking for $ac_word... " >&6; }
32143if ${ac_cv_prog_AR+:} false; then :
32144  $as_echo_n "(cached) " >&6
32145else
32146  if test -n "$AR"; then
32147  ac_cv_prog_AR="$AR" # Let the user override the test.
32148else
32149as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32150for as_dir in $PATH
32151do
32152  IFS=$as_save_IFS
32153  test -z "$as_dir" && as_dir=.
32154    for ac_exec_ext in '' $ac_executable_extensions; do
32155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32156    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32158    break 2
32159  fi
32160done
32161  done
32162IFS=$as_save_IFS
32163
32164fi
32165fi
32166AR=$ac_cv_prog_AR
32167if test -n "$AR"; then
32168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32169$as_echo "$AR" >&6; }
32170else
32171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32172$as_echo "no" >&6; }
32173fi
32174
32175
32176    test -n "$AR" && break
32177  done
32178fi
32179if test -z "$AR"; then
32180  ac_ct_AR=$AR
32181  for ac_prog in ar
32182do
32183  # Extract the first word of "$ac_prog", so it can be a program name with args.
32184set dummy $ac_prog; ac_word=$2
32185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32186$as_echo_n "checking for $ac_word... " >&6; }
32187if ${ac_cv_prog_ac_ct_AR+:} false; then :
32188  $as_echo_n "(cached) " >&6
32189else
32190  if test -n "$ac_ct_AR"; then
32191  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32192else
32193as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32194for as_dir in $PATH
32195do
32196  IFS=$as_save_IFS
32197  test -z "$as_dir" && as_dir=.
32198    for ac_exec_ext in '' $ac_executable_extensions; do
32199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32200    ac_cv_prog_ac_ct_AR="$ac_prog"
32201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32202    break 2
32203  fi
32204done
32205  done
32206IFS=$as_save_IFS
32207
32208fi
32209fi
32210ac_ct_AR=$ac_cv_prog_ac_ct_AR
32211if test -n "$ac_ct_AR"; then
32212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32213$as_echo "$ac_ct_AR" >&6; }
32214else
32215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32216$as_echo "no" >&6; }
32217fi
32218
32219
32220  test -n "$ac_ct_AR" && break
32221done
32222
32223  if test "x$ac_ct_AR" = x; then
32224    AR=""
32225  else
32226    case $cross_compiling:$ac_tool_warned in
32227yes:)
32228{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32229$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32230ac_tool_warned=yes ;;
32231esac
32232    AR=$ac_ct_AR
32233  fi
32234fi
32235
32236  else
32237    # The variable is set, but is it from the command line or the environment?
32238
32239    # Try to remove the string !AR! from our list.
32240    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32241    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32242      # If it failed, the variable was not from the command line. Ignore it,
32243      # but warn the user (except for BASH, which is always set by the calling BASH).
32244      if test "xAR" != xBASH; then
32245        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32246$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32247      fi
32248      # Try to locate tool using the code snippet
32249      if test -n "$ac_tool_prefix"; then
32250  for ac_prog in ar
32251  do
32252    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32253set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32255$as_echo_n "checking for $ac_word... " >&6; }
32256if ${ac_cv_prog_AR+:} false; then :
32257  $as_echo_n "(cached) " >&6
32258else
32259  if test -n "$AR"; then
32260  ac_cv_prog_AR="$AR" # Let the user override the test.
32261else
32262as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32263for as_dir in $PATH
32264do
32265  IFS=$as_save_IFS
32266  test -z "$as_dir" && as_dir=.
32267    for ac_exec_ext in '' $ac_executable_extensions; do
32268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32269    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32271    break 2
32272  fi
32273done
32274  done
32275IFS=$as_save_IFS
32276
32277fi
32278fi
32279AR=$ac_cv_prog_AR
32280if test -n "$AR"; then
32281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32282$as_echo "$AR" >&6; }
32283else
32284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32285$as_echo "no" >&6; }
32286fi
32287
32288
32289    test -n "$AR" && break
32290  done
32291fi
32292if test -z "$AR"; then
32293  ac_ct_AR=$AR
32294  for ac_prog in ar
32295do
32296  # Extract the first word of "$ac_prog", so it can be a program name with args.
32297set dummy $ac_prog; ac_word=$2
32298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32299$as_echo_n "checking for $ac_word... " >&6; }
32300if ${ac_cv_prog_ac_ct_AR+:} false; then :
32301  $as_echo_n "(cached) " >&6
32302else
32303  if test -n "$ac_ct_AR"; then
32304  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32305else
32306as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32307for as_dir in $PATH
32308do
32309  IFS=$as_save_IFS
32310  test -z "$as_dir" && as_dir=.
32311    for ac_exec_ext in '' $ac_executable_extensions; do
32312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32313    ac_cv_prog_ac_ct_AR="$ac_prog"
32314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32315    break 2
32316  fi
32317done
32318  done
32319IFS=$as_save_IFS
32320
32321fi
32322fi
32323ac_ct_AR=$ac_cv_prog_ac_ct_AR
32324if test -n "$ac_ct_AR"; then
32325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32326$as_echo "$ac_ct_AR" >&6; }
32327else
32328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32329$as_echo "no" >&6; }
32330fi
32331
32332
32333  test -n "$ac_ct_AR" && break
32334done
32335
32336  if test "x$ac_ct_AR" = x; then
32337    AR=""
32338  else
32339    case $cross_compiling:$ac_tool_warned in
32340yes:)
32341{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32342$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32343ac_tool_warned=yes ;;
32344esac
32345    AR=$ac_ct_AR
32346  fi
32347fi
32348
32349    else
32350      # If it succeeded, then it was overridden by the user. We will use it
32351      # for the tool.
32352
32353      # First remove it from the list of overridden variables, so we can test
32354      # for unknown variables in the end.
32355      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32356
32357      # Check if the provided tool contains a complete path.
32358      tool_specified="$AR"
32359      tool_basename="${tool_specified##*/}"
32360      if test "x$tool_basename" = "x$tool_specified"; then
32361        # A command without a complete path is provided, search $PATH.
32362        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32363$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32364        # Extract the first word of "$tool_basename", so it can be a program name with args.
32365set dummy $tool_basename; ac_word=$2
32366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32367$as_echo_n "checking for $ac_word... " >&6; }
32368if ${ac_cv_path_AR+:} false; then :
32369  $as_echo_n "(cached) " >&6
32370else
32371  case $AR in
32372  [\\/]* | ?:[\\/]*)
32373  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32374  ;;
32375  *)
32376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32377for as_dir in $PATH
32378do
32379  IFS=$as_save_IFS
32380  test -z "$as_dir" && as_dir=.
32381    for ac_exec_ext in '' $ac_executable_extensions; do
32382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32383    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32385    break 2
32386  fi
32387done
32388  done
32389IFS=$as_save_IFS
32390
32391  ;;
32392esac
32393fi
32394AR=$ac_cv_path_AR
32395if test -n "$AR"; then
32396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32397$as_echo "$AR" >&6; }
32398else
32399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32400$as_echo "no" >&6; }
32401fi
32402
32403
32404        if test "x$AR" = x; then
32405          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32406        fi
32407      else
32408        # Otherwise we believe it is a complete path. Use it as it is.
32409        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32410$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32411        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32412$as_echo_n "checking for AR... " >&6; }
32413        if test ! -x "$tool_specified"; then
32414          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32415$as_echo "not found" >&6; }
32416          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32417        fi
32418        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32419$as_echo "$tool_specified" >&6; }
32420      fi
32421    fi
32422  fi
32423
32424
32425  fi
32426
32427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32428
32429  # First separate the path from the arguments. This will split at the first
32430  # space.
32431  complete="$AR"
32432  path="${complete%% *}"
32433  tmp="$complete EOL"
32434  arguments="${tmp#* }"
32435
32436  # Input might be given as Windows format, start by converting to
32437  # unix format.
32438  new_path=`$CYGPATH -u "$path"`
32439
32440  # Now try to locate executable using which
32441  new_path=`$WHICH "$new_path" 2> /dev/null`
32442  # bat and cmd files are not always considered executable in cygwin causing which
32443  # to not find them
32444  if test "x$new_path" = x \
32445      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32446      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32447    new_path=`$CYGPATH -u "$path"`
32448  fi
32449  if test "x$new_path" = x; then
32450    # Oops. Which didn't find the executable.
32451    # The splitting of arguments from the executable at a space might have been incorrect,
32452    # since paths with space are more likely in Windows. Give it another try with the whole
32453    # argument.
32454    path="$complete"
32455    arguments="EOL"
32456    new_path=`$CYGPATH -u "$path"`
32457    new_path=`$WHICH "$new_path" 2> /dev/null`
32458    # bat and cmd files are not always considered executable in cygwin causing which
32459    # to not find them
32460    if test "x$new_path" = x \
32461        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32462        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32463      new_path=`$CYGPATH -u "$path"`
32464    fi
32465    if test "x$new_path" = x; then
32466      # It's still not found. Now this is an unrecoverable error.
32467      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32468$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32469      has_space=`$ECHO "$complete" | $GREP " "`
32470      if test "x$has_space" != x; then
32471        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32472$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32473      fi
32474      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32475    fi
32476  fi
32477
32478  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32479  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32480  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32481  # "foo.exe" is OK but "foo" is an error.
32482  #
32483  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32484  # It is also a way to make sure we got the proper file name for the real test later on.
32485  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32486  if test "x$test_shortpath" = x; then
32487    # Short path failed, file does not exist as specified.
32488    # Try adding .exe or .cmd
32489    if test -f "${new_path}.exe"; then
32490      input_to_shortpath="${new_path}.exe"
32491    elif test -f "${new_path}.cmd"; then
32492      input_to_shortpath="${new_path}.cmd"
32493    else
32494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32495$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32496      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32497$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32498      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32499    fi
32500  else
32501    input_to_shortpath="$new_path"
32502  fi
32503
32504  # Call helper function which possibly converts this using DOS-style short mode.
32505  # If so, the updated path is stored in $new_path.
32506  new_path="$input_to_shortpath"
32507
32508  input_path="$input_to_shortpath"
32509  # Check if we need to convert this using DOS-style short mode. If the path
32510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32511  # take no chances and rewrite it.
32512  # Note: m4 eats our [], so we need to use [ and ] instead.
32513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32514  if test "x$has_forbidden_chars" != x; then
32515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32516    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32517    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32518    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32519      # Going to short mode and back again did indeed matter. Since short mode is
32520      # case insensitive, let's make it lowercase to improve readability.
32521      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32522      # Now convert it back to Unix-stile (cygpath)
32523      input_path=`$CYGPATH -u "$shortmode_path"`
32524      new_path="$input_path"
32525    fi
32526  fi
32527
32528  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32529  if test "x$test_cygdrive_prefix" = x; then
32530    # As a simple fix, exclude /usr/bin since it's not a real path.
32531    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32532      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32533      # a path prefixed by /cygdrive for fixpath to work.
32534      new_path="$CYGWIN_ROOT_PATH$input_path"
32535    fi
32536  fi
32537
32538  # remove trailing .exe if any
32539  new_path="${new_path/%.exe/}"
32540
32541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32542
32543  # First separate the path from the arguments. This will split at the first
32544  # space.
32545  complete="$AR"
32546  path="${complete%% *}"
32547  tmp="$complete EOL"
32548  arguments="${tmp#* }"
32549
32550  # Input might be given as Windows format, start by converting to
32551  # unix format.
32552  new_path="$path"
32553
32554  windows_path="$new_path"
32555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32556    unix_path=`$CYGPATH -u "$windows_path"`
32557    new_path="$unix_path"
32558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32560    new_path="$unix_path"
32561  fi
32562
32563
32564  # Now try to locate executable using which
32565  new_path=`$WHICH "$new_path" 2> /dev/null`
32566
32567  if test "x$new_path" = x; then
32568    # Oops. Which didn't find the executable.
32569    # The splitting of arguments from the executable at a space might have been incorrect,
32570    # since paths with space are more likely in Windows. Give it another try with the whole
32571    # argument.
32572    path="$complete"
32573    arguments="EOL"
32574    new_path="$path"
32575
32576  windows_path="$new_path"
32577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32578    unix_path=`$CYGPATH -u "$windows_path"`
32579    new_path="$unix_path"
32580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32582    new_path="$unix_path"
32583  fi
32584
32585
32586    new_path=`$WHICH "$new_path" 2> /dev/null`
32587
32588    if test "x$new_path" = x; then
32589      # It's still not found. Now this is an unrecoverable error.
32590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32591$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32592      has_space=`$ECHO "$complete" | $GREP " "`
32593      if test "x$has_space" != x; then
32594        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32595$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32596      fi
32597      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32598    fi
32599  fi
32600
32601  # Now new_path has a complete unix path to the binary
32602  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32603    # Keep paths in /bin as-is, but remove trailing .exe if any
32604    new_path="${new_path/%.exe/}"
32605    # Do not save /bin paths to all_fixpath_prefixes!
32606  else
32607    # Not in mixed or Windows style, start by that.
32608    new_path=`cmd //c echo $new_path`
32609
32610  input_path="$new_path"
32611  # Check if we need to convert this using DOS-style short mode. If the path
32612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32613  # take no chances and rewrite it.
32614  # Note: m4 eats our [], so we need to use [ and ] instead.
32615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32616  if test "x$has_forbidden_chars" != x; then
32617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32618    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32619  fi
32620
32621    # Output is in $new_path
32622
32623  windows_path="$new_path"
32624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32625    unix_path=`$CYGPATH -u "$windows_path"`
32626    new_path="$unix_path"
32627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32629    new_path="$unix_path"
32630  fi
32631
32632    # remove trailing .exe if any
32633    new_path="${new_path/%.exe/}"
32634
32635    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32636    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32637  fi
32638
32639  else
32640    # We're on a posix platform. Hooray! :)
32641    # First separate the path from the arguments. This will split at the first
32642    # space.
32643    complete="$AR"
32644    path="${complete%% *}"
32645    tmp="$complete EOL"
32646    arguments="${tmp#* }"
32647
32648    # Cannot rely on the command "which" here since it doesn't always work.
32649    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32650    if test -z "$is_absolute_path"; then
32651      # Path to executable is not absolute. Find it.
32652      IFS_save="$IFS"
32653      IFS=:
32654      for p in $PATH; do
32655        if test -f "$p/$path" && test -x "$p/$path"; then
32656          new_path="$p/$path"
32657          break
32658        fi
32659      done
32660      IFS="$IFS_save"
32661    else
32662      # This is an absolute path, we can use it without further modifications.
32663      new_path="$path"
32664    fi
32665
32666    if test "x$new_path" = x; then
32667      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32668$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32669      has_space=`$ECHO "$complete" | $GREP " "`
32670      if test "x$has_space" != x; then
32671        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32672$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32673      fi
32674      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32675    fi
32676  fi
32677
32678  # Now join together the path and the arguments once again
32679  if test "x$arguments" != xEOL; then
32680    new_complete="$new_path ${arguments% *}"
32681  else
32682    new_complete="$new_path"
32683  fi
32684
32685  if test "x$complete" != "x$new_complete"; then
32686    AR="$new_complete"
32687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32688$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32689  fi
32690
32691
32692
32693  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
32694    ac_ext=m
32695ac_cpp='$OBJCPP $CPPFLAGS'
32696ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32697ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32698ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32699if test -n "$ac_tool_prefix"; then
32700  for ac_prog in gcc objcc objc cc CC
32701  do
32702    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32703set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32705$as_echo_n "checking for $ac_word... " >&6; }
32706if ${ac_cv_prog_OBJC+:} false; then :
32707  $as_echo_n "(cached) " >&6
32708else
32709  if test -n "$OBJC"; then
32710  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32711else
32712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32713for as_dir in $PATH
32714do
32715  IFS=$as_save_IFS
32716  test -z "$as_dir" && as_dir=.
32717    for ac_exec_ext in '' $ac_executable_extensions; do
32718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32719    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32721    break 2
32722  fi
32723done
32724  done
32725IFS=$as_save_IFS
32726
32727fi
32728fi
32729OBJC=$ac_cv_prog_OBJC
32730if test -n "$OBJC"; then
32731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
32732$as_echo "$OBJC" >&6; }
32733else
32734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32735$as_echo "no" >&6; }
32736fi
32737
32738
32739    test -n "$OBJC" && break
32740  done
32741fi
32742if test -z "$OBJC"; then
32743  ac_ct_OBJC=$OBJC
32744  for ac_prog in gcc objcc objc cc CC
32745do
32746  # Extract the first word of "$ac_prog", so it can be a program name with args.
32747set dummy $ac_prog; ac_word=$2
32748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32749$as_echo_n "checking for $ac_word... " >&6; }
32750if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
32751  $as_echo_n "(cached) " >&6
32752else
32753  if test -n "$ac_ct_OBJC"; then
32754  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
32755else
32756as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32757for as_dir in $PATH
32758do
32759  IFS=$as_save_IFS
32760  test -z "$as_dir" && as_dir=.
32761    for ac_exec_ext in '' $ac_executable_extensions; do
32762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32763    ac_cv_prog_ac_ct_OBJC="$ac_prog"
32764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32765    break 2
32766  fi
32767done
32768  done
32769IFS=$as_save_IFS
32770
32771fi
32772fi
32773ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
32774if test -n "$ac_ct_OBJC"; then
32775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
32776$as_echo "$ac_ct_OBJC" >&6; }
32777else
32778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32779$as_echo "no" >&6; }
32780fi
32781
32782
32783  test -n "$ac_ct_OBJC" && break
32784done
32785
32786  if test "x$ac_ct_OBJC" = x; then
32787    OBJC="gcc"
32788  else
32789    case $cross_compiling:$ac_tool_warned in
32790yes:)
32791{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32792$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32793ac_tool_warned=yes ;;
32794esac
32795    OBJC=$ac_ct_OBJC
32796  fi
32797fi
32798
32799# Provide some information about the compiler.
32800$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
32801set X $ac_compile
32802ac_compiler=$2
32803for ac_option in --version -v -V -qversion; do
32804  { { ac_try="$ac_compiler $ac_option >&5"
32805case "(($ac_try" in
32806  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32807  *) ac_try_echo=$ac_try;;
32808esac
32809eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32810$as_echo "$ac_try_echo"; } >&5
32811  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32812  ac_status=$?
32813  if test -s conftest.err; then
32814    sed '10a\
32815... rest of stderr output deleted ...
32816         10q' conftest.err >conftest.er1
32817    cat conftest.er1 >&5
32818  fi
32819  rm -f conftest.er1 conftest.err
32820  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32821  test $ac_status = 0; }
32822done
32823
32824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
32825$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
32826if ${ac_cv_objc_compiler_gnu+:} false; then :
32827  $as_echo_n "(cached) " >&6
32828else
32829  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32830/* end confdefs.h.  */
32831
32832int
32833main ()
32834{
32835#ifndef __GNUC__
32836       choke me
32837#endif
32838
32839  ;
32840  return 0;
32841}
32842_ACEOF
32843if ac_fn_objc_try_compile "$LINENO"; then :
32844  ac_compiler_gnu=yes
32845else
32846  ac_compiler_gnu=no
32847fi
32848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32849ac_cv_objc_compiler_gnu=$ac_compiler_gnu
32850
32851fi
32852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
32853$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
32854if test $ac_compiler_gnu = yes; then
32855  GOBJC=yes
32856else
32857  GOBJC=
32858fi
32859ac_test_OBJCFLAGS=${OBJCFLAGS+set}
32860ac_save_OBJCFLAGS=$OBJCFLAGS
32861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
32862$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
32863if ${ac_cv_prog_objc_g+:} false; then :
32864  $as_echo_n "(cached) " >&6
32865else
32866  ac_save_objc_werror_flag=$ac_objc_werror_flag
32867   ac_objc_werror_flag=yes
32868   ac_cv_prog_objc_g=no
32869   OBJCFLAGS="-g"
32870   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32871/* end confdefs.h.  */
32872
32873int
32874main ()
32875{
32876
32877  ;
32878  return 0;
32879}
32880_ACEOF
32881if ac_fn_objc_try_compile "$LINENO"; then :
32882  ac_cv_prog_objc_g=yes
32883else
32884  OBJCFLAGS=""
32885      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32886/* end confdefs.h.  */
32887
32888int
32889main ()
32890{
32891
32892  ;
32893  return 0;
32894}
32895_ACEOF
32896if ac_fn_objc_try_compile "$LINENO"; then :
32897
32898else
32899  ac_objc_werror_flag=$ac_save_objc_werror_flag
32900	 OBJCFLAGS="-g"
32901	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32902/* end confdefs.h.  */
32903
32904int
32905main ()
32906{
32907
32908  ;
32909  return 0;
32910}
32911_ACEOF
32912if ac_fn_objc_try_compile "$LINENO"; then :
32913  ac_cv_prog_objc_g=yes
32914fi
32915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32916fi
32917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32918fi
32919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32920   ac_objc_werror_flag=$ac_save_objc_werror_flag
32921fi
32922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
32923$as_echo "$ac_cv_prog_objc_g" >&6; }
32924if test "$ac_test_OBJCFLAGS" = set; then
32925  OBJCFLAGS=$ac_save_OBJCFLAGS
32926elif test $ac_cv_prog_objc_g = yes; then
32927  if test "$GOBJC" = yes; then
32928    OBJCFLAGS="-g -O2"
32929  else
32930    OBJCFLAGS="-g"
32931  fi
32932else
32933  if test "$GOBJC" = yes; then
32934    OBJCFLAGS="-O2"
32935  else
32936    OBJCFLAGS=
32937  fi
32938fi
32939ac_ext=cpp
32940ac_cpp='$CXXCPP $CPPFLAGS'
32941ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32942ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32943ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32944
32945
32946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32947
32948  # First separate the path from the arguments. This will split at the first
32949  # space.
32950  complete="$OBJC"
32951  path="${complete%% *}"
32952  tmp="$complete EOL"
32953  arguments="${tmp#* }"
32954
32955  # Input might be given as Windows format, start by converting to
32956  # unix format.
32957  new_path=`$CYGPATH -u "$path"`
32958
32959  # Now try to locate executable using which
32960  new_path=`$WHICH "$new_path" 2> /dev/null`
32961  # bat and cmd files are not always considered executable in cygwin causing which
32962  # to not find them
32963  if test "x$new_path" = x \
32964      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32965      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32966    new_path=`$CYGPATH -u "$path"`
32967  fi
32968  if test "x$new_path" = x; then
32969    # Oops. Which didn't find the executable.
32970    # The splitting of arguments from the executable at a space might have been incorrect,
32971    # since paths with space are more likely in Windows. Give it another try with the whole
32972    # argument.
32973    path="$complete"
32974    arguments="EOL"
32975    new_path=`$CYGPATH -u "$path"`
32976    new_path=`$WHICH "$new_path" 2> /dev/null`
32977    # bat and cmd files are not always considered executable in cygwin causing which
32978    # to not find them
32979    if test "x$new_path" = x \
32980        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32981        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32982      new_path=`$CYGPATH -u "$path"`
32983    fi
32984    if test "x$new_path" = x; then
32985      # It's still not found. Now this is an unrecoverable error.
32986      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32987$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32988      has_space=`$ECHO "$complete" | $GREP " "`
32989      if test "x$has_space" != x; then
32990        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32991$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32992      fi
32993      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32994    fi
32995  fi
32996
32997  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32998  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32999  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33000  # "foo.exe" is OK but "foo" is an error.
33001  #
33002  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33003  # It is also a way to make sure we got the proper file name for the real test later on.
33004  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33005  if test "x$test_shortpath" = x; then
33006    # Short path failed, file does not exist as specified.
33007    # Try adding .exe or .cmd
33008    if test -f "${new_path}.exe"; then
33009      input_to_shortpath="${new_path}.exe"
33010    elif test -f "${new_path}.cmd"; then
33011      input_to_shortpath="${new_path}.cmd"
33012    else
33013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33014$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33015      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33016$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33017      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33018    fi
33019  else
33020    input_to_shortpath="$new_path"
33021  fi
33022
33023  # Call helper function which possibly converts this using DOS-style short mode.
33024  # If so, the updated path is stored in $new_path.
33025  new_path="$input_to_shortpath"
33026
33027  input_path="$input_to_shortpath"
33028  # Check if we need to convert this using DOS-style short mode. If the path
33029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33030  # take no chances and rewrite it.
33031  # Note: m4 eats our [], so we need to use [ and ] instead.
33032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33033  if test "x$has_forbidden_chars" != x; then
33034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33035    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33036    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33037    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33038      # Going to short mode and back again did indeed matter. Since short mode is
33039      # case insensitive, let's make it lowercase to improve readability.
33040      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33041      # Now convert it back to Unix-stile (cygpath)
33042      input_path=`$CYGPATH -u "$shortmode_path"`
33043      new_path="$input_path"
33044    fi
33045  fi
33046
33047  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33048  if test "x$test_cygdrive_prefix" = x; then
33049    # As a simple fix, exclude /usr/bin since it's not a real path.
33050    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33051      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33052      # a path prefixed by /cygdrive for fixpath to work.
33053      new_path="$CYGWIN_ROOT_PATH$input_path"
33054    fi
33055  fi
33056
33057  # remove trailing .exe if any
33058  new_path="${new_path/%.exe/}"
33059
33060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33061
33062  # First separate the path from the arguments. This will split at the first
33063  # space.
33064  complete="$OBJC"
33065  path="${complete%% *}"
33066  tmp="$complete EOL"
33067  arguments="${tmp#* }"
33068
33069  # Input might be given as Windows format, start by converting to
33070  # unix format.
33071  new_path="$path"
33072
33073  windows_path="$new_path"
33074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33075    unix_path=`$CYGPATH -u "$windows_path"`
33076    new_path="$unix_path"
33077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33079    new_path="$unix_path"
33080  fi
33081
33082
33083  # Now try to locate executable using which
33084  new_path=`$WHICH "$new_path" 2> /dev/null`
33085
33086  if test "x$new_path" = x; then
33087    # Oops. Which didn't find the executable.
33088    # The splitting of arguments from the executable at a space might have been incorrect,
33089    # since paths with space are more likely in Windows. Give it another try with the whole
33090    # argument.
33091    path="$complete"
33092    arguments="EOL"
33093    new_path="$path"
33094
33095  windows_path="$new_path"
33096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33097    unix_path=`$CYGPATH -u "$windows_path"`
33098    new_path="$unix_path"
33099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33101    new_path="$unix_path"
33102  fi
33103
33104
33105    new_path=`$WHICH "$new_path" 2> /dev/null`
33106
33107    if test "x$new_path" = x; then
33108      # It's still not found. Now this is an unrecoverable error.
33109      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33110$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33111      has_space=`$ECHO "$complete" | $GREP " "`
33112      if test "x$has_space" != x; then
33113        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33114$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33115      fi
33116      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33117    fi
33118  fi
33119
33120  # Now new_path has a complete unix path to the binary
33121  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33122    # Keep paths in /bin as-is, but remove trailing .exe if any
33123    new_path="${new_path/%.exe/}"
33124    # Do not save /bin paths to all_fixpath_prefixes!
33125  else
33126    # Not in mixed or Windows style, start by that.
33127    new_path=`cmd //c echo $new_path`
33128
33129  input_path="$new_path"
33130  # Check if we need to convert this using DOS-style short mode. If the path
33131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33132  # take no chances and rewrite it.
33133  # Note: m4 eats our [], so we need to use [ and ] instead.
33134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33135  if test "x$has_forbidden_chars" != x; then
33136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33137    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33138  fi
33139
33140    # Output is in $new_path
33141
33142  windows_path="$new_path"
33143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33144    unix_path=`$CYGPATH -u "$windows_path"`
33145    new_path="$unix_path"
33146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33148    new_path="$unix_path"
33149  fi
33150
33151    # remove trailing .exe if any
33152    new_path="${new_path/%.exe/}"
33153
33154    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33155    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33156  fi
33157
33158  else
33159    # We're on a posix platform. Hooray! :)
33160    # First separate the path from the arguments. This will split at the first
33161    # space.
33162    complete="$OBJC"
33163    path="${complete%% *}"
33164    tmp="$complete EOL"
33165    arguments="${tmp#* }"
33166
33167    # Cannot rely on the command "which" here since it doesn't always work.
33168    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33169    if test -z "$is_absolute_path"; then
33170      # Path to executable is not absolute. Find it.
33171      IFS_save="$IFS"
33172      IFS=:
33173      for p in $PATH; do
33174        if test -f "$p/$path" && test -x "$p/$path"; then
33175          new_path="$p/$path"
33176          break
33177        fi
33178      done
33179      IFS="$IFS_save"
33180    else
33181      # This is an absolute path, we can use it without further modifications.
33182      new_path="$path"
33183    fi
33184
33185    if test "x$new_path" = x; then
33186      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33187$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33188      has_space=`$ECHO "$complete" | $GREP " "`
33189      if test "x$has_space" != x; then
33190        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33191$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33192      fi
33193      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33194    fi
33195  fi
33196
33197  # Now join together the path and the arguments once again
33198  if test "x$arguments" != xEOL; then
33199    new_complete="$new_path ${arguments% *}"
33200  else
33201    new_complete="$new_path"
33202  fi
33203
33204  if test "x$complete" != "x$new_complete"; then
33205    OBJC="$new_complete"
33206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33207$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33208  fi
33209
33210
33211
33212  # Publish this variable in the help.
33213
33214
33215  if test "x$LIPO" = x; then
33216    # The variable is not set by user, try to locate tool using the code snippet
33217    for ac_prog in lipo
33218do
33219  # Extract the first word of "$ac_prog", so it can be a program name with args.
33220set dummy $ac_prog; ac_word=$2
33221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33222$as_echo_n "checking for $ac_word... " >&6; }
33223if ${ac_cv_path_LIPO+:} false; then :
33224  $as_echo_n "(cached) " >&6
33225else
33226  case $LIPO in
33227  [\\/]* | ?:[\\/]*)
33228  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33229  ;;
33230  *)
33231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33232for as_dir in $PATH
33233do
33234  IFS=$as_save_IFS
33235  test -z "$as_dir" && as_dir=.
33236    for ac_exec_ext in '' $ac_executable_extensions; do
33237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33238    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33240    break 2
33241  fi
33242done
33243  done
33244IFS=$as_save_IFS
33245
33246  ;;
33247esac
33248fi
33249LIPO=$ac_cv_path_LIPO
33250if test -n "$LIPO"; then
33251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33252$as_echo "$LIPO" >&6; }
33253else
33254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33255$as_echo "no" >&6; }
33256fi
33257
33258
33259  test -n "$LIPO" && break
33260done
33261
33262  else
33263    # The variable is set, but is it from the command line or the environment?
33264
33265    # Try to remove the string !LIPO! from our list.
33266    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33267    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33268      # If it failed, the variable was not from the command line. Ignore it,
33269      # but warn the user (except for BASH, which is always set by the calling BASH).
33270      if test "xLIPO" != xBASH; then
33271        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33272$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33273      fi
33274      # Try to locate tool using the code snippet
33275      for ac_prog in lipo
33276do
33277  # Extract the first word of "$ac_prog", so it can be a program name with args.
33278set dummy $ac_prog; ac_word=$2
33279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33280$as_echo_n "checking for $ac_word... " >&6; }
33281if ${ac_cv_path_LIPO+:} false; then :
33282  $as_echo_n "(cached) " >&6
33283else
33284  case $LIPO in
33285  [\\/]* | ?:[\\/]*)
33286  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33287  ;;
33288  *)
33289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33290for as_dir in $PATH
33291do
33292  IFS=$as_save_IFS
33293  test -z "$as_dir" && as_dir=.
33294    for ac_exec_ext in '' $ac_executable_extensions; do
33295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33296    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33298    break 2
33299  fi
33300done
33301  done
33302IFS=$as_save_IFS
33303
33304  ;;
33305esac
33306fi
33307LIPO=$ac_cv_path_LIPO
33308if test -n "$LIPO"; then
33309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33310$as_echo "$LIPO" >&6; }
33311else
33312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33313$as_echo "no" >&6; }
33314fi
33315
33316
33317  test -n "$LIPO" && break
33318done
33319
33320    else
33321      # If it succeeded, then it was overridden by the user. We will use it
33322      # for the tool.
33323
33324      # First remove it from the list of overridden variables, so we can test
33325      # for unknown variables in the end.
33326      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33327
33328      # Check if the provided tool contains a complete path.
33329      tool_specified="$LIPO"
33330      tool_basename="${tool_specified##*/}"
33331      if test "x$tool_basename" = "x$tool_specified"; then
33332        # A command without a complete path is provided, search $PATH.
33333        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33334$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33335        # Extract the first word of "$tool_basename", so it can be a program name with args.
33336set dummy $tool_basename; ac_word=$2
33337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33338$as_echo_n "checking for $ac_word... " >&6; }
33339if ${ac_cv_path_LIPO+:} false; then :
33340  $as_echo_n "(cached) " >&6
33341else
33342  case $LIPO in
33343  [\\/]* | ?:[\\/]*)
33344  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33345  ;;
33346  *)
33347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33348for as_dir in $PATH
33349do
33350  IFS=$as_save_IFS
33351  test -z "$as_dir" && as_dir=.
33352    for ac_exec_ext in '' $ac_executable_extensions; do
33353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33354    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33356    break 2
33357  fi
33358done
33359  done
33360IFS=$as_save_IFS
33361
33362  ;;
33363esac
33364fi
33365LIPO=$ac_cv_path_LIPO
33366if test -n "$LIPO"; then
33367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33368$as_echo "$LIPO" >&6; }
33369else
33370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33371$as_echo "no" >&6; }
33372fi
33373
33374
33375        if test "x$LIPO" = x; then
33376          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33377        fi
33378      else
33379        # Otherwise we believe it is a complete path. Use it as it is.
33380        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33381$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33382        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33383$as_echo_n "checking for LIPO... " >&6; }
33384        if test ! -x "$tool_specified"; then
33385          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33386$as_echo "not found" >&6; }
33387          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33388        fi
33389        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33390$as_echo "$tool_specified" >&6; }
33391      fi
33392    fi
33393  fi
33394
33395
33396
33397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33398
33399  # First separate the path from the arguments. This will split at the first
33400  # space.
33401  complete="$LIPO"
33402  path="${complete%% *}"
33403  tmp="$complete EOL"
33404  arguments="${tmp#* }"
33405
33406  # Input might be given as Windows format, start by converting to
33407  # unix format.
33408  new_path=`$CYGPATH -u "$path"`
33409
33410  # Now try to locate executable using which
33411  new_path=`$WHICH "$new_path" 2> /dev/null`
33412  # bat and cmd files are not always considered executable in cygwin causing which
33413  # to not find them
33414  if test "x$new_path" = x \
33415      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33416      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33417    new_path=`$CYGPATH -u "$path"`
33418  fi
33419  if test "x$new_path" = x; then
33420    # Oops. Which didn't find the executable.
33421    # The splitting of arguments from the executable at a space might have been incorrect,
33422    # since paths with space are more likely in Windows. Give it another try with the whole
33423    # argument.
33424    path="$complete"
33425    arguments="EOL"
33426    new_path=`$CYGPATH -u "$path"`
33427    new_path=`$WHICH "$new_path" 2> /dev/null`
33428    # bat and cmd files are not always considered executable in cygwin causing which
33429    # to not find them
33430    if test "x$new_path" = x \
33431        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33432        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33433      new_path=`$CYGPATH -u "$path"`
33434    fi
33435    if test "x$new_path" = x; then
33436      # It's still not found. Now this is an unrecoverable error.
33437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33438$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33439      has_space=`$ECHO "$complete" | $GREP " "`
33440      if test "x$has_space" != x; then
33441        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33442$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33443      fi
33444      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33445    fi
33446  fi
33447
33448  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33449  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33450  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33451  # "foo.exe" is OK but "foo" is an error.
33452  #
33453  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33454  # It is also a way to make sure we got the proper file name for the real test later on.
33455  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33456  if test "x$test_shortpath" = x; then
33457    # Short path failed, file does not exist as specified.
33458    # Try adding .exe or .cmd
33459    if test -f "${new_path}.exe"; then
33460      input_to_shortpath="${new_path}.exe"
33461    elif test -f "${new_path}.cmd"; then
33462      input_to_shortpath="${new_path}.cmd"
33463    else
33464      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33465$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33466      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33467$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33468      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33469    fi
33470  else
33471    input_to_shortpath="$new_path"
33472  fi
33473
33474  # Call helper function which possibly converts this using DOS-style short mode.
33475  # If so, the updated path is stored in $new_path.
33476  new_path="$input_to_shortpath"
33477
33478  input_path="$input_to_shortpath"
33479  # Check if we need to convert this using DOS-style short mode. If the path
33480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33481  # take no chances and rewrite it.
33482  # Note: m4 eats our [], so we need to use [ and ] instead.
33483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33484  if test "x$has_forbidden_chars" != x; then
33485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33486    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33487    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33488    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33489      # Going to short mode and back again did indeed matter. Since short mode is
33490      # case insensitive, let's make it lowercase to improve readability.
33491      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33492      # Now convert it back to Unix-stile (cygpath)
33493      input_path=`$CYGPATH -u "$shortmode_path"`
33494      new_path="$input_path"
33495    fi
33496  fi
33497
33498  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33499  if test "x$test_cygdrive_prefix" = x; then
33500    # As a simple fix, exclude /usr/bin since it's not a real path.
33501    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33502      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33503      # a path prefixed by /cygdrive for fixpath to work.
33504      new_path="$CYGWIN_ROOT_PATH$input_path"
33505    fi
33506  fi
33507
33508  # remove trailing .exe if any
33509  new_path="${new_path/%.exe/}"
33510
33511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33512
33513  # First separate the path from the arguments. This will split at the first
33514  # space.
33515  complete="$LIPO"
33516  path="${complete%% *}"
33517  tmp="$complete EOL"
33518  arguments="${tmp#* }"
33519
33520  # Input might be given as Windows format, start by converting to
33521  # unix format.
33522  new_path="$path"
33523
33524  windows_path="$new_path"
33525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33526    unix_path=`$CYGPATH -u "$windows_path"`
33527    new_path="$unix_path"
33528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33530    new_path="$unix_path"
33531  fi
33532
33533
33534  # Now try to locate executable using which
33535  new_path=`$WHICH "$new_path" 2> /dev/null`
33536
33537  if test "x$new_path" = x; then
33538    # Oops. Which didn't find the executable.
33539    # The splitting of arguments from the executable at a space might have been incorrect,
33540    # since paths with space are more likely in Windows. Give it another try with the whole
33541    # argument.
33542    path="$complete"
33543    arguments="EOL"
33544    new_path="$path"
33545
33546  windows_path="$new_path"
33547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33548    unix_path=`$CYGPATH -u "$windows_path"`
33549    new_path="$unix_path"
33550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33552    new_path="$unix_path"
33553  fi
33554
33555
33556    new_path=`$WHICH "$new_path" 2> /dev/null`
33557
33558    if test "x$new_path" = x; then
33559      # It's still not found. Now this is an unrecoverable error.
33560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33561$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33562      has_space=`$ECHO "$complete" | $GREP " "`
33563      if test "x$has_space" != x; then
33564        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33565$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33566      fi
33567      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33568    fi
33569  fi
33570
33571  # Now new_path has a complete unix path to the binary
33572  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33573    # Keep paths in /bin as-is, but remove trailing .exe if any
33574    new_path="${new_path/%.exe/}"
33575    # Do not save /bin paths to all_fixpath_prefixes!
33576  else
33577    # Not in mixed or Windows style, start by that.
33578    new_path=`cmd //c echo $new_path`
33579
33580  input_path="$new_path"
33581  # Check if we need to convert this using DOS-style short mode. If the path
33582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33583  # take no chances and rewrite it.
33584  # Note: m4 eats our [], so we need to use [ and ] instead.
33585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33586  if test "x$has_forbidden_chars" != x; then
33587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33588    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33589  fi
33590
33591    # Output is in $new_path
33592
33593  windows_path="$new_path"
33594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33595    unix_path=`$CYGPATH -u "$windows_path"`
33596    new_path="$unix_path"
33597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33599    new_path="$unix_path"
33600  fi
33601
33602    # remove trailing .exe if any
33603    new_path="${new_path/%.exe/}"
33604
33605    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33606    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33607  fi
33608
33609  else
33610    # We're on a posix platform. Hooray! :)
33611    # First separate the path from the arguments. This will split at the first
33612    # space.
33613    complete="$LIPO"
33614    path="${complete%% *}"
33615    tmp="$complete EOL"
33616    arguments="${tmp#* }"
33617
33618    # Cannot rely on the command "which" here since it doesn't always work.
33619    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33620    if test -z "$is_absolute_path"; then
33621      # Path to executable is not absolute. Find it.
33622      IFS_save="$IFS"
33623      IFS=:
33624      for p in $PATH; do
33625        if test -f "$p/$path" && test -x "$p/$path"; then
33626          new_path="$p/$path"
33627          break
33628        fi
33629      done
33630      IFS="$IFS_save"
33631    else
33632      # This is an absolute path, we can use it without further modifications.
33633      new_path="$path"
33634    fi
33635
33636    if test "x$new_path" = x; then
33637      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33638$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33639      has_space=`$ECHO "$complete" | $GREP " "`
33640      if test "x$has_space" != x; then
33641        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33642$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33643      fi
33644      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33645    fi
33646  fi
33647
33648  # Now join together the path and the arguments once again
33649  if test "x$arguments" != xEOL; then
33650    new_complete="$new_path ${arguments% *}"
33651  else
33652    new_complete="$new_path"
33653  fi
33654
33655  if test "x$complete" != "x$new_complete"; then
33656    LIPO="$new_complete"
33657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33658$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33659  fi
33660
33661  else
33662    OBJC=
33663  fi
33664
33665  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33666    # Extract the first word of "mt", so it can be a program name with args.
33667set dummy mt; ac_word=$2
33668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33669$as_echo_n "checking for $ac_word... " >&6; }
33670if ${ac_cv_prog_MT+:} false; then :
33671  $as_echo_n "(cached) " >&6
33672else
33673  if test -n "$MT"; then
33674  ac_cv_prog_MT="$MT" # Let the user override the test.
33675else
33676  ac_prog_rejected=no
33677as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33678for as_dir in $PATH
33679do
33680  IFS=$as_save_IFS
33681  test -z "$as_dir" && as_dir=.
33682    for ac_exec_ext in '' $ac_executable_extensions; do
33683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33684    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33685       ac_prog_rejected=yes
33686       continue
33687     fi
33688    ac_cv_prog_MT="mt"
33689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33690    break 2
33691  fi
33692done
33693  done
33694IFS=$as_save_IFS
33695
33696if test $ac_prog_rejected = yes; then
33697  # We found a bogon in the path, so make sure we never use it.
33698  set dummy $ac_cv_prog_MT
33699  shift
33700  if test $# != 0; then
33701    # We chose a different compiler from the bogus one.
33702    # However, it has the same basename, so the bogon will be chosen
33703    # first if we set MT to just the basename; use the full file name.
33704    shift
33705    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
33706  fi
33707fi
33708fi
33709fi
33710MT=$ac_cv_prog_MT
33711if test -n "$MT"; then
33712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
33713$as_echo "$MT" >&6; }
33714else
33715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33716$as_echo "no" >&6; }
33717fi
33718
33719
33720
33721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33722
33723  # First separate the path from the arguments. This will split at the first
33724  # space.
33725  complete="$MT"
33726  path="${complete%% *}"
33727  tmp="$complete EOL"
33728  arguments="${tmp#* }"
33729
33730  # Input might be given as Windows format, start by converting to
33731  # unix format.
33732  new_path=`$CYGPATH -u "$path"`
33733
33734  # Now try to locate executable using which
33735  new_path=`$WHICH "$new_path" 2> /dev/null`
33736  # bat and cmd files are not always considered executable in cygwin causing which
33737  # to not find them
33738  if test "x$new_path" = x \
33739      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33740      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33741    new_path=`$CYGPATH -u "$path"`
33742  fi
33743  if test "x$new_path" = x; then
33744    # Oops. Which didn't find the executable.
33745    # The splitting of arguments from the executable at a space might have been incorrect,
33746    # since paths with space are more likely in Windows. Give it another try with the whole
33747    # argument.
33748    path="$complete"
33749    arguments="EOL"
33750    new_path=`$CYGPATH -u "$path"`
33751    new_path=`$WHICH "$new_path" 2> /dev/null`
33752    # bat and cmd files are not always considered executable in cygwin causing which
33753    # to not find them
33754    if test "x$new_path" = x \
33755        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33756        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33757      new_path=`$CYGPATH -u "$path"`
33758    fi
33759    if test "x$new_path" = x; then
33760      # It's still not found. Now this is an unrecoverable error.
33761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33762$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33763      has_space=`$ECHO "$complete" | $GREP " "`
33764      if test "x$has_space" != x; then
33765        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33766$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33767      fi
33768      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33769    fi
33770  fi
33771
33772  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33773  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33774  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33775  # "foo.exe" is OK but "foo" is an error.
33776  #
33777  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33778  # It is also a way to make sure we got the proper file name for the real test later on.
33779  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33780  if test "x$test_shortpath" = x; then
33781    # Short path failed, file does not exist as specified.
33782    # Try adding .exe or .cmd
33783    if test -f "${new_path}.exe"; then
33784      input_to_shortpath="${new_path}.exe"
33785    elif test -f "${new_path}.cmd"; then
33786      input_to_shortpath="${new_path}.cmd"
33787    else
33788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
33789$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
33790      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33791$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33792      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33793    fi
33794  else
33795    input_to_shortpath="$new_path"
33796  fi
33797
33798  # Call helper function which possibly converts this using DOS-style short mode.
33799  # If so, the updated path is stored in $new_path.
33800  new_path="$input_to_shortpath"
33801
33802  input_path="$input_to_shortpath"
33803  # Check if we need to convert this using DOS-style short mode. If the path
33804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33805  # take no chances and rewrite it.
33806  # Note: m4 eats our [], so we need to use [ and ] instead.
33807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33808  if test "x$has_forbidden_chars" != x; then
33809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33810    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33811    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33812    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33813      # Going to short mode and back again did indeed matter. Since short mode is
33814      # case insensitive, let's make it lowercase to improve readability.
33815      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33816      # Now convert it back to Unix-stile (cygpath)
33817      input_path=`$CYGPATH -u "$shortmode_path"`
33818      new_path="$input_path"
33819    fi
33820  fi
33821
33822  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33823  if test "x$test_cygdrive_prefix" = x; then
33824    # As a simple fix, exclude /usr/bin since it's not a real path.
33825    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33826      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33827      # a path prefixed by /cygdrive for fixpath to work.
33828      new_path="$CYGWIN_ROOT_PATH$input_path"
33829    fi
33830  fi
33831
33832  # remove trailing .exe if any
33833  new_path="${new_path/%.exe/}"
33834
33835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33836
33837  # First separate the path from the arguments. This will split at the first
33838  # space.
33839  complete="$MT"
33840  path="${complete%% *}"
33841  tmp="$complete EOL"
33842  arguments="${tmp#* }"
33843
33844  # Input might be given as Windows format, start by converting to
33845  # unix format.
33846  new_path="$path"
33847
33848  windows_path="$new_path"
33849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33850    unix_path=`$CYGPATH -u "$windows_path"`
33851    new_path="$unix_path"
33852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33854    new_path="$unix_path"
33855  fi
33856
33857
33858  # Now try to locate executable using which
33859  new_path=`$WHICH "$new_path" 2> /dev/null`
33860
33861  if test "x$new_path" = x; then
33862    # Oops. Which didn't find the executable.
33863    # The splitting of arguments from the executable at a space might have been incorrect,
33864    # since paths with space are more likely in Windows. Give it another try with the whole
33865    # argument.
33866    path="$complete"
33867    arguments="EOL"
33868    new_path="$path"
33869
33870  windows_path="$new_path"
33871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33872    unix_path=`$CYGPATH -u "$windows_path"`
33873    new_path="$unix_path"
33874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33876    new_path="$unix_path"
33877  fi
33878
33879
33880    new_path=`$WHICH "$new_path" 2> /dev/null`
33881
33882    if test "x$new_path" = x; then
33883      # It's still not found. Now this is an unrecoverable error.
33884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33885$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33886      has_space=`$ECHO "$complete" | $GREP " "`
33887      if test "x$has_space" != x; then
33888        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33889$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33890      fi
33891      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33892    fi
33893  fi
33894
33895  # Now new_path has a complete unix path to the binary
33896  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33897    # Keep paths in /bin as-is, but remove trailing .exe if any
33898    new_path="${new_path/%.exe/}"
33899    # Do not save /bin paths to all_fixpath_prefixes!
33900  else
33901    # Not in mixed or Windows style, start by that.
33902    new_path=`cmd //c echo $new_path`
33903
33904  input_path="$new_path"
33905  # Check if we need to convert this using DOS-style short mode. If the path
33906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33907  # take no chances and rewrite it.
33908  # Note: m4 eats our [], so we need to use [ and ] instead.
33909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33910  if test "x$has_forbidden_chars" != x; then
33911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33912    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33913  fi
33914
33915    # Output is in $new_path
33916
33917  windows_path="$new_path"
33918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33919    unix_path=`$CYGPATH -u "$windows_path"`
33920    new_path="$unix_path"
33921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33923    new_path="$unix_path"
33924  fi
33925
33926    # remove trailing .exe if any
33927    new_path="${new_path/%.exe/}"
33928
33929    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33930    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33931  fi
33932
33933  else
33934    # We're on a posix platform. Hooray! :)
33935    # First separate the path from the arguments. This will split at the first
33936    # space.
33937    complete="$MT"
33938    path="${complete%% *}"
33939    tmp="$complete EOL"
33940    arguments="${tmp#* }"
33941
33942    # Cannot rely on the command "which" here since it doesn't always work.
33943    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33944    if test -z "$is_absolute_path"; then
33945      # Path to executable is not absolute. Find it.
33946      IFS_save="$IFS"
33947      IFS=:
33948      for p in $PATH; do
33949        if test -f "$p/$path" && test -x "$p/$path"; then
33950          new_path="$p/$path"
33951          break
33952        fi
33953      done
33954      IFS="$IFS_save"
33955    else
33956      # This is an absolute path, we can use it without further modifications.
33957      new_path="$path"
33958    fi
33959
33960    if test "x$new_path" = x; then
33961      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33962$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33963      has_space=`$ECHO "$complete" | $GREP " "`
33964      if test "x$has_space" != x; then
33965        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33966$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33967      fi
33968      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33969    fi
33970  fi
33971
33972  # Now join together the path and the arguments once again
33973  if test "x$arguments" != xEOL; then
33974    new_complete="$new_path ${arguments% *}"
33975  else
33976    new_complete="$new_path"
33977  fi
33978
33979  if test "x$complete" != "x$new_complete"; then
33980    MT="$new_complete"
33981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
33982$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
33983  fi
33984
33985    # Setup the resource compiler (RC)
33986    # Extract the first word of "rc", so it can be a program name with args.
33987set dummy rc; ac_word=$2
33988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33989$as_echo_n "checking for $ac_word... " >&6; }
33990if ${ac_cv_prog_RC+:} false; then :
33991  $as_echo_n "(cached) " >&6
33992else
33993  if test -n "$RC"; then
33994  ac_cv_prog_RC="$RC" # Let the user override the test.
33995else
33996  ac_prog_rejected=no
33997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33998for as_dir in $PATH
33999do
34000  IFS=$as_save_IFS
34001  test -z "$as_dir" && as_dir=.
34002    for ac_exec_ext in '' $ac_executable_extensions; do
34003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34004    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34005       ac_prog_rejected=yes
34006       continue
34007     fi
34008    ac_cv_prog_RC="rc"
34009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34010    break 2
34011  fi
34012done
34013  done
34014IFS=$as_save_IFS
34015
34016if test $ac_prog_rejected = yes; then
34017  # We found a bogon in the path, so make sure we never use it.
34018  set dummy $ac_cv_prog_RC
34019  shift
34020  if test $# != 0; then
34021    # We chose a different compiler from the bogus one.
34022    # However, it has the same basename, so the bogon will be chosen
34023    # first if we set RC to just the basename; use the full file name.
34024    shift
34025    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34026  fi
34027fi
34028fi
34029fi
34030RC=$ac_cv_prog_RC
34031if test -n "$RC"; then
34032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34033$as_echo "$RC" >&6; }
34034else
34035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34036$as_echo "no" >&6; }
34037fi
34038
34039
34040
34041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34042
34043  # First separate the path from the arguments. This will split at the first
34044  # space.
34045  complete="$RC"
34046  path="${complete%% *}"
34047  tmp="$complete EOL"
34048  arguments="${tmp#* }"
34049
34050  # Input might be given as Windows format, start by converting to
34051  # unix format.
34052  new_path=`$CYGPATH -u "$path"`
34053
34054  # Now try to locate executable using which
34055  new_path=`$WHICH "$new_path" 2> /dev/null`
34056  # bat and cmd files are not always considered executable in cygwin causing which
34057  # to not find them
34058  if test "x$new_path" = x \
34059      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34060      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34061    new_path=`$CYGPATH -u "$path"`
34062  fi
34063  if test "x$new_path" = x; then
34064    # Oops. Which didn't find the executable.
34065    # The splitting of arguments from the executable at a space might have been incorrect,
34066    # since paths with space are more likely in Windows. Give it another try with the whole
34067    # argument.
34068    path="$complete"
34069    arguments="EOL"
34070    new_path=`$CYGPATH -u "$path"`
34071    new_path=`$WHICH "$new_path" 2> /dev/null`
34072    # bat and cmd files are not always considered executable in cygwin causing which
34073    # to not find them
34074    if test "x$new_path" = x \
34075        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34076        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34077      new_path=`$CYGPATH -u "$path"`
34078    fi
34079    if test "x$new_path" = x; then
34080      # It's still not found. Now this is an unrecoverable error.
34081      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34082$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34083      has_space=`$ECHO "$complete" | $GREP " "`
34084      if test "x$has_space" != x; then
34085        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34086$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34087      fi
34088      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34089    fi
34090  fi
34091
34092  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34093  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34094  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34095  # "foo.exe" is OK but "foo" is an error.
34096  #
34097  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34098  # It is also a way to make sure we got the proper file name for the real test later on.
34099  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34100  if test "x$test_shortpath" = x; then
34101    # Short path failed, file does not exist as specified.
34102    # Try adding .exe or .cmd
34103    if test -f "${new_path}.exe"; then
34104      input_to_shortpath="${new_path}.exe"
34105    elif test -f "${new_path}.cmd"; then
34106      input_to_shortpath="${new_path}.cmd"
34107    else
34108      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34109$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34110      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34111$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34112      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34113    fi
34114  else
34115    input_to_shortpath="$new_path"
34116  fi
34117
34118  # Call helper function which possibly converts this using DOS-style short mode.
34119  # If so, the updated path is stored in $new_path.
34120  new_path="$input_to_shortpath"
34121
34122  input_path="$input_to_shortpath"
34123  # Check if we need to convert this using DOS-style short mode. If the path
34124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34125  # take no chances and rewrite it.
34126  # Note: m4 eats our [], so we need to use [ and ] instead.
34127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34128  if test "x$has_forbidden_chars" != x; then
34129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34130    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34131    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34132    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34133      # Going to short mode and back again did indeed matter. Since short mode is
34134      # case insensitive, let's make it lowercase to improve readability.
34135      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34136      # Now convert it back to Unix-stile (cygpath)
34137      input_path=`$CYGPATH -u "$shortmode_path"`
34138      new_path="$input_path"
34139    fi
34140  fi
34141
34142  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34143  if test "x$test_cygdrive_prefix" = x; then
34144    # As a simple fix, exclude /usr/bin since it's not a real path.
34145    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34146      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34147      # a path prefixed by /cygdrive for fixpath to work.
34148      new_path="$CYGWIN_ROOT_PATH$input_path"
34149    fi
34150  fi
34151
34152  # remove trailing .exe if any
34153  new_path="${new_path/%.exe/}"
34154
34155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34156
34157  # First separate the path from the arguments. This will split at the first
34158  # space.
34159  complete="$RC"
34160  path="${complete%% *}"
34161  tmp="$complete EOL"
34162  arguments="${tmp#* }"
34163
34164  # Input might be given as Windows format, start by converting to
34165  # unix format.
34166  new_path="$path"
34167
34168  windows_path="$new_path"
34169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34170    unix_path=`$CYGPATH -u "$windows_path"`
34171    new_path="$unix_path"
34172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34174    new_path="$unix_path"
34175  fi
34176
34177
34178  # Now try to locate executable using which
34179  new_path=`$WHICH "$new_path" 2> /dev/null`
34180
34181  if test "x$new_path" = x; then
34182    # Oops. Which didn't find the executable.
34183    # The splitting of arguments from the executable at a space might have been incorrect,
34184    # since paths with space are more likely in Windows. Give it another try with the whole
34185    # argument.
34186    path="$complete"
34187    arguments="EOL"
34188    new_path="$path"
34189
34190  windows_path="$new_path"
34191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34192    unix_path=`$CYGPATH -u "$windows_path"`
34193    new_path="$unix_path"
34194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34196    new_path="$unix_path"
34197  fi
34198
34199
34200    new_path=`$WHICH "$new_path" 2> /dev/null`
34201
34202    if test "x$new_path" = x; then
34203      # It's still not found. Now this is an unrecoverable error.
34204      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34205$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34206      has_space=`$ECHO "$complete" | $GREP " "`
34207      if test "x$has_space" != x; then
34208        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34209$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34210      fi
34211      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34212    fi
34213  fi
34214
34215  # Now new_path has a complete unix path to the binary
34216  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34217    # Keep paths in /bin as-is, but remove trailing .exe if any
34218    new_path="${new_path/%.exe/}"
34219    # Do not save /bin paths to all_fixpath_prefixes!
34220  else
34221    # Not in mixed or Windows style, start by that.
34222    new_path=`cmd //c echo $new_path`
34223
34224  input_path="$new_path"
34225  # Check if we need to convert this using DOS-style short mode. If the path
34226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34227  # take no chances and rewrite it.
34228  # Note: m4 eats our [], so we need to use [ and ] instead.
34229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34230  if test "x$has_forbidden_chars" != x; then
34231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34232    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34233  fi
34234
34235    # Output is in $new_path
34236
34237  windows_path="$new_path"
34238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34239    unix_path=`$CYGPATH -u "$windows_path"`
34240    new_path="$unix_path"
34241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34243    new_path="$unix_path"
34244  fi
34245
34246    # remove trailing .exe if any
34247    new_path="${new_path/%.exe/}"
34248
34249    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34250    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34251  fi
34252
34253  else
34254    # We're on a posix platform. Hooray! :)
34255    # First separate the path from the arguments. This will split at the first
34256    # space.
34257    complete="$RC"
34258    path="${complete%% *}"
34259    tmp="$complete EOL"
34260    arguments="${tmp#* }"
34261
34262    # Cannot rely on the command "which" here since it doesn't always work.
34263    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34264    if test -z "$is_absolute_path"; then
34265      # Path to executable is not absolute. Find it.
34266      IFS_save="$IFS"
34267      IFS=:
34268      for p in $PATH; do
34269        if test -f "$p/$path" && test -x "$p/$path"; then
34270          new_path="$p/$path"
34271          break
34272        fi
34273      done
34274      IFS="$IFS_save"
34275    else
34276      # This is an absolute path, we can use it without further modifications.
34277      new_path="$path"
34278    fi
34279
34280    if test "x$new_path" = x; then
34281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34282$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34283      has_space=`$ECHO "$complete" | $GREP " "`
34284      if test "x$has_space" != x; then
34285        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34286$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34287      fi
34288      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34289    fi
34290  fi
34291
34292  # Now join together the path and the arguments once again
34293  if test "x$arguments" != xEOL; then
34294    new_complete="$new_path ${arguments% *}"
34295  else
34296    new_complete="$new_path"
34297  fi
34298
34299  if test "x$complete" != "x$new_complete"; then
34300    RC="$new_complete"
34301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34302$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34303  fi
34304
34305    # Extract the first word of "dumpbin", so it can be a program name with args.
34306set dummy dumpbin; ac_word=$2
34307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34308$as_echo_n "checking for $ac_word... " >&6; }
34309if ${ac_cv_prog_DUMPBIN+:} false; then :
34310  $as_echo_n "(cached) " >&6
34311else
34312  if test -n "$DUMPBIN"; then
34313  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34314else
34315as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34316for as_dir in $PATH
34317do
34318  IFS=$as_save_IFS
34319  test -z "$as_dir" && as_dir=.
34320    for ac_exec_ext in '' $ac_executable_extensions; do
34321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34322    ac_cv_prog_DUMPBIN="dumpbin"
34323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34324    break 2
34325  fi
34326done
34327  done
34328IFS=$as_save_IFS
34329
34330fi
34331fi
34332DUMPBIN=$ac_cv_prog_DUMPBIN
34333if test -n "$DUMPBIN"; then
34334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34335$as_echo "$DUMPBIN" >&6; }
34336else
34337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34338$as_echo "no" >&6; }
34339fi
34340
34341
34342
34343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34344
34345  # First separate the path from the arguments. This will split at the first
34346  # space.
34347  complete="$DUMPBIN"
34348  path="${complete%% *}"
34349  tmp="$complete EOL"
34350  arguments="${tmp#* }"
34351
34352  # Input might be given as Windows format, start by converting to
34353  # unix format.
34354  new_path=`$CYGPATH -u "$path"`
34355
34356  # Now try to locate executable using which
34357  new_path=`$WHICH "$new_path" 2> /dev/null`
34358  # bat and cmd files are not always considered executable in cygwin causing which
34359  # to not find them
34360  if test "x$new_path" = x \
34361      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34362      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34363    new_path=`$CYGPATH -u "$path"`
34364  fi
34365  if test "x$new_path" = x; then
34366    # Oops. Which didn't find the executable.
34367    # The splitting of arguments from the executable at a space might have been incorrect,
34368    # since paths with space are more likely in Windows. Give it another try with the whole
34369    # argument.
34370    path="$complete"
34371    arguments="EOL"
34372    new_path=`$CYGPATH -u "$path"`
34373    new_path=`$WHICH "$new_path" 2> /dev/null`
34374    # bat and cmd files are not always considered executable in cygwin causing which
34375    # to not find them
34376    if test "x$new_path" = x \
34377        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34378        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34379      new_path=`$CYGPATH -u "$path"`
34380    fi
34381    if test "x$new_path" = x; then
34382      # It's still not found. Now this is an unrecoverable error.
34383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34384$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34385      has_space=`$ECHO "$complete" | $GREP " "`
34386      if test "x$has_space" != x; then
34387        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34388$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34389      fi
34390      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34391    fi
34392  fi
34393
34394  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34395  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34396  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34397  # "foo.exe" is OK but "foo" is an error.
34398  #
34399  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34400  # It is also a way to make sure we got the proper file name for the real test later on.
34401  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34402  if test "x$test_shortpath" = x; then
34403    # Short path failed, file does not exist as specified.
34404    # Try adding .exe or .cmd
34405    if test -f "${new_path}.exe"; then
34406      input_to_shortpath="${new_path}.exe"
34407    elif test -f "${new_path}.cmd"; then
34408      input_to_shortpath="${new_path}.cmd"
34409    else
34410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34411$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34412      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34413$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34414      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34415    fi
34416  else
34417    input_to_shortpath="$new_path"
34418  fi
34419
34420  # Call helper function which possibly converts this using DOS-style short mode.
34421  # If so, the updated path is stored in $new_path.
34422  new_path="$input_to_shortpath"
34423
34424  input_path="$input_to_shortpath"
34425  # Check if we need to convert this using DOS-style short mode. If the path
34426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34427  # take no chances and rewrite it.
34428  # Note: m4 eats our [], so we need to use [ and ] instead.
34429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34430  if test "x$has_forbidden_chars" != x; then
34431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34435      # Going to short mode and back again did indeed matter. Since short mode is
34436      # case insensitive, let's make it lowercase to improve readability.
34437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34438      # Now convert it back to Unix-stile (cygpath)
34439      input_path=`$CYGPATH -u "$shortmode_path"`
34440      new_path="$input_path"
34441    fi
34442  fi
34443
34444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34445  if test "x$test_cygdrive_prefix" = x; then
34446    # As a simple fix, exclude /usr/bin since it's not a real path.
34447    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34449      # a path prefixed by /cygdrive for fixpath to work.
34450      new_path="$CYGWIN_ROOT_PATH$input_path"
34451    fi
34452  fi
34453
34454  # remove trailing .exe if any
34455  new_path="${new_path/%.exe/}"
34456
34457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34458
34459  # First separate the path from the arguments. This will split at the first
34460  # space.
34461  complete="$DUMPBIN"
34462  path="${complete%% *}"
34463  tmp="$complete EOL"
34464  arguments="${tmp#* }"
34465
34466  # Input might be given as Windows format, start by converting to
34467  # unix format.
34468  new_path="$path"
34469
34470  windows_path="$new_path"
34471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34472    unix_path=`$CYGPATH -u "$windows_path"`
34473    new_path="$unix_path"
34474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34476    new_path="$unix_path"
34477  fi
34478
34479
34480  # Now try to locate executable using which
34481  new_path=`$WHICH "$new_path" 2> /dev/null`
34482
34483  if test "x$new_path" = x; then
34484    # Oops. Which didn't find the executable.
34485    # The splitting of arguments from the executable at a space might have been incorrect,
34486    # since paths with space are more likely in Windows. Give it another try with the whole
34487    # argument.
34488    path="$complete"
34489    arguments="EOL"
34490    new_path="$path"
34491
34492  windows_path="$new_path"
34493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34494    unix_path=`$CYGPATH -u "$windows_path"`
34495    new_path="$unix_path"
34496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34498    new_path="$unix_path"
34499  fi
34500
34501
34502    new_path=`$WHICH "$new_path" 2> /dev/null`
34503
34504    if test "x$new_path" = x; then
34505      # It's still not found. Now this is an unrecoverable error.
34506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34507$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34508      has_space=`$ECHO "$complete" | $GREP " "`
34509      if test "x$has_space" != x; then
34510        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34511$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34512      fi
34513      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34514    fi
34515  fi
34516
34517  # Now new_path has a complete unix path to the binary
34518  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34519    # Keep paths in /bin as-is, but remove trailing .exe if any
34520    new_path="${new_path/%.exe/}"
34521    # Do not save /bin paths to all_fixpath_prefixes!
34522  else
34523    # Not in mixed or Windows style, start by that.
34524    new_path=`cmd //c echo $new_path`
34525
34526  input_path="$new_path"
34527  # Check if we need to convert this using DOS-style short mode. If the path
34528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34529  # take no chances and rewrite it.
34530  # Note: m4 eats our [], so we need to use [ and ] instead.
34531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34532  if test "x$has_forbidden_chars" != x; then
34533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34535  fi
34536
34537    # Output is in $new_path
34538
34539  windows_path="$new_path"
34540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34541    unix_path=`$CYGPATH -u "$windows_path"`
34542    new_path="$unix_path"
34543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34545    new_path="$unix_path"
34546  fi
34547
34548    # remove trailing .exe if any
34549    new_path="${new_path/%.exe/}"
34550
34551    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34552    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34553  fi
34554
34555  else
34556    # We're on a posix platform. Hooray! :)
34557    # First separate the path from the arguments. This will split at the first
34558    # space.
34559    complete="$DUMPBIN"
34560    path="${complete%% *}"
34561    tmp="$complete EOL"
34562    arguments="${tmp#* }"
34563
34564    # Cannot rely on the command "which" here since it doesn't always work.
34565    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34566    if test -z "$is_absolute_path"; then
34567      # Path to executable is not absolute. Find it.
34568      IFS_save="$IFS"
34569      IFS=:
34570      for p in $PATH; do
34571        if test -f "$p/$path" && test -x "$p/$path"; then
34572          new_path="$p/$path"
34573          break
34574        fi
34575      done
34576      IFS="$IFS_save"
34577    else
34578      # This is an absolute path, we can use it without further modifications.
34579      new_path="$path"
34580    fi
34581
34582    if test "x$new_path" = x; then
34583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34584$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34585      has_space=`$ECHO "$complete" | $GREP " "`
34586      if test "x$has_space" != x; then
34587        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34588$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34589      fi
34590      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34591    fi
34592  fi
34593
34594  # Now join together the path and the arguments once again
34595  if test "x$arguments" != xEOL; then
34596    new_complete="$new_path ${arguments% *}"
34597  else
34598    new_complete="$new_path"
34599  fi
34600
34601  if test "x$complete" != "x$new_complete"; then
34602    DUMPBIN="$new_complete"
34603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34604$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34605  fi
34606
34607  fi
34608
34609  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34610
34611
34612  # Publish this variable in the help.
34613
34614
34615  if test "x$STRIP" = x; then
34616    # The variable is not set by user, try to locate tool using the code snippet
34617    for ac_prog in strip
34618do
34619  # Extract the first word of "$ac_prog", so it can be a program name with args.
34620set dummy $ac_prog; ac_word=$2
34621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34622$as_echo_n "checking for $ac_word... " >&6; }
34623if ${ac_cv_path_STRIP+:} false; then :
34624  $as_echo_n "(cached) " >&6
34625else
34626  case $STRIP in
34627  [\\/]* | ?:[\\/]*)
34628  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34629  ;;
34630  *)
34631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34632for as_dir in $PATH
34633do
34634  IFS=$as_save_IFS
34635  test -z "$as_dir" && as_dir=.
34636    for ac_exec_ext in '' $ac_executable_extensions; do
34637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34638    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34640    break 2
34641  fi
34642done
34643  done
34644IFS=$as_save_IFS
34645
34646  ;;
34647esac
34648fi
34649STRIP=$ac_cv_path_STRIP
34650if test -n "$STRIP"; then
34651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34652$as_echo "$STRIP" >&6; }
34653else
34654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34655$as_echo "no" >&6; }
34656fi
34657
34658
34659  test -n "$STRIP" && break
34660done
34661
34662  else
34663    # The variable is set, but is it from the command line or the environment?
34664
34665    # Try to remove the string !STRIP! from our list.
34666    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
34667    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34668      # If it failed, the variable was not from the command line. Ignore it,
34669      # but warn the user (except for BASH, which is always set by the calling BASH).
34670      if test "xSTRIP" != xBASH; then
34671        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
34672$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
34673      fi
34674      # Try to locate tool using the code snippet
34675      for ac_prog in strip
34676do
34677  # Extract the first word of "$ac_prog", so it can be a program name with args.
34678set dummy $ac_prog; ac_word=$2
34679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34680$as_echo_n "checking for $ac_word... " >&6; }
34681if ${ac_cv_path_STRIP+:} false; then :
34682  $as_echo_n "(cached) " >&6
34683else
34684  case $STRIP in
34685  [\\/]* | ?:[\\/]*)
34686  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34687  ;;
34688  *)
34689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34690for as_dir in $PATH
34691do
34692  IFS=$as_save_IFS
34693  test -z "$as_dir" && as_dir=.
34694    for ac_exec_ext in '' $ac_executable_extensions; do
34695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34696    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34698    break 2
34699  fi
34700done
34701  done
34702IFS=$as_save_IFS
34703
34704  ;;
34705esac
34706fi
34707STRIP=$ac_cv_path_STRIP
34708if test -n "$STRIP"; then
34709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34710$as_echo "$STRIP" >&6; }
34711else
34712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34713$as_echo "no" >&6; }
34714fi
34715
34716
34717  test -n "$STRIP" && break
34718done
34719
34720    else
34721      # If it succeeded, then it was overridden by the user. We will use it
34722      # for the tool.
34723
34724      # First remove it from the list of overridden variables, so we can test
34725      # for unknown variables in the end.
34726      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34727
34728      # Check if the provided tool contains a complete path.
34729      tool_specified="$STRIP"
34730      tool_basename="${tool_specified##*/}"
34731      if test "x$tool_basename" = "x$tool_specified"; then
34732        # A command without a complete path is provided, search $PATH.
34733        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
34734$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
34735        # Extract the first word of "$tool_basename", so it can be a program name with args.
34736set dummy $tool_basename; ac_word=$2
34737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34738$as_echo_n "checking for $ac_word... " >&6; }
34739if ${ac_cv_path_STRIP+:} false; then :
34740  $as_echo_n "(cached) " >&6
34741else
34742  case $STRIP in
34743  [\\/]* | ?:[\\/]*)
34744  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34745  ;;
34746  *)
34747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34748for as_dir in $PATH
34749do
34750  IFS=$as_save_IFS
34751  test -z "$as_dir" && as_dir=.
34752    for ac_exec_ext in '' $ac_executable_extensions; do
34753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34754    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34756    break 2
34757  fi
34758done
34759  done
34760IFS=$as_save_IFS
34761
34762  ;;
34763esac
34764fi
34765STRIP=$ac_cv_path_STRIP
34766if test -n "$STRIP"; then
34767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34768$as_echo "$STRIP" >&6; }
34769else
34770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34771$as_echo "no" >&6; }
34772fi
34773
34774
34775        if test "x$STRIP" = x; then
34776          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34777        fi
34778      else
34779        # Otherwise we believe it is a complete path. Use it as it is.
34780        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
34781$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
34782        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
34783$as_echo_n "checking for STRIP... " >&6; }
34784        if test ! -x "$tool_specified"; then
34785          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34786$as_echo "not found" >&6; }
34787          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
34788        fi
34789        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34790$as_echo "$tool_specified" >&6; }
34791      fi
34792    fi
34793  fi
34794
34795
34796
34797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34798
34799  # First separate the path from the arguments. This will split at the first
34800  # space.
34801  complete="$STRIP"
34802  path="${complete%% *}"
34803  tmp="$complete EOL"
34804  arguments="${tmp#* }"
34805
34806  # Input might be given as Windows format, start by converting to
34807  # unix format.
34808  new_path=`$CYGPATH -u "$path"`
34809
34810  # Now try to locate executable using which
34811  new_path=`$WHICH "$new_path" 2> /dev/null`
34812  # bat and cmd files are not always considered executable in cygwin causing which
34813  # to not find them
34814  if test "x$new_path" = x \
34815      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34816      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34817    new_path=`$CYGPATH -u "$path"`
34818  fi
34819  if test "x$new_path" = x; then
34820    # Oops. Which didn't find the executable.
34821    # The splitting of arguments from the executable at a space might have been incorrect,
34822    # since paths with space are more likely in Windows. Give it another try with the whole
34823    # argument.
34824    path="$complete"
34825    arguments="EOL"
34826    new_path=`$CYGPATH -u "$path"`
34827    new_path=`$WHICH "$new_path" 2> /dev/null`
34828    # bat and cmd files are not always considered executable in cygwin causing which
34829    # to not find them
34830    if test "x$new_path" = x \
34831        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34832        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34833      new_path=`$CYGPATH -u "$path"`
34834    fi
34835    if test "x$new_path" = x; then
34836      # It's still not found. Now this is an unrecoverable error.
34837      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34838$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34839      has_space=`$ECHO "$complete" | $GREP " "`
34840      if test "x$has_space" != x; then
34841        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34842$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34843      fi
34844      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34845    fi
34846  fi
34847
34848  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34849  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34850  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34851  # "foo.exe" is OK but "foo" is an error.
34852  #
34853  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34854  # It is also a way to make sure we got the proper file name for the real test later on.
34855  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34856  if test "x$test_shortpath" = x; then
34857    # Short path failed, file does not exist as specified.
34858    # Try adding .exe or .cmd
34859    if test -f "${new_path}.exe"; then
34860      input_to_shortpath="${new_path}.exe"
34861    elif test -f "${new_path}.cmd"; then
34862      input_to_shortpath="${new_path}.cmd"
34863    else
34864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
34865$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
34866      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34867$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34868      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34869    fi
34870  else
34871    input_to_shortpath="$new_path"
34872  fi
34873
34874  # Call helper function which possibly converts this using DOS-style short mode.
34875  # If so, the updated path is stored in $new_path.
34876  new_path="$input_to_shortpath"
34877
34878  input_path="$input_to_shortpath"
34879  # Check if we need to convert this using DOS-style short mode. If the path
34880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34881  # take no chances and rewrite it.
34882  # Note: m4 eats our [], so we need to use [ and ] instead.
34883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34884  if test "x$has_forbidden_chars" != x; then
34885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34886    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34887    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34888    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34889      # Going to short mode and back again did indeed matter. Since short mode is
34890      # case insensitive, let's make it lowercase to improve readability.
34891      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34892      # Now convert it back to Unix-stile (cygpath)
34893      input_path=`$CYGPATH -u "$shortmode_path"`
34894      new_path="$input_path"
34895    fi
34896  fi
34897
34898  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34899  if test "x$test_cygdrive_prefix" = x; then
34900    # As a simple fix, exclude /usr/bin since it's not a real path.
34901    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34902      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34903      # a path prefixed by /cygdrive for fixpath to work.
34904      new_path="$CYGWIN_ROOT_PATH$input_path"
34905    fi
34906  fi
34907
34908  # remove trailing .exe if any
34909  new_path="${new_path/%.exe/}"
34910
34911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34912
34913  # First separate the path from the arguments. This will split at the first
34914  # space.
34915  complete="$STRIP"
34916  path="${complete%% *}"
34917  tmp="$complete EOL"
34918  arguments="${tmp#* }"
34919
34920  # Input might be given as Windows format, start by converting to
34921  # unix format.
34922  new_path="$path"
34923
34924  windows_path="$new_path"
34925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34926    unix_path=`$CYGPATH -u "$windows_path"`
34927    new_path="$unix_path"
34928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34930    new_path="$unix_path"
34931  fi
34932
34933
34934  # Now try to locate executable using which
34935  new_path=`$WHICH "$new_path" 2> /dev/null`
34936
34937  if test "x$new_path" = x; then
34938    # Oops. Which didn't find the executable.
34939    # The splitting of arguments from the executable at a space might have been incorrect,
34940    # since paths with space are more likely in Windows. Give it another try with the whole
34941    # argument.
34942    path="$complete"
34943    arguments="EOL"
34944    new_path="$path"
34945
34946  windows_path="$new_path"
34947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34948    unix_path=`$CYGPATH -u "$windows_path"`
34949    new_path="$unix_path"
34950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34952    new_path="$unix_path"
34953  fi
34954
34955
34956    new_path=`$WHICH "$new_path" 2> /dev/null`
34957
34958    if test "x$new_path" = x; then
34959      # It's still not found. Now this is an unrecoverable error.
34960      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34961$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34962      has_space=`$ECHO "$complete" | $GREP " "`
34963      if test "x$has_space" != x; then
34964        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34965$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34966      fi
34967      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34968    fi
34969  fi
34970
34971  # Now new_path has a complete unix path to the binary
34972  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34973    # Keep paths in /bin as-is, but remove trailing .exe if any
34974    new_path="${new_path/%.exe/}"
34975    # Do not save /bin paths to all_fixpath_prefixes!
34976  else
34977    # Not in mixed or Windows style, start by that.
34978    new_path=`cmd //c echo $new_path`
34979
34980  input_path="$new_path"
34981  # Check if we need to convert this using DOS-style short mode. If the path
34982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34983  # take no chances and rewrite it.
34984  # Note: m4 eats our [], so we need to use [ and ] instead.
34985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34986  if test "x$has_forbidden_chars" != x; then
34987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34988    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34989  fi
34990
34991    # Output is in $new_path
34992
34993  windows_path="$new_path"
34994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34995    unix_path=`$CYGPATH -u "$windows_path"`
34996    new_path="$unix_path"
34997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34999    new_path="$unix_path"
35000  fi
35001
35002    # remove trailing .exe if any
35003    new_path="${new_path/%.exe/}"
35004
35005    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35006    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35007  fi
35008
35009  else
35010    # We're on a posix platform. Hooray! :)
35011    # First separate the path from the arguments. This will split at the first
35012    # space.
35013    complete="$STRIP"
35014    path="${complete%% *}"
35015    tmp="$complete EOL"
35016    arguments="${tmp#* }"
35017
35018    # Cannot rely on the command "which" here since it doesn't always work.
35019    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35020    if test -z "$is_absolute_path"; then
35021      # Path to executable is not absolute. Find it.
35022      IFS_save="$IFS"
35023      IFS=:
35024      for p in $PATH; do
35025        if test -f "$p/$path" && test -x "$p/$path"; then
35026          new_path="$p/$path"
35027          break
35028        fi
35029      done
35030      IFS="$IFS_save"
35031    else
35032      # This is an absolute path, we can use it without further modifications.
35033      new_path="$path"
35034    fi
35035
35036    if test "x$new_path" = x; then
35037      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35038$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35039      has_space=`$ECHO "$complete" | $GREP " "`
35040      if test "x$has_space" != x; then
35041        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35042$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35043      fi
35044      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35045    fi
35046  fi
35047
35048  # Now join together the path and the arguments once again
35049  if test "x$arguments" != xEOL; then
35050    new_complete="$new_path ${arguments% *}"
35051  else
35052    new_complete="$new_path"
35053  fi
35054
35055  if test "x$complete" != "x$new_complete"; then
35056    STRIP="$new_complete"
35057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35058$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35059  fi
35060
35061
35062
35063  # Publish this variable in the help.
35064
35065
35066  if test "x$NM" = x; then
35067    # The variable is not set by user, try to locate tool using the code snippet
35068    for ac_prog in nm
35069do
35070  # Extract the first word of "$ac_prog", so it can be a program name with args.
35071set dummy $ac_prog; ac_word=$2
35072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35073$as_echo_n "checking for $ac_word... " >&6; }
35074if ${ac_cv_path_NM+:} false; then :
35075  $as_echo_n "(cached) " >&6
35076else
35077  case $NM in
35078  [\\/]* | ?:[\\/]*)
35079  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35080  ;;
35081  *)
35082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35083for as_dir in $PATH
35084do
35085  IFS=$as_save_IFS
35086  test -z "$as_dir" && as_dir=.
35087    for ac_exec_ext in '' $ac_executable_extensions; do
35088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35089    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35091    break 2
35092  fi
35093done
35094  done
35095IFS=$as_save_IFS
35096
35097  ;;
35098esac
35099fi
35100NM=$ac_cv_path_NM
35101if test -n "$NM"; then
35102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35103$as_echo "$NM" >&6; }
35104else
35105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35106$as_echo "no" >&6; }
35107fi
35108
35109
35110  test -n "$NM" && break
35111done
35112
35113  else
35114    # The variable is set, but is it from the command line or the environment?
35115
35116    # Try to remove the string !NM! from our list.
35117    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35118    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35119      # If it failed, the variable was not from the command line. Ignore it,
35120      # but warn the user (except for BASH, which is always set by the calling BASH).
35121      if test "xNM" != xBASH; then
35122        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35123$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35124      fi
35125      # Try to locate tool using the code snippet
35126      for ac_prog in nm
35127do
35128  # Extract the first word of "$ac_prog", so it can be a program name with args.
35129set dummy $ac_prog; ac_word=$2
35130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35131$as_echo_n "checking for $ac_word... " >&6; }
35132if ${ac_cv_path_NM+:} false; then :
35133  $as_echo_n "(cached) " >&6
35134else
35135  case $NM in
35136  [\\/]* | ?:[\\/]*)
35137  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35138  ;;
35139  *)
35140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35141for as_dir in $PATH
35142do
35143  IFS=$as_save_IFS
35144  test -z "$as_dir" && as_dir=.
35145    for ac_exec_ext in '' $ac_executable_extensions; do
35146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35147    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35149    break 2
35150  fi
35151done
35152  done
35153IFS=$as_save_IFS
35154
35155  ;;
35156esac
35157fi
35158NM=$ac_cv_path_NM
35159if test -n "$NM"; then
35160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35161$as_echo "$NM" >&6; }
35162else
35163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35164$as_echo "no" >&6; }
35165fi
35166
35167
35168  test -n "$NM" && break
35169done
35170
35171    else
35172      # If it succeeded, then it was overridden by the user. We will use it
35173      # for the tool.
35174
35175      # First remove it from the list of overridden variables, so we can test
35176      # for unknown variables in the end.
35177      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35178
35179      # Check if the provided tool contains a complete path.
35180      tool_specified="$NM"
35181      tool_basename="${tool_specified##*/}"
35182      if test "x$tool_basename" = "x$tool_specified"; then
35183        # A command without a complete path is provided, search $PATH.
35184        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35185$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35186        # Extract the first word of "$tool_basename", so it can be a program name with args.
35187set dummy $tool_basename; ac_word=$2
35188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35189$as_echo_n "checking for $ac_word... " >&6; }
35190if ${ac_cv_path_NM+:} false; then :
35191  $as_echo_n "(cached) " >&6
35192else
35193  case $NM in
35194  [\\/]* | ?:[\\/]*)
35195  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35196  ;;
35197  *)
35198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35199for as_dir in $PATH
35200do
35201  IFS=$as_save_IFS
35202  test -z "$as_dir" && as_dir=.
35203    for ac_exec_ext in '' $ac_executable_extensions; do
35204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35205    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35207    break 2
35208  fi
35209done
35210  done
35211IFS=$as_save_IFS
35212
35213  ;;
35214esac
35215fi
35216NM=$ac_cv_path_NM
35217if test -n "$NM"; then
35218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35219$as_echo "$NM" >&6; }
35220else
35221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35222$as_echo "no" >&6; }
35223fi
35224
35225
35226        if test "x$NM" = x; then
35227          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35228        fi
35229      else
35230        # Otherwise we believe it is a complete path. Use it as it is.
35231        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35232$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35233        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35234$as_echo_n "checking for NM... " >&6; }
35235        if test ! -x "$tool_specified"; then
35236          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35237$as_echo "not found" >&6; }
35238          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35239        fi
35240        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35241$as_echo "$tool_specified" >&6; }
35242      fi
35243    fi
35244  fi
35245
35246
35247
35248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35249
35250  # First separate the path from the arguments. This will split at the first
35251  # space.
35252  complete="$NM"
35253  path="${complete%% *}"
35254  tmp="$complete EOL"
35255  arguments="${tmp#* }"
35256
35257  # Input might be given as Windows format, start by converting to
35258  # unix format.
35259  new_path=`$CYGPATH -u "$path"`
35260
35261  # Now try to locate executable using which
35262  new_path=`$WHICH "$new_path" 2> /dev/null`
35263  # bat and cmd files are not always considered executable in cygwin causing which
35264  # to not find them
35265  if test "x$new_path" = x \
35266      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35267      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35268    new_path=`$CYGPATH -u "$path"`
35269  fi
35270  if test "x$new_path" = x; then
35271    # Oops. Which didn't find the executable.
35272    # The splitting of arguments from the executable at a space might have been incorrect,
35273    # since paths with space are more likely in Windows. Give it another try with the whole
35274    # argument.
35275    path="$complete"
35276    arguments="EOL"
35277    new_path=`$CYGPATH -u "$path"`
35278    new_path=`$WHICH "$new_path" 2> /dev/null`
35279    # bat and cmd files are not always considered executable in cygwin causing which
35280    # to not find them
35281    if test "x$new_path" = x \
35282        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35283        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35284      new_path=`$CYGPATH -u "$path"`
35285    fi
35286    if test "x$new_path" = x; then
35287      # It's still not found. Now this is an unrecoverable error.
35288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35289$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35290      has_space=`$ECHO "$complete" | $GREP " "`
35291      if test "x$has_space" != x; then
35292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35294      fi
35295      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35296    fi
35297  fi
35298
35299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35302  # "foo.exe" is OK but "foo" is an error.
35303  #
35304  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35305  # It is also a way to make sure we got the proper file name for the real test later on.
35306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35307  if test "x$test_shortpath" = x; then
35308    # Short path failed, file does not exist as specified.
35309    # Try adding .exe or .cmd
35310    if test -f "${new_path}.exe"; then
35311      input_to_shortpath="${new_path}.exe"
35312    elif test -f "${new_path}.cmd"; then
35313      input_to_shortpath="${new_path}.cmd"
35314    else
35315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35316$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35317      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35318$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35319      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35320    fi
35321  else
35322    input_to_shortpath="$new_path"
35323  fi
35324
35325  # Call helper function which possibly converts this using DOS-style short mode.
35326  # If so, the updated path is stored in $new_path.
35327  new_path="$input_to_shortpath"
35328
35329  input_path="$input_to_shortpath"
35330  # Check if we need to convert this using DOS-style short mode. If the path
35331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35332  # take no chances and rewrite it.
35333  # Note: m4 eats our [], so we need to use [ and ] instead.
35334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35335  if test "x$has_forbidden_chars" != x; then
35336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35340      # Going to short mode and back again did indeed matter. Since short mode is
35341      # case insensitive, let's make it lowercase to improve readability.
35342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35343      # Now convert it back to Unix-stile (cygpath)
35344      input_path=`$CYGPATH -u "$shortmode_path"`
35345      new_path="$input_path"
35346    fi
35347  fi
35348
35349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35350  if test "x$test_cygdrive_prefix" = x; then
35351    # As a simple fix, exclude /usr/bin since it's not a real path.
35352    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35354      # a path prefixed by /cygdrive for fixpath to work.
35355      new_path="$CYGWIN_ROOT_PATH$input_path"
35356    fi
35357  fi
35358
35359  # remove trailing .exe if any
35360  new_path="${new_path/%.exe/}"
35361
35362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35363
35364  # First separate the path from the arguments. This will split at the first
35365  # space.
35366  complete="$NM"
35367  path="${complete%% *}"
35368  tmp="$complete EOL"
35369  arguments="${tmp#* }"
35370
35371  # Input might be given as Windows format, start by converting to
35372  # unix format.
35373  new_path="$path"
35374
35375  windows_path="$new_path"
35376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35377    unix_path=`$CYGPATH -u "$windows_path"`
35378    new_path="$unix_path"
35379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35381    new_path="$unix_path"
35382  fi
35383
35384
35385  # Now try to locate executable using which
35386  new_path=`$WHICH "$new_path" 2> /dev/null`
35387
35388  if test "x$new_path" = x; then
35389    # Oops. Which didn't find the executable.
35390    # The splitting of arguments from the executable at a space might have been incorrect,
35391    # since paths with space are more likely in Windows. Give it another try with the whole
35392    # argument.
35393    path="$complete"
35394    arguments="EOL"
35395    new_path="$path"
35396
35397  windows_path="$new_path"
35398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35399    unix_path=`$CYGPATH -u "$windows_path"`
35400    new_path="$unix_path"
35401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35403    new_path="$unix_path"
35404  fi
35405
35406
35407    new_path=`$WHICH "$new_path" 2> /dev/null`
35408
35409    if test "x$new_path" = x; then
35410      # It's still not found. Now this is an unrecoverable error.
35411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35412$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35413      has_space=`$ECHO "$complete" | $GREP " "`
35414      if test "x$has_space" != x; then
35415        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35416$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35417      fi
35418      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35419    fi
35420  fi
35421
35422  # Now new_path has a complete unix path to the binary
35423  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35424    # Keep paths in /bin as-is, but remove trailing .exe if any
35425    new_path="${new_path/%.exe/}"
35426    # Do not save /bin paths to all_fixpath_prefixes!
35427  else
35428    # Not in mixed or Windows style, start by that.
35429    new_path=`cmd //c echo $new_path`
35430
35431  input_path="$new_path"
35432  # Check if we need to convert this using DOS-style short mode. If the path
35433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35434  # take no chances and rewrite it.
35435  # Note: m4 eats our [], so we need to use [ and ] instead.
35436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35437  if test "x$has_forbidden_chars" != x; then
35438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35440  fi
35441
35442    # Output is in $new_path
35443
35444  windows_path="$new_path"
35445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35446    unix_path=`$CYGPATH -u "$windows_path"`
35447    new_path="$unix_path"
35448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35450    new_path="$unix_path"
35451  fi
35452
35453    # remove trailing .exe if any
35454    new_path="${new_path/%.exe/}"
35455
35456    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35457    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35458  fi
35459
35460  else
35461    # We're on a posix platform. Hooray! :)
35462    # First separate the path from the arguments. This will split at the first
35463    # space.
35464    complete="$NM"
35465    path="${complete%% *}"
35466    tmp="$complete EOL"
35467    arguments="${tmp#* }"
35468
35469    # Cannot rely on the command "which" here since it doesn't always work.
35470    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35471    if test -z "$is_absolute_path"; then
35472      # Path to executable is not absolute. Find it.
35473      IFS_save="$IFS"
35474      IFS=:
35475      for p in $PATH; do
35476        if test -f "$p/$path" && test -x "$p/$path"; then
35477          new_path="$p/$path"
35478          break
35479        fi
35480      done
35481      IFS="$IFS_save"
35482    else
35483      # This is an absolute path, we can use it without further modifications.
35484      new_path="$path"
35485    fi
35486
35487    if test "x$new_path" = x; then
35488      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35489$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35490      has_space=`$ECHO "$complete" | $GREP " "`
35491      if test "x$has_space" != x; then
35492        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35493$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35494      fi
35495      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35496    fi
35497  fi
35498
35499  # Now join together the path and the arguments once again
35500  if test "x$arguments" != xEOL; then
35501    new_complete="$new_path ${arguments% *}"
35502  else
35503    new_complete="$new_path"
35504  fi
35505
35506  if test "x$complete" != "x$new_complete"; then
35507    NM="$new_complete"
35508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35509$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35510  fi
35511
35512
35513
35514  # Publish this variable in the help.
35515
35516
35517  if test "x$GNM" = x; then
35518    # The variable is not set by user, try to locate tool using the code snippet
35519    for ac_prog in gnm
35520do
35521  # Extract the first word of "$ac_prog", so it can be a program name with args.
35522set dummy $ac_prog; ac_word=$2
35523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35524$as_echo_n "checking for $ac_word... " >&6; }
35525if ${ac_cv_path_GNM+:} false; then :
35526  $as_echo_n "(cached) " >&6
35527else
35528  case $GNM in
35529  [\\/]* | ?:[\\/]*)
35530  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35531  ;;
35532  *)
35533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35534for as_dir in $PATH
35535do
35536  IFS=$as_save_IFS
35537  test -z "$as_dir" && as_dir=.
35538    for ac_exec_ext in '' $ac_executable_extensions; do
35539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35540    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35542    break 2
35543  fi
35544done
35545  done
35546IFS=$as_save_IFS
35547
35548  ;;
35549esac
35550fi
35551GNM=$ac_cv_path_GNM
35552if test -n "$GNM"; then
35553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35554$as_echo "$GNM" >&6; }
35555else
35556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35557$as_echo "no" >&6; }
35558fi
35559
35560
35561  test -n "$GNM" && break
35562done
35563
35564  else
35565    # The variable is set, but is it from the command line or the environment?
35566
35567    # Try to remove the string !GNM! from our list.
35568    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
35569    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35570      # If it failed, the variable was not from the command line. Ignore it,
35571      # but warn the user (except for BASH, which is always set by the calling BASH).
35572      if test "xGNM" != xBASH; then
35573        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
35574$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
35575      fi
35576      # Try to locate tool using the code snippet
35577      for ac_prog in gnm
35578do
35579  # Extract the first word of "$ac_prog", so it can be a program name with args.
35580set dummy $ac_prog; ac_word=$2
35581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35582$as_echo_n "checking for $ac_word... " >&6; }
35583if ${ac_cv_path_GNM+:} false; then :
35584  $as_echo_n "(cached) " >&6
35585else
35586  case $GNM in
35587  [\\/]* | ?:[\\/]*)
35588  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35589  ;;
35590  *)
35591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35592for as_dir in $PATH
35593do
35594  IFS=$as_save_IFS
35595  test -z "$as_dir" && as_dir=.
35596    for ac_exec_ext in '' $ac_executable_extensions; do
35597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35598    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35600    break 2
35601  fi
35602done
35603  done
35604IFS=$as_save_IFS
35605
35606  ;;
35607esac
35608fi
35609GNM=$ac_cv_path_GNM
35610if test -n "$GNM"; then
35611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35612$as_echo "$GNM" >&6; }
35613else
35614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35615$as_echo "no" >&6; }
35616fi
35617
35618
35619  test -n "$GNM" && break
35620done
35621
35622    else
35623      # If it succeeded, then it was overridden by the user. We will use it
35624      # for the tool.
35625
35626      # First remove it from the list of overridden variables, so we can test
35627      # for unknown variables in the end.
35628      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35629
35630      # Check if the provided tool contains a complete path.
35631      tool_specified="$GNM"
35632      tool_basename="${tool_specified##*/}"
35633      if test "x$tool_basename" = "x$tool_specified"; then
35634        # A command without a complete path is provided, search $PATH.
35635        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
35636$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
35637        # Extract the first word of "$tool_basename", so it can be a program name with args.
35638set dummy $tool_basename; ac_word=$2
35639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35640$as_echo_n "checking for $ac_word... " >&6; }
35641if ${ac_cv_path_GNM+:} false; then :
35642  $as_echo_n "(cached) " >&6
35643else
35644  case $GNM in
35645  [\\/]* | ?:[\\/]*)
35646  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35647  ;;
35648  *)
35649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35650for as_dir in $PATH
35651do
35652  IFS=$as_save_IFS
35653  test -z "$as_dir" && as_dir=.
35654    for ac_exec_ext in '' $ac_executable_extensions; do
35655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35656    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35658    break 2
35659  fi
35660done
35661  done
35662IFS=$as_save_IFS
35663
35664  ;;
35665esac
35666fi
35667GNM=$ac_cv_path_GNM
35668if test -n "$GNM"; then
35669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35670$as_echo "$GNM" >&6; }
35671else
35672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35673$as_echo "no" >&6; }
35674fi
35675
35676
35677        if test "x$GNM" = x; then
35678          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35679        fi
35680      else
35681        # Otherwise we believe it is a complete path. Use it as it is.
35682        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
35683$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
35684        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
35685$as_echo_n "checking for GNM... " >&6; }
35686        if test ! -x "$tool_specified"; then
35687          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35688$as_echo "not found" >&6; }
35689          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
35690        fi
35691        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35692$as_echo "$tool_specified" >&6; }
35693      fi
35694    fi
35695  fi
35696
35697
35698
35699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35700
35701  # First separate the path from the arguments. This will split at the first
35702  # space.
35703  complete="$GNM"
35704  path="${complete%% *}"
35705  tmp="$complete EOL"
35706  arguments="${tmp#* }"
35707
35708  # Input might be given as Windows format, start by converting to
35709  # unix format.
35710  new_path=`$CYGPATH -u "$path"`
35711
35712  # Now try to locate executable using which
35713  new_path=`$WHICH "$new_path" 2> /dev/null`
35714  # bat and cmd files are not always considered executable in cygwin causing which
35715  # to not find them
35716  if test "x$new_path" = x \
35717      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35718      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35719    new_path=`$CYGPATH -u "$path"`
35720  fi
35721  if test "x$new_path" = x; then
35722    # Oops. Which didn't find the executable.
35723    # The splitting of arguments from the executable at a space might have been incorrect,
35724    # since paths with space are more likely in Windows. Give it another try with the whole
35725    # argument.
35726    path="$complete"
35727    arguments="EOL"
35728    new_path=`$CYGPATH -u "$path"`
35729    new_path=`$WHICH "$new_path" 2> /dev/null`
35730    # bat and cmd files are not always considered executable in cygwin causing which
35731    # to not find them
35732    if test "x$new_path" = x \
35733        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35734        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35735      new_path=`$CYGPATH -u "$path"`
35736    fi
35737    if test "x$new_path" = x; then
35738      # It's still not found. Now this is an unrecoverable error.
35739      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35740$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35741      has_space=`$ECHO "$complete" | $GREP " "`
35742      if test "x$has_space" != x; then
35743        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35744$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35745      fi
35746      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35747    fi
35748  fi
35749
35750  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35751  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35752  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35753  # "foo.exe" is OK but "foo" is an error.
35754  #
35755  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35756  # It is also a way to make sure we got the proper file name for the real test later on.
35757  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35758  if test "x$test_shortpath" = x; then
35759    # Short path failed, file does not exist as specified.
35760    # Try adding .exe or .cmd
35761    if test -f "${new_path}.exe"; then
35762      input_to_shortpath="${new_path}.exe"
35763    elif test -f "${new_path}.cmd"; then
35764      input_to_shortpath="${new_path}.cmd"
35765    else
35766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
35767$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
35768      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35769$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35770      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35771    fi
35772  else
35773    input_to_shortpath="$new_path"
35774  fi
35775
35776  # Call helper function which possibly converts this using DOS-style short mode.
35777  # If so, the updated path is stored in $new_path.
35778  new_path="$input_to_shortpath"
35779
35780  input_path="$input_to_shortpath"
35781  # Check if we need to convert this using DOS-style short mode. If the path
35782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35783  # take no chances and rewrite it.
35784  # Note: m4 eats our [], so we need to use [ and ] instead.
35785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35786  if test "x$has_forbidden_chars" != x; then
35787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35788    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35789    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35790    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35791      # Going to short mode and back again did indeed matter. Since short mode is
35792      # case insensitive, let's make it lowercase to improve readability.
35793      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35794      # Now convert it back to Unix-stile (cygpath)
35795      input_path=`$CYGPATH -u "$shortmode_path"`
35796      new_path="$input_path"
35797    fi
35798  fi
35799
35800  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35801  if test "x$test_cygdrive_prefix" = x; then
35802    # As a simple fix, exclude /usr/bin since it's not a real path.
35803    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35804      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35805      # a path prefixed by /cygdrive for fixpath to work.
35806      new_path="$CYGWIN_ROOT_PATH$input_path"
35807    fi
35808  fi
35809
35810  # remove trailing .exe if any
35811  new_path="${new_path/%.exe/}"
35812
35813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35814
35815  # First separate the path from the arguments. This will split at the first
35816  # space.
35817  complete="$GNM"
35818  path="${complete%% *}"
35819  tmp="$complete EOL"
35820  arguments="${tmp#* }"
35821
35822  # Input might be given as Windows format, start by converting to
35823  # unix format.
35824  new_path="$path"
35825
35826  windows_path="$new_path"
35827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35828    unix_path=`$CYGPATH -u "$windows_path"`
35829    new_path="$unix_path"
35830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35832    new_path="$unix_path"
35833  fi
35834
35835
35836  # Now try to locate executable using which
35837  new_path=`$WHICH "$new_path" 2> /dev/null`
35838
35839  if test "x$new_path" = x; then
35840    # Oops. Which didn't find the executable.
35841    # The splitting of arguments from the executable at a space might have been incorrect,
35842    # since paths with space are more likely in Windows. Give it another try with the whole
35843    # argument.
35844    path="$complete"
35845    arguments="EOL"
35846    new_path="$path"
35847
35848  windows_path="$new_path"
35849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35850    unix_path=`$CYGPATH -u "$windows_path"`
35851    new_path="$unix_path"
35852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35854    new_path="$unix_path"
35855  fi
35856
35857
35858    new_path=`$WHICH "$new_path" 2> /dev/null`
35859
35860    if test "x$new_path" = x; then
35861      # It's still not found. Now this is an unrecoverable error.
35862      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35863$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35864      has_space=`$ECHO "$complete" | $GREP " "`
35865      if test "x$has_space" != x; then
35866        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35867$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35868      fi
35869      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35870    fi
35871  fi
35872
35873  # Now new_path has a complete unix path to the binary
35874  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35875    # Keep paths in /bin as-is, but remove trailing .exe if any
35876    new_path="${new_path/%.exe/}"
35877    # Do not save /bin paths to all_fixpath_prefixes!
35878  else
35879    # Not in mixed or Windows style, start by that.
35880    new_path=`cmd //c echo $new_path`
35881
35882  input_path="$new_path"
35883  # Check if we need to convert this using DOS-style short mode. If the path
35884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35885  # take no chances and rewrite it.
35886  # Note: m4 eats our [], so we need to use [ and ] instead.
35887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35888  if test "x$has_forbidden_chars" != x; then
35889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35890    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35891  fi
35892
35893    # Output is in $new_path
35894
35895  windows_path="$new_path"
35896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35897    unix_path=`$CYGPATH -u "$windows_path"`
35898    new_path="$unix_path"
35899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35901    new_path="$unix_path"
35902  fi
35903
35904    # remove trailing .exe if any
35905    new_path="${new_path/%.exe/}"
35906
35907    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35908    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35909  fi
35910
35911  else
35912    # We're on a posix platform. Hooray! :)
35913    # First separate the path from the arguments. This will split at the first
35914    # space.
35915    complete="$GNM"
35916    path="${complete%% *}"
35917    tmp="$complete EOL"
35918    arguments="${tmp#* }"
35919
35920    # Cannot rely on the command "which" here since it doesn't always work.
35921    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35922    if test -z "$is_absolute_path"; then
35923      # Path to executable is not absolute. Find it.
35924      IFS_save="$IFS"
35925      IFS=:
35926      for p in $PATH; do
35927        if test -f "$p/$path" && test -x "$p/$path"; then
35928          new_path="$p/$path"
35929          break
35930        fi
35931      done
35932      IFS="$IFS_save"
35933    else
35934      # This is an absolute path, we can use it without further modifications.
35935      new_path="$path"
35936    fi
35937
35938    if test "x$new_path" = x; then
35939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35940$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35941      has_space=`$ECHO "$complete" | $GREP " "`
35942      if test "x$has_space" != x; then
35943        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35944$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35945      fi
35946      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35947    fi
35948  fi
35949
35950  # Now join together the path and the arguments once again
35951  if test "x$arguments" != xEOL; then
35952    new_complete="$new_path ${arguments% *}"
35953  else
35954    new_complete="$new_path"
35955  fi
35956
35957  if test "x$complete" != "x$new_complete"; then
35958    GNM="$new_complete"
35959    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
35960$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
35961  fi
35962
35963
35964
35965
35966  # Publish this variable in the help.
35967
35968
35969  if test "x$MCS" = x; then
35970    # The variable is not set by user, try to locate tool using the code snippet
35971    for ac_prog in mcs
35972do
35973  # Extract the first word of "$ac_prog", so it can be a program name with args.
35974set dummy $ac_prog; ac_word=$2
35975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35976$as_echo_n "checking for $ac_word... " >&6; }
35977if ${ac_cv_path_MCS+:} false; then :
35978  $as_echo_n "(cached) " >&6
35979else
35980  case $MCS in
35981  [\\/]* | ?:[\\/]*)
35982  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
35983  ;;
35984  *)
35985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35986for as_dir in $PATH
35987do
35988  IFS=$as_save_IFS
35989  test -z "$as_dir" && as_dir=.
35990    for ac_exec_ext in '' $ac_executable_extensions; do
35991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35992    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
35993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35994    break 2
35995  fi
35996done
35997  done
35998IFS=$as_save_IFS
35999
36000  ;;
36001esac
36002fi
36003MCS=$ac_cv_path_MCS
36004if test -n "$MCS"; then
36005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36006$as_echo "$MCS" >&6; }
36007else
36008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36009$as_echo "no" >&6; }
36010fi
36011
36012
36013  test -n "$MCS" && break
36014done
36015
36016  else
36017    # The variable is set, but is it from the command line or the environment?
36018
36019    # Try to remove the string !MCS! from our list.
36020    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36021    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36022      # If it failed, the variable was not from the command line. Ignore it,
36023      # but warn the user (except for BASH, which is always set by the calling BASH).
36024      if test "xMCS" != xBASH; then
36025        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36026$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36027      fi
36028      # Try to locate tool using the code snippet
36029      for ac_prog in mcs
36030do
36031  # Extract the first word of "$ac_prog", so it can be a program name with args.
36032set dummy $ac_prog; ac_word=$2
36033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36034$as_echo_n "checking for $ac_word... " >&6; }
36035if ${ac_cv_path_MCS+:} false; then :
36036  $as_echo_n "(cached) " >&6
36037else
36038  case $MCS in
36039  [\\/]* | ?:[\\/]*)
36040  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36041  ;;
36042  *)
36043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36044for as_dir in $PATH
36045do
36046  IFS=$as_save_IFS
36047  test -z "$as_dir" && as_dir=.
36048    for ac_exec_ext in '' $ac_executable_extensions; do
36049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36050    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36052    break 2
36053  fi
36054done
36055  done
36056IFS=$as_save_IFS
36057
36058  ;;
36059esac
36060fi
36061MCS=$ac_cv_path_MCS
36062if test -n "$MCS"; then
36063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36064$as_echo "$MCS" >&6; }
36065else
36066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36067$as_echo "no" >&6; }
36068fi
36069
36070
36071  test -n "$MCS" && break
36072done
36073
36074    else
36075      # If it succeeded, then it was overridden by the user. We will use it
36076      # for the tool.
36077
36078      # First remove it from the list of overridden variables, so we can test
36079      # for unknown variables in the end.
36080      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36081
36082      # Check if the provided tool contains a complete path.
36083      tool_specified="$MCS"
36084      tool_basename="${tool_specified##*/}"
36085      if test "x$tool_basename" = "x$tool_specified"; then
36086        # A command without a complete path is provided, search $PATH.
36087        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36088$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36089        # Extract the first word of "$tool_basename", so it can be a program name with args.
36090set dummy $tool_basename; ac_word=$2
36091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36092$as_echo_n "checking for $ac_word... " >&6; }
36093if ${ac_cv_path_MCS+:} false; then :
36094  $as_echo_n "(cached) " >&6
36095else
36096  case $MCS in
36097  [\\/]* | ?:[\\/]*)
36098  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36099  ;;
36100  *)
36101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36102for as_dir in $PATH
36103do
36104  IFS=$as_save_IFS
36105  test -z "$as_dir" && as_dir=.
36106    for ac_exec_ext in '' $ac_executable_extensions; do
36107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36108    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36110    break 2
36111  fi
36112done
36113  done
36114IFS=$as_save_IFS
36115
36116  ;;
36117esac
36118fi
36119MCS=$ac_cv_path_MCS
36120if test -n "$MCS"; then
36121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36122$as_echo "$MCS" >&6; }
36123else
36124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36125$as_echo "no" >&6; }
36126fi
36127
36128
36129        if test "x$MCS" = x; then
36130          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36131        fi
36132      else
36133        # Otherwise we believe it is a complete path. Use it as it is.
36134        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36135$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36136        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36137$as_echo_n "checking for MCS... " >&6; }
36138        if test ! -x "$tool_specified"; then
36139          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36140$as_echo "not found" >&6; }
36141          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36142        fi
36143        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36144$as_echo "$tool_specified" >&6; }
36145      fi
36146    fi
36147  fi
36148
36149
36150
36151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36152
36153  # First separate the path from the arguments. This will split at the first
36154  # space.
36155  complete="$MCS"
36156  path="${complete%% *}"
36157  tmp="$complete EOL"
36158  arguments="${tmp#* }"
36159
36160  # Input might be given as Windows format, start by converting to
36161  # unix format.
36162  new_path=`$CYGPATH -u "$path"`
36163
36164  # Now try to locate executable using which
36165  new_path=`$WHICH "$new_path" 2> /dev/null`
36166  # bat and cmd files are not always considered executable in cygwin causing which
36167  # to not find them
36168  if test "x$new_path" = x \
36169      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36170      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36171    new_path=`$CYGPATH -u "$path"`
36172  fi
36173  if test "x$new_path" = x; then
36174    # Oops. Which didn't find the executable.
36175    # The splitting of arguments from the executable at a space might have been incorrect,
36176    # since paths with space are more likely in Windows. Give it another try with the whole
36177    # argument.
36178    path="$complete"
36179    arguments="EOL"
36180    new_path=`$CYGPATH -u "$path"`
36181    new_path=`$WHICH "$new_path" 2> /dev/null`
36182    # bat and cmd files are not always considered executable in cygwin causing which
36183    # to not find them
36184    if test "x$new_path" = x \
36185        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36186        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36187      new_path=`$CYGPATH -u "$path"`
36188    fi
36189    if test "x$new_path" = x; then
36190      # It's still not found. Now this is an unrecoverable error.
36191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36192$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36193      has_space=`$ECHO "$complete" | $GREP " "`
36194      if test "x$has_space" != x; then
36195        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36196$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36197      fi
36198      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36199    fi
36200  fi
36201
36202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36205  # "foo.exe" is OK but "foo" is an error.
36206  #
36207  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36208  # It is also a way to make sure we got the proper file name for the real test later on.
36209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36210  if test "x$test_shortpath" = x; then
36211    # Short path failed, file does not exist as specified.
36212    # Try adding .exe or .cmd
36213    if test -f "${new_path}.exe"; then
36214      input_to_shortpath="${new_path}.exe"
36215    elif test -f "${new_path}.cmd"; then
36216      input_to_shortpath="${new_path}.cmd"
36217    else
36218      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36219$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36220      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36221$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36222      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36223    fi
36224  else
36225    input_to_shortpath="$new_path"
36226  fi
36227
36228  # Call helper function which possibly converts this using DOS-style short mode.
36229  # If so, the updated path is stored in $new_path.
36230  new_path="$input_to_shortpath"
36231
36232  input_path="$input_to_shortpath"
36233  # Check if we need to convert this using DOS-style short mode. If the path
36234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36235  # take no chances and rewrite it.
36236  # Note: m4 eats our [], so we need to use [ and ] instead.
36237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36238  if test "x$has_forbidden_chars" != x; then
36239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36240    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36241    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36242    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36243      # Going to short mode and back again did indeed matter. Since short mode is
36244      # case insensitive, let's make it lowercase to improve readability.
36245      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36246      # Now convert it back to Unix-stile (cygpath)
36247      input_path=`$CYGPATH -u "$shortmode_path"`
36248      new_path="$input_path"
36249    fi
36250  fi
36251
36252  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36253  if test "x$test_cygdrive_prefix" = x; then
36254    # As a simple fix, exclude /usr/bin since it's not a real path.
36255    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36256      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36257      # a path prefixed by /cygdrive for fixpath to work.
36258      new_path="$CYGWIN_ROOT_PATH$input_path"
36259    fi
36260  fi
36261
36262  # remove trailing .exe if any
36263  new_path="${new_path/%.exe/}"
36264
36265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36266
36267  # First separate the path from the arguments. This will split at the first
36268  # space.
36269  complete="$MCS"
36270  path="${complete%% *}"
36271  tmp="$complete EOL"
36272  arguments="${tmp#* }"
36273
36274  # Input might be given as Windows format, start by converting to
36275  # unix format.
36276  new_path="$path"
36277
36278  windows_path="$new_path"
36279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36280    unix_path=`$CYGPATH -u "$windows_path"`
36281    new_path="$unix_path"
36282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36284    new_path="$unix_path"
36285  fi
36286
36287
36288  # Now try to locate executable using which
36289  new_path=`$WHICH "$new_path" 2> /dev/null`
36290
36291  if test "x$new_path" = x; then
36292    # Oops. Which didn't find the executable.
36293    # The splitting of arguments from the executable at a space might have been incorrect,
36294    # since paths with space are more likely in Windows. Give it another try with the whole
36295    # argument.
36296    path="$complete"
36297    arguments="EOL"
36298    new_path="$path"
36299
36300  windows_path="$new_path"
36301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36302    unix_path=`$CYGPATH -u "$windows_path"`
36303    new_path="$unix_path"
36304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36306    new_path="$unix_path"
36307  fi
36308
36309
36310    new_path=`$WHICH "$new_path" 2> /dev/null`
36311
36312    if test "x$new_path" = x; then
36313      # It's still not found. Now this is an unrecoverable error.
36314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36315$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36316      has_space=`$ECHO "$complete" | $GREP " "`
36317      if test "x$has_space" != x; then
36318        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36319$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36320      fi
36321      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36322    fi
36323  fi
36324
36325  # Now new_path has a complete unix path to the binary
36326  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36327    # Keep paths in /bin as-is, but remove trailing .exe if any
36328    new_path="${new_path/%.exe/}"
36329    # Do not save /bin paths to all_fixpath_prefixes!
36330  else
36331    # Not in mixed or Windows style, start by that.
36332    new_path=`cmd //c echo $new_path`
36333
36334  input_path="$new_path"
36335  # Check if we need to convert this using DOS-style short mode. If the path
36336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36337  # take no chances and rewrite it.
36338  # Note: m4 eats our [], so we need to use [ and ] instead.
36339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36340  if test "x$has_forbidden_chars" != x; then
36341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36342    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36343  fi
36344
36345    # Output is in $new_path
36346
36347  windows_path="$new_path"
36348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36349    unix_path=`$CYGPATH -u "$windows_path"`
36350    new_path="$unix_path"
36351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36353    new_path="$unix_path"
36354  fi
36355
36356    # remove trailing .exe if any
36357    new_path="${new_path/%.exe/}"
36358
36359    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36360    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36361  fi
36362
36363  else
36364    # We're on a posix platform. Hooray! :)
36365    # First separate the path from the arguments. This will split at the first
36366    # space.
36367    complete="$MCS"
36368    path="${complete%% *}"
36369    tmp="$complete EOL"
36370    arguments="${tmp#* }"
36371
36372    # Cannot rely on the command "which" here since it doesn't always work.
36373    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36374    if test -z "$is_absolute_path"; then
36375      # Path to executable is not absolute. Find it.
36376      IFS_save="$IFS"
36377      IFS=:
36378      for p in $PATH; do
36379        if test -f "$p/$path" && test -x "$p/$path"; then
36380          new_path="$p/$path"
36381          break
36382        fi
36383      done
36384      IFS="$IFS_save"
36385    else
36386      # This is an absolute path, we can use it without further modifications.
36387      new_path="$path"
36388    fi
36389
36390    if test "x$new_path" = x; then
36391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36392$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36393      has_space=`$ECHO "$complete" | $GREP " "`
36394      if test "x$has_space" != x; then
36395        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36396$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36397      fi
36398      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36399    fi
36400  fi
36401
36402  # Now join together the path and the arguments once again
36403  if test "x$arguments" != xEOL; then
36404    new_complete="$new_path ${arguments% *}"
36405  else
36406    new_complete="$new_path"
36407  fi
36408
36409  if test "x$complete" != "x$new_complete"; then
36410    MCS="$new_complete"
36411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36412$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36413  fi
36414
36415  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36416    # FIXME: we should unify this with the solaris case above.
36417
36418
36419  # Publish this variable in the help.
36420
36421
36422  if test "x$STRIP" = x; then
36423    # The variable is not set by user, try to locate tool using the code snippet
36424    if test -n "$ac_tool_prefix"; then
36425  for ac_prog in strip
36426  do
36427    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36428set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36430$as_echo_n "checking for $ac_word... " >&6; }
36431if ${ac_cv_prog_STRIP+:} false; then :
36432  $as_echo_n "(cached) " >&6
36433else
36434  if test -n "$STRIP"; then
36435  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36436else
36437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36438for as_dir in $PATH
36439do
36440  IFS=$as_save_IFS
36441  test -z "$as_dir" && as_dir=.
36442    for ac_exec_ext in '' $ac_executable_extensions; do
36443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36444    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36446    break 2
36447  fi
36448done
36449  done
36450IFS=$as_save_IFS
36451
36452fi
36453fi
36454STRIP=$ac_cv_prog_STRIP
36455if test -n "$STRIP"; then
36456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36457$as_echo "$STRIP" >&6; }
36458else
36459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36460$as_echo "no" >&6; }
36461fi
36462
36463
36464    test -n "$STRIP" && break
36465  done
36466fi
36467if test -z "$STRIP"; then
36468  ac_ct_STRIP=$STRIP
36469  for ac_prog in strip
36470do
36471  # Extract the first word of "$ac_prog", so it can be a program name with args.
36472set dummy $ac_prog; ac_word=$2
36473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36474$as_echo_n "checking for $ac_word... " >&6; }
36475if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36476  $as_echo_n "(cached) " >&6
36477else
36478  if test -n "$ac_ct_STRIP"; then
36479  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36480else
36481as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36482for as_dir in $PATH
36483do
36484  IFS=$as_save_IFS
36485  test -z "$as_dir" && as_dir=.
36486    for ac_exec_ext in '' $ac_executable_extensions; do
36487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36488    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36490    break 2
36491  fi
36492done
36493  done
36494IFS=$as_save_IFS
36495
36496fi
36497fi
36498ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36499if test -n "$ac_ct_STRIP"; then
36500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36501$as_echo "$ac_ct_STRIP" >&6; }
36502else
36503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36504$as_echo "no" >&6; }
36505fi
36506
36507
36508  test -n "$ac_ct_STRIP" && break
36509done
36510
36511  if test "x$ac_ct_STRIP" = x; then
36512    STRIP=""
36513  else
36514    case $cross_compiling:$ac_tool_warned in
36515yes:)
36516{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36517$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36518ac_tool_warned=yes ;;
36519esac
36520    STRIP=$ac_ct_STRIP
36521  fi
36522fi
36523
36524  else
36525    # The variable is set, but is it from the command line or the environment?
36526
36527    # Try to remove the string !STRIP! from our list.
36528    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36529    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36530      # If it failed, the variable was not from the command line. Ignore it,
36531      # but warn the user (except for BASH, which is always set by the calling BASH).
36532      if test "xSTRIP" != xBASH; then
36533        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36534$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36535      fi
36536      # Try to locate tool using the code snippet
36537      if test -n "$ac_tool_prefix"; then
36538  for ac_prog in strip
36539  do
36540    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36541set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36543$as_echo_n "checking for $ac_word... " >&6; }
36544if ${ac_cv_prog_STRIP+:} false; then :
36545  $as_echo_n "(cached) " >&6
36546else
36547  if test -n "$STRIP"; then
36548  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36549else
36550as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36551for as_dir in $PATH
36552do
36553  IFS=$as_save_IFS
36554  test -z "$as_dir" && as_dir=.
36555    for ac_exec_ext in '' $ac_executable_extensions; do
36556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36557    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36559    break 2
36560  fi
36561done
36562  done
36563IFS=$as_save_IFS
36564
36565fi
36566fi
36567STRIP=$ac_cv_prog_STRIP
36568if test -n "$STRIP"; then
36569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36570$as_echo "$STRIP" >&6; }
36571else
36572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36573$as_echo "no" >&6; }
36574fi
36575
36576
36577    test -n "$STRIP" && break
36578  done
36579fi
36580if test -z "$STRIP"; then
36581  ac_ct_STRIP=$STRIP
36582  for ac_prog in strip
36583do
36584  # Extract the first word of "$ac_prog", so it can be a program name with args.
36585set dummy $ac_prog; ac_word=$2
36586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36587$as_echo_n "checking for $ac_word... " >&6; }
36588if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36589  $as_echo_n "(cached) " >&6
36590else
36591  if test -n "$ac_ct_STRIP"; then
36592  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36593else
36594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36595for as_dir in $PATH
36596do
36597  IFS=$as_save_IFS
36598  test -z "$as_dir" && as_dir=.
36599    for ac_exec_ext in '' $ac_executable_extensions; do
36600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36601    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36603    break 2
36604  fi
36605done
36606  done
36607IFS=$as_save_IFS
36608
36609fi
36610fi
36611ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36612if test -n "$ac_ct_STRIP"; then
36613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36614$as_echo "$ac_ct_STRIP" >&6; }
36615else
36616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36617$as_echo "no" >&6; }
36618fi
36619
36620
36621  test -n "$ac_ct_STRIP" && break
36622done
36623
36624  if test "x$ac_ct_STRIP" = x; then
36625    STRIP=""
36626  else
36627    case $cross_compiling:$ac_tool_warned in
36628yes:)
36629{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36630$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36631ac_tool_warned=yes ;;
36632esac
36633    STRIP=$ac_ct_STRIP
36634  fi
36635fi
36636
36637    else
36638      # If it succeeded, then it was overridden by the user. We will use it
36639      # for the tool.
36640
36641      # First remove it from the list of overridden variables, so we can test
36642      # for unknown variables in the end.
36643      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36644
36645      # Check if the provided tool contains a complete path.
36646      tool_specified="$STRIP"
36647      tool_basename="${tool_specified##*/}"
36648      if test "x$tool_basename" = "x$tool_specified"; then
36649        # A command without a complete path is provided, search $PATH.
36650        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36651$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36652        # Extract the first word of "$tool_basename", so it can be a program name with args.
36653set dummy $tool_basename; ac_word=$2
36654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36655$as_echo_n "checking for $ac_word... " >&6; }
36656if ${ac_cv_path_STRIP+:} false; then :
36657  $as_echo_n "(cached) " >&6
36658else
36659  case $STRIP in
36660  [\\/]* | ?:[\\/]*)
36661  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36662  ;;
36663  *)
36664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36665for as_dir in $PATH
36666do
36667  IFS=$as_save_IFS
36668  test -z "$as_dir" && as_dir=.
36669    for ac_exec_ext in '' $ac_executable_extensions; do
36670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36671    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36673    break 2
36674  fi
36675done
36676  done
36677IFS=$as_save_IFS
36678
36679  ;;
36680esac
36681fi
36682STRIP=$ac_cv_path_STRIP
36683if test -n "$STRIP"; then
36684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36685$as_echo "$STRIP" >&6; }
36686else
36687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36688$as_echo "no" >&6; }
36689fi
36690
36691
36692        if test "x$STRIP" = x; then
36693          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36694        fi
36695      else
36696        # Otherwise we believe it is a complete path. Use it as it is.
36697        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36698$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36699        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36700$as_echo_n "checking for STRIP... " >&6; }
36701        if test ! -x "$tool_specified"; then
36702          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36703$as_echo "not found" >&6; }
36704          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36705        fi
36706        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36707$as_echo "$tool_specified" >&6; }
36708      fi
36709    fi
36710  fi
36711
36712
36713
36714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36715
36716  # First separate the path from the arguments. This will split at the first
36717  # space.
36718  complete="$STRIP"
36719  path="${complete%% *}"
36720  tmp="$complete EOL"
36721  arguments="${tmp#* }"
36722
36723  # Input might be given as Windows format, start by converting to
36724  # unix format.
36725  new_path=`$CYGPATH -u "$path"`
36726
36727  # Now try to locate executable using which
36728  new_path=`$WHICH "$new_path" 2> /dev/null`
36729  # bat and cmd files are not always considered executable in cygwin causing which
36730  # to not find them
36731  if test "x$new_path" = x \
36732      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36733      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36734    new_path=`$CYGPATH -u "$path"`
36735  fi
36736  if test "x$new_path" = x; then
36737    # Oops. Which didn't find the executable.
36738    # The splitting of arguments from the executable at a space might have been incorrect,
36739    # since paths with space are more likely in Windows. Give it another try with the whole
36740    # argument.
36741    path="$complete"
36742    arguments="EOL"
36743    new_path=`$CYGPATH -u "$path"`
36744    new_path=`$WHICH "$new_path" 2> /dev/null`
36745    # bat and cmd files are not always considered executable in cygwin causing which
36746    # to not find them
36747    if test "x$new_path" = x \
36748        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36749        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36750      new_path=`$CYGPATH -u "$path"`
36751    fi
36752    if test "x$new_path" = x; then
36753      # It's still not found. Now this is an unrecoverable error.
36754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36755$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36756      has_space=`$ECHO "$complete" | $GREP " "`
36757      if test "x$has_space" != x; then
36758        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36759$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36760      fi
36761      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36762    fi
36763  fi
36764
36765  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36766  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36767  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36768  # "foo.exe" is OK but "foo" is an error.
36769  #
36770  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36771  # It is also a way to make sure we got the proper file name for the real test later on.
36772  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36773  if test "x$test_shortpath" = x; then
36774    # Short path failed, file does not exist as specified.
36775    # Try adding .exe or .cmd
36776    if test -f "${new_path}.exe"; then
36777      input_to_shortpath="${new_path}.exe"
36778    elif test -f "${new_path}.cmd"; then
36779      input_to_shortpath="${new_path}.cmd"
36780    else
36781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36782$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36783      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36784$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36785      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36786    fi
36787  else
36788    input_to_shortpath="$new_path"
36789  fi
36790
36791  # Call helper function which possibly converts this using DOS-style short mode.
36792  # If so, the updated path is stored in $new_path.
36793  new_path="$input_to_shortpath"
36794
36795  input_path="$input_to_shortpath"
36796  # Check if we need to convert this using DOS-style short mode. If the path
36797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36798  # take no chances and rewrite it.
36799  # Note: m4 eats our [], so we need to use [ and ] instead.
36800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36801  if test "x$has_forbidden_chars" != x; then
36802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36803    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36804    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36805    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36806      # Going to short mode and back again did indeed matter. Since short mode is
36807      # case insensitive, let's make it lowercase to improve readability.
36808      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36809      # Now convert it back to Unix-stile (cygpath)
36810      input_path=`$CYGPATH -u "$shortmode_path"`
36811      new_path="$input_path"
36812    fi
36813  fi
36814
36815  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36816  if test "x$test_cygdrive_prefix" = x; then
36817    # As a simple fix, exclude /usr/bin since it's not a real path.
36818    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36819      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36820      # a path prefixed by /cygdrive for fixpath to work.
36821      new_path="$CYGWIN_ROOT_PATH$input_path"
36822    fi
36823  fi
36824
36825  # remove trailing .exe if any
36826  new_path="${new_path/%.exe/}"
36827
36828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36829
36830  # First separate the path from the arguments. This will split at the first
36831  # space.
36832  complete="$STRIP"
36833  path="${complete%% *}"
36834  tmp="$complete EOL"
36835  arguments="${tmp#* }"
36836
36837  # Input might be given as Windows format, start by converting to
36838  # unix format.
36839  new_path="$path"
36840
36841  windows_path="$new_path"
36842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36843    unix_path=`$CYGPATH -u "$windows_path"`
36844    new_path="$unix_path"
36845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36847    new_path="$unix_path"
36848  fi
36849
36850
36851  # Now try to locate executable using which
36852  new_path=`$WHICH "$new_path" 2> /dev/null`
36853
36854  if test "x$new_path" = x; then
36855    # Oops. Which didn't find the executable.
36856    # The splitting of arguments from the executable at a space might have been incorrect,
36857    # since paths with space are more likely in Windows. Give it another try with the whole
36858    # argument.
36859    path="$complete"
36860    arguments="EOL"
36861    new_path="$path"
36862
36863  windows_path="$new_path"
36864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36865    unix_path=`$CYGPATH -u "$windows_path"`
36866    new_path="$unix_path"
36867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36869    new_path="$unix_path"
36870  fi
36871
36872
36873    new_path=`$WHICH "$new_path" 2> /dev/null`
36874
36875    if test "x$new_path" = x; then
36876      # It's still not found. Now this is an unrecoverable error.
36877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36878$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36879      has_space=`$ECHO "$complete" | $GREP " "`
36880      if test "x$has_space" != x; then
36881        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36882$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36883      fi
36884      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36885    fi
36886  fi
36887
36888  # Now new_path has a complete unix path to the binary
36889  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36890    # Keep paths in /bin as-is, but remove trailing .exe if any
36891    new_path="${new_path/%.exe/}"
36892    # Do not save /bin paths to all_fixpath_prefixes!
36893  else
36894    # Not in mixed or Windows style, start by that.
36895    new_path=`cmd //c echo $new_path`
36896
36897  input_path="$new_path"
36898  # Check if we need to convert this using DOS-style short mode. If the path
36899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36900  # take no chances and rewrite it.
36901  # Note: m4 eats our [], so we need to use [ and ] instead.
36902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36903  if test "x$has_forbidden_chars" != x; then
36904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36905    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36906  fi
36907
36908    # Output is in $new_path
36909
36910  windows_path="$new_path"
36911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36912    unix_path=`$CYGPATH -u "$windows_path"`
36913    new_path="$unix_path"
36914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36916    new_path="$unix_path"
36917  fi
36918
36919    # remove trailing .exe if any
36920    new_path="${new_path/%.exe/}"
36921
36922    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36923    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36924  fi
36925
36926  else
36927    # We're on a posix platform. Hooray! :)
36928    # First separate the path from the arguments. This will split at the first
36929    # space.
36930    complete="$STRIP"
36931    path="${complete%% *}"
36932    tmp="$complete EOL"
36933    arguments="${tmp#* }"
36934
36935    # Cannot rely on the command "which" here since it doesn't always work.
36936    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36937    if test -z "$is_absolute_path"; then
36938      # Path to executable is not absolute. Find it.
36939      IFS_save="$IFS"
36940      IFS=:
36941      for p in $PATH; do
36942        if test -f "$p/$path" && test -x "$p/$path"; then
36943          new_path="$p/$path"
36944          break
36945        fi
36946      done
36947      IFS="$IFS_save"
36948    else
36949      # This is an absolute path, we can use it without further modifications.
36950      new_path="$path"
36951    fi
36952
36953    if test "x$new_path" = x; then
36954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36955$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36956      has_space=`$ECHO "$complete" | $GREP " "`
36957      if test "x$has_space" != x; then
36958        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36959$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36960      fi
36961      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36962    fi
36963  fi
36964
36965  # Now join together the path and the arguments once again
36966  if test "x$arguments" != xEOL; then
36967    new_complete="$new_path ${arguments% *}"
36968  else
36969    new_complete="$new_path"
36970  fi
36971
36972  if test "x$complete" != "x$new_complete"; then
36973    STRIP="$new_complete"
36974    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36975$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36976  fi
36977
36978
36979
36980  # Publish this variable in the help.
36981
36982
36983  if test "x$NM" = x; then
36984    # The variable is not set by user, try to locate tool using the code snippet
36985    if test -n "$ac_tool_prefix"; then
36986  for ac_prog in nm
36987  do
36988    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36989set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36991$as_echo_n "checking for $ac_word... " >&6; }
36992if ${ac_cv_prog_NM+:} false; then :
36993  $as_echo_n "(cached) " >&6
36994else
36995  if test -n "$NM"; then
36996  ac_cv_prog_NM="$NM" # Let the user override the test.
36997else
36998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36999for as_dir in $PATH
37000do
37001  IFS=$as_save_IFS
37002  test -z "$as_dir" && as_dir=.
37003    for ac_exec_ext in '' $ac_executable_extensions; do
37004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37005    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37007    break 2
37008  fi
37009done
37010  done
37011IFS=$as_save_IFS
37012
37013fi
37014fi
37015NM=$ac_cv_prog_NM
37016if test -n "$NM"; then
37017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37018$as_echo "$NM" >&6; }
37019else
37020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37021$as_echo "no" >&6; }
37022fi
37023
37024
37025    test -n "$NM" && break
37026  done
37027fi
37028if test -z "$NM"; then
37029  ac_ct_NM=$NM
37030  for ac_prog in nm
37031do
37032  # Extract the first word of "$ac_prog", so it can be a program name with args.
37033set dummy $ac_prog; ac_word=$2
37034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37035$as_echo_n "checking for $ac_word... " >&6; }
37036if ${ac_cv_prog_ac_ct_NM+:} false; then :
37037  $as_echo_n "(cached) " >&6
37038else
37039  if test -n "$ac_ct_NM"; then
37040  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37041else
37042as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37043for as_dir in $PATH
37044do
37045  IFS=$as_save_IFS
37046  test -z "$as_dir" && as_dir=.
37047    for ac_exec_ext in '' $ac_executable_extensions; do
37048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37049    ac_cv_prog_ac_ct_NM="$ac_prog"
37050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37051    break 2
37052  fi
37053done
37054  done
37055IFS=$as_save_IFS
37056
37057fi
37058fi
37059ac_ct_NM=$ac_cv_prog_ac_ct_NM
37060if test -n "$ac_ct_NM"; then
37061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37062$as_echo "$ac_ct_NM" >&6; }
37063else
37064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37065$as_echo "no" >&6; }
37066fi
37067
37068
37069  test -n "$ac_ct_NM" && break
37070done
37071
37072  if test "x$ac_ct_NM" = x; then
37073    NM=""
37074  else
37075    case $cross_compiling:$ac_tool_warned in
37076yes:)
37077{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37078$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37079ac_tool_warned=yes ;;
37080esac
37081    NM=$ac_ct_NM
37082  fi
37083fi
37084
37085  else
37086    # The variable is set, but is it from the command line or the environment?
37087
37088    # Try to remove the string !NM! from our list.
37089    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37090    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37091      # If it failed, the variable was not from the command line. Ignore it,
37092      # but warn the user (except for BASH, which is always set by the calling BASH).
37093      if test "xNM" != xBASH; then
37094        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37095$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37096      fi
37097      # Try to locate tool using the code snippet
37098      if test -n "$ac_tool_prefix"; then
37099  for ac_prog in nm
37100  do
37101    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37102set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37104$as_echo_n "checking for $ac_word... " >&6; }
37105if ${ac_cv_prog_NM+:} false; then :
37106  $as_echo_n "(cached) " >&6
37107else
37108  if test -n "$NM"; then
37109  ac_cv_prog_NM="$NM" # Let the user override the test.
37110else
37111as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37112for as_dir in $PATH
37113do
37114  IFS=$as_save_IFS
37115  test -z "$as_dir" && as_dir=.
37116    for ac_exec_ext in '' $ac_executable_extensions; do
37117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37118    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37120    break 2
37121  fi
37122done
37123  done
37124IFS=$as_save_IFS
37125
37126fi
37127fi
37128NM=$ac_cv_prog_NM
37129if test -n "$NM"; then
37130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37131$as_echo "$NM" >&6; }
37132else
37133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37134$as_echo "no" >&6; }
37135fi
37136
37137
37138    test -n "$NM" && break
37139  done
37140fi
37141if test -z "$NM"; then
37142  ac_ct_NM=$NM
37143  for ac_prog in nm
37144do
37145  # Extract the first word of "$ac_prog", so it can be a program name with args.
37146set dummy $ac_prog; ac_word=$2
37147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37148$as_echo_n "checking for $ac_word... " >&6; }
37149if ${ac_cv_prog_ac_ct_NM+:} false; then :
37150  $as_echo_n "(cached) " >&6
37151else
37152  if test -n "$ac_ct_NM"; then
37153  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37154else
37155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37156for as_dir in $PATH
37157do
37158  IFS=$as_save_IFS
37159  test -z "$as_dir" && as_dir=.
37160    for ac_exec_ext in '' $ac_executable_extensions; do
37161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37162    ac_cv_prog_ac_ct_NM="$ac_prog"
37163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37164    break 2
37165  fi
37166done
37167  done
37168IFS=$as_save_IFS
37169
37170fi
37171fi
37172ac_ct_NM=$ac_cv_prog_ac_ct_NM
37173if test -n "$ac_ct_NM"; then
37174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37175$as_echo "$ac_ct_NM" >&6; }
37176else
37177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37178$as_echo "no" >&6; }
37179fi
37180
37181
37182  test -n "$ac_ct_NM" && break
37183done
37184
37185  if test "x$ac_ct_NM" = x; then
37186    NM=""
37187  else
37188    case $cross_compiling:$ac_tool_warned in
37189yes:)
37190{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37191$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37192ac_tool_warned=yes ;;
37193esac
37194    NM=$ac_ct_NM
37195  fi
37196fi
37197
37198    else
37199      # If it succeeded, then it was overridden by the user. We will use it
37200      # for the tool.
37201
37202      # First remove it from the list of overridden variables, so we can test
37203      # for unknown variables in the end.
37204      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37205
37206      # Check if the provided tool contains a complete path.
37207      tool_specified="$NM"
37208      tool_basename="${tool_specified##*/}"
37209      if test "x$tool_basename" = "x$tool_specified"; then
37210        # A command without a complete path is provided, search $PATH.
37211        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37212$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37213        # Extract the first word of "$tool_basename", so it can be a program name with args.
37214set dummy $tool_basename; ac_word=$2
37215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37216$as_echo_n "checking for $ac_word... " >&6; }
37217if ${ac_cv_path_NM+:} false; then :
37218  $as_echo_n "(cached) " >&6
37219else
37220  case $NM in
37221  [\\/]* | ?:[\\/]*)
37222  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37223  ;;
37224  *)
37225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37226for as_dir in $PATH
37227do
37228  IFS=$as_save_IFS
37229  test -z "$as_dir" && as_dir=.
37230    for ac_exec_ext in '' $ac_executable_extensions; do
37231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37232    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37234    break 2
37235  fi
37236done
37237  done
37238IFS=$as_save_IFS
37239
37240  ;;
37241esac
37242fi
37243NM=$ac_cv_path_NM
37244if test -n "$NM"; then
37245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37246$as_echo "$NM" >&6; }
37247else
37248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37249$as_echo "no" >&6; }
37250fi
37251
37252
37253        if test "x$NM" = x; then
37254          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37255        fi
37256      else
37257        # Otherwise we believe it is a complete path. Use it as it is.
37258        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37259$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37260        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37261$as_echo_n "checking for NM... " >&6; }
37262        if test ! -x "$tool_specified"; then
37263          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37264$as_echo "not found" >&6; }
37265          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37266        fi
37267        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37268$as_echo "$tool_specified" >&6; }
37269      fi
37270    fi
37271  fi
37272
37273
37274
37275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37276
37277  # First separate the path from the arguments. This will split at the first
37278  # space.
37279  complete="$NM"
37280  path="${complete%% *}"
37281  tmp="$complete EOL"
37282  arguments="${tmp#* }"
37283
37284  # Input might be given as Windows format, start by converting to
37285  # unix format.
37286  new_path=`$CYGPATH -u "$path"`
37287
37288  # Now try to locate executable using which
37289  new_path=`$WHICH "$new_path" 2> /dev/null`
37290  # bat and cmd files are not always considered executable in cygwin causing which
37291  # to not find them
37292  if test "x$new_path" = x \
37293      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37294      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37295    new_path=`$CYGPATH -u "$path"`
37296  fi
37297  if test "x$new_path" = x; then
37298    # Oops. Which didn't find the executable.
37299    # The splitting of arguments from the executable at a space might have been incorrect,
37300    # since paths with space are more likely in Windows. Give it another try with the whole
37301    # argument.
37302    path="$complete"
37303    arguments="EOL"
37304    new_path=`$CYGPATH -u "$path"`
37305    new_path=`$WHICH "$new_path" 2> /dev/null`
37306    # bat and cmd files are not always considered executable in cygwin causing which
37307    # to not find them
37308    if test "x$new_path" = x \
37309        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37310        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37311      new_path=`$CYGPATH -u "$path"`
37312    fi
37313    if test "x$new_path" = x; then
37314      # It's still not found. Now this is an unrecoverable error.
37315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37316$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37317      has_space=`$ECHO "$complete" | $GREP " "`
37318      if test "x$has_space" != x; then
37319        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37320$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37321      fi
37322      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37323    fi
37324  fi
37325
37326  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37327  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37328  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37329  # "foo.exe" is OK but "foo" is an error.
37330  #
37331  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37332  # It is also a way to make sure we got the proper file name for the real test later on.
37333  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37334  if test "x$test_shortpath" = x; then
37335    # Short path failed, file does not exist as specified.
37336    # Try adding .exe or .cmd
37337    if test -f "${new_path}.exe"; then
37338      input_to_shortpath="${new_path}.exe"
37339    elif test -f "${new_path}.cmd"; then
37340      input_to_shortpath="${new_path}.cmd"
37341    else
37342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37343$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37344      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37345$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37346      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37347    fi
37348  else
37349    input_to_shortpath="$new_path"
37350  fi
37351
37352  # Call helper function which possibly converts this using DOS-style short mode.
37353  # If so, the updated path is stored in $new_path.
37354  new_path="$input_to_shortpath"
37355
37356  input_path="$input_to_shortpath"
37357  # Check if we need to convert this using DOS-style short mode. If the path
37358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37359  # take no chances and rewrite it.
37360  # Note: m4 eats our [], so we need to use [ and ] instead.
37361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37362  if test "x$has_forbidden_chars" != x; then
37363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37364    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37365    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37366    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37367      # Going to short mode and back again did indeed matter. Since short mode is
37368      # case insensitive, let's make it lowercase to improve readability.
37369      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37370      # Now convert it back to Unix-stile (cygpath)
37371      input_path=`$CYGPATH -u "$shortmode_path"`
37372      new_path="$input_path"
37373    fi
37374  fi
37375
37376  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37377  if test "x$test_cygdrive_prefix" = x; then
37378    # As a simple fix, exclude /usr/bin since it's not a real path.
37379    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37380      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37381      # a path prefixed by /cygdrive for fixpath to work.
37382      new_path="$CYGWIN_ROOT_PATH$input_path"
37383    fi
37384  fi
37385
37386  # remove trailing .exe if any
37387  new_path="${new_path/%.exe/}"
37388
37389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37390
37391  # First separate the path from the arguments. This will split at the first
37392  # space.
37393  complete="$NM"
37394  path="${complete%% *}"
37395  tmp="$complete EOL"
37396  arguments="${tmp#* }"
37397
37398  # Input might be given as Windows format, start by converting to
37399  # unix format.
37400  new_path="$path"
37401
37402  windows_path="$new_path"
37403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37404    unix_path=`$CYGPATH -u "$windows_path"`
37405    new_path="$unix_path"
37406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37408    new_path="$unix_path"
37409  fi
37410
37411
37412  # Now try to locate executable using which
37413  new_path=`$WHICH "$new_path" 2> /dev/null`
37414
37415  if test "x$new_path" = x; then
37416    # Oops. Which didn't find the executable.
37417    # The splitting of arguments from the executable at a space might have been incorrect,
37418    # since paths with space are more likely in Windows. Give it another try with the whole
37419    # argument.
37420    path="$complete"
37421    arguments="EOL"
37422    new_path="$path"
37423
37424  windows_path="$new_path"
37425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37426    unix_path=`$CYGPATH -u "$windows_path"`
37427    new_path="$unix_path"
37428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37430    new_path="$unix_path"
37431  fi
37432
37433
37434    new_path=`$WHICH "$new_path" 2> /dev/null`
37435
37436    if test "x$new_path" = x; then
37437      # It's still not found. Now this is an unrecoverable error.
37438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37439$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37440      has_space=`$ECHO "$complete" | $GREP " "`
37441      if test "x$has_space" != x; then
37442        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37443$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37444      fi
37445      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37446    fi
37447  fi
37448
37449  # Now new_path has a complete unix path to the binary
37450  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37451    # Keep paths in /bin as-is, but remove trailing .exe if any
37452    new_path="${new_path/%.exe/}"
37453    # Do not save /bin paths to all_fixpath_prefixes!
37454  else
37455    # Not in mixed or Windows style, start by that.
37456    new_path=`cmd //c echo $new_path`
37457
37458  input_path="$new_path"
37459  # Check if we need to convert this using DOS-style short mode. If the path
37460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37461  # take no chances and rewrite it.
37462  # Note: m4 eats our [], so we need to use [ and ] instead.
37463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37464  if test "x$has_forbidden_chars" != x; then
37465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37466    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37467  fi
37468
37469    # Output is in $new_path
37470
37471  windows_path="$new_path"
37472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37473    unix_path=`$CYGPATH -u "$windows_path"`
37474    new_path="$unix_path"
37475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37477    new_path="$unix_path"
37478  fi
37479
37480    # remove trailing .exe if any
37481    new_path="${new_path/%.exe/}"
37482
37483    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37484    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37485  fi
37486
37487  else
37488    # We're on a posix platform. Hooray! :)
37489    # First separate the path from the arguments. This will split at the first
37490    # space.
37491    complete="$NM"
37492    path="${complete%% *}"
37493    tmp="$complete EOL"
37494    arguments="${tmp#* }"
37495
37496    # Cannot rely on the command "which" here since it doesn't always work.
37497    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37498    if test -z "$is_absolute_path"; then
37499      # Path to executable is not absolute. Find it.
37500      IFS_save="$IFS"
37501      IFS=:
37502      for p in $PATH; do
37503        if test -f "$p/$path" && test -x "$p/$path"; then
37504          new_path="$p/$path"
37505          break
37506        fi
37507      done
37508      IFS="$IFS_save"
37509    else
37510      # This is an absolute path, we can use it without further modifications.
37511      new_path="$path"
37512    fi
37513
37514    if test "x$new_path" = x; then
37515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37516$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37517      has_space=`$ECHO "$complete" | $GREP " "`
37518      if test "x$has_space" != x; then
37519        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37520$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37521      fi
37522      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37523    fi
37524  fi
37525
37526  # Now join together the path and the arguments once again
37527  if test "x$arguments" != xEOL; then
37528    new_complete="$new_path ${arguments% *}"
37529  else
37530    new_complete="$new_path"
37531  fi
37532
37533  if test "x$complete" != "x$new_complete"; then
37534    NM="$new_complete"
37535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37536$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37537  fi
37538
37539    GNM="$NM"
37540
37541  fi
37542
37543  # objcopy is used for moving debug symbols to separate files when
37544  # full debug symbols are enabled.
37545  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37546
37547
37548  # Publish this variable in the help.
37549
37550
37551  if test "x$OBJCOPY" = x; then
37552    # The variable is not set by user, try to locate tool using the code snippet
37553    if test -n "$ac_tool_prefix"; then
37554  for ac_prog in gobjcopy objcopy
37555  do
37556    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37557set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37559$as_echo_n "checking for $ac_word... " >&6; }
37560if ${ac_cv_prog_OBJCOPY+:} false; then :
37561  $as_echo_n "(cached) " >&6
37562else
37563  if test -n "$OBJCOPY"; then
37564  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37565else
37566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37567for as_dir in $PATH
37568do
37569  IFS=$as_save_IFS
37570  test -z "$as_dir" && as_dir=.
37571    for ac_exec_ext in '' $ac_executable_extensions; do
37572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37573    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37575    break 2
37576  fi
37577done
37578  done
37579IFS=$as_save_IFS
37580
37581fi
37582fi
37583OBJCOPY=$ac_cv_prog_OBJCOPY
37584if test -n "$OBJCOPY"; then
37585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37586$as_echo "$OBJCOPY" >&6; }
37587else
37588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37589$as_echo "no" >&6; }
37590fi
37591
37592
37593    test -n "$OBJCOPY" && break
37594  done
37595fi
37596if test -z "$OBJCOPY"; then
37597  ac_ct_OBJCOPY=$OBJCOPY
37598  for ac_prog in gobjcopy objcopy
37599do
37600  # Extract the first word of "$ac_prog", so it can be a program name with args.
37601set dummy $ac_prog; ac_word=$2
37602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37603$as_echo_n "checking for $ac_word... " >&6; }
37604if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37605  $as_echo_n "(cached) " >&6
37606else
37607  if test -n "$ac_ct_OBJCOPY"; then
37608  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37609else
37610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37611for as_dir in $PATH
37612do
37613  IFS=$as_save_IFS
37614  test -z "$as_dir" && as_dir=.
37615    for ac_exec_ext in '' $ac_executable_extensions; do
37616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37617    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37619    break 2
37620  fi
37621done
37622  done
37623IFS=$as_save_IFS
37624
37625fi
37626fi
37627ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37628if test -n "$ac_ct_OBJCOPY"; then
37629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37630$as_echo "$ac_ct_OBJCOPY" >&6; }
37631else
37632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37633$as_echo "no" >&6; }
37634fi
37635
37636
37637  test -n "$ac_ct_OBJCOPY" && break
37638done
37639
37640  if test "x$ac_ct_OBJCOPY" = x; then
37641    OBJCOPY=""
37642  else
37643    case $cross_compiling:$ac_tool_warned in
37644yes:)
37645{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37646$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37647ac_tool_warned=yes ;;
37648esac
37649    OBJCOPY=$ac_ct_OBJCOPY
37650  fi
37651fi
37652
37653  else
37654    # The variable is set, but is it from the command line or the environment?
37655
37656    # Try to remove the string !OBJCOPY! from our list.
37657    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37658    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37659      # If it failed, the variable was not from the command line. Ignore it,
37660      # but warn the user (except for BASH, which is always set by the calling BASH).
37661      if test "xOBJCOPY" != xBASH; then
37662        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37663$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37664      fi
37665      # Try to locate tool using the code snippet
37666      if test -n "$ac_tool_prefix"; then
37667  for ac_prog in gobjcopy objcopy
37668  do
37669    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37670set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37672$as_echo_n "checking for $ac_word... " >&6; }
37673if ${ac_cv_prog_OBJCOPY+:} false; then :
37674  $as_echo_n "(cached) " >&6
37675else
37676  if test -n "$OBJCOPY"; then
37677  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37678else
37679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37680for as_dir in $PATH
37681do
37682  IFS=$as_save_IFS
37683  test -z "$as_dir" && as_dir=.
37684    for ac_exec_ext in '' $ac_executable_extensions; do
37685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37686    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37688    break 2
37689  fi
37690done
37691  done
37692IFS=$as_save_IFS
37693
37694fi
37695fi
37696OBJCOPY=$ac_cv_prog_OBJCOPY
37697if test -n "$OBJCOPY"; then
37698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37699$as_echo "$OBJCOPY" >&6; }
37700else
37701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37702$as_echo "no" >&6; }
37703fi
37704
37705
37706    test -n "$OBJCOPY" && break
37707  done
37708fi
37709if test -z "$OBJCOPY"; then
37710  ac_ct_OBJCOPY=$OBJCOPY
37711  for ac_prog in gobjcopy objcopy
37712do
37713  # Extract the first word of "$ac_prog", so it can be a program name with args.
37714set dummy $ac_prog; ac_word=$2
37715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37716$as_echo_n "checking for $ac_word... " >&6; }
37717if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37718  $as_echo_n "(cached) " >&6
37719else
37720  if test -n "$ac_ct_OBJCOPY"; then
37721  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37722else
37723as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37724for as_dir in $PATH
37725do
37726  IFS=$as_save_IFS
37727  test -z "$as_dir" && as_dir=.
37728    for ac_exec_ext in '' $ac_executable_extensions; do
37729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37730    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37732    break 2
37733  fi
37734done
37735  done
37736IFS=$as_save_IFS
37737
37738fi
37739fi
37740ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37741if test -n "$ac_ct_OBJCOPY"; then
37742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37743$as_echo "$ac_ct_OBJCOPY" >&6; }
37744else
37745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37746$as_echo "no" >&6; }
37747fi
37748
37749
37750  test -n "$ac_ct_OBJCOPY" && break
37751done
37752
37753  if test "x$ac_ct_OBJCOPY" = x; then
37754    OBJCOPY=""
37755  else
37756    case $cross_compiling:$ac_tool_warned in
37757yes:)
37758{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37759$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37760ac_tool_warned=yes ;;
37761esac
37762    OBJCOPY=$ac_ct_OBJCOPY
37763  fi
37764fi
37765
37766    else
37767      # If it succeeded, then it was overridden by the user. We will use it
37768      # for the tool.
37769
37770      # First remove it from the list of overridden variables, so we can test
37771      # for unknown variables in the end.
37772      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37773
37774      # Check if the provided tool contains a complete path.
37775      tool_specified="$OBJCOPY"
37776      tool_basename="${tool_specified##*/}"
37777      if test "x$tool_basename" = "x$tool_specified"; then
37778        # A command without a complete path is provided, search $PATH.
37779        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37780$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37781        # Extract the first word of "$tool_basename", so it can be a program name with args.
37782set dummy $tool_basename; ac_word=$2
37783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37784$as_echo_n "checking for $ac_word... " >&6; }
37785if ${ac_cv_path_OBJCOPY+:} false; then :
37786  $as_echo_n "(cached) " >&6
37787else
37788  case $OBJCOPY in
37789  [\\/]* | ?:[\\/]*)
37790  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37791  ;;
37792  *)
37793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37794for as_dir in $PATH
37795do
37796  IFS=$as_save_IFS
37797  test -z "$as_dir" && as_dir=.
37798    for ac_exec_ext in '' $ac_executable_extensions; do
37799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37800    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37802    break 2
37803  fi
37804done
37805  done
37806IFS=$as_save_IFS
37807
37808  ;;
37809esac
37810fi
37811OBJCOPY=$ac_cv_path_OBJCOPY
37812if test -n "$OBJCOPY"; then
37813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37814$as_echo "$OBJCOPY" >&6; }
37815else
37816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37817$as_echo "no" >&6; }
37818fi
37819
37820
37821        if test "x$OBJCOPY" = x; then
37822          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37823        fi
37824      else
37825        # Otherwise we believe it is a complete path. Use it as it is.
37826        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
37827$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
37828        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
37829$as_echo_n "checking for OBJCOPY... " >&6; }
37830        if test ! -x "$tool_specified"; then
37831          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37832$as_echo "not found" >&6; }
37833          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
37834        fi
37835        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37836$as_echo "$tool_specified" >&6; }
37837      fi
37838    fi
37839  fi
37840
37841
37842    # Only call fixup if objcopy was found.
37843    if test -n "$OBJCOPY"; then
37844
37845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37846
37847  # First separate the path from the arguments. This will split at the first
37848  # space.
37849  complete="$OBJCOPY"
37850  path="${complete%% *}"
37851  tmp="$complete EOL"
37852  arguments="${tmp#* }"
37853
37854  # Input might be given as Windows format, start by converting to
37855  # unix format.
37856  new_path=`$CYGPATH -u "$path"`
37857
37858  # Now try to locate executable using which
37859  new_path=`$WHICH "$new_path" 2> /dev/null`
37860  # bat and cmd files are not always considered executable in cygwin causing which
37861  # to not find them
37862  if test "x$new_path" = x \
37863      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37864      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37865    new_path=`$CYGPATH -u "$path"`
37866  fi
37867  if test "x$new_path" = x; then
37868    # Oops. Which didn't find the executable.
37869    # The splitting of arguments from the executable at a space might have been incorrect,
37870    # since paths with space are more likely in Windows. Give it another try with the whole
37871    # argument.
37872    path="$complete"
37873    arguments="EOL"
37874    new_path=`$CYGPATH -u "$path"`
37875    new_path=`$WHICH "$new_path" 2> /dev/null`
37876    # bat and cmd files are not always considered executable in cygwin causing which
37877    # to not find them
37878    if test "x$new_path" = x \
37879        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37880        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37881      new_path=`$CYGPATH -u "$path"`
37882    fi
37883    if test "x$new_path" = x; then
37884      # It's still not found. Now this is an unrecoverable error.
37885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
37886$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
37887      has_space=`$ECHO "$complete" | $GREP " "`
37888      if test "x$has_space" != x; then
37889        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37890$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37891      fi
37892      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37893    fi
37894  fi
37895
37896  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37897  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37898  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37899  # "foo.exe" is OK but "foo" is an error.
37900  #
37901  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37902  # It is also a way to make sure we got the proper file name for the real test later on.
37903  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37904  if test "x$test_shortpath" = x; then
37905    # Short path failed, file does not exist as specified.
37906    # Try adding .exe or .cmd
37907    if test -f "${new_path}.exe"; then
37908      input_to_shortpath="${new_path}.exe"
37909    elif test -f "${new_path}.cmd"; then
37910      input_to_shortpath="${new_path}.cmd"
37911    else
37912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
37913$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
37914      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37915$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37916      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37917    fi
37918  else
37919    input_to_shortpath="$new_path"
37920  fi
37921
37922  # Call helper function which possibly converts this using DOS-style short mode.
37923  # If so, the updated path is stored in $new_path.
37924  new_path="$input_to_shortpath"
37925
37926  input_path="$input_to_shortpath"
37927  # Check if we need to convert this using DOS-style short mode. If the path
37928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37929  # take no chances and rewrite it.
37930  # Note: m4 eats our [], so we need to use [ and ] instead.
37931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37932  if test "x$has_forbidden_chars" != x; then
37933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37934    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37935    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37936    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37937      # Going to short mode and back again did indeed matter. Since short mode is
37938      # case insensitive, let's make it lowercase to improve readability.
37939      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37940      # Now convert it back to Unix-stile (cygpath)
37941      input_path=`$CYGPATH -u "$shortmode_path"`
37942      new_path="$input_path"
37943    fi
37944  fi
37945
37946  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37947  if test "x$test_cygdrive_prefix" = x; then
37948    # As a simple fix, exclude /usr/bin since it's not a real path.
37949    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37950      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37951      # a path prefixed by /cygdrive for fixpath to work.
37952      new_path="$CYGWIN_ROOT_PATH$input_path"
37953    fi
37954  fi
37955
37956  # remove trailing .exe if any
37957  new_path="${new_path/%.exe/}"
37958
37959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37960
37961  # First separate the path from the arguments. This will split at the first
37962  # space.
37963  complete="$OBJCOPY"
37964  path="${complete%% *}"
37965  tmp="$complete EOL"
37966  arguments="${tmp#* }"
37967
37968  # Input might be given as Windows format, start by converting to
37969  # unix format.
37970  new_path="$path"
37971
37972  windows_path="$new_path"
37973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37974    unix_path=`$CYGPATH -u "$windows_path"`
37975    new_path="$unix_path"
37976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37978    new_path="$unix_path"
37979  fi
37980
37981
37982  # Now try to locate executable using which
37983  new_path=`$WHICH "$new_path" 2> /dev/null`
37984
37985  if test "x$new_path" = x; then
37986    # Oops. Which didn't find the executable.
37987    # The splitting of arguments from the executable at a space might have been incorrect,
37988    # since paths with space are more likely in Windows. Give it another try with the whole
37989    # argument.
37990    path="$complete"
37991    arguments="EOL"
37992    new_path="$path"
37993
37994  windows_path="$new_path"
37995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37996    unix_path=`$CYGPATH -u "$windows_path"`
37997    new_path="$unix_path"
37998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38000    new_path="$unix_path"
38001  fi
38002
38003
38004    new_path=`$WHICH "$new_path" 2> /dev/null`
38005
38006    if test "x$new_path" = x; then
38007      # It's still not found. Now this is an unrecoverable error.
38008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38009$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38010      has_space=`$ECHO "$complete" | $GREP " "`
38011      if test "x$has_space" != x; then
38012        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38013$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38014      fi
38015      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38016    fi
38017  fi
38018
38019  # Now new_path has a complete unix path to the binary
38020  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38021    # Keep paths in /bin as-is, but remove trailing .exe if any
38022    new_path="${new_path/%.exe/}"
38023    # Do not save /bin paths to all_fixpath_prefixes!
38024  else
38025    # Not in mixed or Windows style, start by that.
38026    new_path=`cmd //c echo $new_path`
38027
38028  input_path="$new_path"
38029  # Check if we need to convert this using DOS-style short mode. If the path
38030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38031  # take no chances and rewrite it.
38032  # Note: m4 eats our [], so we need to use [ and ] instead.
38033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38034  if test "x$has_forbidden_chars" != x; then
38035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38036    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38037  fi
38038
38039    # Output is in $new_path
38040
38041  windows_path="$new_path"
38042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38043    unix_path=`$CYGPATH -u "$windows_path"`
38044    new_path="$unix_path"
38045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38047    new_path="$unix_path"
38048  fi
38049
38050    # remove trailing .exe if any
38051    new_path="${new_path/%.exe/}"
38052
38053    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38054    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38055  fi
38056
38057  else
38058    # We're on a posix platform. Hooray! :)
38059    # First separate the path from the arguments. This will split at the first
38060    # space.
38061    complete="$OBJCOPY"
38062    path="${complete%% *}"
38063    tmp="$complete EOL"
38064    arguments="${tmp#* }"
38065
38066    # Cannot rely on the command "which" here since it doesn't always work.
38067    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38068    if test -z "$is_absolute_path"; then
38069      # Path to executable is not absolute. Find it.
38070      IFS_save="$IFS"
38071      IFS=:
38072      for p in $PATH; do
38073        if test -f "$p/$path" && test -x "$p/$path"; then
38074          new_path="$p/$path"
38075          break
38076        fi
38077      done
38078      IFS="$IFS_save"
38079    else
38080      # This is an absolute path, we can use it without further modifications.
38081      new_path="$path"
38082    fi
38083
38084    if test "x$new_path" = x; then
38085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38086$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38087      has_space=`$ECHO "$complete" | $GREP " "`
38088      if test "x$has_space" != x; then
38089        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38090$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38091      fi
38092      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38093    fi
38094  fi
38095
38096  # Now join together the path and the arguments once again
38097  if test "x$arguments" != xEOL; then
38098    new_complete="$new_path ${arguments% *}"
38099  else
38100    new_complete="$new_path"
38101  fi
38102
38103  if test "x$complete" != "x$new_complete"; then
38104    OBJCOPY="$new_complete"
38105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38106$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38107  fi
38108
38109    fi
38110  fi
38111
38112
38113
38114  # Publish this variable in the help.
38115
38116
38117  if test "x$OBJDUMP" = x; then
38118    # The variable is not set by user, try to locate tool using the code snippet
38119    if test -n "$ac_tool_prefix"; then
38120  for ac_prog in gobjdump objdump
38121  do
38122    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38123set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38125$as_echo_n "checking for $ac_word... " >&6; }
38126if ${ac_cv_prog_OBJDUMP+:} false; then :
38127  $as_echo_n "(cached) " >&6
38128else
38129  if test -n "$OBJDUMP"; then
38130  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38131else
38132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38133for as_dir in $PATH
38134do
38135  IFS=$as_save_IFS
38136  test -z "$as_dir" && as_dir=.
38137    for ac_exec_ext in '' $ac_executable_extensions; do
38138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38139    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38141    break 2
38142  fi
38143done
38144  done
38145IFS=$as_save_IFS
38146
38147fi
38148fi
38149OBJDUMP=$ac_cv_prog_OBJDUMP
38150if test -n "$OBJDUMP"; then
38151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38152$as_echo "$OBJDUMP" >&6; }
38153else
38154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38155$as_echo "no" >&6; }
38156fi
38157
38158
38159    test -n "$OBJDUMP" && break
38160  done
38161fi
38162if test -z "$OBJDUMP"; then
38163  ac_ct_OBJDUMP=$OBJDUMP
38164  for ac_prog in gobjdump objdump
38165do
38166  # Extract the first word of "$ac_prog", so it can be a program name with args.
38167set dummy $ac_prog; ac_word=$2
38168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38169$as_echo_n "checking for $ac_word... " >&6; }
38170if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38171  $as_echo_n "(cached) " >&6
38172else
38173  if test -n "$ac_ct_OBJDUMP"; then
38174  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38175else
38176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38177for as_dir in $PATH
38178do
38179  IFS=$as_save_IFS
38180  test -z "$as_dir" && as_dir=.
38181    for ac_exec_ext in '' $ac_executable_extensions; do
38182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38183    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38185    break 2
38186  fi
38187done
38188  done
38189IFS=$as_save_IFS
38190
38191fi
38192fi
38193ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38194if test -n "$ac_ct_OBJDUMP"; then
38195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38196$as_echo "$ac_ct_OBJDUMP" >&6; }
38197else
38198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38199$as_echo "no" >&6; }
38200fi
38201
38202
38203  test -n "$ac_ct_OBJDUMP" && break
38204done
38205
38206  if test "x$ac_ct_OBJDUMP" = x; then
38207    OBJDUMP=""
38208  else
38209    case $cross_compiling:$ac_tool_warned in
38210yes:)
38211{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38212$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38213ac_tool_warned=yes ;;
38214esac
38215    OBJDUMP=$ac_ct_OBJDUMP
38216  fi
38217fi
38218
38219  else
38220    # The variable is set, but is it from the command line or the environment?
38221
38222    # Try to remove the string !OBJDUMP! from our list.
38223    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38224    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38225      # If it failed, the variable was not from the command line. Ignore it,
38226      # but warn the user (except for BASH, which is always set by the calling BASH).
38227      if test "xOBJDUMP" != xBASH; then
38228        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38229$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38230      fi
38231      # Try to locate tool using the code snippet
38232      if test -n "$ac_tool_prefix"; then
38233  for ac_prog in gobjdump objdump
38234  do
38235    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38236set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38238$as_echo_n "checking for $ac_word... " >&6; }
38239if ${ac_cv_prog_OBJDUMP+:} false; then :
38240  $as_echo_n "(cached) " >&6
38241else
38242  if test -n "$OBJDUMP"; then
38243  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38244else
38245as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38246for as_dir in $PATH
38247do
38248  IFS=$as_save_IFS
38249  test -z "$as_dir" && as_dir=.
38250    for ac_exec_ext in '' $ac_executable_extensions; do
38251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38252    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38254    break 2
38255  fi
38256done
38257  done
38258IFS=$as_save_IFS
38259
38260fi
38261fi
38262OBJDUMP=$ac_cv_prog_OBJDUMP
38263if test -n "$OBJDUMP"; then
38264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38265$as_echo "$OBJDUMP" >&6; }
38266else
38267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38268$as_echo "no" >&6; }
38269fi
38270
38271
38272    test -n "$OBJDUMP" && break
38273  done
38274fi
38275if test -z "$OBJDUMP"; then
38276  ac_ct_OBJDUMP=$OBJDUMP
38277  for ac_prog in gobjdump objdump
38278do
38279  # Extract the first word of "$ac_prog", so it can be a program name with args.
38280set dummy $ac_prog; ac_word=$2
38281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38282$as_echo_n "checking for $ac_word... " >&6; }
38283if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38284  $as_echo_n "(cached) " >&6
38285else
38286  if test -n "$ac_ct_OBJDUMP"; then
38287  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38288else
38289as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38290for as_dir in $PATH
38291do
38292  IFS=$as_save_IFS
38293  test -z "$as_dir" && as_dir=.
38294    for ac_exec_ext in '' $ac_executable_extensions; do
38295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38296    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38298    break 2
38299  fi
38300done
38301  done
38302IFS=$as_save_IFS
38303
38304fi
38305fi
38306ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38307if test -n "$ac_ct_OBJDUMP"; then
38308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38309$as_echo "$ac_ct_OBJDUMP" >&6; }
38310else
38311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38312$as_echo "no" >&6; }
38313fi
38314
38315
38316  test -n "$ac_ct_OBJDUMP" && break
38317done
38318
38319  if test "x$ac_ct_OBJDUMP" = x; then
38320    OBJDUMP=""
38321  else
38322    case $cross_compiling:$ac_tool_warned in
38323yes:)
38324{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38325$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38326ac_tool_warned=yes ;;
38327esac
38328    OBJDUMP=$ac_ct_OBJDUMP
38329  fi
38330fi
38331
38332    else
38333      # If it succeeded, then it was overridden by the user. We will use it
38334      # for the tool.
38335
38336      # First remove it from the list of overridden variables, so we can test
38337      # for unknown variables in the end.
38338      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38339
38340      # Check if the provided tool contains a complete path.
38341      tool_specified="$OBJDUMP"
38342      tool_basename="${tool_specified##*/}"
38343      if test "x$tool_basename" = "x$tool_specified"; then
38344        # A command without a complete path is provided, search $PATH.
38345        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38346$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38347        # Extract the first word of "$tool_basename", so it can be a program name with args.
38348set dummy $tool_basename; ac_word=$2
38349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38350$as_echo_n "checking for $ac_word... " >&6; }
38351if ${ac_cv_path_OBJDUMP+:} false; then :
38352  $as_echo_n "(cached) " >&6
38353else
38354  case $OBJDUMP in
38355  [\\/]* | ?:[\\/]*)
38356  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38357  ;;
38358  *)
38359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38360for as_dir in $PATH
38361do
38362  IFS=$as_save_IFS
38363  test -z "$as_dir" && as_dir=.
38364    for ac_exec_ext in '' $ac_executable_extensions; do
38365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38366    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38368    break 2
38369  fi
38370done
38371  done
38372IFS=$as_save_IFS
38373
38374  ;;
38375esac
38376fi
38377OBJDUMP=$ac_cv_path_OBJDUMP
38378if test -n "$OBJDUMP"; then
38379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38380$as_echo "$OBJDUMP" >&6; }
38381else
38382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38383$as_echo "no" >&6; }
38384fi
38385
38386
38387        if test "x$OBJDUMP" = x; then
38388          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38389        fi
38390      else
38391        # Otherwise we believe it is a complete path. Use it as it is.
38392        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38393$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38394        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38395$as_echo_n "checking for OBJDUMP... " >&6; }
38396        if test ! -x "$tool_specified"; then
38397          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38398$as_echo "not found" >&6; }
38399          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38400        fi
38401        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38402$as_echo "$tool_specified" >&6; }
38403      fi
38404    fi
38405  fi
38406
38407
38408  if test "x$OBJDUMP" != x; then
38409    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38410    # bails if argument is missing.
38411
38412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38413
38414  # First separate the path from the arguments. This will split at the first
38415  # space.
38416  complete="$OBJDUMP"
38417  path="${complete%% *}"
38418  tmp="$complete EOL"
38419  arguments="${tmp#* }"
38420
38421  # Input might be given as Windows format, start by converting to
38422  # unix format.
38423  new_path=`$CYGPATH -u "$path"`
38424
38425  # Now try to locate executable using which
38426  new_path=`$WHICH "$new_path" 2> /dev/null`
38427  # bat and cmd files are not always considered executable in cygwin causing which
38428  # to not find them
38429  if test "x$new_path" = x \
38430      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38431      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38432    new_path=`$CYGPATH -u "$path"`
38433  fi
38434  if test "x$new_path" = x; then
38435    # Oops. Which didn't find the executable.
38436    # The splitting of arguments from the executable at a space might have been incorrect,
38437    # since paths with space are more likely in Windows. Give it another try with the whole
38438    # argument.
38439    path="$complete"
38440    arguments="EOL"
38441    new_path=`$CYGPATH -u "$path"`
38442    new_path=`$WHICH "$new_path" 2> /dev/null`
38443    # bat and cmd files are not always considered executable in cygwin causing which
38444    # to not find them
38445    if test "x$new_path" = x \
38446        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38447        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38448      new_path=`$CYGPATH -u "$path"`
38449    fi
38450    if test "x$new_path" = x; then
38451      # It's still not found. Now this is an unrecoverable error.
38452      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38453$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38454      has_space=`$ECHO "$complete" | $GREP " "`
38455      if test "x$has_space" != x; then
38456        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38457$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38458      fi
38459      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38460    fi
38461  fi
38462
38463  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38464  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38465  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38466  # "foo.exe" is OK but "foo" is an error.
38467  #
38468  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38469  # It is also a way to make sure we got the proper file name for the real test later on.
38470  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38471  if test "x$test_shortpath" = x; then
38472    # Short path failed, file does not exist as specified.
38473    # Try adding .exe or .cmd
38474    if test -f "${new_path}.exe"; then
38475      input_to_shortpath="${new_path}.exe"
38476    elif test -f "${new_path}.cmd"; then
38477      input_to_shortpath="${new_path}.cmd"
38478    else
38479      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38480$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38481      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38482$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38483      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38484    fi
38485  else
38486    input_to_shortpath="$new_path"
38487  fi
38488
38489  # Call helper function which possibly converts this using DOS-style short mode.
38490  # If so, the updated path is stored in $new_path.
38491  new_path="$input_to_shortpath"
38492
38493  input_path="$input_to_shortpath"
38494  # Check if we need to convert this using DOS-style short mode. If the path
38495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38496  # take no chances and rewrite it.
38497  # Note: m4 eats our [], so we need to use [ and ] instead.
38498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38499  if test "x$has_forbidden_chars" != x; then
38500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38501    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38502    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38503    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38504      # Going to short mode and back again did indeed matter. Since short mode is
38505      # case insensitive, let's make it lowercase to improve readability.
38506      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38507      # Now convert it back to Unix-stile (cygpath)
38508      input_path=`$CYGPATH -u "$shortmode_path"`
38509      new_path="$input_path"
38510    fi
38511  fi
38512
38513  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38514  if test "x$test_cygdrive_prefix" = x; then
38515    # As a simple fix, exclude /usr/bin since it's not a real path.
38516    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38517      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38518      # a path prefixed by /cygdrive for fixpath to work.
38519      new_path="$CYGWIN_ROOT_PATH$input_path"
38520    fi
38521  fi
38522
38523  # remove trailing .exe if any
38524  new_path="${new_path/%.exe/}"
38525
38526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38527
38528  # First separate the path from the arguments. This will split at the first
38529  # space.
38530  complete="$OBJDUMP"
38531  path="${complete%% *}"
38532  tmp="$complete EOL"
38533  arguments="${tmp#* }"
38534
38535  # Input might be given as Windows format, start by converting to
38536  # unix format.
38537  new_path="$path"
38538
38539  windows_path="$new_path"
38540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38541    unix_path=`$CYGPATH -u "$windows_path"`
38542    new_path="$unix_path"
38543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38545    new_path="$unix_path"
38546  fi
38547
38548
38549  # Now try to locate executable using which
38550  new_path=`$WHICH "$new_path" 2> /dev/null`
38551
38552  if test "x$new_path" = x; then
38553    # Oops. Which didn't find the executable.
38554    # The splitting of arguments from the executable at a space might have been incorrect,
38555    # since paths with space are more likely in Windows. Give it another try with the whole
38556    # argument.
38557    path="$complete"
38558    arguments="EOL"
38559    new_path="$path"
38560
38561  windows_path="$new_path"
38562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38563    unix_path=`$CYGPATH -u "$windows_path"`
38564    new_path="$unix_path"
38565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38567    new_path="$unix_path"
38568  fi
38569
38570
38571    new_path=`$WHICH "$new_path" 2> /dev/null`
38572
38573    if test "x$new_path" = x; then
38574      # It's still not found. Now this is an unrecoverable error.
38575      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38576$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38577      has_space=`$ECHO "$complete" | $GREP " "`
38578      if test "x$has_space" != x; then
38579        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38580$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38581      fi
38582      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38583    fi
38584  fi
38585
38586  # Now new_path has a complete unix path to the binary
38587  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38588    # Keep paths in /bin as-is, but remove trailing .exe if any
38589    new_path="${new_path/%.exe/}"
38590    # Do not save /bin paths to all_fixpath_prefixes!
38591  else
38592    # Not in mixed or Windows style, start by that.
38593    new_path=`cmd //c echo $new_path`
38594
38595  input_path="$new_path"
38596  # Check if we need to convert this using DOS-style short mode. If the path
38597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38598  # take no chances and rewrite it.
38599  # Note: m4 eats our [], so we need to use [ and ] instead.
38600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38601  if test "x$has_forbidden_chars" != x; then
38602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38603    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38604  fi
38605
38606    # Output is in $new_path
38607
38608  windows_path="$new_path"
38609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38610    unix_path=`$CYGPATH -u "$windows_path"`
38611    new_path="$unix_path"
38612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38614    new_path="$unix_path"
38615  fi
38616
38617    # remove trailing .exe if any
38618    new_path="${new_path/%.exe/}"
38619
38620    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38621    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38622  fi
38623
38624  else
38625    # We're on a posix platform. Hooray! :)
38626    # First separate the path from the arguments. This will split at the first
38627    # space.
38628    complete="$OBJDUMP"
38629    path="${complete%% *}"
38630    tmp="$complete EOL"
38631    arguments="${tmp#* }"
38632
38633    # Cannot rely on the command "which" here since it doesn't always work.
38634    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38635    if test -z "$is_absolute_path"; then
38636      # Path to executable is not absolute. Find it.
38637      IFS_save="$IFS"
38638      IFS=:
38639      for p in $PATH; do
38640        if test -f "$p/$path" && test -x "$p/$path"; then
38641          new_path="$p/$path"
38642          break
38643        fi
38644      done
38645      IFS="$IFS_save"
38646    else
38647      # This is an absolute path, we can use it without further modifications.
38648      new_path="$path"
38649    fi
38650
38651    if test "x$new_path" = x; then
38652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38653$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38654      has_space=`$ECHO "$complete" | $GREP " "`
38655      if test "x$has_space" != x; then
38656        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38657$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38658      fi
38659      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38660    fi
38661  fi
38662
38663  # Now join together the path and the arguments once again
38664  if test "x$arguments" != xEOL; then
38665    new_complete="$new_path ${arguments% *}"
38666  else
38667    new_complete="$new_path"
38668  fi
38669
38670  if test "x$complete" != "x$new_complete"; then
38671    OBJDUMP="$new_complete"
38672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38673$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38674  fi
38675
38676  fi
38677
38678
38679  # Restore old path.
38680  PATH="$OLD_PATH"
38681
38682  # Restore the flags to the user specified values.
38683  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38684  CFLAGS="$ORG_CFLAGS"
38685  CXXFLAGS="$ORG_CXXFLAGS"
38686  OBJCFLAGS="$ORG_OBJCFLAGS"
38687
38688
38689# Finally do some processing after the detection phase
38690
38691  if test "x$COMPILE_TYPE" = "xcross"; then
38692    # Now we need to find a C/C++ compiler that can build executables for the
38693    # build platform. We can't use the AC_PROG_CC macro, since it can only be
38694    # used once. Also, we need to do this without adding a tools dir to the
38695    # path, otherwise we might pick up cross-compilers which don't use standard
38696    # naming.
38697
38698    # FIXME: we should list the discovered compilers as an exclude pattern!
38699    # If we do that, we can do this detection before POST_DETECTION, and still
38700    # find the build compilers in the tools dir, if needed.
38701
38702
38703  # Publish this variable in the help.
38704
38705
38706  if test "x$BUILD_CC" = x; then
38707    # The variable is not set by user, try to locate tool using the code snippet
38708    for ac_prog in cl cc gcc
38709do
38710  # Extract the first word of "$ac_prog", so it can be a program name with args.
38711set dummy $ac_prog; ac_word=$2
38712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38713$as_echo_n "checking for $ac_word... " >&6; }
38714if ${ac_cv_path_BUILD_CC+:} false; then :
38715  $as_echo_n "(cached) " >&6
38716else
38717  case $BUILD_CC in
38718  [\\/]* | ?:[\\/]*)
38719  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38720  ;;
38721  *)
38722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38723for as_dir in $PATH
38724do
38725  IFS=$as_save_IFS
38726  test -z "$as_dir" && as_dir=.
38727    for ac_exec_ext in '' $ac_executable_extensions; do
38728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38729    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38731    break 2
38732  fi
38733done
38734  done
38735IFS=$as_save_IFS
38736
38737  ;;
38738esac
38739fi
38740BUILD_CC=$ac_cv_path_BUILD_CC
38741if test -n "$BUILD_CC"; then
38742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38743$as_echo "$BUILD_CC" >&6; }
38744else
38745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38746$as_echo "no" >&6; }
38747fi
38748
38749
38750  test -n "$BUILD_CC" && break
38751done
38752
38753  else
38754    # The variable is set, but is it from the command line or the environment?
38755
38756    # Try to remove the string !BUILD_CC! from our list.
38757    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
38758    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38759      # If it failed, the variable was not from the command line. Ignore it,
38760      # but warn the user (except for BASH, which is always set by the calling BASH).
38761      if test "xBUILD_CC" != xBASH; then
38762        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
38763$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
38764      fi
38765      # Try to locate tool using the code snippet
38766      for ac_prog in cl cc gcc
38767do
38768  # Extract the first word of "$ac_prog", so it can be a program name with args.
38769set dummy $ac_prog; ac_word=$2
38770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38771$as_echo_n "checking for $ac_word... " >&6; }
38772if ${ac_cv_path_BUILD_CC+:} false; then :
38773  $as_echo_n "(cached) " >&6
38774else
38775  case $BUILD_CC in
38776  [\\/]* | ?:[\\/]*)
38777  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38778  ;;
38779  *)
38780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38781for as_dir in $PATH
38782do
38783  IFS=$as_save_IFS
38784  test -z "$as_dir" && as_dir=.
38785    for ac_exec_ext in '' $ac_executable_extensions; do
38786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38787    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38789    break 2
38790  fi
38791done
38792  done
38793IFS=$as_save_IFS
38794
38795  ;;
38796esac
38797fi
38798BUILD_CC=$ac_cv_path_BUILD_CC
38799if test -n "$BUILD_CC"; then
38800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38801$as_echo "$BUILD_CC" >&6; }
38802else
38803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38804$as_echo "no" >&6; }
38805fi
38806
38807
38808  test -n "$BUILD_CC" && break
38809done
38810
38811    else
38812      # If it succeeded, then it was overridden by the user. We will use it
38813      # for the tool.
38814
38815      # First remove it from the list of overridden variables, so we can test
38816      # for unknown variables in the end.
38817      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38818
38819      # Check if the provided tool contains a complete path.
38820      tool_specified="$BUILD_CC"
38821      tool_basename="${tool_specified##*/}"
38822      if test "x$tool_basename" = "x$tool_specified"; then
38823        # A command without a complete path is provided, search $PATH.
38824        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
38825$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
38826        # Extract the first word of "$tool_basename", so it can be a program name with args.
38827set dummy $tool_basename; ac_word=$2
38828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38829$as_echo_n "checking for $ac_word... " >&6; }
38830if ${ac_cv_path_BUILD_CC+:} false; then :
38831  $as_echo_n "(cached) " >&6
38832else
38833  case $BUILD_CC in
38834  [\\/]* | ?:[\\/]*)
38835  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38836  ;;
38837  *)
38838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38839for as_dir in $PATH
38840do
38841  IFS=$as_save_IFS
38842  test -z "$as_dir" && as_dir=.
38843    for ac_exec_ext in '' $ac_executable_extensions; do
38844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38845    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38847    break 2
38848  fi
38849done
38850  done
38851IFS=$as_save_IFS
38852
38853  ;;
38854esac
38855fi
38856BUILD_CC=$ac_cv_path_BUILD_CC
38857if test -n "$BUILD_CC"; then
38858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38859$as_echo "$BUILD_CC" >&6; }
38860else
38861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38862$as_echo "no" >&6; }
38863fi
38864
38865
38866        if test "x$BUILD_CC" = x; then
38867          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38868        fi
38869      else
38870        # Otherwise we believe it is a complete path. Use it as it is.
38871        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
38872$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
38873        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
38874$as_echo_n "checking for BUILD_CC... " >&6; }
38875        if test ! -x "$tool_specified"; then
38876          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38877$as_echo "not found" >&6; }
38878          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
38879        fi
38880        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38881$as_echo "$tool_specified" >&6; }
38882      fi
38883    fi
38884  fi
38885
38886
38887
38888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38889
38890  # First separate the path from the arguments. This will split at the first
38891  # space.
38892  complete="$BUILD_CC"
38893  path="${complete%% *}"
38894  tmp="$complete EOL"
38895  arguments="${tmp#* }"
38896
38897  # Input might be given as Windows format, start by converting to
38898  # unix format.
38899  new_path=`$CYGPATH -u "$path"`
38900
38901  # Now try to locate executable using which
38902  new_path=`$WHICH "$new_path" 2> /dev/null`
38903  # bat and cmd files are not always considered executable in cygwin causing which
38904  # to not find them
38905  if test "x$new_path" = x \
38906      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38907      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38908    new_path=`$CYGPATH -u "$path"`
38909  fi
38910  if test "x$new_path" = x; then
38911    # Oops. Which didn't find the executable.
38912    # The splitting of arguments from the executable at a space might have been incorrect,
38913    # since paths with space are more likely in Windows. Give it another try with the whole
38914    # argument.
38915    path="$complete"
38916    arguments="EOL"
38917    new_path=`$CYGPATH -u "$path"`
38918    new_path=`$WHICH "$new_path" 2> /dev/null`
38919    # bat and cmd files are not always considered executable in cygwin causing which
38920    # to not find them
38921    if test "x$new_path" = x \
38922        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38923        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38924      new_path=`$CYGPATH -u "$path"`
38925    fi
38926    if test "x$new_path" = x; then
38927      # It's still not found. Now this is an unrecoverable error.
38928      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
38929$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
38930      has_space=`$ECHO "$complete" | $GREP " "`
38931      if test "x$has_space" != x; then
38932        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38933$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38934      fi
38935      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
38936    fi
38937  fi
38938
38939  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38940  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38941  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38942  # "foo.exe" is OK but "foo" is an error.
38943  #
38944  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38945  # It is also a way to make sure we got the proper file name for the real test later on.
38946  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38947  if test "x$test_shortpath" = x; then
38948    # Short path failed, file does not exist as specified.
38949    # Try adding .exe or .cmd
38950    if test -f "${new_path}.exe"; then
38951      input_to_shortpath="${new_path}.exe"
38952    elif test -f "${new_path}.cmd"; then
38953      input_to_shortpath="${new_path}.cmd"
38954    else
38955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
38956$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
38957      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38958$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38959      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
38960    fi
38961  else
38962    input_to_shortpath="$new_path"
38963  fi
38964
38965  # Call helper function which possibly converts this using DOS-style short mode.
38966  # If so, the updated path is stored in $new_path.
38967  new_path="$input_to_shortpath"
38968
38969  input_path="$input_to_shortpath"
38970  # Check if we need to convert this using DOS-style short mode. If the path
38971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38972  # take no chances and rewrite it.
38973  # Note: m4 eats our [], so we need to use [ and ] instead.
38974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38975  if test "x$has_forbidden_chars" != x; then
38976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38977    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38978    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38979    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38980      # Going to short mode and back again did indeed matter. Since short mode is
38981      # case insensitive, let's make it lowercase to improve readability.
38982      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38983      # Now convert it back to Unix-stile (cygpath)
38984      input_path=`$CYGPATH -u "$shortmode_path"`
38985      new_path="$input_path"
38986    fi
38987  fi
38988
38989  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38990  if test "x$test_cygdrive_prefix" = x; then
38991    # As a simple fix, exclude /usr/bin since it's not a real path.
38992    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38993      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38994      # a path prefixed by /cygdrive for fixpath to work.
38995      new_path="$CYGWIN_ROOT_PATH$input_path"
38996    fi
38997  fi
38998
38999  # remove trailing .exe if any
39000  new_path="${new_path/%.exe/}"
39001
39002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39003
39004  # First separate the path from the arguments. This will split at the first
39005  # space.
39006  complete="$BUILD_CC"
39007  path="${complete%% *}"
39008  tmp="$complete EOL"
39009  arguments="${tmp#* }"
39010
39011  # Input might be given as Windows format, start by converting to
39012  # unix format.
39013  new_path="$path"
39014
39015  windows_path="$new_path"
39016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39017    unix_path=`$CYGPATH -u "$windows_path"`
39018    new_path="$unix_path"
39019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39021    new_path="$unix_path"
39022  fi
39023
39024
39025  # Now try to locate executable using which
39026  new_path=`$WHICH "$new_path" 2> /dev/null`
39027
39028  if test "x$new_path" = x; then
39029    # Oops. Which didn't find the executable.
39030    # The splitting of arguments from the executable at a space might have been incorrect,
39031    # since paths with space are more likely in Windows. Give it another try with the whole
39032    # argument.
39033    path="$complete"
39034    arguments="EOL"
39035    new_path="$path"
39036
39037  windows_path="$new_path"
39038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39039    unix_path=`$CYGPATH -u "$windows_path"`
39040    new_path="$unix_path"
39041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39043    new_path="$unix_path"
39044  fi
39045
39046
39047    new_path=`$WHICH "$new_path" 2> /dev/null`
39048
39049    if test "x$new_path" = x; then
39050      # It's still not found. Now this is an unrecoverable error.
39051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39052$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39053      has_space=`$ECHO "$complete" | $GREP " "`
39054      if test "x$has_space" != x; then
39055        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39056$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39057      fi
39058      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39059    fi
39060  fi
39061
39062  # Now new_path has a complete unix path to the binary
39063  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39064    # Keep paths in /bin as-is, but remove trailing .exe if any
39065    new_path="${new_path/%.exe/}"
39066    # Do not save /bin paths to all_fixpath_prefixes!
39067  else
39068    # Not in mixed or Windows style, start by that.
39069    new_path=`cmd //c echo $new_path`
39070
39071  input_path="$new_path"
39072  # Check if we need to convert this using DOS-style short mode. If the path
39073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39074  # take no chances and rewrite it.
39075  # Note: m4 eats our [], so we need to use [ and ] instead.
39076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39077  if test "x$has_forbidden_chars" != x; then
39078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39079    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39080  fi
39081
39082    # Output is in $new_path
39083
39084  windows_path="$new_path"
39085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39086    unix_path=`$CYGPATH -u "$windows_path"`
39087    new_path="$unix_path"
39088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39090    new_path="$unix_path"
39091  fi
39092
39093    # remove trailing .exe if any
39094    new_path="${new_path/%.exe/}"
39095
39096    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39097    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39098  fi
39099
39100  else
39101    # We're on a posix platform. Hooray! :)
39102    # First separate the path from the arguments. This will split at the first
39103    # space.
39104    complete="$BUILD_CC"
39105    path="${complete%% *}"
39106    tmp="$complete EOL"
39107    arguments="${tmp#* }"
39108
39109    # Cannot rely on the command "which" here since it doesn't always work.
39110    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39111    if test -z "$is_absolute_path"; then
39112      # Path to executable is not absolute. Find it.
39113      IFS_save="$IFS"
39114      IFS=:
39115      for p in $PATH; do
39116        if test -f "$p/$path" && test -x "$p/$path"; then
39117          new_path="$p/$path"
39118          break
39119        fi
39120      done
39121      IFS="$IFS_save"
39122    else
39123      # This is an absolute path, we can use it without further modifications.
39124      new_path="$path"
39125    fi
39126
39127    if test "x$new_path" = x; then
39128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39129$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39130      has_space=`$ECHO "$complete" | $GREP " "`
39131      if test "x$has_space" != x; then
39132        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39133$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39134      fi
39135      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39136    fi
39137  fi
39138
39139  # Now join together the path and the arguments once again
39140  if test "x$arguments" != xEOL; then
39141    new_complete="$new_path ${arguments% *}"
39142  else
39143    new_complete="$new_path"
39144  fi
39145
39146  if test "x$complete" != "x$new_complete"; then
39147    BUILD_CC="$new_complete"
39148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39149$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39150  fi
39151
39152
39153
39154  # Publish this variable in the help.
39155
39156
39157  if test "x$BUILD_CXX" = x; then
39158    # The variable is not set by user, try to locate tool using the code snippet
39159    for ac_prog in cl CC g++
39160do
39161  # Extract the first word of "$ac_prog", so it can be a program name with args.
39162set dummy $ac_prog; ac_word=$2
39163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39164$as_echo_n "checking for $ac_word... " >&6; }
39165if ${ac_cv_path_BUILD_CXX+:} false; then :
39166  $as_echo_n "(cached) " >&6
39167else
39168  case $BUILD_CXX in
39169  [\\/]* | ?:[\\/]*)
39170  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39171  ;;
39172  *)
39173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39174for as_dir in $PATH
39175do
39176  IFS=$as_save_IFS
39177  test -z "$as_dir" && as_dir=.
39178    for ac_exec_ext in '' $ac_executable_extensions; do
39179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39180    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39182    break 2
39183  fi
39184done
39185  done
39186IFS=$as_save_IFS
39187
39188  ;;
39189esac
39190fi
39191BUILD_CXX=$ac_cv_path_BUILD_CXX
39192if test -n "$BUILD_CXX"; then
39193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39194$as_echo "$BUILD_CXX" >&6; }
39195else
39196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39197$as_echo "no" >&6; }
39198fi
39199
39200
39201  test -n "$BUILD_CXX" && break
39202done
39203
39204  else
39205    # The variable is set, but is it from the command line or the environment?
39206
39207    # Try to remove the string !BUILD_CXX! from our list.
39208    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39209    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39210      # If it failed, the variable was not from the command line. Ignore it,
39211      # but warn the user (except for BASH, which is always set by the calling BASH).
39212      if test "xBUILD_CXX" != xBASH; then
39213        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39214$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39215      fi
39216      # Try to locate tool using the code snippet
39217      for ac_prog in cl CC g++
39218do
39219  # Extract the first word of "$ac_prog", so it can be a program name with args.
39220set dummy $ac_prog; ac_word=$2
39221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39222$as_echo_n "checking for $ac_word... " >&6; }
39223if ${ac_cv_path_BUILD_CXX+:} false; then :
39224  $as_echo_n "(cached) " >&6
39225else
39226  case $BUILD_CXX in
39227  [\\/]* | ?:[\\/]*)
39228  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39229  ;;
39230  *)
39231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39232for as_dir in $PATH
39233do
39234  IFS=$as_save_IFS
39235  test -z "$as_dir" && as_dir=.
39236    for ac_exec_ext in '' $ac_executable_extensions; do
39237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39238    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39240    break 2
39241  fi
39242done
39243  done
39244IFS=$as_save_IFS
39245
39246  ;;
39247esac
39248fi
39249BUILD_CXX=$ac_cv_path_BUILD_CXX
39250if test -n "$BUILD_CXX"; then
39251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39252$as_echo "$BUILD_CXX" >&6; }
39253else
39254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39255$as_echo "no" >&6; }
39256fi
39257
39258
39259  test -n "$BUILD_CXX" && break
39260done
39261
39262    else
39263      # If it succeeded, then it was overridden by the user. We will use it
39264      # for the tool.
39265
39266      # First remove it from the list of overridden variables, so we can test
39267      # for unknown variables in the end.
39268      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39269
39270      # Check if the provided tool contains a complete path.
39271      tool_specified="$BUILD_CXX"
39272      tool_basename="${tool_specified##*/}"
39273      if test "x$tool_basename" = "x$tool_specified"; then
39274        # A command without a complete path is provided, search $PATH.
39275        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39276$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39277        # Extract the first word of "$tool_basename", so it can be a program name with args.
39278set dummy $tool_basename; ac_word=$2
39279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39280$as_echo_n "checking for $ac_word... " >&6; }
39281if ${ac_cv_path_BUILD_CXX+:} false; then :
39282  $as_echo_n "(cached) " >&6
39283else
39284  case $BUILD_CXX in
39285  [\\/]* | ?:[\\/]*)
39286  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39287  ;;
39288  *)
39289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39290for as_dir in $PATH
39291do
39292  IFS=$as_save_IFS
39293  test -z "$as_dir" && as_dir=.
39294    for ac_exec_ext in '' $ac_executable_extensions; do
39295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39296    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39298    break 2
39299  fi
39300done
39301  done
39302IFS=$as_save_IFS
39303
39304  ;;
39305esac
39306fi
39307BUILD_CXX=$ac_cv_path_BUILD_CXX
39308if test -n "$BUILD_CXX"; then
39309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39310$as_echo "$BUILD_CXX" >&6; }
39311else
39312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39313$as_echo "no" >&6; }
39314fi
39315
39316
39317        if test "x$BUILD_CXX" = x; then
39318          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39319        fi
39320      else
39321        # Otherwise we believe it is a complete path. Use it as it is.
39322        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39323$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39324        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39325$as_echo_n "checking for BUILD_CXX... " >&6; }
39326        if test ! -x "$tool_specified"; then
39327          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39328$as_echo "not found" >&6; }
39329          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39330        fi
39331        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39332$as_echo "$tool_specified" >&6; }
39333      fi
39334    fi
39335  fi
39336
39337
39338
39339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39340
39341  # First separate the path from the arguments. This will split at the first
39342  # space.
39343  complete="$BUILD_CXX"
39344  path="${complete%% *}"
39345  tmp="$complete EOL"
39346  arguments="${tmp#* }"
39347
39348  # Input might be given as Windows format, start by converting to
39349  # unix format.
39350  new_path=`$CYGPATH -u "$path"`
39351
39352  # Now try to locate executable using which
39353  new_path=`$WHICH "$new_path" 2> /dev/null`
39354  # bat and cmd files are not always considered executable in cygwin causing which
39355  # to not find them
39356  if test "x$new_path" = x \
39357      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39358      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39359    new_path=`$CYGPATH -u "$path"`
39360  fi
39361  if test "x$new_path" = x; then
39362    # Oops. Which didn't find the executable.
39363    # The splitting of arguments from the executable at a space might have been incorrect,
39364    # since paths with space are more likely in Windows. Give it another try with the whole
39365    # argument.
39366    path="$complete"
39367    arguments="EOL"
39368    new_path=`$CYGPATH -u "$path"`
39369    new_path=`$WHICH "$new_path" 2> /dev/null`
39370    # bat and cmd files are not always considered executable in cygwin causing which
39371    # to not find them
39372    if test "x$new_path" = x \
39373        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39374        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39375      new_path=`$CYGPATH -u "$path"`
39376    fi
39377    if test "x$new_path" = x; then
39378      # It's still not found. Now this is an unrecoverable error.
39379      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39380$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39381      has_space=`$ECHO "$complete" | $GREP " "`
39382      if test "x$has_space" != x; then
39383        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39384$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39385      fi
39386      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39387    fi
39388  fi
39389
39390  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39391  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39392  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39393  # "foo.exe" is OK but "foo" is an error.
39394  #
39395  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39396  # It is also a way to make sure we got the proper file name for the real test later on.
39397  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39398  if test "x$test_shortpath" = x; then
39399    # Short path failed, file does not exist as specified.
39400    # Try adding .exe or .cmd
39401    if test -f "${new_path}.exe"; then
39402      input_to_shortpath="${new_path}.exe"
39403    elif test -f "${new_path}.cmd"; then
39404      input_to_shortpath="${new_path}.cmd"
39405    else
39406      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39407$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39408      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39409$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39410      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39411    fi
39412  else
39413    input_to_shortpath="$new_path"
39414  fi
39415
39416  # Call helper function which possibly converts this using DOS-style short mode.
39417  # If so, the updated path is stored in $new_path.
39418  new_path="$input_to_shortpath"
39419
39420  input_path="$input_to_shortpath"
39421  # Check if we need to convert this using DOS-style short mode. If the path
39422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39423  # take no chances and rewrite it.
39424  # Note: m4 eats our [], so we need to use [ and ] instead.
39425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39426  if test "x$has_forbidden_chars" != x; then
39427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39428    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39429    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39430    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39431      # Going to short mode and back again did indeed matter. Since short mode is
39432      # case insensitive, let's make it lowercase to improve readability.
39433      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39434      # Now convert it back to Unix-stile (cygpath)
39435      input_path=`$CYGPATH -u "$shortmode_path"`
39436      new_path="$input_path"
39437    fi
39438  fi
39439
39440  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39441  if test "x$test_cygdrive_prefix" = x; then
39442    # As a simple fix, exclude /usr/bin since it's not a real path.
39443    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39444      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39445      # a path prefixed by /cygdrive for fixpath to work.
39446      new_path="$CYGWIN_ROOT_PATH$input_path"
39447    fi
39448  fi
39449
39450  # remove trailing .exe if any
39451  new_path="${new_path/%.exe/}"
39452
39453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39454
39455  # First separate the path from the arguments. This will split at the first
39456  # space.
39457  complete="$BUILD_CXX"
39458  path="${complete%% *}"
39459  tmp="$complete EOL"
39460  arguments="${tmp#* }"
39461
39462  # Input might be given as Windows format, start by converting to
39463  # unix format.
39464  new_path="$path"
39465
39466  windows_path="$new_path"
39467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39468    unix_path=`$CYGPATH -u "$windows_path"`
39469    new_path="$unix_path"
39470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39472    new_path="$unix_path"
39473  fi
39474
39475
39476  # Now try to locate executable using which
39477  new_path=`$WHICH "$new_path" 2> /dev/null`
39478
39479  if test "x$new_path" = x; then
39480    # Oops. Which didn't find the executable.
39481    # The splitting of arguments from the executable at a space might have been incorrect,
39482    # since paths with space are more likely in Windows. Give it another try with the whole
39483    # argument.
39484    path="$complete"
39485    arguments="EOL"
39486    new_path="$path"
39487
39488  windows_path="$new_path"
39489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39490    unix_path=`$CYGPATH -u "$windows_path"`
39491    new_path="$unix_path"
39492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39494    new_path="$unix_path"
39495  fi
39496
39497
39498    new_path=`$WHICH "$new_path" 2> /dev/null`
39499
39500    if test "x$new_path" = x; then
39501      # It's still not found. Now this is an unrecoverable error.
39502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39503$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39504      has_space=`$ECHO "$complete" | $GREP " "`
39505      if test "x$has_space" != x; then
39506        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39507$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39508      fi
39509      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39510    fi
39511  fi
39512
39513  # Now new_path has a complete unix path to the binary
39514  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39515    # Keep paths in /bin as-is, but remove trailing .exe if any
39516    new_path="${new_path/%.exe/}"
39517    # Do not save /bin paths to all_fixpath_prefixes!
39518  else
39519    # Not in mixed or Windows style, start by that.
39520    new_path=`cmd //c echo $new_path`
39521
39522  input_path="$new_path"
39523  # Check if we need to convert this using DOS-style short mode. If the path
39524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39525  # take no chances and rewrite it.
39526  # Note: m4 eats our [], so we need to use [ and ] instead.
39527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39528  if test "x$has_forbidden_chars" != x; then
39529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39530    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39531  fi
39532
39533    # Output is in $new_path
39534
39535  windows_path="$new_path"
39536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39537    unix_path=`$CYGPATH -u "$windows_path"`
39538    new_path="$unix_path"
39539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39541    new_path="$unix_path"
39542  fi
39543
39544    # remove trailing .exe if any
39545    new_path="${new_path/%.exe/}"
39546
39547    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39548    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39549  fi
39550
39551  else
39552    # We're on a posix platform. Hooray! :)
39553    # First separate the path from the arguments. This will split at the first
39554    # space.
39555    complete="$BUILD_CXX"
39556    path="${complete%% *}"
39557    tmp="$complete EOL"
39558    arguments="${tmp#* }"
39559
39560    # Cannot rely on the command "which" here since it doesn't always work.
39561    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39562    if test -z "$is_absolute_path"; then
39563      # Path to executable is not absolute. Find it.
39564      IFS_save="$IFS"
39565      IFS=:
39566      for p in $PATH; do
39567        if test -f "$p/$path" && test -x "$p/$path"; then
39568          new_path="$p/$path"
39569          break
39570        fi
39571      done
39572      IFS="$IFS_save"
39573    else
39574      # This is an absolute path, we can use it without further modifications.
39575      new_path="$path"
39576    fi
39577
39578    if test "x$new_path" = x; then
39579      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39580$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39581      has_space=`$ECHO "$complete" | $GREP " "`
39582      if test "x$has_space" != x; then
39583        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39584$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39585      fi
39586      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39587    fi
39588  fi
39589
39590  # Now join together the path and the arguments once again
39591  if test "x$arguments" != xEOL; then
39592    new_complete="$new_path ${arguments% *}"
39593  else
39594    new_complete="$new_path"
39595  fi
39596
39597  if test "x$complete" != "x$new_complete"; then
39598    BUILD_CXX="$new_complete"
39599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39600$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39601  fi
39602
39603
39604
39605  # Publish this variable in the help.
39606
39607
39608  if test "x$BUILD_LD" = x; then
39609    # The variable is not set by user, try to locate tool using the code snippet
39610    for ac_prog in ld
39611do
39612  # Extract the first word of "$ac_prog", so it can be a program name with args.
39613set dummy $ac_prog; ac_word=$2
39614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39615$as_echo_n "checking for $ac_word... " >&6; }
39616if ${ac_cv_path_BUILD_LD+:} false; then :
39617  $as_echo_n "(cached) " >&6
39618else
39619  case $BUILD_LD in
39620  [\\/]* | ?:[\\/]*)
39621  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39622  ;;
39623  *)
39624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39625for as_dir in $PATH
39626do
39627  IFS=$as_save_IFS
39628  test -z "$as_dir" && as_dir=.
39629    for ac_exec_ext in '' $ac_executable_extensions; do
39630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39631    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39633    break 2
39634  fi
39635done
39636  done
39637IFS=$as_save_IFS
39638
39639  ;;
39640esac
39641fi
39642BUILD_LD=$ac_cv_path_BUILD_LD
39643if test -n "$BUILD_LD"; then
39644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39645$as_echo "$BUILD_LD" >&6; }
39646else
39647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39648$as_echo "no" >&6; }
39649fi
39650
39651
39652  test -n "$BUILD_LD" && break
39653done
39654
39655  else
39656    # The variable is set, but is it from the command line or the environment?
39657
39658    # Try to remove the string !BUILD_LD! from our list.
39659    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39660    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39661      # If it failed, the variable was not from the command line. Ignore it,
39662      # but warn the user (except for BASH, which is always set by the calling BASH).
39663      if test "xBUILD_LD" != xBASH; then
39664        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39665$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39666      fi
39667      # Try to locate tool using the code snippet
39668      for ac_prog in ld
39669do
39670  # Extract the first word of "$ac_prog", so it can be a program name with args.
39671set dummy $ac_prog; ac_word=$2
39672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39673$as_echo_n "checking for $ac_word... " >&6; }
39674if ${ac_cv_path_BUILD_LD+:} false; then :
39675  $as_echo_n "(cached) " >&6
39676else
39677  case $BUILD_LD in
39678  [\\/]* | ?:[\\/]*)
39679  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39680  ;;
39681  *)
39682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39683for as_dir in $PATH
39684do
39685  IFS=$as_save_IFS
39686  test -z "$as_dir" && as_dir=.
39687    for ac_exec_ext in '' $ac_executable_extensions; do
39688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39689    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39691    break 2
39692  fi
39693done
39694  done
39695IFS=$as_save_IFS
39696
39697  ;;
39698esac
39699fi
39700BUILD_LD=$ac_cv_path_BUILD_LD
39701if test -n "$BUILD_LD"; then
39702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39703$as_echo "$BUILD_LD" >&6; }
39704else
39705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39706$as_echo "no" >&6; }
39707fi
39708
39709
39710  test -n "$BUILD_LD" && break
39711done
39712
39713    else
39714      # If it succeeded, then it was overridden by the user. We will use it
39715      # for the tool.
39716
39717      # First remove it from the list of overridden variables, so we can test
39718      # for unknown variables in the end.
39719      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39720
39721      # Check if the provided tool contains a complete path.
39722      tool_specified="$BUILD_LD"
39723      tool_basename="${tool_specified##*/}"
39724      if test "x$tool_basename" = "x$tool_specified"; then
39725        # A command without a complete path is provided, search $PATH.
39726        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
39727$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
39728        # Extract the first word of "$tool_basename", so it can be a program name with args.
39729set dummy $tool_basename; ac_word=$2
39730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39731$as_echo_n "checking for $ac_word... " >&6; }
39732if ${ac_cv_path_BUILD_LD+:} false; then :
39733  $as_echo_n "(cached) " >&6
39734else
39735  case $BUILD_LD in
39736  [\\/]* | ?:[\\/]*)
39737  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39738  ;;
39739  *)
39740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39741for as_dir in $PATH
39742do
39743  IFS=$as_save_IFS
39744  test -z "$as_dir" && as_dir=.
39745    for ac_exec_ext in '' $ac_executable_extensions; do
39746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39747    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39749    break 2
39750  fi
39751done
39752  done
39753IFS=$as_save_IFS
39754
39755  ;;
39756esac
39757fi
39758BUILD_LD=$ac_cv_path_BUILD_LD
39759if test -n "$BUILD_LD"; then
39760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39761$as_echo "$BUILD_LD" >&6; }
39762else
39763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39764$as_echo "no" >&6; }
39765fi
39766
39767
39768        if test "x$BUILD_LD" = x; then
39769          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39770        fi
39771      else
39772        # Otherwise we believe it is a complete path. Use it as it is.
39773        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
39774$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
39775        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
39776$as_echo_n "checking for BUILD_LD... " >&6; }
39777        if test ! -x "$tool_specified"; then
39778          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39779$as_echo "not found" >&6; }
39780          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
39781        fi
39782        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39783$as_echo "$tool_specified" >&6; }
39784      fi
39785    fi
39786  fi
39787
39788
39789
39790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39791
39792  # First separate the path from the arguments. This will split at the first
39793  # space.
39794  complete="$BUILD_LD"
39795  path="${complete%% *}"
39796  tmp="$complete EOL"
39797  arguments="${tmp#* }"
39798
39799  # Input might be given as Windows format, start by converting to
39800  # unix format.
39801  new_path=`$CYGPATH -u "$path"`
39802
39803  # Now try to locate executable using which
39804  new_path=`$WHICH "$new_path" 2> /dev/null`
39805  # bat and cmd files are not always considered executable in cygwin causing which
39806  # to not find them
39807  if test "x$new_path" = x \
39808      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39809      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39810    new_path=`$CYGPATH -u "$path"`
39811  fi
39812  if test "x$new_path" = x; then
39813    # Oops. Which didn't find the executable.
39814    # The splitting of arguments from the executable at a space might have been incorrect,
39815    # since paths with space are more likely in Windows. Give it another try with the whole
39816    # argument.
39817    path="$complete"
39818    arguments="EOL"
39819    new_path=`$CYGPATH -u "$path"`
39820    new_path=`$WHICH "$new_path" 2> /dev/null`
39821    # bat and cmd files are not always considered executable in cygwin causing which
39822    # to not find them
39823    if test "x$new_path" = x \
39824        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39825        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39826      new_path=`$CYGPATH -u "$path"`
39827    fi
39828    if test "x$new_path" = x; then
39829      # It's still not found. Now this is an unrecoverable error.
39830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39831$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39832      has_space=`$ECHO "$complete" | $GREP " "`
39833      if test "x$has_space" != x; then
39834        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39835$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39836      fi
39837      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39838    fi
39839  fi
39840
39841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39844  # "foo.exe" is OK but "foo" is an error.
39845  #
39846  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39847  # It is also a way to make sure we got the proper file name for the real test later on.
39848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39849  if test "x$test_shortpath" = x; then
39850    # Short path failed, file does not exist as specified.
39851    # Try adding .exe or .cmd
39852    if test -f "${new_path}.exe"; then
39853      input_to_shortpath="${new_path}.exe"
39854    elif test -f "${new_path}.cmd"; then
39855      input_to_shortpath="${new_path}.cmd"
39856    else
39857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
39858$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
39859      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39860$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39861      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39862    fi
39863  else
39864    input_to_shortpath="$new_path"
39865  fi
39866
39867  # Call helper function which possibly converts this using DOS-style short mode.
39868  # If so, the updated path is stored in $new_path.
39869  new_path="$input_to_shortpath"
39870
39871  input_path="$input_to_shortpath"
39872  # Check if we need to convert this using DOS-style short mode. If the path
39873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39874  # take no chances and rewrite it.
39875  # Note: m4 eats our [], so we need to use [ and ] instead.
39876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39877  if test "x$has_forbidden_chars" != x; then
39878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39882      # Going to short mode and back again did indeed matter. Since short mode is
39883      # case insensitive, let's make it lowercase to improve readability.
39884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39885      # Now convert it back to Unix-stile (cygpath)
39886      input_path=`$CYGPATH -u "$shortmode_path"`
39887      new_path="$input_path"
39888    fi
39889  fi
39890
39891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39892  if test "x$test_cygdrive_prefix" = x; then
39893    # As a simple fix, exclude /usr/bin since it's not a real path.
39894    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39896      # a path prefixed by /cygdrive for fixpath to work.
39897      new_path="$CYGWIN_ROOT_PATH$input_path"
39898    fi
39899  fi
39900
39901  # remove trailing .exe if any
39902  new_path="${new_path/%.exe/}"
39903
39904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39905
39906  # First separate the path from the arguments. This will split at the first
39907  # space.
39908  complete="$BUILD_LD"
39909  path="${complete%% *}"
39910  tmp="$complete EOL"
39911  arguments="${tmp#* }"
39912
39913  # Input might be given as Windows format, start by converting to
39914  # unix format.
39915  new_path="$path"
39916
39917  windows_path="$new_path"
39918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39919    unix_path=`$CYGPATH -u "$windows_path"`
39920    new_path="$unix_path"
39921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39923    new_path="$unix_path"
39924  fi
39925
39926
39927  # Now try to locate executable using which
39928  new_path=`$WHICH "$new_path" 2> /dev/null`
39929
39930  if test "x$new_path" = x; then
39931    # Oops. Which didn't find the executable.
39932    # The splitting of arguments from the executable at a space might have been incorrect,
39933    # since paths with space are more likely in Windows. Give it another try with the whole
39934    # argument.
39935    path="$complete"
39936    arguments="EOL"
39937    new_path="$path"
39938
39939  windows_path="$new_path"
39940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39941    unix_path=`$CYGPATH -u "$windows_path"`
39942    new_path="$unix_path"
39943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39945    new_path="$unix_path"
39946  fi
39947
39948
39949    new_path=`$WHICH "$new_path" 2> /dev/null`
39950
39951    if test "x$new_path" = x; then
39952      # It's still not found. Now this is an unrecoverable error.
39953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39954$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39955      has_space=`$ECHO "$complete" | $GREP " "`
39956      if test "x$has_space" != x; then
39957        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39958$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39959      fi
39960      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39961    fi
39962  fi
39963
39964  # Now new_path has a complete unix path to the binary
39965  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39966    # Keep paths in /bin as-is, but remove trailing .exe if any
39967    new_path="${new_path/%.exe/}"
39968    # Do not save /bin paths to all_fixpath_prefixes!
39969  else
39970    # Not in mixed or Windows style, start by that.
39971    new_path=`cmd //c echo $new_path`
39972
39973  input_path="$new_path"
39974  # Check if we need to convert this using DOS-style short mode. If the path
39975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39976  # take no chances and rewrite it.
39977  # Note: m4 eats our [], so we need to use [ and ] instead.
39978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39979  if test "x$has_forbidden_chars" != x; then
39980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39982  fi
39983
39984    # Output is in $new_path
39985
39986  windows_path="$new_path"
39987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39988    unix_path=`$CYGPATH -u "$windows_path"`
39989    new_path="$unix_path"
39990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39992    new_path="$unix_path"
39993  fi
39994
39995    # remove trailing .exe if any
39996    new_path="${new_path/%.exe/}"
39997
39998    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39999    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40000  fi
40001
40002  else
40003    # We're on a posix platform. Hooray! :)
40004    # First separate the path from the arguments. This will split at the first
40005    # space.
40006    complete="$BUILD_LD"
40007    path="${complete%% *}"
40008    tmp="$complete EOL"
40009    arguments="${tmp#* }"
40010
40011    # Cannot rely on the command "which" here since it doesn't always work.
40012    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40013    if test -z "$is_absolute_path"; then
40014      # Path to executable is not absolute. Find it.
40015      IFS_save="$IFS"
40016      IFS=:
40017      for p in $PATH; do
40018        if test -f "$p/$path" && test -x "$p/$path"; then
40019          new_path="$p/$path"
40020          break
40021        fi
40022      done
40023      IFS="$IFS_save"
40024    else
40025      # This is an absolute path, we can use it without further modifications.
40026      new_path="$path"
40027    fi
40028
40029    if test "x$new_path" = x; then
40030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40031$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40032      has_space=`$ECHO "$complete" | $GREP " "`
40033      if test "x$has_space" != x; then
40034        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40035$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40036      fi
40037      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40038    fi
40039  fi
40040
40041  # Now join together the path and the arguments once again
40042  if test "x$arguments" != xEOL; then
40043    new_complete="$new_path ${arguments% *}"
40044  else
40045    new_complete="$new_path"
40046  fi
40047
40048  if test "x$complete" != "x$new_complete"; then
40049    BUILD_LD="$new_complete"
40050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40051$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40052  fi
40053
40054  else
40055    # If we are not cross compiling, use the normal target compilers for
40056    # building the build platform executables.
40057    BUILD_CC="$CC"
40058    BUILD_CXX="$CXX"
40059    BUILD_LD="$LD"
40060  fi
40061
40062
40063
40064
40065
40066
40067  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40068    # For hotspot, we need these in Windows mixed path,
40069    # so rewrite them all. Need added .exe suffix.
40070    HOTSPOT_CXX="$CXX.exe"
40071    HOTSPOT_LD="$LD.exe"
40072    HOTSPOT_MT="$MT.exe"
40073    HOTSPOT_RC="$RC.exe"
40074
40075  unix_path="$HOTSPOT_CXX"
40076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40077    windows_path=`$CYGPATH -m "$unix_path"`
40078    HOTSPOT_CXX="$windows_path"
40079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40080    windows_path=`cmd //c echo $unix_path`
40081    HOTSPOT_CXX="$windows_path"
40082  fi
40083
40084
40085  unix_path="$HOTSPOT_LD"
40086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40087    windows_path=`$CYGPATH -m "$unix_path"`
40088    HOTSPOT_LD="$windows_path"
40089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40090    windows_path=`cmd //c echo $unix_path`
40091    HOTSPOT_LD="$windows_path"
40092  fi
40093
40094
40095  unix_path="$HOTSPOT_MT"
40096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40097    windows_path=`$CYGPATH -m "$unix_path"`
40098    HOTSPOT_MT="$windows_path"
40099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40100    windows_path=`cmd //c echo $unix_path`
40101    HOTSPOT_MT="$windows_path"
40102  fi
40103
40104
40105  unix_path="$HOTSPOT_RC"
40106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40107    windows_path=`$CYGPATH -m "$unix_path"`
40108    HOTSPOT_RC="$windows_path"
40109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40110    windows_path=`cmd //c echo $unix_path`
40111    HOTSPOT_RC="$windows_path"
40112  fi
40113
40114
40115
40116  else
40117    HOTSPOT_CXX="$CXX"
40118    HOTSPOT_LD="$LD"
40119  fi
40120
40121
40122
40123  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40124    USE_CLANG=true
40125  fi
40126
40127
40128  # LDEXE is the linker to use, when creating executables. Not really used.
40129  # FIXME: These should just be removed!
40130  LDEXE="$LD"
40131  LDEXECXX="$LDCXX"
40132
40133
40134
40135
40136  # The package path is used only on macosx?
40137  # FIXME: clean this up, and/or move it elsewhere.
40138  PACKAGE_PATH=/opt/local
40139
40140
40141  # Check for extra potential brokenness.
40142  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40143    # On Windows, double-check that we got the right compiler.
40144    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40145    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40146    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40147      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40148        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40149      fi
40150    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40151      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40152        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40153      fi
40154    fi
40155  fi
40156
40157  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40158    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40159    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40160    # This is later checked when setting flags.
40161  fi
40162
40163  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40164  # in executable.'
40165  USING_BROKEN_SUSE_LD=no
40166  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40167    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40168$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40169    echo "SUNWprivate_1.1 { local: *; };" > version-script.map
40170    echo "int main() { }" > main.c
40171    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40172      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40173$as_echo "no" >&6; }
40174      USING_BROKEN_SUSE_LD=no
40175    else
40176      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40177$as_echo "yes" >&6; }
40178      USING_BROKEN_SUSE_LD=yes
40179    fi
40180    rm -rf version-script.map main.c a.out
40181  fi
40182
40183
40184
40185# Setup the JTReg Regression Test Harness.
40186
40187
40188# Check whether --with-jtreg was given.
40189if test "${with_jtreg+set}" = set; then :
40190  withval=$with_jtreg;
40191else
40192  with_jtreg=no
40193fi
40194
40195
40196  if test "x$with_jtreg" = xno; then
40197    # jtreg disabled
40198    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40199$as_echo_n "checking for jtreg... " >&6; }
40200    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40201$as_echo "no" >&6; }
40202  else
40203    if test "x$with_jtreg" != xyes; then
40204      # with path specified.
40205      JT_HOME="$with_jtreg"
40206    fi
40207
40208    if test "x$JT_HOME" != x; then
40209      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40210$as_echo_n "checking for jtreg... " >&6; }
40211
40212      # use JT_HOME enviroment var.
40213
40214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40215
40216  # Input might be given as Windows format, start by converting to
40217  # unix format.
40218  path="$JT_HOME"
40219  new_path=`$CYGPATH -u "$path"`
40220
40221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40224  # "foo.exe" is OK but "foo" is an error.
40225  #
40226  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40227  # It is also a way to make sure we got the proper file name for the real test later on.
40228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40229  if test "x$test_shortpath" = x; then
40230    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40231$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40232    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40233  fi
40234
40235  # Call helper function which possibly converts this using DOS-style short mode.
40236  # If so, the updated path is stored in $new_path.
40237
40238  input_path="$new_path"
40239  # Check if we need to convert this using DOS-style short mode. If the path
40240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40241  # take no chances and rewrite it.
40242  # Note: m4 eats our [], so we need to use [ and ] instead.
40243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40244  if test "x$has_forbidden_chars" != x; then
40245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40246    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40247    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40248    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40249      # Going to short mode and back again did indeed matter. Since short mode is
40250      # case insensitive, let's make it lowercase to improve readability.
40251      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40252      # Now convert it back to Unix-stile (cygpath)
40253      input_path=`$CYGPATH -u "$shortmode_path"`
40254      new_path="$input_path"
40255    fi
40256  fi
40257
40258  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40259  if test "x$test_cygdrive_prefix" = x; then
40260    # As a simple fix, exclude /usr/bin since it's not a real path.
40261    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40262      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40263      # a path prefixed by /cygdrive for fixpath to work.
40264      new_path="$CYGWIN_ROOT_PATH$input_path"
40265    fi
40266  fi
40267
40268
40269  if test "x$path" != "x$new_path"; then
40270    JT_HOME="$new_path"
40271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40272$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40273  fi
40274
40275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40276
40277  path="$JT_HOME"
40278  has_colon=`$ECHO $path | $GREP ^.:`
40279  new_path="$path"
40280  if test "x$has_colon" = x; then
40281    # Not in mixed or Windows style, start by that.
40282    new_path=`cmd //c echo $path`
40283  fi
40284
40285
40286  input_path="$new_path"
40287  # Check if we need to convert this using DOS-style short mode. If the path
40288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40289  # take no chances and rewrite it.
40290  # Note: m4 eats our [], so we need to use [ and ] instead.
40291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40292  if test "x$has_forbidden_chars" != x; then
40293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40295  fi
40296
40297
40298  windows_path="$new_path"
40299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40300    unix_path=`$CYGPATH -u "$windows_path"`
40301    new_path="$unix_path"
40302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40304    new_path="$unix_path"
40305  fi
40306
40307  if test "x$path" != "x$new_path"; then
40308    JT_HOME="$new_path"
40309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40310$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40311  fi
40312
40313  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40314  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40315
40316  else
40317    # We're on a posix platform. Hooray! :)
40318    path="$JT_HOME"
40319    has_space=`$ECHO "$path" | $GREP " "`
40320    if test "x$has_space" != x; then
40321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40322$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40323      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40324    fi
40325
40326    # Use eval to expand a potential ~
40327    eval path="$path"
40328    if test ! -f "$path" && test ! -d "$path"; then
40329      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40330    fi
40331
40332    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40333  fi
40334
40335
40336      # jtreg win32 script works for everybody
40337      JTREGEXE="$JT_HOME/win32/bin/jtreg"
40338
40339      if test ! -f "$JTREGEXE"; then
40340        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40341      fi
40342
40343      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40344$as_echo "$JTREGEXE" >&6; }
40345    else
40346      # try to find jtreg on path
40347
40348
40349
40350  # Publish this variable in the help.
40351
40352
40353  if test "x$JTREGEXE" = x; then
40354    # The variable is not set by user, try to locate tool using the code snippet
40355    for ac_prog in jtreg
40356do
40357  # Extract the first word of "$ac_prog", so it can be a program name with args.
40358set dummy $ac_prog; ac_word=$2
40359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40360$as_echo_n "checking for $ac_word... " >&6; }
40361if ${ac_cv_path_JTREGEXE+:} false; then :
40362  $as_echo_n "(cached) " >&6
40363else
40364  case $JTREGEXE in
40365  [\\/]* | ?:[\\/]*)
40366  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40367  ;;
40368  *)
40369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40370for as_dir in $PATH
40371do
40372  IFS=$as_save_IFS
40373  test -z "$as_dir" && as_dir=.
40374    for ac_exec_ext in '' $ac_executable_extensions; do
40375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40376    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40378    break 2
40379  fi
40380done
40381  done
40382IFS=$as_save_IFS
40383
40384  ;;
40385esac
40386fi
40387JTREGEXE=$ac_cv_path_JTREGEXE
40388if test -n "$JTREGEXE"; then
40389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40390$as_echo "$JTREGEXE" >&6; }
40391else
40392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40393$as_echo "no" >&6; }
40394fi
40395
40396
40397  test -n "$JTREGEXE" && break
40398done
40399
40400  else
40401    # The variable is set, but is it from the command line or the environment?
40402
40403    # Try to remove the string !JTREGEXE! from our list.
40404    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40405    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40406      # If it failed, the variable was not from the command line. Ignore it,
40407      # but warn the user (except for BASH, which is always set by the calling BASH).
40408      if test "xJTREGEXE" != xBASH; then
40409        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40410$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40411      fi
40412      # Try to locate tool using the code snippet
40413      for ac_prog in jtreg
40414do
40415  # Extract the first word of "$ac_prog", so it can be a program name with args.
40416set dummy $ac_prog; ac_word=$2
40417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40418$as_echo_n "checking for $ac_word... " >&6; }
40419if ${ac_cv_path_JTREGEXE+:} false; then :
40420  $as_echo_n "(cached) " >&6
40421else
40422  case $JTREGEXE in
40423  [\\/]* | ?:[\\/]*)
40424  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40425  ;;
40426  *)
40427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40428for as_dir in $PATH
40429do
40430  IFS=$as_save_IFS
40431  test -z "$as_dir" && as_dir=.
40432    for ac_exec_ext in '' $ac_executable_extensions; do
40433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40434    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40436    break 2
40437  fi
40438done
40439  done
40440IFS=$as_save_IFS
40441
40442  ;;
40443esac
40444fi
40445JTREGEXE=$ac_cv_path_JTREGEXE
40446if test -n "$JTREGEXE"; then
40447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40448$as_echo "$JTREGEXE" >&6; }
40449else
40450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40451$as_echo "no" >&6; }
40452fi
40453
40454
40455  test -n "$JTREGEXE" && break
40456done
40457
40458    else
40459      # If it succeeded, then it was overridden by the user. We will use it
40460      # for the tool.
40461
40462      # First remove it from the list of overridden variables, so we can test
40463      # for unknown variables in the end.
40464      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40465
40466      # Check if the provided tool contains a complete path.
40467      tool_specified="$JTREGEXE"
40468      tool_basename="${tool_specified##*/}"
40469      if test "x$tool_basename" = "x$tool_specified"; then
40470        # A command without a complete path is provided, search $PATH.
40471        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
40472$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
40473        # Extract the first word of "$tool_basename", so it can be a program name with args.
40474set dummy $tool_basename; ac_word=$2
40475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40476$as_echo_n "checking for $ac_word... " >&6; }
40477if ${ac_cv_path_JTREGEXE+:} false; then :
40478  $as_echo_n "(cached) " >&6
40479else
40480  case $JTREGEXE in
40481  [\\/]* | ?:[\\/]*)
40482  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40483  ;;
40484  *)
40485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40486for as_dir in $PATH
40487do
40488  IFS=$as_save_IFS
40489  test -z "$as_dir" && as_dir=.
40490    for ac_exec_ext in '' $ac_executable_extensions; do
40491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40492    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40494    break 2
40495  fi
40496done
40497  done
40498IFS=$as_save_IFS
40499
40500  ;;
40501esac
40502fi
40503JTREGEXE=$ac_cv_path_JTREGEXE
40504if test -n "$JTREGEXE"; then
40505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40506$as_echo "$JTREGEXE" >&6; }
40507else
40508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40509$as_echo "no" >&6; }
40510fi
40511
40512
40513        if test "x$JTREGEXE" = x; then
40514          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40515        fi
40516      else
40517        # Otherwise we believe it is a complete path. Use it as it is.
40518        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
40519$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
40520        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
40521$as_echo_n "checking for JTREGEXE... " >&6; }
40522        if test ! -x "$tool_specified"; then
40523          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40524$as_echo "not found" >&6; }
40525          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
40526        fi
40527        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40528$as_echo "$tool_specified" >&6; }
40529      fi
40530    fi
40531  fi
40532
40533
40534
40535  if test "x$JTREGEXE" = x; then
40536    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
40537  fi
40538
40539
40540      JT_HOME="`$DIRNAME $JTREGEXE`"
40541    fi
40542  fi
40543
40544
40545
40546
40547
40548
40549  # Option used to tell the compiler whether to create 32- or 64-bit executables
40550  if test "x$TOOLCHAIN_TYPE" = xxlc; then
40551    COMPILER_TARGET_BITS_FLAG="-q"
40552  else
40553    COMPILER_TARGET_BITS_FLAG="-m"
40554  fi
40555
40556
40557  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
40558  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40559    ARFLAGS="-r"
40560  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40561    ARFLAGS="-X64"
40562  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
40563    # lib.exe is used as AR to create static libraries.
40564    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
40565  else
40566    ARFLAGS=""
40567  fi
40568
40569
40570  ## Setup strip.
40571  # FIXME: should this really be per platform, or should it be per toolchain type?
40572  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
40573  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
40574  if test "x$OPENJDK_TARGET_OS" = xlinux; then
40575    STRIPFLAGS="-g"
40576  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
40577    STRIPFLAGS="-x"
40578  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
40579    STRIPFLAGS="-S"
40580  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40581    STRIPFLAGS="-X32_64"
40582  fi
40583
40584  if test "x$OPENJDK_TARGET_OS" != xwindows; then
40585    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
40586  fi
40587
40588
40589  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40590    # FIXME: break out into MCSFLAGS
40591    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
40592  fi
40593
40594
40595  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40596    CC_OUT_OPTION=-Fo
40597    EXE_OUT_OPTION=-out:
40598    LD_OUT_OPTION=-out:
40599    AR_OUT_OPTION=-out:
40600  else
40601    # The option used to specify the target .o,.a or .so file.
40602    # When compiling, how to specify the to be created object file.
40603    CC_OUT_OPTION='-o$(SPACE)'
40604    # When linking, how to specify the to be created executable.
40605    EXE_OUT_OPTION='-o$(SPACE)'
40606    # When linking, how to specify the to be created dynamically linkable library.
40607    LD_OUT_OPTION='-o$(SPACE)'
40608    # When archiving, how to specify the to be create static archive for object files.
40609    AR_OUT_OPTION='rcs$(SPACE)'
40610  fi
40611
40612
40613
40614
40615
40616  # On Windows, we need to set RC flags.
40617  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40618    RC_FLAGS="-nologo -l 0x409 -r"
40619    if test "x$VARIANT" = xOPT; then
40620      RC_FLAGS="$RC_FLAGS -d NDEBUG"
40621    fi
40622
40623    # The version variables used to create RC_FLAGS may be overridden
40624    # in a custom configure script, or possibly the command line.
40625    # Let those variables be expanded at make time in spec.gmk.
40626    # The \$ are escaped to the shell, and the $(...) variables
40627    # are evaluated by make.
40628    RC_FLAGS="$RC_FLAGS \
40629        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
40630        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
40631        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
40632        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
40633        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
40634        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
40635        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
40636  fi
40637
40638
40639  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40640    # FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX.
40641    CCXXFLAGS="$CCXXFLAGS -nologo"
40642  fi
40643
40644
40645# FIXME: Currently we must test this after toolchain but before flags. Fix!
40646
40647# Now we can test some aspects on the target using configure macros.
40648
40649
40650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
40651$as_echo_n "checking for ANSI C header files... " >&6; }
40652if ${ac_cv_header_stdc+:} false; then :
40653  $as_echo_n "(cached) " >&6
40654else
40655  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40656/* end confdefs.h.  */
40657#include <stdlib.h>
40658#include <stdarg.h>
40659#include <string.h>
40660#include <float.h>
40661
40662int
40663main ()
40664{
40665
40666  ;
40667  return 0;
40668}
40669_ACEOF
40670if ac_fn_cxx_try_compile "$LINENO"; then :
40671  ac_cv_header_stdc=yes
40672else
40673  ac_cv_header_stdc=no
40674fi
40675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40676
40677if test $ac_cv_header_stdc = yes; then
40678  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
40679  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40680/* end confdefs.h.  */
40681#include <string.h>
40682
40683_ACEOF
40684if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40685  $EGREP "memchr" >/dev/null 2>&1; then :
40686
40687else
40688  ac_cv_header_stdc=no
40689fi
40690rm -f conftest*
40691
40692fi
40693
40694if test $ac_cv_header_stdc = yes; then
40695  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
40696  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40697/* end confdefs.h.  */
40698#include <stdlib.h>
40699
40700_ACEOF
40701if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40702  $EGREP "free" >/dev/null 2>&1; then :
40703
40704else
40705  ac_cv_header_stdc=no
40706fi
40707rm -f conftest*
40708
40709fi
40710
40711if test $ac_cv_header_stdc = yes; then
40712  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
40713  if test "$cross_compiling" = yes; then :
40714  :
40715else
40716  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40717/* end confdefs.h.  */
40718#include <ctype.h>
40719#include <stdlib.h>
40720#if ((' ' & 0x0FF) == 0x020)
40721# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
40722# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
40723#else
40724# define ISLOWER(c) \
40725		   (('a' <= (c) && (c) <= 'i') \
40726		     || ('j' <= (c) && (c) <= 'r') \
40727		     || ('s' <= (c) && (c) <= 'z'))
40728# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
40729#endif
40730
40731#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
40732int
40733main ()
40734{
40735  int i;
40736  for (i = 0; i < 256; i++)
40737    if (XOR (islower (i), ISLOWER (i))
40738	|| toupper (i) != TOUPPER (i))
40739      return 2;
40740  return 0;
40741}
40742_ACEOF
40743if ac_fn_cxx_try_run "$LINENO"; then :
40744
40745else
40746  ac_cv_header_stdc=no
40747fi
40748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40749  conftest.$ac_objext conftest.beam conftest.$ac_ext
40750fi
40751
40752fi
40753fi
40754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
40755$as_echo "$ac_cv_header_stdc" >&6; }
40756if test $ac_cv_header_stdc = yes; then
40757
40758$as_echo "#define STDC_HEADERS 1" >>confdefs.h
40759
40760fi
40761
40762# On IRIX 5.3, sys/types and inttypes.h are conflicting.
40763for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
40764		  inttypes.h stdint.h unistd.h
40765do :
40766  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
40767ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
40768"
40769if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
40770  cat >>confdefs.h <<_ACEOF
40771#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
40772_ACEOF
40773
40774fi
40775
40776done
40777
40778
40779
40780  ###############################################################################
40781  #
40782  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
40783  # (The JVM can use 32 or 64 bit Java pointers but that decision
40784  # is made at runtime.)
40785  #
40786
40787  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
40788    # Always specify -m flag on Solaris
40789    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
40790
40791  # When we add flags to the "official" CFLAGS etc, we need to
40792  # keep track of these additions in ADDED_CFLAGS etc. These
40793  # will later be checked to make sure only controlled additions
40794  # have been made to CFLAGS etc.
40795  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40796  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40797  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40798
40799  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40800  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40801  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40802
40803  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40804  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40805  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40806
40807  elif test "x$COMPILE_TYPE" = xreduced; then
40808    if test "x$OPENJDK_TARGET_OS" != xwindows; then
40809      # Specify -m if running reduced on other Posix platforms
40810
40811  # When we add flags to the "official" CFLAGS etc, we need to
40812  # keep track of these additions in ADDED_CFLAGS etc. These
40813  # will later be checked to make sure only controlled additions
40814  # have been made to CFLAGS etc.
40815  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40816  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40817  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40818
40819  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40820  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40821  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40822
40823  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40824  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40825  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40826
40827    fi
40828  fi
40829
40830  # Make compilation sanity check
40831  for ac_header in stdio.h
40832do :
40833  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
40834if test "x$ac_cv_header_stdio_h" = xyes; then :
40835  cat >>confdefs.h <<_ACEOF
40836#define HAVE_STDIO_H 1
40837_ACEOF
40838
40839else
40840
40841    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
40842$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
40843    if test "x$COMPILE_TYPE" = xreduced; then
40844      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
40845$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
40846    elif test "x$COMPILE_TYPE" = xcross; then
40847      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
40848$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
40849    fi
40850    as_fn_error $? "Cannot continue." "$LINENO" 5
40851
40852fi
40853
40854done
40855
40856
40857  # The cast to long int works around a bug in the HP C Compiler
40858# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40859# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40860# This bug is HP SR number 8606223364.
40861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
40862$as_echo_n "checking size of int *... " >&6; }
40863if ${ac_cv_sizeof_int_p+:} false; then :
40864  $as_echo_n "(cached) " >&6
40865else
40866  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
40867
40868else
40869  if test "$ac_cv_type_int_p" = yes; then
40870     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
40871$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
40872as_fn_error 77 "cannot compute sizeof (int *)
40873See \`config.log' for more details" "$LINENO" 5; }
40874   else
40875     ac_cv_sizeof_int_p=0
40876   fi
40877fi
40878
40879fi
40880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
40881$as_echo "$ac_cv_sizeof_int_p" >&6; }
40882
40883
40884
40885cat >>confdefs.h <<_ACEOF
40886#define SIZEOF_INT_P $ac_cv_sizeof_int_p
40887_ACEOF
40888
40889
40890
40891  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
40892  if test "x$ac_cv_sizeof_int_p" = x; then
40893    # The test failed, lets stick to the assumed value.
40894    { $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
40895$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
40896  else
40897    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
40898
40899    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
40900      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
40901      # Let's try to implicitely set the compilers target architecture and retry the test
40902      { $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
40903$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;}
40904      { $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
40905$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;}
40906
40907  # When we add flags to the "official" CFLAGS etc, we need to
40908  # keep track of these additions in ADDED_CFLAGS etc. These
40909  # will later be checked to make sure only controlled additions
40910  # have been made to CFLAGS etc.
40911  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40912  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40913  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40914
40915  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40916  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40917  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40918
40919  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40920  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40921  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40922
40923
40924      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
40925      unset ac_cv_sizeof_int_p
40926      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
40927      cat >>confdefs.h <<_ACEOF
40928#undef SIZEOF_INT_P
40929_ACEOF
40930
40931      # The cast to long int works around a bug in the HP C Compiler
40932# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40933# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40934# This bug is HP SR number 8606223364.
40935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
40936$as_echo_n "checking size of int *... " >&6; }
40937if ${ac_cv_sizeof_int_p+:} false; then :
40938  $as_echo_n "(cached) " >&6
40939else
40940  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
40941
40942else
40943  if test "$ac_cv_type_int_p" = yes; then
40944     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
40945$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
40946as_fn_error 77 "cannot compute sizeof (int *)
40947See \`config.log' for more details" "$LINENO" 5; }
40948   else
40949     ac_cv_sizeof_int_p=0
40950   fi
40951fi
40952
40953fi
40954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
40955$as_echo "$ac_cv_sizeof_int_p" >&6; }
40956
40957
40958
40959cat >>confdefs.h <<_ACEOF
40960#define SIZEOF_INT_P $ac_cv_sizeof_int_p
40961_ACEOF
40962
40963
40964
40965      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
40966
40967      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
40968        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
40969      fi
40970    fi
40971  fi
40972
40973  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
40974$as_echo_n "checking for target address size... " >&6; }
40975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
40976$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
40977
40978
40979  ###############################################################################
40980  #
40981  # Is the target little of big endian?
40982  #
40983   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
40984$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
40985if ${ac_cv_c_bigendian+:} false; then :
40986  $as_echo_n "(cached) " >&6
40987else
40988  ac_cv_c_bigendian=unknown
40989    # See if we're dealing with a universal compiler.
40990    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40991/* end confdefs.h.  */
40992#ifndef __APPLE_CC__
40993	       not a universal capable compiler
40994	     #endif
40995	     typedef int dummy;
40996
40997_ACEOF
40998if ac_fn_cxx_try_compile "$LINENO"; then :
40999
41000	# Check for potential -arch flags.  It is not universal unless
41001	# there are at least two -arch flags with different values.
41002	ac_arch=
41003	ac_prev=
41004	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41005	 if test -n "$ac_prev"; then
41006	   case $ac_word in
41007	     i?86 | x86_64 | ppc | ppc64)
41008	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41009		 ac_arch=$ac_word
41010	       else
41011		 ac_cv_c_bigendian=universal
41012		 break
41013	       fi
41014	       ;;
41015	   esac
41016	   ac_prev=
41017	 elif test "x$ac_word" = "x-arch"; then
41018	   ac_prev=arch
41019	 fi
41020       done
41021fi
41022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41023    if test $ac_cv_c_bigendian = unknown; then
41024      # See if sys/param.h defines the BYTE_ORDER macro.
41025      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41026/* end confdefs.h.  */
41027#include <sys/types.h>
41028	     #include <sys/param.h>
41029
41030int
41031main ()
41032{
41033#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41034		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41035		     && LITTLE_ENDIAN)
41036	      bogus endian macros
41037	     #endif
41038
41039  ;
41040  return 0;
41041}
41042_ACEOF
41043if ac_fn_cxx_try_compile "$LINENO"; then :
41044  # It does; now see whether it defined to BIG_ENDIAN or not.
41045	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41046/* end confdefs.h.  */
41047#include <sys/types.h>
41048		#include <sys/param.h>
41049
41050int
41051main ()
41052{
41053#if BYTE_ORDER != BIG_ENDIAN
41054		 not big endian
41055		#endif
41056
41057  ;
41058  return 0;
41059}
41060_ACEOF
41061if ac_fn_cxx_try_compile "$LINENO"; then :
41062  ac_cv_c_bigendian=yes
41063else
41064  ac_cv_c_bigendian=no
41065fi
41066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41067fi
41068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41069    fi
41070    if test $ac_cv_c_bigendian = unknown; then
41071      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41072      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41073/* end confdefs.h.  */
41074#include <limits.h>
41075
41076int
41077main ()
41078{
41079#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41080	      bogus endian macros
41081	     #endif
41082
41083  ;
41084  return 0;
41085}
41086_ACEOF
41087if ac_fn_cxx_try_compile "$LINENO"; then :
41088  # It does; now see whether it defined to _BIG_ENDIAN or not.
41089	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41090/* end confdefs.h.  */
41091#include <limits.h>
41092
41093int
41094main ()
41095{
41096#ifndef _BIG_ENDIAN
41097		 not big endian
41098		#endif
41099
41100  ;
41101  return 0;
41102}
41103_ACEOF
41104if ac_fn_cxx_try_compile "$LINENO"; then :
41105  ac_cv_c_bigendian=yes
41106else
41107  ac_cv_c_bigendian=no
41108fi
41109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41110fi
41111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41112    fi
41113    if test $ac_cv_c_bigendian = unknown; then
41114      # Compile a test program.
41115      if test "$cross_compiling" = yes; then :
41116  # Try to guess by grepping values from an object file.
41117	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41118/* end confdefs.h.  */
41119short int ascii_mm[] =
41120		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41121		short int ascii_ii[] =
41122		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41123		int use_ascii (int i) {
41124		  return ascii_mm[i] + ascii_ii[i];
41125		}
41126		short int ebcdic_ii[] =
41127		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41128		short int ebcdic_mm[] =
41129		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41130		int use_ebcdic (int i) {
41131		  return ebcdic_mm[i] + ebcdic_ii[i];
41132		}
41133		extern int foo;
41134
41135int
41136main ()
41137{
41138return use_ascii (foo) == use_ebcdic (foo);
41139  ;
41140  return 0;
41141}
41142_ACEOF
41143if ac_fn_cxx_try_compile "$LINENO"; then :
41144  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41145	      ac_cv_c_bigendian=yes
41146	    fi
41147	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41148	      if test "$ac_cv_c_bigendian" = unknown; then
41149		ac_cv_c_bigendian=no
41150	      else
41151		# finding both strings is unlikely to happen, but who knows?
41152		ac_cv_c_bigendian=unknown
41153	      fi
41154	    fi
41155fi
41156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41157else
41158  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41159/* end confdefs.h.  */
41160$ac_includes_default
41161int
41162main ()
41163{
41164
41165	     /* Are we little or big endian?  From Harbison&Steele.  */
41166	     union
41167	     {
41168	       long int l;
41169	       char c[sizeof (long int)];
41170	     } u;
41171	     u.l = 1;
41172	     return u.c[sizeof (long int) - 1] == 1;
41173
41174  ;
41175  return 0;
41176}
41177_ACEOF
41178if ac_fn_cxx_try_run "$LINENO"; then :
41179  ac_cv_c_bigendian=no
41180else
41181  ac_cv_c_bigendian=yes
41182fi
41183rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41184  conftest.$ac_objext conftest.beam conftest.$ac_ext
41185fi
41186
41187    fi
41188fi
41189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41190$as_echo "$ac_cv_c_bigendian" >&6; }
41191 case $ac_cv_c_bigendian in #(
41192   yes)
41193     ENDIAN="big";; #(
41194   no)
41195     ENDIAN="little" ;; #(
41196   universal)
41197     ENDIAN="universal_endianness"
41198     ;; #(
41199   *)
41200     ENDIAN="unknown" ;;
41201 esac
41202
41203
41204  if test "x$ENDIAN" = xuniversal_endianness; then
41205    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41206  fi
41207  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41208    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
41209  fi
41210
41211
41212# Configure flags for the tools
41213
41214  ###############################################################################
41215  #
41216  # How to compile shared libraries.
41217  #
41218
41219  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41220    PICFLAG="-fPIC"
41221    C_FLAG_REORDER=''
41222    CXX_FLAG_REORDER=''
41223
41224    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41225      # Linking is different on MacOSX
41226      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41227      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41228      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41229      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41230      SET_SHARED_LIBRARY_MAPFILE=''
41231    else
41232      # Default works for linux, might work on other platforms as well.
41233      SHARED_LIBRARY_FLAGS='-shared'
41234      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41235      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41236      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41237      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41238    fi
41239  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41240    PICFLAG="-KPIC"
41241    C_FLAG_REORDER='-xF'
41242    CXX_FLAG_REORDER='-xF'
41243    SHARED_LIBRARY_FLAGS="-G"
41244    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41245    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41246    SET_SHARED_LIBRARY_NAME=''
41247    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41248  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41249    PICFLAG="-qpic=large"
41250    C_FLAG_REORDER=''
41251    CXX_FLAG_REORDER=''
41252    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41253    SET_EXECUTABLE_ORIGIN=""
41254    SET_SHARED_LIBRARY_ORIGIN=''
41255    SET_SHARED_LIBRARY_NAME=''
41256    SET_SHARED_LIBRARY_MAPFILE=''
41257  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41258    PICFLAG=""
41259    C_FLAG_REORDER=''
41260    CXX_FLAG_REORDER=''
41261    SHARED_LIBRARY_FLAGS="-LD"
41262    SET_EXECUTABLE_ORIGIN=''
41263    SET_SHARED_LIBRARY_ORIGIN=''
41264    SET_SHARED_LIBRARY_NAME=''
41265    SET_SHARED_LIBRARY_MAPFILE=''
41266  fi
41267
41268
41269
41270
41271
41272
41273
41274
41275
41276  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41277    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41278    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41279    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41280  fi
41281  # The (cross) compiler is now configured, we can now test capabilities
41282  # of the target platform.
41283
41284
41285
41286  ###############################################################################
41287  #
41288  # Setup the opt flags for different compilers
41289  # and different operating systems.
41290  #
41291
41292  # FIXME: this was indirectly the old default, but just inherited.
41293  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41294  #   C_FLAG_DEPS="-MMD -MF"
41295  # fi
41296
41297  # Generate make dependency files
41298  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41299    C_FLAG_DEPS="-MMD -MF"
41300  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41301    C_FLAG_DEPS="-xMMD -xMF"
41302  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41303    C_FLAG_DEPS="-qmakedep=gcc -MF"
41304  fi
41305  CXX_FLAG_DEPS="$C_FLAG_DEPS"
41306
41307
41308
41309  # Debug symbols
41310  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41311    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41312      CFLAGS_DEBUG_SYMBOLS="-g1"
41313      CXXFLAGS_DEBUG_SYMBOLS="-g1"
41314    else
41315      CFLAGS_DEBUG_SYMBOLS="-g"
41316      CXXFLAGS_DEBUG_SYMBOLS="-g"
41317    fi
41318  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41319    CFLAGS_DEBUG_SYMBOLS="-g -xs"
41320    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41321  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41322    CFLAGS_DEBUG_SYMBOLS="-g"
41323    CXXFLAGS_DEBUG_SYMBOLS="-g"
41324  fi
41325
41326
41327
41328  # Optimization levels
41329  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41330    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41331
41332    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41333      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41334      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
41335      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41336      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41337      C_O_FLAG_NONE="-xregs=no%frameptr"
41338      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41339      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41340      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41341      CXX_O_FLAG_NONE="-xregs=no%frameptr"
41342      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41343        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41344        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41345      fi
41346    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41347      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
41348      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41349      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41350      C_O_FLAG_NONE=""
41351      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41352      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41353      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41354      CXX_O_FLAG_NONE=""
41355    fi
41356  else
41357    # The remaining toolchains share opt flags between CC and CXX;
41358    # setup for C and duplicate afterwards.
41359    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41360      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41361        # On MacOSX we optimize for size, something
41362        # we should do for all platforms?
41363        C_O_FLAG_HIGHEST="-Os"
41364        C_O_FLAG_HI="-Os"
41365        C_O_FLAG_NORM="-Os"
41366        C_O_FLAG_NONE=""
41367      else
41368        C_O_FLAG_HIGHEST="-O3"
41369        C_O_FLAG_HI="-O3"
41370        C_O_FLAG_NORM="-O2"
41371        C_O_FLAG_NONE="-O0"
41372      fi
41373    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41374      C_O_FLAG_HIGHEST="-O3"
41375      C_O_FLAG_HI="-O3 -qstrict"
41376      C_O_FLAG_NORM="-O2"
41377      C_O_FLAG_NONE=""
41378    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41379      C_O_FLAG_HIGHEST="-O2"
41380      C_O_FLAG_HI="-O1"
41381      C_O_FLAG_NORM="-O1"
41382      C_O_FLAG_NONE="-Od"
41383    fi
41384    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41385    CXX_O_FLAG_HI="$C_O_FLAG_HI"
41386    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41387    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41388  fi
41389
41390
41391
41392
41393
41394
41395
41396
41397
41398
41399
41400  # Special extras...
41401  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41402    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41403      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41404      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41405    fi
41406  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41407    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
41408    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41409    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41410  fi
41411
41412  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
41413    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
41414$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
41415  fi
41416
41417  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
41418    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
41419$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
41420  fi
41421
41422  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
41423    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
41424$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
41425  fi
41426
41427
41428# Check whether --with-extra-cflags was given.
41429if test "${with_extra_cflags+set}" = set; then :
41430  withval=$with_extra_cflags;
41431fi
41432
41433
41434
41435# Check whether --with-extra-cxxflags was given.
41436if test "${with_extra_cxxflags+set}" = set; then :
41437  withval=$with_extra_cxxflags;
41438fi
41439
41440
41441
41442# Check whether --with-extra-ldflags was given.
41443if test "${with_extra_ldflags+set}" = set; then :
41444  withval=$with_extra_ldflags;
41445fi
41446
41447
41448  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
41449  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
41450  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
41451
41452  # Hotspot needs these set in their legacy form
41453  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
41454  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
41455  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
41456
41457
41458
41459
41460
41461  ###############################################################################
41462  #
41463  # Now setup the CFLAGS and LDFLAGS for the JDK build.
41464  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
41465  #
41466
41467  # Setup compiler/platform specific flags to CFLAGS_JDK,
41468  # CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?)
41469  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41470    # these options are used for both C and C++ compiles
41471    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
41472        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
41473    case $OPENJDK_TARGET_CPU_ARCH in
41474      arm )
41475        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41476        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41477        ;;
41478      ppc )
41479        # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
41480        ;;
41481      * )
41482        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
41483        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41484        ;;
41485    esac
41486  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41487    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
41488    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
41489      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
41490      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
41491    fi
41492
41493    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
41494    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
41495  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41496    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41497    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41498  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41499    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
41500    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
41501    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
41502    -DWIN32 -DIAL"
41503    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
41504      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
41505    else
41506      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
41507    fi
41508  fi
41509
41510  ###############################################################################
41511
41512  # Adjust flags according to debug level.
41513  case $DEBUG_LEVEL in
41514    fastdebug )
41515      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41516      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41517      C_O_FLAG_HI="$C_O_FLAG_NORM"
41518      C_O_FLAG_NORM="$C_O_FLAG_NORM"
41519      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41520      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
41521      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41522      ;;
41523    slowdebug )
41524      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41525      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41526      C_O_FLAG_HI="$C_O_FLAG_NONE"
41527      C_O_FLAG_NORM="$C_O_FLAG_NONE"
41528      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
41529      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
41530      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41531      ;;
41532  esac
41533
41534  # Setup LP64
41535  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
41536
41537  # Set some common defines. These works for all compilers, but assume
41538  # -D is universally accepted.
41539
41540  # Setup endianness
41541  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
41542    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
41543    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
41544    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
41545    #   Note: -Dmacro         is the same as    #define macro 1
41546    #         -Dmacro=        is the same as    #define macro
41547    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41548      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
41549    else
41550      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
41551    fi
41552  else
41553    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
41554  fi
41555
41556  # Setup target OS define. Use OS target name but in upper case.
41557  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
41558  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
41559
41560  # Setup target CPU
41561  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
41562
41563  # Setup debug/release defines
41564  if test "x$DEBUG_LEVEL" = xrelease; then
41565    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
41566    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41567      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
41568    fi
41569  else
41570    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
41571  fi
41572
41573  # Setup release name
41574  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
41575
41576
41577  # Set some additional per-OS defines.
41578  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41579    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
41580  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41581    # FIXME: PPC64 should not be here.
41582    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DPPC64"
41583  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
41584    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
41585  fi
41586
41587  # Additional macosx handling
41588  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41589    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41590      # FIXME: This needs to be exported in spec.gmk due to closed legacy code.
41591      # FIXME: clean this up, and/or move it elsewhere.
41592
41593      # Setting these parameters makes it an error to link to macosx APIs that are
41594      # newer than the given OS version and makes the linked binaries compatible
41595      # even if built on a newer version of the OS.
41596      # The expected format is X.Y.Z
41597      MACOSX_VERSION_MIN=10.7.0
41598
41599
41600      # The macro takes the version with no dots, ex: 1070
41601      # Let the flags variables get resolved in make for easier override on make
41602      # command line.
41603      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41604      LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41605    fi
41606  fi
41607
41608  # Setup some hard coded includes
41609  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
41610      -I${JDK_OUTPUTDIR}/include \
41611      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
41612      -I${JDK_TOPDIR}/src/share/javavm/export \
41613      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
41614      -I${JDK_TOPDIR}/src/share/native/common \
41615      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
41616
41617  # The shared libraries are compiled using the picflag.
41618  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
41619  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
41620
41621  # Executable flags
41622  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
41623  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
41624
41625
41626
41627
41628
41629
41630  # Setup LDFLAGS et al.
41631  #
41632  # Now this is odd. The JDK native libraries have to link against libjvm.so
41633  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
41634  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
41635  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
41636  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
41637  # libraries will link to whatever is in memory. Yuck.
41638  #
41639  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
41640  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41641    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
41642    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41643      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
41644    fi
41645    # TODO: make -debug optional "--disable-full-debug-symbols"
41646    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
41647    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
41648    LDFLAGS_JDKLIB_SUFFIX=""
41649    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
41650      LDFLAGS_STACK_SIZE=1048576
41651    else
41652      LDFLAGS_STACK_SIZE=327680
41653    fi
41654    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
41655  else
41656    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41657      # If this is a --hash-style=gnu system, use --hash-style=both, why?
41658      # We have previously set HAS_GNU_HASH if this is the case
41659      if test -n "$HAS_GNU_HASH"; then
41660        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
41661      fi
41662      if test "x$OPENJDK_TARGET_OS" = xlinux; then
41663        # And since we now know that the linker is gnu, then add -z defs, to forbid
41664        # undefined symbols in object files.
41665        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
41666        if test "x$DEBUG_LEVEL" = "xrelease"; then
41667          # When building release libraries, tell the linker optimize them.
41668          # Should this be supplied to the OSS linker as well?
41669          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
41670        fi
41671      fi
41672    fi
41673
41674    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41675      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
41676      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
41677    fi
41678
41679    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
41680        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
41681
41682    # On some platforms (mac) the linker warns about non existing -L dirs.
41683    # Add server first if available. Linking aginst client does not always produce the same results.
41684    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
41685    # Default to server for other variants.
41686    if test "x$JVM_VARIANT_SERVER" = xtrue; then
41687      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41688    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
41689      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
41690    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
41691      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
41692    else
41693      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41694    fi
41695
41696    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
41697    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41698      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
41699    fi
41700
41701    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
41702    if test "x$OPENJDK_TARGET_OS" = xlinux; then
41703      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
41704    fi
41705  fi
41706
41707
41708
41709
41710
41711
41712
41713
41714  # Some Zero and Shark settings.
41715  # ZERO_ARCHFLAG tells the compiler which mode to build for
41716  case "${OPENJDK_TARGET_CPU}" in
41717    s390)
41718      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
41719      ;;
41720    *)
41721      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41722  esac
41723
41724  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
41725$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
41726  supports=yes
41727
41728  saved_cflags="$CFLAGS"
41729  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
41730  ac_ext=c
41731ac_cpp='$CPP $CPPFLAGS'
41732ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41733ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41734ac_compiler_gnu=$ac_cv_c_compiler_gnu
41735
41736  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41737/* end confdefs.h.  */
41738int i;
41739_ACEOF
41740if ac_fn_c_try_compile "$LINENO"; then :
41741
41742else
41743  supports=no
41744fi
41745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41746  ac_ext=cpp
41747ac_cpp='$CXXCPP $CPPFLAGS'
41748ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41749ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41750ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41751
41752  CFLAGS="$saved_cflags"
41753
41754  saved_cxxflags="$CXXFLAGS"
41755  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
41756  ac_ext=cpp
41757ac_cpp='$CXXCPP $CPPFLAGS'
41758ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41759ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41760ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41761
41762  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41763/* end confdefs.h.  */
41764int i;
41765_ACEOF
41766if ac_fn_cxx_try_compile "$LINENO"; then :
41767
41768else
41769  supports=no
41770fi
41771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41772  ac_ext=cpp
41773ac_cpp='$CXXCPP $CPPFLAGS'
41774ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41775ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41776ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41777
41778  CXXFLAGS="$saved_cxxflags"
41779
41780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41781$as_echo "$supports" >&6; }
41782  if test "x$supports" = "xyes" ; then
41783    :
41784  else
41785    ZERO_ARCHFLAG=""
41786  fi
41787
41788
41789
41790  # Check that the compiler supports -mX (or -qX on AIX) flags
41791  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
41792
41793  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
41794$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
41795  supports=yes
41796
41797  saved_cflags="$CFLAGS"
41798  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
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 ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
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    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
41853  else
41854    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
41855  fi
41856
41857
41858
41859
41860# Setup debug symbols (need objcopy from the toolchain for that)
41861
41862  #
41863  # ENABLE_DEBUG_SYMBOLS
41864  # This must be done after the toolchain is setup, since we're looking at objcopy.
41865  #
41866  # Check whether --enable-debug-symbols was given.
41867if test "${enable_debug_symbols+set}" = set; then :
41868  enableval=$enable_debug_symbols;
41869fi
41870
41871
41872  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
41873$as_echo_n "checking if we should generate debug symbols... " >&6; }
41874
41875  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
41876    # explicit enabling of enable-debug-symbols and can't find objcopy
41877    #   this is an error
41878    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
41879  fi
41880
41881  if test "x$enable_debug_symbols" = "xyes"; then
41882    ENABLE_DEBUG_SYMBOLS=true
41883  elif test "x$enable_debug_symbols" = "xno"; then
41884    ENABLE_DEBUG_SYMBOLS=false
41885  else
41886    # Default is on if objcopy is found
41887    if test "x$OBJCOPY" != x; then
41888      ENABLE_DEBUG_SYMBOLS=true
41889    # MacOS X and Windows don't use objcopy but default is on for those OSes
41890    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
41891      ENABLE_DEBUG_SYMBOLS=true
41892    else
41893      ENABLE_DEBUG_SYMBOLS=false
41894    fi
41895  fi
41896
41897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
41898$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
41899
41900  #
41901  # ZIP_DEBUGINFO_FILES
41902  #
41903  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
41904$as_echo_n "checking if we should zip debug-info files... " >&6; }
41905  # Check whether --enable-zip-debug-info was given.
41906if test "${enable_zip_debug_info+set}" = set; then :
41907  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
41908else
41909  enable_zip_debug_info="yes"
41910fi
41911
41912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
41913$as_echo "${enable_zip_debug_info}" >&6; }
41914
41915  if test "x${enable_zip_debug_info}" = "xno"; then
41916    ZIP_DEBUGINFO_FILES=false
41917  else
41918    ZIP_DEBUGINFO_FILES=true
41919  fi
41920
41921
41922
41923
41924
41925###############################################################################
41926#
41927# Check dependencies for external and internal libraries.
41928#
41929###############################################################################
41930
41931# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
41932
41933  # When using cygwin or msys, we need a wrapper binary that renames
41934  # /cygdrive/c/ arguments into c:/ arguments and peeks into
41935  # @files and rewrites these too! This wrapper binary is
41936  # called fixpath.
41937  FIXPATH=
41938  if test "x$OPENJDK_BUILD_OS" = xwindows; then
41939    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
41940$as_echo_n "checking if fixpath can be created... " >&6; }
41941    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
41942    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
41943    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
41944      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
41945      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
41946      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
41947      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
41948    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
41949      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
41950      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
41951
41952      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
41953      # @ was chosen as separator to minimize risk of other tools messing around with it
41954      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
41955      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
41956
41957      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
41958    fi
41959    rm -f $OUTPUT_ROOT/fixpath*
41960    cd $OUTPUT_ROOT
41961    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
41962    cd $CURDIR
41963
41964    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
41965      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41966$as_echo "no" >&6; }
41967      cat $OUTPUT_ROOT/fixpath1.log
41968      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
41969    fi
41970    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41971$as_echo "yes" >&6; }
41972    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
41973$as_echo_n "checking if fixpath.exe works... " >&6; }
41974    cd $OUTPUT_ROOT
41975    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
41976    cd $CURDIR
41977    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
41978      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41979$as_echo "no" >&6; }
41980      cat $OUTPUT_ROOT/fixpath2.log
41981      as_fn_error $? "fixpath did not work!" "$LINENO" 5
41982    fi
41983    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41984$as_echo "yes" >&6; }
41985    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
41986  fi
41987
41988
41989
41990
41991
41992
41993  ###############################################################################
41994  #
41995  # OS specific settings that we never will need to probe.
41996  #
41997  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41998    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
41999$as_echo_n "checking what is not needed on Linux?... " >&6; }
42000    PULSE_NOT_NEEDED=yes
42001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42002$as_echo "pulse" >&6; }
42003  fi
42004
42005  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42006    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42007$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42008    ALSA_NOT_NEEDED=yes
42009    PULSE_NOT_NEEDED=yes
42010    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42011$as_echo "alsa pulse" >&6; }
42012  fi
42013
42014  if test "x$OPENJDK_TARGET_OS" = xaix; then
42015    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42016$as_echo_n "checking what is not needed on AIX?... " >&6; }
42017    ALSA_NOT_NEEDED=yes
42018    PULSE_NOT_NEEDED=yes
42019    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42020$as_echo "alsa pulse" >&6; }
42021  fi
42022
42023
42024  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42025    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42026$as_echo_n "checking what is not needed on Windows?... " >&6; }
42027    CUPS_NOT_NEEDED=yes
42028    ALSA_NOT_NEEDED=yes
42029    PULSE_NOT_NEEDED=yes
42030    X11_NOT_NEEDED=yes
42031    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42032$as_echo "alsa cups pulse x11" >&6; }
42033  fi
42034
42035  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42036    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42037$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42038    ALSA_NOT_NEEDED=yes
42039    PULSE_NOT_NEEDED=yes
42040    X11_NOT_NEEDED=yes
42041    # If the java runtime framework is disabled, then we need X11.
42042    # This will be adjusted below.
42043    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42044$as_echo "alsa pulse x11" >&6; }
42045  fi
42046
42047  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42048    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42049$as_echo_n "checking what is not needed on bsd?... " >&6; }
42050    ALSA_NOT_NEEDED=yes
42051    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42052$as_echo "alsa" >&6; }
42053  fi
42054
42055  if test "x$OPENJDK" = "xfalse"; then
42056    FREETYPE_NOT_NEEDED=yes
42057  fi
42058
42059  if test "x$SUPPORT_HEADFUL" = xno; then
42060    X11_NOT_NEEDED=yes
42061  fi
42062
42063  ###############################################################################
42064  #
42065  # Check for MacOSX support for OpenJDK.
42066  #
42067
42068
42069  # Check whether --enable-macosx-runtime-support was given.
42070if test "${enable_macosx_runtime_support+set}" = set; then :
42071  enableval=$enable_macosx_runtime_support;
42072fi
42073
42074  if test "x$enable_macosx_runtime_support" != x; then
42075    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
42076$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
42077  fi
42078
42079
42080  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
42081$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
42082  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
42083    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
42084$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
42085  else
42086    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42087$as_echo "no" >&6; }
42088  fi
42089
42090
42091
42092  ###############################################################################
42093  #
42094  # Check for X Windows
42095  #
42096
42097  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42098  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42099  # --x-libraries for the sysroot, if that seems to be correct.
42100  if test "x$SYS_ROOT" != "x/"; then
42101    if test "x$x_includes" = xNONE; then
42102      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
42103        x_includes="$SYS_ROOT/usr/X11R6/include"
42104      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
42105        x_includes="$SYS_ROOT/usr/include"
42106      fi
42107    fi
42108    if test "x$x_libraries" = xNONE; then
42109      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
42110        x_libraries="$SYS_ROOT/usr/X11R6/lib"
42111      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42112        x_libraries="$SYS_ROOT/usr/lib64"
42113      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
42114        x_libraries="$SYS_ROOT/usr/lib"
42115      fi
42116    fi
42117  fi
42118
42119  # Now let autoconf do it's magic
42120  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42121$as_echo_n "checking for X... " >&6; }
42122
42123
42124# Check whether --with-x was given.
42125if test "${with_x+set}" = set; then :
42126  withval=$with_x;
42127fi
42128
42129# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42130if test "x$with_x" = xno; then
42131  # The user explicitly disabled X.
42132  have_x=disabled
42133else
42134  case $x_includes,$x_libraries in #(
42135    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42136    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42137  $as_echo_n "(cached) " >&6
42138else
42139  # One or both of the vars are not set, and there is no cached value.
42140ac_x_includes=no ac_x_libraries=no
42141rm -f -r conftest.dir
42142if mkdir conftest.dir; then
42143  cd conftest.dir
42144  cat >Imakefile <<'_ACEOF'
42145incroot:
42146	@echo incroot='${INCROOT}'
42147usrlibdir:
42148	@echo usrlibdir='${USRLIBDIR}'
42149libdir:
42150	@echo libdir='${LIBDIR}'
42151_ACEOF
42152  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42153    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42154    for ac_var in incroot usrlibdir libdir; do
42155      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42156    done
42157    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42158    for ac_extension in a so sl dylib la dll; do
42159      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42160	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
42161	ac_im_usrlibdir=$ac_im_libdir; break
42162      fi
42163    done
42164    # Screen out bogus values from the imake configuration.  They are
42165    # bogus both because they are the default anyway, and because
42166    # using them would break gcc on systems where it needs fixed includes.
42167    case $ac_im_incroot in
42168	/usr/include) ac_x_includes= ;;
42169	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42170    esac
42171    case $ac_im_usrlibdir in
42172	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
42173	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42174    esac
42175  fi
42176  cd ..
42177  rm -f -r conftest.dir
42178fi
42179
42180# Standard set of common directories for X headers.
42181# Check X11 before X11Rn because it is often a symlink to the current release.
42182ac_x_header_dirs='
42183/usr/X11/include
42184/usr/X11R7/include
42185/usr/X11R6/include
42186/usr/X11R5/include
42187/usr/X11R4/include
42188
42189/usr/include/X11
42190/usr/include/X11R7
42191/usr/include/X11R6
42192/usr/include/X11R5
42193/usr/include/X11R4
42194
42195/usr/local/X11/include
42196/usr/local/X11R7/include
42197/usr/local/X11R6/include
42198/usr/local/X11R5/include
42199/usr/local/X11R4/include
42200
42201/usr/local/include/X11
42202/usr/local/include/X11R7
42203/usr/local/include/X11R6
42204/usr/local/include/X11R5
42205/usr/local/include/X11R4
42206
42207/usr/X386/include
42208/usr/x386/include
42209/usr/XFree86/include/X11
42210
42211/usr/include
42212/usr/local/include
42213/usr/unsupported/include
42214/usr/athena/include
42215/usr/local/x11r5/include
42216/usr/lpp/Xamples/include
42217
42218/usr/openwin/include
42219/usr/openwin/share/include'
42220
42221if test "$ac_x_includes" = no; then
42222  # Guess where to find include files, by looking for Xlib.h.
42223  # First, try using that file with no special directory specified.
42224  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42225/* end confdefs.h.  */
42226#include <X11/Xlib.h>
42227_ACEOF
42228if ac_fn_cxx_try_cpp "$LINENO"; then :
42229  # We can compile using X headers with no special include directory.
42230ac_x_includes=
42231else
42232  for ac_dir in $ac_x_header_dirs; do
42233  if test -r "$ac_dir/X11/Xlib.h"; then
42234    ac_x_includes=$ac_dir
42235    break
42236  fi
42237done
42238fi
42239rm -f conftest.err conftest.i conftest.$ac_ext
42240fi # $ac_x_includes = no
42241
42242if test "$ac_x_libraries" = no; then
42243  # Check for the libraries.
42244  # See if we find them without any special options.
42245  # Don't add to $LIBS permanently.
42246  ac_save_LIBS=$LIBS
42247  LIBS="-lX11 $LIBS"
42248  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42249/* end confdefs.h.  */
42250#include <X11/Xlib.h>
42251int
42252main ()
42253{
42254XrmInitialize ()
42255  ;
42256  return 0;
42257}
42258_ACEOF
42259if ac_fn_cxx_try_link "$LINENO"; then :
42260  LIBS=$ac_save_LIBS
42261# We can link X programs with no special library path.
42262ac_x_libraries=
42263else
42264  LIBS=$ac_save_LIBS
42265for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
42266do
42267  # Don't even attempt the hair of trying to link an X program!
42268  for ac_extension in a so sl dylib la dll; do
42269    if test -r "$ac_dir/libX11.$ac_extension"; then
42270      ac_x_libraries=$ac_dir
42271      break 2
42272    fi
42273  done
42274done
42275fi
42276rm -f core conftest.err conftest.$ac_objext \
42277    conftest$ac_exeext conftest.$ac_ext
42278fi # $ac_x_libraries = no
42279
42280case $ac_x_includes,$ac_x_libraries in #(
42281  no,* | *,no | *\'*)
42282    # Didn't find X, or a directory has "'" in its name.
42283    ac_cv_have_x="have_x=no";; #(
42284  *)
42285    # Record where we found X for the cache.
42286    ac_cv_have_x="have_x=yes\
42287	ac_x_includes='$ac_x_includes'\
42288	ac_x_libraries='$ac_x_libraries'"
42289esac
42290fi
42291;; #(
42292    *) have_x=yes;;
42293  esac
42294  eval "$ac_cv_have_x"
42295fi # $with_x != no
42296
42297if test "$have_x" != yes; then
42298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
42299$as_echo "$have_x" >&6; }
42300  no_x=yes
42301else
42302  # If each of the values was on the command line, it overrides each guess.
42303  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
42304  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
42305  # Update the cache value to reflect the command line values.
42306  ac_cv_have_x="have_x=yes\
42307	ac_x_includes='$x_includes'\
42308	ac_x_libraries='$x_libraries'"
42309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
42310$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
42311fi
42312
42313  if test "$no_x" = yes; then
42314  # Not all programs may use this symbol, but it does not hurt to define it.
42315
42316$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
42317
42318  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
42319else
42320  if test -n "$x_includes"; then
42321    X_CFLAGS="$X_CFLAGS -I$x_includes"
42322  fi
42323
42324  # It would also be nice to do this for all -L options, not just this one.
42325  if test -n "$x_libraries"; then
42326    X_LIBS="$X_LIBS -L$x_libraries"
42327    # For Solaris; some versions of Sun CC require a space after -R and
42328    # others require no space.  Words are not sufficient . . . .
42329    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
42330$as_echo_n "checking whether -R must be followed by a space... " >&6; }
42331    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
42332    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
42333    ac_cxx_werror_flag=yes
42334    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42335/* end confdefs.h.  */
42336
42337int
42338main ()
42339{
42340
42341  ;
42342  return 0;
42343}
42344_ACEOF
42345if ac_fn_cxx_try_link "$LINENO"; then :
42346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42347$as_echo "no" >&6; }
42348       X_LIBS="$X_LIBS -R$x_libraries"
42349else
42350  LIBS="$ac_xsave_LIBS -R $x_libraries"
42351       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42352/* end confdefs.h.  */
42353
42354int
42355main ()
42356{
42357
42358  ;
42359  return 0;
42360}
42361_ACEOF
42362if ac_fn_cxx_try_link "$LINENO"; then :
42363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42364$as_echo "yes" >&6; }
42365	  X_LIBS="$X_LIBS -R $x_libraries"
42366else
42367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
42368$as_echo "neither works" >&6; }
42369fi
42370rm -f core conftest.err conftest.$ac_objext \
42371    conftest$ac_exeext conftest.$ac_ext
42372fi
42373rm -f core conftest.err conftest.$ac_objext \
42374    conftest$ac_exeext conftest.$ac_ext
42375    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
42376    LIBS=$ac_xsave_LIBS
42377  fi
42378
42379  # Check for system-dependent libraries X programs must link with.
42380  # Do this before checking for the system-independent R6 libraries
42381  # (-lICE), since we may need -lsocket or whatever for X linking.
42382
42383  if test "$ISC" = yes; then
42384    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
42385  else
42386    # Martyn Johnson says this is needed for Ultrix, if the X
42387    # libraries were built with DECnet support.  And Karl Berry says
42388    # the Alpha needs dnet_stub (dnet does not exist).
42389    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
42390    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42391/* end confdefs.h.  */
42392
42393/* Override any GCC internal prototype to avoid an error.
42394   Use char because int might match the return type of a GCC
42395   builtin and then its argument prototype would still apply.  */
42396#ifdef __cplusplus
42397extern "C"
42398#endif
42399char XOpenDisplay ();
42400int
42401main ()
42402{
42403return XOpenDisplay ();
42404  ;
42405  return 0;
42406}
42407_ACEOF
42408if ac_fn_cxx_try_link "$LINENO"; then :
42409
42410else
42411  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
42412$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
42413if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
42414  $as_echo_n "(cached) " >&6
42415else
42416  ac_check_lib_save_LIBS=$LIBS
42417LIBS="-ldnet  $LIBS"
42418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42419/* end confdefs.h.  */
42420
42421/* Override any GCC internal prototype to avoid an error.
42422   Use char because int might match the return type of a GCC
42423   builtin and then its argument prototype would still apply.  */
42424#ifdef __cplusplus
42425extern "C"
42426#endif
42427char dnet_ntoa ();
42428int
42429main ()
42430{
42431return dnet_ntoa ();
42432  ;
42433  return 0;
42434}
42435_ACEOF
42436if ac_fn_cxx_try_link "$LINENO"; then :
42437  ac_cv_lib_dnet_dnet_ntoa=yes
42438else
42439  ac_cv_lib_dnet_dnet_ntoa=no
42440fi
42441rm -f core conftest.err conftest.$ac_objext \
42442    conftest$ac_exeext conftest.$ac_ext
42443LIBS=$ac_check_lib_save_LIBS
42444fi
42445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
42446$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
42447if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
42448  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
42449fi
42450
42451    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
42452      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
42453$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
42454if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
42455  $as_echo_n "(cached) " >&6
42456else
42457  ac_check_lib_save_LIBS=$LIBS
42458LIBS="-ldnet_stub  $LIBS"
42459cat 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 dnet_ntoa ();
42469int
42470main ()
42471{
42472return dnet_ntoa ();
42473  ;
42474  return 0;
42475}
42476_ACEOF
42477if ac_fn_cxx_try_link "$LINENO"; then :
42478  ac_cv_lib_dnet_stub_dnet_ntoa=yes
42479else
42480  ac_cv_lib_dnet_stub_dnet_ntoa=no
42481fi
42482rm -f core conftest.err conftest.$ac_objext \
42483    conftest$ac_exeext conftest.$ac_ext
42484LIBS=$ac_check_lib_save_LIBS
42485fi
42486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
42487$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
42488if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
42489  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
42490fi
42491
42492    fi
42493fi
42494rm -f core conftest.err conftest.$ac_objext \
42495    conftest$ac_exeext conftest.$ac_ext
42496    LIBS="$ac_xsave_LIBS"
42497
42498    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
42499    # to get the SysV transport functions.
42500    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
42501    # needs -lnsl.
42502    # The nsl library prevents programs from opening the X display
42503    # on Irix 5.2, according to T.E. Dickey.
42504    # The functions gethostbyname, getservbyname, and inet_addr are
42505    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
42506    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
42507if test "x$ac_cv_func_gethostbyname" = xyes; then :
42508
42509fi
42510
42511    if test $ac_cv_func_gethostbyname = no; then
42512      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
42513$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
42514if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
42515  $as_echo_n "(cached) " >&6
42516else
42517  ac_check_lib_save_LIBS=$LIBS
42518LIBS="-lnsl  $LIBS"
42519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42520/* end confdefs.h.  */
42521
42522/* Override any GCC internal prototype to avoid an error.
42523   Use char because int might match the return type of a GCC
42524   builtin and then its argument prototype would still apply.  */
42525#ifdef __cplusplus
42526extern "C"
42527#endif
42528char gethostbyname ();
42529int
42530main ()
42531{
42532return gethostbyname ();
42533  ;
42534  return 0;
42535}
42536_ACEOF
42537if ac_fn_cxx_try_link "$LINENO"; then :
42538  ac_cv_lib_nsl_gethostbyname=yes
42539else
42540  ac_cv_lib_nsl_gethostbyname=no
42541fi
42542rm -f core conftest.err conftest.$ac_objext \
42543    conftest$ac_exeext conftest.$ac_ext
42544LIBS=$ac_check_lib_save_LIBS
42545fi
42546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
42547$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
42548if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
42549  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
42550fi
42551
42552      if test $ac_cv_lib_nsl_gethostbyname = no; then
42553	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
42554$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
42555if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
42556  $as_echo_n "(cached) " >&6
42557else
42558  ac_check_lib_save_LIBS=$LIBS
42559LIBS="-lbsd  $LIBS"
42560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42561/* end confdefs.h.  */
42562
42563/* Override any GCC internal prototype to avoid an error.
42564   Use char because int might match the return type of a GCC
42565   builtin and then its argument prototype would still apply.  */
42566#ifdef __cplusplus
42567extern "C"
42568#endif
42569char gethostbyname ();
42570int
42571main ()
42572{
42573return gethostbyname ();
42574  ;
42575  return 0;
42576}
42577_ACEOF
42578if ac_fn_cxx_try_link "$LINENO"; then :
42579  ac_cv_lib_bsd_gethostbyname=yes
42580else
42581  ac_cv_lib_bsd_gethostbyname=no
42582fi
42583rm -f core conftest.err conftest.$ac_objext \
42584    conftest$ac_exeext conftest.$ac_ext
42585LIBS=$ac_check_lib_save_LIBS
42586fi
42587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
42588$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
42589if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
42590  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
42591fi
42592
42593      fi
42594    fi
42595
42596    # lieder@skyler.mavd.honeywell.com says without -lsocket,
42597    # socket/setsockopt and other routines are undefined under SCO ODT
42598    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
42599    # on later versions), says Simon Leinen: it contains gethostby*
42600    # variants that don't use the name server (or something).  -lsocket
42601    # must be given before -lnsl if both are needed.  We assume that
42602    # if connect needs -lnsl, so does gethostbyname.
42603    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
42604if test "x$ac_cv_func_connect" = xyes; then :
42605
42606fi
42607
42608    if test $ac_cv_func_connect = no; then
42609      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
42610$as_echo_n "checking for connect in -lsocket... " >&6; }
42611if ${ac_cv_lib_socket_connect+:} false; then :
42612  $as_echo_n "(cached) " >&6
42613else
42614  ac_check_lib_save_LIBS=$LIBS
42615LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
42616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42617/* end confdefs.h.  */
42618
42619/* Override any GCC internal prototype to avoid an error.
42620   Use char because int might match the return type of a GCC
42621   builtin and then its argument prototype would still apply.  */
42622#ifdef __cplusplus
42623extern "C"
42624#endif
42625char connect ();
42626int
42627main ()
42628{
42629return connect ();
42630  ;
42631  return 0;
42632}
42633_ACEOF
42634if ac_fn_cxx_try_link "$LINENO"; then :
42635  ac_cv_lib_socket_connect=yes
42636else
42637  ac_cv_lib_socket_connect=no
42638fi
42639rm -f core conftest.err conftest.$ac_objext \
42640    conftest$ac_exeext conftest.$ac_ext
42641LIBS=$ac_check_lib_save_LIBS
42642fi
42643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
42644$as_echo "$ac_cv_lib_socket_connect" >&6; }
42645if test "x$ac_cv_lib_socket_connect" = xyes; then :
42646  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
42647fi
42648
42649    fi
42650
42651    # Guillermo Gomez says -lposix is necessary on A/UX.
42652    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
42653if test "x$ac_cv_func_remove" = xyes; then :
42654
42655fi
42656
42657    if test $ac_cv_func_remove = no; then
42658      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
42659$as_echo_n "checking for remove in -lposix... " >&6; }
42660if ${ac_cv_lib_posix_remove+:} false; then :
42661  $as_echo_n "(cached) " >&6
42662else
42663  ac_check_lib_save_LIBS=$LIBS
42664LIBS="-lposix  $LIBS"
42665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42666/* end confdefs.h.  */
42667
42668/* Override any GCC internal prototype to avoid an error.
42669   Use char because int might match the return type of a GCC
42670   builtin and then its argument prototype would still apply.  */
42671#ifdef __cplusplus
42672extern "C"
42673#endif
42674char remove ();
42675int
42676main ()
42677{
42678return remove ();
42679  ;
42680  return 0;
42681}
42682_ACEOF
42683if ac_fn_cxx_try_link "$LINENO"; then :
42684  ac_cv_lib_posix_remove=yes
42685else
42686  ac_cv_lib_posix_remove=no
42687fi
42688rm -f core conftest.err conftest.$ac_objext \
42689    conftest$ac_exeext conftest.$ac_ext
42690LIBS=$ac_check_lib_save_LIBS
42691fi
42692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
42693$as_echo "$ac_cv_lib_posix_remove" >&6; }
42694if test "x$ac_cv_lib_posix_remove" = xyes; then :
42695  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
42696fi
42697
42698    fi
42699
42700    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
42701    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
42702if test "x$ac_cv_func_shmat" = xyes; then :
42703
42704fi
42705
42706    if test $ac_cv_func_shmat = no; then
42707      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
42708$as_echo_n "checking for shmat in -lipc... " >&6; }
42709if ${ac_cv_lib_ipc_shmat+:} false; then :
42710  $as_echo_n "(cached) " >&6
42711else
42712  ac_check_lib_save_LIBS=$LIBS
42713LIBS="-lipc  $LIBS"
42714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42715/* end confdefs.h.  */
42716
42717/* Override any GCC internal prototype to avoid an error.
42718   Use char because int might match the return type of a GCC
42719   builtin and then its argument prototype would still apply.  */
42720#ifdef __cplusplus
42721extern "C"
42722#endif
42723char shmat ();
42724int
42725main ()
42726{
42727return shmat ();
42728  ;
42729  return 0;
42730}
42731_ACEOF
42732if ac_fn_cxx_try_link "$LINENO"; then :
42733  ac_cv_lib_ipc_shmat=yes
42734else
42735  ac_cv_lib_ipc_shmat=no
42736fi
42737rm -f core conftest.err conftest.$ac_objext \
42738    conftest$ac_exeext conftest.$ac_ext
42739LIBS=$ac_check_lib_save_LIBS
42740fi
42741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
42742$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
42743if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
42744  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
42745fi
42746
42747    fi
42748  fi
42749
42750  # Check for libraries that X11R6 Xt/Xaw programs need.
42751  ac_save_LDFLAGS=$LDFLAGS
42752  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
42753  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
42754  # check for ICE first), but we must link in the order -lSM -lICE or
42755  # we get undefined symbols.  So assume we have SM if we have ICE.
42756  # These have to be linked with before -lX11, unlike the other
42757  # libraries we check for below, so use a different variable.
42758  # John Interrante, Karl Berry
42759  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
42760$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
42761if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
42762  $as_echo_n "(cached) " >&6
42763else
42764  ac_check_lib_save_LIBS=$LIBS
42765LIBS="-lICE $X_EXTRA_LIBS $LIBS"
42766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42767/* end confdefs.h.  */
42768
42769/* Override any GCC internal prototype to avoid an error.
42770   Use char because int might match the return type of a GCC
42771   builtin and then its argument prototype would still apply.  */
42772#ifdef __cplusplus
42773extern "C"
42774#endif
42775char IceConnectionNumber ();
42776int
42777main ()
42778{
42779return IceConnectionNumber ();
42780  ;
42781  return 0;
42782}
42783_ACEOF
42784if ac_fn_cxx_try_link "$LINENO"; then :
42785  ac_cv_lib_ICE_IceConnectionNumber=yes
42786else
42787  ac_cv_lib_ICE_IceConnectionNumber=no
42788fi
42789rm -f core conftest.err conftest.$ac_objext \
42790    conftest$ac_exeext conftest.$ac_ext
42791LIBS=$ac_check_lib_save_LIBS
42792fi
42793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
42794$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
42795if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
42796  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
42797fi
42798
42799  LDFLAGS=$ac_save_LDFLAGS
42800
42801fi
42802
42803
42804  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
42805  # this doesn't make sense so we remove it.
42806  if test "x$COMPILE_TYPE" = xcross; then
42807    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
42808  fi
42809
42810  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
42811
42812  # Print a helpful message on how to acquire the necessary build dependency.
42813  # x11 is the help tag: freetype, cups, pulse, alsa etc
42814  MISSING_DEPENDENCY=x11
42815
42816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42817    cygwin_help $MISSING_DEPENDENCY
42818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42819    msys_help $MISSING_DEPENDENCY
42820  else
42821    PKGHANDLER_COMMAND=
42822
42823    case $PKGHANDLER in
42824      apt-get)
42825        apt_help     $MISSING_DEPENDENCY ;;
42826      yum)
42827        yum_help     $MISSING_DEPENDENCY ;;
42828      port)
42829        port_help    $MISSING_DEPENDENCY ;;
42830      pkgutil)
42831        pkgutil_help $MISSING_DEPENDENCY ;;
42832      pkgadd)
42833        pkgadd_help  $MISSING_DEPENDENCY ;;
42834    esac
42835
42836    if test "x$PKGHANDLER_COMMAND" != x; then
42837      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
42838    fi
42839  fi
42840
42841    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
42842  fi
42843
42844  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42845    OPENWIN_HOME="/usr/openwin"
42846  fi
42847
42848
42849
42850  #
42851  # Weird Sol10 something check...TODO change to try compile
42852  #
42853  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
42854    if test "`uname -r`" = "5.10"; then
42855      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
42856        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
42857      fi
42858    fi
42859  fi
42860
42861  ac_ext=c
42862ac_cpp='$CPP $CPPFLAGS'
42863ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42864ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42865ac_compiler_gnu=$ac_cv_c_compiler_gnu
42866
42867  OLD_CFLAGS="$CFLAGS"
42868  CFLAGS="$CFLAGS $X_CFLAGS"
42869
42870  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
42871  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
42872do :
42873  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
42874ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
42875        # include <X11/Xlib.h>
42876        # include <X11/Xutil.h>
42877
42878
42879"
42880if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
42881  cat >>confdefs.h <<_ACEOF
42882#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
42883_ACEOF
42884 X11_A_OK=yes
42885else
42886  X11_A_OK=no; break
42887fi
42888
42889done
42890
42891
42892  CFLAGS="$OLD_CFLAGS"
42893  ac_ext=cpp
42894ac_cpp='$CXXCPP $CPPFLAGS'
42895ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42896ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42897ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42898
42899
42900  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
42901
42902  # Print a helpful message on how to acquire the necessary build dependency.
42903  # x11 is the help tag: freetype, cups, pulse, alsa etc
42904  MISSING_DEPENDENCY=x11
42905
42906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42907    cygwin_help $MISSING_DEPENDENCY
42908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42909    msys_help $MISSING_DEPENDENCY
42910  else
42911    PKGHANDLER_COMMAND=
42912
42913    case $PKGHANDLER in
42914      apt-get)
42915        apt_help     $MISSING_DEPENDENCY ;;
42916      yum)
42917        yum_help     $MISSING_DEPENDENCY ;;
42918      port)
42919        port_help    $MISSING_DEPENDENCY ;;
42920      pkgutil)
42921        pkgutil_help $MISSING_DEPENDENCY ;;
42922      pkgadd)
42923        pkgadd_help  $MISSING_DEPENDENCY ;;
42924    esac
42925
42926    if test "x$PKGHANDLER_COMMAND" != x; then
42927      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
42928    fi
42929  fi
42930
42931    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
42932  fi
42933
42934
42935
42936
42937
42938
42939  ###############################################################################
42940  #
42941  # The common unix printing system cups is used to print from java.
42942  #
42943
42944# Check whether --with-cups was given.
42945if test "${with_cups+set}" = set; then :
42946  withval=$with_cups;
42947fi
42948
42949
42950# Check whether --with-cups-include was given.
42951if test "${with_cups_include+set}" = set; then :
42952  withval=$with_cups_include;
42953fi
42954
42955
42956  if test "x$CUPS_NOT_NEEDED" = xyes; then
42957    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
42958      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
42959$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
42960    fi
42961    CUPS_CFLAGS=
42962  else
42963    CUPS_FOUND=no
42964
42965    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
42966      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
42967    fi
42968
42969    if test "x${with_cups}" != x; then
42970      CUPS_CFLAGS="-I${with_cups}/include"
42971      CUPS_FOUND=yes
42972    fi
42973    if test "x${with_cups_include}" != x; then
42974      CUPS_CFLAGS="-I${with_cups_include}"
42975      CUPS_FOUND=yes
42976    fi
42977    if test "x$CUPS_FOUND" = xno; then
42978
42979
42980  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
42981    # Source the builddeps file again, to make sure it uses the latest variables!
42982    . $builddepsfile
42983    # Look for a target and build machine specific resource!
42984    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
42985    if test "x$resource" = x; then
42986      # Ok, lets instead look for a target specific resource
42987      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
42988    fi
42989    if test "x$resource" = x; then
42990      # Ok, lets instead look for a build specific resource
42991      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
42992    fi
42993    if test "x$resource" = x; then
42994      # Ok, lets instead look for a generic resource
42995      # (The cups comes from M4 and not the shell, thus no need for eval here.)
42996      resource=${builddep_cups}
42997    fi
42998    if test "x$resource" != x; then
42999      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43000$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43001      # If the resource in the builddeps.conf file is an existing directory,
43002      # for example /java/linux/cups
43003      if test -d ${resource}; then
43004        depdir=${resource}
43005      else
43006
43007  # cups is for example mymodule
43008  # $resource is for example libs/general/libmymod_1_2_3.zip
43009  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43010  # $with_builddeps_dir is for example /localhome/builddeps
43011  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43012  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43013  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43014  filename=`basename $resource`
43015  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43016  filebase=${filename%%.*}
43017  extension=${filename#*.}
43018  installdir=$with_builddeps_dir/$filebase
43019  if test ! -f $installdir/$filename.unpacked; then
43020    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43021$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43022    if test ! -d $installdir; then
43023      mkdir -p $installdir
43024    fi
43025    if test ! -d $installdir; then
43026      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43027    fi
43028    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43029    touch $tmpfile
43030    if test ! -f $tmpfile; then
43031      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43032    fi
43033
43034  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43035  # $tmpfile is the local file name for the downloaded file.
43036  VALID_TOOL=no
43037  if test "x$BDEPS_FTP" = xwget; then
43038    VALID_TOOL=yes
43039    wget -O $tmpfile $with_builddeps_server/$resource
43040  fi
43041  if test "x$BDEPS_FTP" = xlftp; then
43042    VALID_TOOL=yes
43043    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43044  fi
43045  if test "x$BDEPS_FTP" = xftp; then
43046    VALID_TOOL=yes
43047    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43048    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43049    FTPUSERPWD=${FTPSERVER%%@*}
43050    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43051      FTPUSER=${userpwd%%:*}
43052      FTPPWD=${userpwd#*@}
43053      FTPSERVER=${FTPSERVER#*@}
43054    else
43055      FTPUSER=ftp
43056      FTPPWD=ftp
43057    fi
43058    # the "pass" command does not work on some
43059    # ftp clients (read ftp.exe) but if it works,
43060    # passive mode is better!
43061    ( \
43062        echo "user $FTPUSER $FTPPWD"        ; \
43063        echo "pass"                         ; \
43064        echo "bin"                          ; \
43065        echo "get $FTPPATH $tmpfile"              ; \
43066    ) | ftp -in $FTPSERVER
43067  fi
43068  if test "x$VALID_TOOL" != xyes; then
43069    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43070  fi
43071
43072    mv $tmpfile $installdir/$filename
43073    if test ! -s $installdir/$filename; then
43074      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43075    fi
43076    case "$extension" in
43077      zip)  echo "Unzipping $installdir/$filename..."
43078        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43079        ;;
43080      tar.gz) echo "Untaring $installdir/$filename..."
43081        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43082        ;;
43083      tgz) echo "Untaring $installdir/$filename..."
43084        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43085        ;;
43086      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43087        ;;
43088    esac
43089  fi
43090  if test -f $installdir/$filename.unpacked; then
43091    depdir=$installdir
43092  fi
43093
43094      fi
43095      # Source the builddeps file again, because in the previous command, the depdir
43096      # was updated to point at the current build dependency install directory.
43097      . $builddepsfile
43098      # Now extract variables from the builddeps.conf files.
43099      theroot=${builddep_cups_ROOT}
43100      thecflags=${builddep_cups_CFLAGS}
43101      thelibs=${builddep_cups_LIBS}
43102      if test "x$depdir" = x; then
43103        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43104      fi
43105      CUPS=$depdir
43106      if test "x$theroot" != x; then
43107        CUPS="$theroot"
43108      fi
43109      if test "x$thecflags" != x; then
43110        CUPS_CFLAGS="$thecflags"
43111      fi
43112      if test "x$thelibs" != x; then
43113        CUPS_LIBS="$thelibs"
43114      fi
43115      CUPS_FOUND=yes
43116
43117    fi
43118
43119  fi
43120
43121    fi
43122    if test "x$CUPS_FOUND" = xno; then
43123      # Are the cups headers installed in the default /usr/include location?
43124      for ac_header in cups/cups.h cups/ppd.h
43125do :
43126  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43127ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43128if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43129  cat >>confdefs.h <<_ACEOF
43130#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43131_ACEOF
43132
43133            CUPS_FOUND=yes
43134            CUPS_CFLAGS=
43135            DEFAULT_CUPS=yes
43136
43137
43138fi
43139
43140done
43141
43142    fi
43143    if test "x$CUPS_FOUND" = xno; then
43144      # Getting nervous now? Lets poke around for standard Solaris third-party
43145      # package installation locations.
43146      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43147$as_echo_n "checking for cups headers... " >&6; }
43148      if test -s /opt/sfw/cups/include/cups/cups.h; then
43149        # An SFW package seems to be installed!
43150        CUPS_FOUND=yes
43151        CUPS_CFLAGS="-I/opt/sfw/cups/include"
43152      elif test -s /opt/csw/include/cups/cups.h; then
43153        # A CSW package seems to be installed!
43154        CUPS_FOUND=yes
43155        CUPS_CFLAGS="-I/opt/csw/include"
43156      fi
43157      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43158$as_echo "$CUPS_FOUND" >&6; }
43159    fi
43160    if test "x$CUPS_FOUND" = xno; then
43161
43162  # Print a helpful message on how to acquire the necessary build dependency.
43163  # cups is the help tag: freetype, cups, pulse, alsa etc
43164  MISSING_DEPENDENCY=cups
43165
43166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43167    cygwin_help $MISSING_DEPENDENCY
43168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43169    msys_help $MISSING_DEPENDENCY
43170  else
43171    PKGHANDLER_COMMAND=
43172
43173    case $PKGHANDLER in
43174      apt-get)
43175        apt_help     $MISSING_DEPENDENCY ;;
43176      yum)
43177        yum_help     $MISSING_DEPENDENCY ;;
43178      port)
43179        port_help    $MISSING_DEPENDENCY ;;
43180      pkgutil)
43181        pkgutil_help $MISSING_DEPENDENCY ;;
43182      pkgadd)
43183        pkgadd_help  $MISSING_DEPENDENCY ;;
43184    esac
43185
43186    if test "x$PKGHANDLER_COMMAND" != x; then
43187      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43188    fi
43189  fi
43190
43191      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43192    fi
43193  fi
43194
43195
43196
43197
43198
43199
43200  ###############################################################################
43201  #
43202  # The ubiquitous freetype library is used to render fonts.
43203  #
43204
43205# Check whether --with-freetype was given.
43206if test "${with_freetype+set}" = set; then :
43207  withval=$with_freetype;
43208fi
43209
43210
43211# Check whether --with-freetype-include was given.
43212if test "${with_freetype_include+set}" = set; then :
43213  withval=$with_freetype_include;
43214fi
43215
43216
43217# Check whether --with-freetype-lib was given.
43218if test "${with_freetype_lib+set}" = set; then :
43219  withval=$with_freetype_lib;
43220fi
43221
43222  # Check whether --enable-freetype-bundling was given.
43223if test "${enable_freetype_bundling+set}" = set; then :
43224  enableval=$enable_freetype_bundling;
43225fi
43226
43227
43228  FREETYPE_CFLAGS=
43229  FREETYPE_LIBS=
43230  FREETYPE_BUNDLE_LIB_PATH=
43231
43232  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43233    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43234      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43235$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43236    fi
43237    if test "x$enable_freetype_bundling" != x; then
43238      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
43239$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
43240    fi
43241  else
43242    # freetype is needed to build; go get it!
43243
43244    BUNDLE_FREETYPE="$enable_freetype_bundling"
43245
43246    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43247      # User has specified settings
43248
43249      if test "x$BUNDLE_FREETYPE" = x; then
43250        # If not specified, default is to bundle freetype
43251        BUNDLE_FREETYPE=yes
43252      fi
43253
43254      if test "x$with_freetype" != x; then
43255        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
43256        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
43257      fi
43258
43259      # Allow --with-freetype-lib and --with-freetype-include to override
43260      if test "x$with_freetype_include" != x; then
43261        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
43262      fi
43263      if test "x$with_freetype_lib" != x; then
43264        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
43265      fi
43266
43267      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
43268        # Okay, we got it. Check that it works.
43269
43270  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43271  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43272  METHOD="--with-freetype"
43273
43274  # First check if the files exists.
43275  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43276    # We found an arbitrary include file. That's a good sign.
43277    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43278$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43279    FOUND_FREETYPE=yes
43280
43281    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43282    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43283      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43284$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43285      FOUND_FREETYPE=no
43286    else
43287      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43288        # On Windows, we will need both .lib and .dll file.
43289        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43290          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43291$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43292          FOUND_FREETYPE=no
43293        fi
43294      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
43295        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43296        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43297      fi
43298    fi
43299  fi
43300
43301  if test "x$FOUND_FREETYPE" = xyes; then
43302
43303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43304
43305  # Input might be given as Windows format, start by converting to
43306  # unix format.
43307  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43308  new_path=`$CYGPATH -u "$path"`
43309
43310  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43311  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43312  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43313  # "foo.exe" is OK but "foo" is an error.
43314  #
43315  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43316  # It is also a way to make sure we got the proper file name for the real test later on.
43317  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43318  if test "x$test_shortpath" = x; then
43319    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43320$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43321    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43322  fi
43323
43324  # Call helper function which possibly converts this using DOS-style short mode.
43325  # If so, the updated path is stored in $new_path.
43326
43327  input_path="$new_path"
43328  # Check if we need to convert this using DOS-style short mode. If the path
43329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43330  # take no chances and rewrite it.
43331  # Note: m4 eats our [], so we need to use [ and ] instead.
43332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43333  if test "x$has_forbidden_chars" != x; then
43334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43338      # Going to short mode and back again did indeed matter. Since short mode is
43339      # case insensitive, let's make it lowercase to improve readability.
43340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43341      # Now convert it back to Unix-stile (cygpath)
43342      input_path=`$CYGPATH -u "$shortmode_path"`
43343      new_path="$input_path"
43344    fi
43345  fi
43346
43347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43348  if test "x$test_cygdrive_prefix" = x; then
43349    # As a simple fix, exclude /usr/bin since it's not a real path.
43350    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43352      # a path prefixed by /cygdrive for fixpath to work.
43353      new_path="$CYGWIN_ROOT_PATH$input_path"
43354    fi
43355  fi
43356
43357
43358  if test "x$path" != "x$new_path"; then
43359    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43361$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43362  fi
43363
43364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43365
43366  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43367  has_colon=`$ECHO $path | $GREP ^.:`
43368  new_path="$path"
43369  if test "x$has_colon" = x; then
43370    # Not in mixed or Windows style, start by that.
43371    new_path=`cmd //c echo $path`
43372  fi
43373
43374
43375  input_path="$new_path"
43376  # Check if we need to convert this using DOS-style short mode. If the path
43377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43378  # take no chances and rewrite it.
43379  # Note: m4 eats our [], so we need to use [ and ] instead.
43380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43381  if test "x$has_forbidden_chars" != x; then
43382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43383    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43384  fi
43385
43386
43387  windows_path="$new_path"
43388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43389    unix_path=`$CYGPATH -u "$windows_path"`
43390    new_path="$unix_path"
43391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43393    new_path="$unix_path"
43394  fi
43395
43396  if test "x$path" != "x$new_path"; then
43397    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43399$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43400  fi
43401
43402  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43403  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43404
43405  else
43406    # We're on a posix platform. Hooray! :)
43407    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43408    has_space=`$ECHO "$path" | $GREP " "`
43409    if test "x$has_space" != x; then
43410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43411$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43412      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43413    fi
43414
43415    # Use eval to expand a potential ~
43416    eval path="$path"
43417    if test ! -f "$path" && test ! -d "$path"; then
43418      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43419    fi
43420
43421    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43422  fi
43423
43424
43425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43426
43427  # Input might be given as Windows format, start by converting to
43428  # unix format.
43429  path="$POTENTIAL_FREETYPE_LIB_PATH"
43430  new_path=`$CYGPATH -u "$path"`
43431
43432  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43433  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43434  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43435  # "foo.exe" is OK but "foo" is an error.
43436  #
43437  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43438  # It is also a way to make sure we got the proper file name for the real test later on.
43439  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43440  if test "x$test_shortpath" = x; then
43441    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43442$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43443    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43444  fi
43445
43446  # Call helper function which possibly converts this using DOS-style short mode.
43447  # If so, the updated path is stored in $new_path.
43448
43449  input_path="$new_path"
43450  # Check if we need to convert this using DOS-style short mode. If the path
43451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43452  # take no chances and rewrite it.
43453  # Note: m4 eats our [], so we need to use [ and ] instead.
43454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43455  if test "x$has_forbidden_chars" != x; then
43456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43457    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43458    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43459    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43460      # Going to short mode and back again did indeed matter. Since short mode is
43461      # case insensitive, let's make it lowercase to improve readability.
43462      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43463      # Now convert it back to Unix-stile (cygpath)
43464      input_path=`$CYGPATH -u "$shortmode_path"`
43465      new_path="$input_path"
43466    fi
43467  fi
43468
43469  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43470  if test "x$test_cygdrive_prefix" = x; then
43471    # As a simple fix, exclude /usr/bin since it's not a real path.
43472    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43473      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43474      # a path prefixed by /cygdrive for fixpath to work.
43475      new_path="$CYGWIN_ROOT_PATH$input_path"
43476    fi
43477  fi
43478
43479
43480  if test "x$path" != "x$new_path"; then
43481    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43483$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43484  fi
43485
43486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43487
43488  path="$POTENTIAL_FREETYPE_LIB_PATH"
43489  has_colon=`$ECHO $path | $GREP ^.:`
43490  new_path="$path"
43491  if test "x$has_colon" = x; then
43492    # Not in mixed or Windows style, start by that.
43493    new_path=`cmd //c echo $path`
43494  fi
43495
43496
43497  input_path="$new_path"
43498  # Check if we need to convert this using DOS-style short mode. If the path
43499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43500  # take no chances and rewrite it.
43501  # Note: m4 eats our [], so we need to use [ and ] instead.
43502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43503  if test "x$has_forbidden_chars" != x; then
43504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43505    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43506  fi
43507
43508
43509  windows_path="$new_path"
43510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43511    unix_path=`$CYGPATH -u "$windows_path"`
43512    new_path="$unix_path"
43513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43515    new_path="$unix_path"
43516  fi
43517
43518  if test "x$path" != "x$new_path"; then
43519    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43520    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43521$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43522  fi
43523
43524  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43525  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43526
43527  else
43528    # We're on a posix platform. Hooray! :)
43529    path="$POTENTIAL_FREETYPE_LIB_PATH"
43530    has_space=`$ECHO "$path" | $GREP " "`
43531    if test "x$has_space" != x; then
43532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43533$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43534      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43535    fi
43536
43537    # Use eval to expand a potential ~
43538    eval path="$path"
43539    if test ! -f "$path" && test ! -d "$path"; then
43540      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43541    fi
43542
43543    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43544  fi
43545
43546
43547    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43548    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43549$as_echo_n "checking for freetype includes... " >&6; }
43550    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43551$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43552    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43553    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43554$as_echo_n "checking for freetype libraries... " >&6; }
43555    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43556$as_echo "$FREETYPE_LIB_PATH" >&6; }
43557  fi
43558
43559        if test "x$FOUND_FREETYPE" != xyes; then
43560          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
43561        fi
43562      else
43563        # User specified only one of lib or include. This is an error.
43564        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
43565          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
43566$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
43567          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43568        else
43569          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
43570$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
43571          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43572        fi
43573      fi
43574    else
43575      # User did not specify settings, but we need freetype. Try to locate it.
43576
43577      if test "x$BUNDLE_FREETYPE" = x; then
43578        # If not specified, default is to bundle freetype only on windows
43579        if test "x$OPENJDK_TARGET_OS" = xwindows; then
43580          BUNDLE_FREETYPE=yes
43581        else
43582          BUNDLE_FREETYPE=no
43583        fi
43584      fi
43585
43586      if test "x$FOUND_FREETYPE" != xyes; then
43587        # Check builddeps
43588
43589
43590  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43591    # Source the builddeps file again, to make sure it uses the latest variables!
43592    . $builddepsfile
43593    # Look for a target and build machine specific resource!
43594    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43595    if test "x$resource" = x; then
43596      # Ok, lets instead look for a target specific resource
43597      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
43598    fi
43599    if test "x$resource" = x; then
43600      # Ok, lets instead look for a build specific resource
43601      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
43602    fi
43603    if test "x$resource" = x; then
43604      # Ok, lets instead look for a generic resource
43605      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
43606      resource=${builddep_freetype2}
43607    fi
43608    if test "x$resource" != x; then
43609      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
43610$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
43611      # If the resource in the builddeps.conf file is an existing directory,
43612      # for example /java/linux/cups
43613      if test -d ${resource}; then
43614        depdir=${resource}
43615      else
43616
43617  # freetype2 is for example mymodule
43618  # $resource is for example libs/general/libmymod_1_2_3.zip
43619  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43620  # $with_builddeps_dir is for example /localhome/builddeps
43621  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43622  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43623  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43624  filename=`basename $resource`
43625  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43626  filebase=${filename%%.*}
43627  extension=${filename#*.}
43628  installdir=$with_builddeps_dir/$filebase
43629  if test ! -f $installdir/$filename.unpacked; then
43630    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
43631$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43632    if test ! -d $installdir; then
43633      mkdir -p $installdir
43634    fi
43635    if test ! -d $installdir; then
43636      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43637    fi
43638    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
43639    touch $tmpfile
43640    if test ! -f $tmpfile; then
43641      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43642    fi
43643
43644  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43645  # $tmpfile is the local file name for the downloaded file.
43646  VALID_TOOL=no
43647  if test "x$BDEPS_FTP" = xwget; then
43648    VALID_TOOL=yes
43649    wget -O $tmpfile $with_builddeps_server/$resource
43650  fi
43651  if test "x$BDEPS_FTP" = xlftp; then
43652    VALID_TOOL=yes
43653    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43654  fi
43655  if test "x$BDEPS_FTP" = xftp; then
43656    VALID_TOOL=yes
43657    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43658    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43659    FTPUSERPWD=${FTPSERVER%%@*}
43660    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43661      FTPUSER=${userpwd%%:*}
43662      FTPPWD=${userpwd#*@}
43663      FTPSERVER=${FTPSERVER#*@}
43664    else
43665      FTPUSER=ftp
43666      FTPPWD=ftp
43667    fi
43668    # the "pass" command does not work on some
43669    # ftp clients (read ftp.exe) but if it works,
43670    # passive mode is better!
43671    ( \
43672        echo "user $FTPUSER $FTPPWD"        ; \
43673        echo "pass"                         ; \
43674        echo "bin"                          ; \
43675        echo "get $FTPPATH $tmpfile"              ; \
43676    ) | ftp -in $FTPSERVER
43677  fi
43678  if test "x$VALID_TOOL" != xyes; then
43679    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43680  fi
43681
43682    mv $tmpfile $installdir/$filename
43683    if test ! -s $installdir/$filename; then
43684      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43685    fi
43686    case "$extension" in
43687      zip)  echo "Unzipping $installdir/$filename..."
43688        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43689        ;;
43690      tar.gz) echo "Untaring $installdir/$filename..."
43691        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43692        ;;
43693      tgz) echo "Untaring $installdir/$filename..."
43694        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43695        ;;
43696      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43697        ;;
43698    esac
43699  fi
43700  if test -f $installdir/$filename.unpacked; then
43701    depdir=$installdir
43702  fi
43703
43704      fi
43705      # Source the builddeps file again, because in the previous command, the depdir
43706      # was updated to point at the current build dependency install directory.
43707      . $builddepsfile
43708      # Now extract variables from the builddeps.conf files.
43709      theroot=${builddep_freetype2_ROOT}
43710      thecflags=${builddep_freetype2_CFLAGS}
43711      thelibs=${builddep_freetype2_LIBS}
43712      if test "x$depdir" = x; then
43713        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
43714      fi
43715      FREETYPE=$depdir
43716      if test "x$theroot" != x; then
43717        FREETYPE="$theroot"
43718      fi
43719      if test "x$thecflags" != x; then
43720        FREETYPE_CFLAGS="$thecflags"
43721      fi
43722      if test "x$thelibs" != x; then
43723        FREETYPE_LIBS="$thelibs"
43724      fi
43725      FOUND_FREETYPE=yes
43726      else FOUND_FREETYPE=no
43727
43728    fi
43729    else FOUND_FREETYPE=no
43730
43731  fi
43732
43733        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
43734        if test "x$FOUND_FREETYPE" = xyes; then
43735          if test "x$BUNDLE_FREETYPE" = xyes; then
43736            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
43737$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
43738            FOUND_FREETYPE=no
43739          else
43740            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
43741$as_echo_n "checking for freetype... " >&6; }
43742            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
43743$as_echo "yes (using builddeps)" >&6; }
43744          fi
43745        fi
43746      fi
43747
43748      if test "x$FOUND_FREETYPE" != xyes; then
43749        # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
43750        if test "x$PKG_CONFIG" != x; then
43751
43752pkg_failed=no
43753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
43754$as_echo_n "checking for FREETYPE... " >&6; }
43755
43756if test -n "$FREETYPE_CFLAGS"; then
43757    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
43758 elif test -n "$PKG_CONFIG"; then
43759    if test -n "$PKG_CONFIG" && \
43760    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43761  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43762  ac_status=$?
43763  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43764  test $ac_status = 0; }; then
43765  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
43766else
43767  pkg_failed=yes
43768fi
43769 else
43770    pkg_failed=untried
43771fi
43772if test -n "$FREETYPE_LIBS"; then
43773    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
43774 elif test -n "$PKG_CONFIG"; then
43775    if test -n "$PKG_CONFIG" && \
43776    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43777  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43778  ac_status=$?
43779  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43780  test $ac_status = 0; }; then
43781  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
43782else
43783  pkg_failed=yes
43784fi
43785 else
43786    pkg_failed=untried
43787fi
43788
43789
43790
43791if test $pkg_failed = yes; then
43792
43793if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
43794        _pkg_short_errors_supported=yes
43795else
43796        _pkg_short_errors_supported=no
43797fi
43798        if test $_pkg_short_errors_supported = yes; then
43799	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
43800        else
43801	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
43802        fi
43803	# Put the nasty error message in config.log where it belongs
43804	echo "$FREETYPE_PKG_ERRORS" >&5
43805
43806	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43807$as_echo "no" >&6; }
43808                FOUND_FREETYPE=no
43809elif test $pkg_failed = untried; then
43810	FOUND_FREETYPE=no
43811else
43812	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
43813	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
43814        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43815$as_echo "yes" >&6; }
43816	FOUND_FREETYPE=yes
43817fi
43818          if test "x$FOUND_FREETYPE" = xyes; then
43819            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
43820            FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
43821            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
43822            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
43823              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
43824            fi
43825            # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
43826            if test "x$BUNDLE_FREETYPE" = xyes; then
43827              { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
43828$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
43829              FOUND_FREETYPE=no
43830            else
43831              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
43832$as_echo_n "checking for freetype... " >&6; }
43833              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
43834$as_echo "yes (using pkg-config)" >&6; }
43835            fi
43836          fi
43837        fi
43838      fi
43839
43840      if test "x$FOUND_FREETYPE" != xyes; then
43841        # Check in well-known locations
43842        if test "x$OPENJDK_TARGET_OS" = xwindows; then
43843          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
43844
43845  windows_path="$FREETYPE_BASE_DIR"
43846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43847    unix_path=`$CYGPATH -u "$windows_path"`
43848    FREETYPE_BASE_DIR="$unix_path"
43849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43851    FREETYPE_BASE_DIR="$unix_path"
43852  fi
43853
43854
43855  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
43856  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
43857  METHOD="well-known location"
43858
43859  # First check if the files exists.
43860  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43861    # We found an arbitrary include file. That's a good sign.
43862    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43863$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43864    FOUND_FREETYPE=yes
43865
43866    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43867    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43868      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43869$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43870      FOUND_FREETYPE=no
43871    else
43872      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43873        # On Windows, we will need both .lib and .dll file.
43874        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43875          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43876$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43877          FOUND_FREETYPE=no
43878        fi
43879      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
43880        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43881        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43882      fi
43883    fi
43884  fi
43885
43886  if test "x$FOUND_FREETYPE" = xyes; then
43887
43888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43889
43890  # Input might be given as Windows format, start by converting to
43891  # unix format.
43892  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43893  new_path=`$CYGPATH -u "$path"`
43894
43895  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43896  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43897  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43898  # "foo.exe" is OK but "foo" is an error.
43899  #
43900  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43901  # It is also a way to make sure we got the proper file name for the real test later on.
43902  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43903  if test "x$test_shortpath" = x; then
43904    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43905$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43906    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43907  fi
43908
43909  # Call helper function which possibly converts this using DOS-style short mode.
43910  # If so, the updated path is stored in $new_path.
43911
43912  input_path="$new_path"
43913  # Check if we need to convert this using DOS-style short mode. If the path
43914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43915  # take no chances and rewrite it.
43916  # Note: m4 eats our [], so we need to use [ and ] instead.
43917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43918  if test "x$has_forbidden_chars" != x; then
43919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43920    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43921    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43922    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43923      # Going to short mode and back again did indeed matter. Since short mode is
43924      # case insensitive, let's make it lowercase to improve readability.
43925      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43926      # Now convert it back to Unix-stile (cygpath)
43927      input_path=`$CYGPATH -u "$shortmode_path"`
43928      new_path="$input_path"
43929    fi
43930  fi
43931
43932  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43933  if test "x$test_cygdrive_prefix" = x; then
43934    # As a simple fix, exclude /usr/bin since it's not a real path.
43935    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43936      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43937      # a path prefixed by /cygdrive for fixpath to work.
43938      new_path="$CYGWIN_ROOT_PATH$input_path"
43939    fi
43940  fi
43941
43942
43943  if test "x$path" != "x$new_path"; then
43944    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43946$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43947  fi
43948
43949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43950
43951  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43952  has_colon=`$ECHO $path | $GREP ^.:`
43953  new_path="$path"
43954  if test "x$has_colon" = x; then
43955    # Not in mixed or Windows style, start by that.
43956    new_path=`cmd //c echo $path`
43957  fi
43958
43959
43960  input_path="$new_path"
43961  # Check if we need to convert this using DOS-style short mode. If the path
43962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43963  # take no chances and rewrite it.
43964  # Note: m4 eats our [], so we need to use [ and ] instead.
43965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43966  if test "x$has_forbidden_chars" != x; then
43967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43968    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43969  fi
43970
43971
43972  windows_path="$new_path"
43973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43974    unix_path=`$CYGPATH -u "$windows_path"`
43975    new_path="$unix_path"
43976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43978    new_path="$unix_path"
43979  fi
43980
43981  if test "x$path" != "x$new_path"; then
43982    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43984$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43985  fi
43986
43987  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43988  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43989
43990  else
43991    # We're on a posix platform. Hooray! :)
43992    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43993    has_space=`$ECHO "$path" | $GREP " "`
43994    if test "x$has_space" != x; then
43995      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43996$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43997      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43998    fi
43999
44000    # Use eval to expand a potential ~
44001    eval path="$path"
44002    if test ! -f "$path" && test ! -d "$path"; then
44003      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44004    fi
44005
44006    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44007  fi
44008
44009
44010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44011
44012  # Input might be given as Windows format, start by converting to
44013  # unix format.
44014  path="$POTENTIAL_FREETYPE_LIB_PATH"
44015  new_path=`$CYGPATH -u "$path"`
44016
44017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44020  # "foo.exe" is OK but "foo" is an error.
44021  #
44022  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44023  # It is also a way to make sure we got the proper file name for the real test later on.
44024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44025  if test "x$test_shortpath" = x; then
44026    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44027$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44028    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44029  fi
44030
44031  # Call helper function which possibly converts this using DOS-style short mode.
44032  # If so, the updated path is stored in $new_path.
44033
44034  input_path="$new_path"
44035  # Check if we need to convert this using DOS-style short mode. If the path
44036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44037  # take no chances and rewrite it.
44038  # Note: m4 eats our [], so we need to use [ and ] instead.
44039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44040  if test "x$has_forbidden_chars" != x; then
44041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44042    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44043    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44044    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44045      # Going to short mode and back again did indeed matter. Since short mode is
44046      # case insensitive, let's make it lowercase to improve readability.
44047      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44048      # Now convert it back to Unix-stile (cygpath)
44049      input_path=`$CYGPATH -u "$shortmode_path"`
44050      new_path="$input_path"
44051    fi
44052  fi
44053
44054  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44055  if test "x$test_cygdrive_prefix" = x; then
44056    # As a simple fix, exclude /usr/bin since it's not a real path.
44057    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44058      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44059      # a path prefixed by /cygdrive for fixpath to work.
44060      new_path="$CYGWIN_ROOT_PATH$input_path"
44061    fi
44062  fi
44063
44064
44065  if test "x$path" != "x$new_path"; then
44066    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44068$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44069  fi
44070
44071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44072
44073  path="$POTENTIAL_FREETYPE_LIB_PATH"
44074  has_colon=`$ECHO $path | $GREP ^.:`
44075  new_path="$path"
44076  if test "x$has_colon" = x; then
44077    # Not in mixed or Windows style, start by that.
44078    new_path=`cmd //c echo $path`
44079  fi
44080
44081
44082  input_path="$new_path"
44083  # Check if we need to convert this using DOS-style short mode. If the path
44084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44085  # take no chances and rewrite it.
44086  # Note: m4 eats our [], so we need to use [ and ] instead.
44087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44088  if test "x$has_forbidden_chars" != x; then
44089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44091  fi
44092
44093
44094  windows_path="$new_path"
44095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44096    unix_path=`$CYGPATH -u "$windows_path"`
44097    new_path="$unix_path"
44098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44100    new_path="$unix_path"
44101  fi
44102
44103  if test "x$path" != "x$new_path"; then
44104    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44106$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44107  fi
44108
44109  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44110  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44111
44112  else
44113    # We're on a posix platform. Hooray! :)
44114    path="$POTENTIAL_FREETYPE_LIB_PATH"
44115    has_space=`$ECHO "$path" | $GREP " "`
44116    if test "x$has_space" != x; then
44117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44118$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44119      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44120    fi
44121
44122    # Use eval to expand a potential ~
44123    eval path="$path"
44124    if test ! -f "$path" && test ! -d "$path"; then
44125      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44126    fi
44127
44128    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44129  fi
44130
44131
44132    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44133    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44134$as_echo_n "checking for freetype includes... " >&6; }
44135    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44136$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44137    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44138    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44139$as_echo_n "checking for freetype libraries... " >&6; }
44140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44141$as_echo "$FREETYPE_LIB_PATH" >&6; }
44142  fi
44143
44144          if test "x$FOUND_FREETYPE" != xyes; then
44145            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
44146
44147  windows_path="$FREETYPE_BASE_DIR"
44148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44149    unix_path=`$CYGPATH -u "$windows_path"`
44150    FREETYPE_BASE_DIR="$unix_path"
44151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44153    FREETYPE_BASE_DIR="$unix_path"
44154  fi
44155
44156
44157  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44158  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44159  METHOD="well-known location"
44160
44161  # First check if the files exists.
44162  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44163    # We found an arbitrary include file. That's a good sign.
44164    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44165$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44166    FOUND_FREETYPE=yes
44167
44168    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44169    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44170      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44171$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44172      FOUND_FREETYPE=no
44173    else
44174      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44175        # On Windows, we will need both .lib and .dll file.
44176        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44177          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44178$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44179          FOUND_FREETYPE=no
44180        fi
44181      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
44182        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44183        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44184      fi
44185    fi
44186  fi
44187
44188  if test "x$FOUND_FREETYPE" = xyes; then
44189
44190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44191
44192  # Input might be given as Windows format, start by converting to
44193  # unix format.
44194  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44195  new_path=`$CYGPATH -u "$path"`
44196
44197  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44198  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44199  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44200  # "foo.exe" is OK but "foo" is an error.
44201  #
44202  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44203  # It is also a way to make sure we got the proper file name for the real test later on.
44204  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44205  if test "x$test_shortpath" = x; then
44206    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44207$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44208    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44209  fi
44210
44211  # Call helper function which possibly converts this using DOS-style short mode.
44212  # If so, the updated path is stored in $new_path.
44213
44214  input_path="$new_path"
44215  # Check if we need to convert this using DOS-style short mode. If the path
44216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44217  # take no chances and rewrite it.
44218  # Note: m4 eats our [], so we need to use [ and ] instead.
44219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44220  if test "x$has_forbidden_chars" != x; then
44221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44222    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44223    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44224    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44225      # Going to short mode and back again did indeed matter. Since short mode is
44226      # case insensitive, let's make it lowercase to improve readability.
44227      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44228      # Now convert it back to Unix-stile (cygpath)
44229      input_path=`$CYGPATH -u "$shortmode_path"`
44230      new_path="$input_path"
44231    fi
44232  fi
44233
44234  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44235  if test "x$test_cygdrive_prefix" = x; then
44236    # As a simple fix, exclude /usr/bin since it's not a real path.
44237    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44238      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44239      # a path prefixed by /cygdrive for fixpath to work.
44240      new_path="$CYGWIN_ROOT_PATH$input_path"
44241    fi
44242  fi
44243
44244
44245  if test "x$path" != "x$new_path"; then
44246    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44248$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44249  fi
44250
44251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44252
44253  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44254  has_colon=`$ECHO $path | $GREP ^.:`
44255  new_path="$path"
44256  if test "x$has_colon" = x; then
44257    # Not in mixed or Windows style, start by that.
44258    new_path=`cmd //c echo $path`
44259  fi
44260
44261
44262  input_path="$new_path"
44263  # Check if we need to convert this using DOS-style short mode. If the path
44264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44265  # take no chances and rewrite it.
44266  # Note: m4 eats our [], so we need to use [ and ] instead.
44267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44268  if test "x$has_forbidden_chars" != x; then
44269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44270    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44271  fi
44272
44273
44274  windows_path="$new_path"
44275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44276    unix_path=`$CYGPATH -u "$windows_path"`
44277    new_path="$unix_path"
44278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44280    new_path="$unix_path"
44281  fi
44282
44283  if test "x$path" != "x$new_path"; then
44284    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44286$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44287  fi
44288
44289  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44290  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44291
44292  else
44293    # We're on a posix platform. Hooray! :)
44294    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44295    has_space=`$ECHO "$path" | $GREP " "`
44296    if test "x$has_space" != x; then
44297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44298$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44299      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44300    fi
44301
44302    # Use eval to expand a potential ~
44303    eval path="$path"
44304    if test ! -f "$path" && test ! -d "$path"; then
44305      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44306    fi
44307
44308    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44309  fi
44310
44311
44312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44313
44314  # Input might be given as Windows format, start by converting to
44315  # unix format.
44316  path="$POTENTIAL_FREETYPE_LIB_PATH"
44317  new_path=`$CYGPATH -u "$path"`
44318
44319  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44320  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44321  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44322  # "foo.exe" is OK but "foo" is an error.
44323  #
44324  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44325  # It is also a way to make sure we got the proper file name for the real test later on.
44326  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44327  if test "x$test_shortpath" = x; then
44328    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44329$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44330    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44331  fi
44332
44333  # Call helper function which possibly converts this using DOS-style short mode.
44334  # If so, the updated path is stored in $new_path.
44335
44336  input_path="$new_path"
44337  # Check if we need to convert this using DOS-style short mode. If the path
44338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44339  # take no chances and rewrite it.
44340  # Note: m4 eats our [], so we need to use [ and ] instead.
44341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44342  if test "x$has_forbidden_chars" != x; then
44343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44344    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44345    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44346    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44347      # Going to short mode and back again did indeed matter. Since short mode is
44348      # case insensitive, let's make it lowercase to improve readability.
44349      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44350      # Now convert it back to Unix-stile (cygpath)
44351      input_path=`$CYGPATH -u "$shortmode_path"`
44352      new_path="$input_path"
44353    fi
44354  fi
44355
44356  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44357  if test "x$test_cygdrive_prefix" = x; then
44358    # As a simple fix, exclude /usr/bin since it's not a real path.
44359    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44360      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44361      # a path prefixed by /cygdrive for fixpath to work.
44362      new_path="$CYGWIN_ROOT_PATH$input_path"
44363    fi
44364  fi
44365
44366
44367  if test "x$path" != "x$new_path"; then
44368    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44370$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44371  fi
44372
44373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44374
44375  path="$POTENTIAL_FREETYPE_LIB_PATH"
44376  has_colon=`$ECHO $path | $GREP ^.:`
44377  new_path="$path"
44378  if test "x$has_colon" = x; then
44379    # Not in mixed or Windows style, start by that.
44380    new_path=`cmd //c echo $path`
44381  fi
44382
44383
44384  input_path="$new_path"
44385  # Check if we need to convert this using DOS-style short mode. If the path
44386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44387  # take no chances and rewrite it.
44388  # Note: m4 eats our [], so we need to use [ and ] instead.
44389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44390  if test "x$has_forbidden_chars" != x; then
44391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44392    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44393  fi
44394
44395
44396  windows_path="$new_path"
44397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44398    unix_path=`$CYGPATH -u "$windows_path"`
44399    new_path="$unix_path"
44400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44402    new_path="$unix_path"
44403  fi
44404
44405  if test "x$path" != "x$new_path"; then
44406    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44408$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44409  fi
44410
44411  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44412  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44413
44414  else
44415    # We're on a posix platform. Hooray! :)
44416    path="$POTENTIAL_FREETYPE_LIB_PATH"
44417    has_space=`$ECHO "$path" | $GREP " "`
44418    if test "x$has_space" != x; then
44419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44420$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44421      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44422    fi
44423
44424    # Use eval to expand a potential ~
44425    eval path="$path"
44426    if test ! -f "$path" && test ! -d "$path"; then
44427      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44428    fi
44429
44430    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44431  fi
44432
44433
44434    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44435    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44436$as_echo_n "checking for freetype includes... " >&6; }
44437    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44438$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44439    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44440    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44441$as_echo_n "checking for freetype libraries... " >&6; }
44442    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44443$as_echo "$FREETYPE_LIB_PATH" >&6; }
44444  fi
44445
44446          fi
44447        else
44448          if test "x$SYS_ROOT" = "x/"; then
44449            FREETYPE_ROOT=
44450          else
44451            FREETYPE_ROOT="$SYS_ROOT"
44452          fi
44453          FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
44454
44455  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44456  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44457  METHOD="well-known location"
44458
44459  # First check if the files exists.
44460  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44461    # We found an arbitrary include file. That's a good sign.
44462    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44463$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44464    FOUND_FREETYPE=yes
44465
44466    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44467    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44468      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44469$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44470      FOUND_FREETYPE=no
44471    else
44472      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44473        # On Windows, we will need both .lib and .dll file.
44474        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44475          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44476$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44477          FOUND_FREETYPE=no
44478        fi
44479      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
44480        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44481        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44482      fi
44483    fi
44484  fi
44485
44486  if test "x$FOUND_FREETYPE" = xyes; then
44487
44488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44489
44490  # Input might be given as Windows format, start by converting to
44491  # unix format.
44492  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44493  new_path=`$CYGPATH -u "$path"`
44494
44495  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44496  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44497  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44498  # "foo.exe" is OK but "foo" is an error.
44499  #
44500  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44501  # It is also a way to make sure we got the proper file name for the real test later on.
44502  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44503  if test "x$test_shortpath" = x; then
44504    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44505$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44506    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44507  fi
44508
44509  # Call helper function which possibly converts this using DOS-style short mode.
44510  # If so, the updated path is stored in $new_path.
44511
44512  input_path="$new_path"
44513  # Check if we need to convert this using DOS-style short mode. If the path
44514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44515  # take no chances and rewrite it.
44516  # Note: m4 eats our [], so we need to use [ and ] instead.
44517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44518  if test "x$has_forbidden_chars" != x; then
44519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44520    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44521    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44522    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44523      # Going to short mode and back again did indeed matter. Since short mode is
44524      # case insensitive, let's make it lowercase to improve readability.
44525      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44526      # Now convert it back to Unix-stile (cygpath)
44527      input_path=`$CYGPATH -u "$shortmode_path"`
44528      new_path="$input_path"
44529    fi
44530  fi
44531
44532  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44533  if test "x$test_cygdrive_prefix" = x; then
44534    # As a simple fix, exclude /usr/bin since it's not a real path.
44535    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44536      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44537      # a path prefixed by /cygdrive for fixpath to work.
44538      new_path="$CYGWIN_ROOT_PATH$input_path"
44539    fi
44540  fi
44541
44542
44543  if test "x$path" != "x$new_path"; then
44544    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44545    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44546$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44547  fi
44548
44549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44550
44551  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44552  has_colon=`$ECHO $path | $GREP ^.:`
44553  new_path="$path"
44554  if test "x$has_colon" = x; then
44555    # Not in mixed or Windows style, start by that.
44556    new_path=`cmd //c echo $path`
44557  fi
44558
44559
44560  input_path="$new_path"
44561  # Check if we need to convert this using DOS-style short mode. If the path
44562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44563  # take no chances and rewrite it.
44564  # Note: m4 eats our [], so we need to use [ and ] instead.
44565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44566  if test "x$has_forbidden_chars" != x; then
44567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44568    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44569  fi
44570
44571
44572  windows_path="$new_path"
44573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44574    unix_path=`$CYGPATH -u "$windows_path"`
44575    new_path="$unix_path"
44576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44578    new_path="$unix_path"
44579  fi
44580
44581  if test "x$path" != "x$new_path"; then
44582    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44583    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44584$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44585  fi
44586
44587  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44588  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44589
44590  else
44591    # We're on a posix platform. Hooray! :)
44592    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44593    has_space=`$ECHO "$path" | $GREP " "`
44594    if test "x$has_space" != x; then
44595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44596$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44597      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44598    fi
44599
44600    # Use eval to expand a potential ~
44601    eval path="$path"
44602    if test ! -f "$path" && test ! -d "$path"; then
44603      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44604    fi
44605
44606    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44607  fi
44608
44609
44610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44611
44612  # Input might be given as Windows format, start by converting to
44613  # unix format.
44614  path="$POTENTIAL_FREETYPE_LIB_PATH"
44615  new_path=`$CYGPATH -u "$path"`
44616
44617  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44618  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44619  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44620  # "foo.exe" is OK but "foo" is an error.
44621  #
44622  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44623  # It is also a way to make sure we got the proper file name for the real test later on.
44624  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44625  if test "x$test_shortpath" = x; then
44626    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44627$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44628    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44629  fi
44630
44631  # Call helper function which possibly converts this using DOS-style short mode.
44632  # If so, the updated path is stored in $new_path.
44633
44634  input_path="$new_path"
44635  # Check if we need to convert this using DOS-style short mode. If the path
44636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44637  # take no chances and rewrite it.
44638  # Note: m4 eats our [], so we need to use [ and ] instead.
44639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44640  if test "x$has_forbidden_chars" != x; then
44641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44642    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44643    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44644    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44645      # Going to short mode and back again did indeed matter. Since short mode is
44646      # case insensitive, let's make it lowercase to improve readability.
44647      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44648      # Now convert it back to Unix-stile (cygpath)
44649      input_path=`$CYGPATH -u "$shortmode_path"`
44650      new_path="$input_path"
44651    fi
44652  fi
44653
44654  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44655  if test "x$test_cygdrive_prefix" = x; then
44656    # As a simple fix, exclude /usr/bin since it's not a real path.
44657    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44658      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44659      # a path prefixed by /cygdrive for fixpath to work.
44660      new_path="$CYGWIN_ROOT_PATH$input_path"
44661    fi
44662  fi
44663
44664
44665  if test "x$path" != "x$new_path"; then
44666    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44668$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44669  fi
44670
44671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44672
44673  path="$POTENTIAL_FREETYPE_LIB_PATH"
44674  has_colon=`$ECHO $path | $GREP ^.:`
44675  new_path="$path"
44676  if test "x$has_colon" = x; then
44677    # Not in mixed or Windows style, start by that.
44678    new_path=`cmd //c echo $path`
44679  fi
44680
44681
44682  input_path="$new_path"
44683  # Check if we need to convert this using DOS-style short mode. If the path
44684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44685  # take no chances and rewrite it.
44686  # Note: m4 eats our [], so we need to use [ and ] instead.
44687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44688  if test "x$has_forbidden_chars" != x; then
44689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44690    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44691  fi
44692
44693
44694  windows_path="$new_path"
44695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44696    unix_path=`$CYGPATH -u "$windows_path"`
44697    new_path="$unix_path"
44698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44700    new_path="$unix_path"
44701  fi
44702
44703  if test "x$path" != "x$new_path"; then
44704    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44705    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44706$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44707  fi
44708
44709  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44710  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44711
44712  else
44713    # We're on a posix platform. Hooray! :)
44714    path="$POTENTIAL_FREETYPE_LIB_PATH"
44715    has_space=`$ECHO "$path" | $GREP " "`
44716    if test "x$has_space" != x; then
44717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44718$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44719      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44720    fi
44721
44722    # Use eval to expand a potential ~
44723    eval path="$path"
44724    if test ! -f "$path" && test ! -d "$path"; then
44725      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44726    fi
44727
44728    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44729  fi
44730
44731
44732    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44733    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44734$as_echo_n "checking for freetype includes... " >&6; }
44735    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44736$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44737    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44738    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44739$as_echo_n "checking for freetype libraries... " >&6; }
44740    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44741$as_echo "$FREETYPE_LIB_PATH" >&6; }
44742  fi
44743
44744
44745          if test "x$FOUND_FREETYPE" != xyes; then
44746            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
44747
44748  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44749  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44750  METHOD="well-known location"
44751
44752  # First check if the files exists.
44753  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44754    # We found an arbitrary include file. That's a good sign.
44755    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44756$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44757    FOUND_FREETYPE=yes
44758
44759    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44760    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44761      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44762$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44763      FOUND_FREETYPE=no
44764    else
44765      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44766        # On Windows, we will need both .lib and .dll file.
44767        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44768          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44769$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44770          FOUND_FREETYPE=no
44771        fi
44772      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
44773        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44774        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44775      fi
44776    fi
44777  fi
44778
44779  if test "x$FOUND_FREETYPE" = xyes; then
44780
44781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44782
44783  # Input might be given as Windows format, start by converting to
44784  # unix format.
44785  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44786  new_path=`$CYGPATH -u "$path"`
44787
44788  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44789  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44790  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44791  # "foo.exe" is OK but "foo" is an error.
44792  #
44793  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44794  # It is also a way to make sure we got the proper file name for the real test later on.
44795  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44796  if test "x$test_shortpath" = x; then
44797    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44798$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44799    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44800  fi
44801
44802  # Call helper function which possibly converts this using DOS-style short mode.
44803  # If so, the updated path is stored in $new_path.
44804
44805  input_path="$new_path"
44806  # Check if we need to convert this using DOS-style short mode. If the path
44807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44808  # take no chances and rewrite it.
44809  # Note: m4 eats our [], so we need to use [ and ] instead.
44810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44811  if test "x$has_forbidden_chars" != x; then
44812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44813    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44814    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44815    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44816      # Going to short mode and back again did indeed matter. Since short mode is
44817      # case insensitive, let's make it lowercase to improve readability.
44818      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44819      # Now convert it back to Unix-stile (cygpath)
44820      input_path=`$CYGPATH -u "$shortmode_path"`
44821      new_path="$input_path"
44822    fi
44823  fi
44824
44825  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44826  if test "x$test_cygdrive_prefix" = x; then
44827    # As a simple fix, exclude /usr/bin since it's not a real path.
44828    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44829      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44830      # a path prefixed by /cygdrive for fixpath to work.
44831      new_path="$CYGWIN_ROOT_PATH$input_path"
44832    fi
44833  fi
44834
44835
44836  if test "x$path" != "x$new_path"; then
44837    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44839$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44840  fi
44841
44842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44843
44844  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44845  has_colon=`$ECHO $path | $GREP ^.:`
44846  new_path="$path"
44847  if test "x$has_colon" = x; then
44848    # Not in mixed or Windows style, start by that.
44849    new_path=`cmd //c echo $path`
44850  fi
44851
44852
44853  input_path="$new_path"
44854  # Check if we need to convert this using DOS-style short mode. If the path
44855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44856  # take no chances and rewrite it.
44857  # Note: m4 eats our [], so we need to use [ and ] instead.
44858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44859  if test "x$has_forbidden_chars" != x; then
44860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44861    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44862  fi
44863
44864
44865  windows_path="$new_path"
44866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44867    unix_path=`$CYGPATH -u "$windows_path"`
44868    new_path="$unix_path"
44869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44871    new_path="$unix_path"
44872  fi
44873
44874  if test "x$path" != "x$new_path"; then
44875    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44877$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44878  fi
44879
44880  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44881  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44882
44883  else
44884    # We're on a posix platform. Hooray! :)
44885    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44886    has_space=`$ECHO "$path" | $GREP " "`
44887    if test "x$has_space" != x; then
44888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44889$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44890      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44891    fi
44892
44893    # Use eval to expand a potential ~
44894    eval path="$path"
44895    if test ! -f "$path" && test ! -d "$path"; then
44896      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44897    fi
44898
44899    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44900  fi
44901
44902
44903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44904
44905  # Input might be given as Windows format, start by converting to
44906  # unix format.
44907  path="$POTENTIAL_FREETYPE_LIB_PATH"
44908  new_path=`$CYGPATH -u "$path"`
44909
44910  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44911  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44912  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44913  # "foo.exe" is OK but "foo" is an error.
44914  #
44915  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44916  # It is also a way to make sure we got the proper file name for the real test later on.
44917  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44918  if test "x$test_shortpath" = x; then
44919    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44920$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44921    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44922  fi
44923
44924  # Call helper function which possibly converts this using DOS-style short mode.
44925  # If so, the updated path is stored in $new_path.
44926
44927  input_path="$new_path"
44928  # Check if we need to convert this using DOS-style short mode. If the path
44929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44930  # take no chances and rewrite it.
44931  # Note: m4 eats our [], so we need to use [ and ] instead.
44932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44933  if test "x$has_forbidden_chars" != x; then
44934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44935    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44936    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44937    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44938      # Going to short mode and back again did indeed matter. Since short mode is
44939      # case insensitive, let's make it lowercase to improve readability.
44940      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44941      # Now convert it back to Unix-stile (cygpath)
44942      input_path=`$CYGPATH -u "$shortmode_path"`
44943      new_path="$input_path"
44944    fi
44945  fi
44946
44947  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44948  if test "x$test_cygdrive_prefix" = x; then
44949    # As a simple fix, exclude /usr/bin since it's not a real path.
44950    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44951      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44952      # a path prefixed by /cygdrive for fixpath to work.
44953      new_path="$CYGWIN_ROOT_PATH$input_path"
44954    fi
44955  fi
44956
44957
44958  if test "x$path" != "x$new_path"; then
44959    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44961$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44962  fi
44963
44964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44965
44966  path="$POTENTIAL_FREETYPE_LIB_PATH"
44967  has_colon=`$ECHO $path | $GREP ^.:`
44968  new_path="$path"
44969  if test "x$has_colon" = x; then
44970    # Not in mixed or Windows style, start by that.
44971    new_path=`cmd //c echo $path`
44972  fi
44973
44974
44975  input_path="$new_path"
44976  # Check if we need to convert this using DOS-style short mode. If the path
44977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44978  # take no chances and rewrite it.
44979  # Note: m4 eats our [], so we need to use [ and ] instead.
44980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44981  if test "x$has_forbidden_chars" != x; then
44982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44983    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44984  fi
44985
44986
44987  windows_path="$new_path"
44988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44989    unix_path=`$CYGPATH -u "$windows_path"`
44990    new_path="$unix_path"
44991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44993    new_path="$unix_path"
44994  fi
44995
44996  if test "x$path" != "x$new_path"; then
44997    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44998    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44999$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45000  fi
45001
45002  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45003  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45004
45005  else
45006    # We're on a posix platform. Hooray! :)
45007    path="$POTENTIAL_FREETYPE_LIB_PATH"
45008    has_space=`$ECHO "$path" | $GREP " "`
45009    if test "x$has_space" != x; then
45010      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45011$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45012      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45013    fi
45014
45015    # Use eval to expand a potential ~
45016    eval path="$path"
45017    if test ! -f "$path" && test ! -d "$path"; then
45018      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45019    fi
45020
45021    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45022  fi
45023
45024
45025    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45026    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45027$as_echo_n "checking for freetype includes... " >&6; }
45028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45029$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45030    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45031    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45032$as_echo_n "checking for freetype libraries... " >&6; }
45033    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45034$as_echo "$FREETYPE_LIB_PATH" >&6; }
45035  fi
45036
45037          fi
45038
45039          if test "x$FOUND_FREETYPE" != xyes; then
45040            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
45041            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45042
45043  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45044  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
45045  METHOD="well-known location"
45046
45047  # First check if the files exists.
45048  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45049    # We found an arbitrary include file. That's a good sign.
45050    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45051$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45052    FOUND_FREETYPE=yes
45053
45054    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45055    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45056      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45057$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45058      FOUND_FREETYPE=no
45059    else
45060      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45061        # On Windows, we will need both .lib and .dll file.
45062        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45063          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45064$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45065          FOUND_FREETYPE=no
45066        fi
45067      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
45068        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45069        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45070      fi
45071    fi
45072  fi
45073
45074  if test "x$FOUND_FREETYPE" = xyes; then
45075
45076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45077
45078  # Input might be given as Windows format, start by converting to
45079  # unix format.
45080  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45081  new_path=`$CYGPATH -u "$path"`
45082
45083  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45084  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45085  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45086  # "foo.exe" is OK but "foo" is an error.
45087  #
45088  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45089  # It is also a way to make sure we got the proper file name for the real test later on.
45090  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45091  if test "x$test_shortpath" = x; then
45092    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45093$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45094    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45095  fi
45096
45097  # Call helper function which possibly converts this using DOS-style short mode.
45098  # If so, the updated path is stored in $new_path.
45099
45100  input_path="$new_path"
45101  # Check if we need to convert this using DOS-style short mode. If the path
45102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45103  # take no chances and rewrite it.
45104  # Note: m4 eats our [], so we need to use [ and ] instead.
45105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45106  if test "x$has_forbidden_chars" != x; then
45107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45111      # Going to short mode and back again did indeed matter. Since short mode is
45112      # case insensitive, let's make it lowercase to improve readability.
45113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45114      # Now convert it back to Unix-stile (cygpath)
45115      input_path=`$CYGPATH -u "$shortmode_path"`
45116      new_path="$input_path"
45117    fi
45118  fi
45119
45120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45121  if test "x$test_cygdrive_prefix" = x; then
45122    # As a simple fix, exclude /usr/bin since it's not a real path.
45123    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45125      # a path prefixed by /cygdrive for fixpath to work.
45126      new_path="$CYGWIN_ROOT_PATH$input_path"
45127    fi
45128  fi
45129
45130
45131  if test "x$path" != "x$new_path"; then
45132    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45134$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45135  fi
45136
45137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45138
45139  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45140  has_colon=`$ECHO $path | $GREP ^.:`
45141  new_path="$path"
45142  if test "x$has_colon" = x; then
45143    # Not in mixed or Windows style, start by that.
45144    new_path=`cmd //c echo $path`
45145  fi
45146
45147
45148  input_path="$new_path"
45149  # Check if we need to convert this using DOS-style short mode. If the path
45150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45151  # take no chances and rewrite it.
45152  # Note: m4 eats our [], so we need to use [ and ] instead.
45153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45154  if test "x$has_forbidden_chars" != x; then
45155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45156    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45157  fi
45158
45159
45160  windows_path="$new_path"
45161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45162    unix_path=`$CYGPATH -u "$windows_path"`
45163    new_path="$unix_path"
45164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45166    new_path="$unix_path"
45167  fi
45168
45169  if test "x$path" != "x$new_path"; then
45170    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45172$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45173  fi
45174
45175  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45176  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45177
45178  else
45179    # We're on a posix platform. Hooray! :)
45180    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45181    has_space=`$ECHO "$path" | $GREP " "`
45182    if test "x$has_space" != x; then
45183      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45184$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45185      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45186    fi
45187
45188    # Use eval to expand a potential ~
45189    eval path="$path"
45190    if test ! -f "$path" && test ! -d "$path"; then
45191      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45192    fi
45193
45194    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45195  fi
45196
45197
45198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45199
45200  # Input might be given as Windows format, start by converting to
45201  # unix format.
45202  path="$POTENTIAL_FREETYPE_LIB_PATH"
45203  new_path=`$CYGPATH -u "$path"`
45204
45205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45208  # "foo.exe" is OK but "foo" is an error.
45209  #
45210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45211  # It is also a way to make sure we got the proper file name for the real test later on.
45212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45213  if test "x$test_shortpath" = x; then
45214    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45215$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45216    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45217  fi
45218
45219  # Call helper function which possibly converts this using DOS-style short mode.
45220  # If so, the updated path is stored in $new_path.
45221
45222  input_path="$new_path"
45223  # Check if we need to convert this using DOS-style short mode. If the path
45224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45225  # take no chances and rewrite it.
45226  # Note: m4 eats our [], so we need to use [ and ] instead.
45227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45228  if test "x$has_forbidden_chars" != x; then
45229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45233      # Going to short mode and back again did indeed matter. Since short mode is
45234      # case insensitive, let's make it lowercase to improve readability.
45235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45236      # Now convert it back to Unix-stile (cygpath)
45237      input_path=`$CYGPATH -u "$shortmode_path"`
45238      new_path="$input_path"
45239    fi
45240  fi
45241
45242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45243  if test "x$test_cygdrive_prefix" = x; then
45244    # As a simple fix, exclude /usr/bin since it's not a real path.
45245    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45247      # a path prefixed by /cygdrive for fixpath to work.
45248      new_path="$CYGWIN_ROOT_PATH$input_path"
45249    fi
45250  fi
45251
45252
45253  if test "x$path" != "x$new_path"; then
45254    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45256$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45257  fi
45258
45259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45260
45261  path="$POTENTIAL_FREETYPE_LIB_PATH"
45262  has_colon=`$ECHO $path | $GREP ^.:`
45263  new_path="$path"
45264  if test "x$has_colon" = x; then
45265    # Not in mixed or Windows style, start by that.
45266    new_path=`cmd //c echo $path`
45267  fi
45268
45269
45270  input_path="$new_path"
45271  # Check if we need to convert this using DOS-style short mode. If the path
45272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45273  # take no chances and rewrite it.
45274  # Note: m4 eats our [], so we need to use [ and ] instead.
45275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45276  if test "x$has_forbidden_chars" != x; then
45277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45279  fi
45280
45281
45282  windows_path="$new_path"
45283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45284    unix_path=`$CYGPATH -u "$windows_path"`
45285    new_path="$unix_path"
45286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45288    new_path="$unix_path"
45289  fi
45290
45291  if test "x$path" != "x$new_path"; then
45292    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45294$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45295  fi
45296
45297  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45298  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45299
45300  else
45301    # We're on a posix platform. Hooray! :)
45302    path="$POTENTIAL_FREETYPE_LIB_PATH"
45303    has_space=`$ECHO "$path" | $GREP " "`
45304    if test "x$has_space" != x; then
45305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45306$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45307      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45308    fi
45309
45310    # Use eval to expand a potential ~
45311    eval path="$path"
45312    if test ! -f "$path" && test ! -d "$path"; then
45313      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45314    fi
45315
45316    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45317  fi
45318
45319
45320    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45321    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45322$as_echo_n "checking for freetype includes... " >&6; }
45323    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45324$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45325    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45326    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45327$as_echo_n "checking for freetype libraries... " >&6; }
45328    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45329$as_echo "$FREETYPE_LIB_PATH" >&6; }
45330  fi
45331
45332            else
45333
45334  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45335  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
45336  METHOD="well-known location"
45337
45338  # First check if the files exists.
45339  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45340    # We found an arbitrary include file. That's a good sign.
45341    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45342$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45343    FOUND_FREETYPE=yes
45344
45345    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45346    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45347      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45348$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45349      FOUND_FREETYPE=no
45350    else
45351      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45352        # On Windows, we will need both .lib and .dll file.
45353        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45354          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45355$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45356          FOUND_FREETYPE=no
45357        fi
45358      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
45359        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45360        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45361      fi
45362    fi
45363  fi
45364
45365  if test "x$FOUND_FREETYPE" = xyes; then
45366
45367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45368
45369  # Input might be given as Windows format, start by converting to
45370  # unix format.
45371  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45372  new_path=`$CYGPATH -u "$path"`
45373
45374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45377  # "foo.exe" is OK but "foo" is an error.
45378  #
45379  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45380  # It is also a way to make sure we got the proper file name for the real test later on.
45381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45382  if test "x$test_shortpath" = x; then
45383    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45384$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45385    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45386  fi
45387
45388  # Call helper function which possibly converts this using DOS-style short mode.
45389  # If so, the updated path is stored in $new_path.
45390
45391  input_path="$new_path"
45392  # Check if we need to convert this using DOS-style short mode. If the path
45393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45394  # take no chances and rewrite it.
45395  # Note: m4 eats our [], so we need to use [ and ] instead.
45396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45397  if test "x$has_forbidden_chars" != x; then
45398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45402      # Going to short mode and back again did indeed matter. Since short mode is
45403      # case insensitive, let's make it lowercase to improve readability.
45404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45405      # Now convert it back to Unix-stile (cygpath)
45406      input_path=`$CYGPATH -u "$shortmode_path"`
45407      new_path="$input_path"
45408    fi
45409  fi
45410
45411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45412  if test "x$test_cygdrive_prefix" = x; then
45413    # As a simple fix, exclude /usr/bin since it's not a real path.
45414    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45416      # a path prefixed by /cygdrive for fixpath to work.
45417      new_path="$CYGWIN_ROOT_PATH$input_path"
45418    fi
45419  fi
45420
45421
45422  if test "x$path" != "x$new_path"; then
45423    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45425$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45426  fi
45427
45428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45429
45430  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45431  has_colon=`$ECHO $path | $GREP ^.:`
45432  new_path="$path"
45433  if test "x$has_colon" = x; then
45434    # Not in mixed or Windows style, start by that.
45435    new_path=`cmd //c echo $path`
45436  fi
45437
45438
45439  input_path="$new_path"
45440  # Check if we need to convert this using DOS-style short mode. If the path
45441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45442  # take no chances and rewrite it.
45443  # Note: m4 eats our [], so we need to use [ and ] instead.
45444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45445  if test "x$has_forbidden_chars" != x; then
45446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45448  fi
45449
45450
45451  windows_path="$new_path"
45452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45453    unix_path=`$CYGPATH -u "$windows_path"`
45454    new_path="$unix_path"
45455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45457    new_path="$unix_path"
45458  fi
45459
45460  if test "x$path" != "x$new_path"; then
45461    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45463$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45464  fi
45465
45466  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45467  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45468
45469  else
45470    # We're on a posix platform. Hooray! :)
45471    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45472    has_space=`$ECHO "$path" | $GREP " "`
45473    if test "x$has_space" != x; then
45474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45475$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45476      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45477    fi
45478
45479    # Use eval to expand a potential ~
45480    eval path="$path"
45481    if test ! -f "$path" && test ! -d "$path"; then
45482      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45483    fi
45484
45485    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45486  fi
45487
45488
45489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45490
45491  # Input might be given as Windows format, start by converting to
45492  # unix format.
45493  path="$POTENTIAL_FREETYPE_LIB_PATH"
45494  new_path=`$CYGPATH -u "$path"`
45495
45496  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45497  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45498  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45499  # "foo.exe" is OK but "foo" is an error.
45500  #
45501  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45502  # It is also a way to make sure we got the proper file name for the real test later on.
45503  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45504  if test "x$test_shortpath" = x; then
45505    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45506$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45507    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45508  fi
45509
45510  # Call helper function which possibly converts this using DOS-style short mode.
45511  # If so, the updated path is stored in $new_path.
45512
45513  input_path="$new_path"
45514  # Check if we need to convert this using DOS-style short mode. If the path
45515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45516  # take no chances and rewrite it.
45517  # Note: m4 eats our [], so we need to use [ and ] instead.
45518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45519  if test "x$has_forbidden_chars" != x; then
45520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45524      # Going to short mode and back again did indeed matter. Since short mode is
45525      # case insensitive, let's make it lowercase to improve readability.
45526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45527      # Now convert it back to Unix-stile (cygpath)
45528      input_path=`$CYGPATH -u "$shortmode_path"`
45529      new_path="$input_path"
45530    fi
45531  fi
45532
45533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45534  if test "x$test_cygdrive_prefix" = x; then
45535    # As a simple fix, exclude /usr/bin since it's not a real path.
45536    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45538      # a path prefixed by /cygdrive for fixpath to work.
45539      new_path="$CYGWIN_ROOT_PATH$input_path"
45540    fi
45541  fi
45542
45543
45544  if test "x$path" != "x$new_path"; then
45545    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45547$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45548  fi
45549
45550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45551
45552  path="$POTENTIAL_FREETYPE_LIB_PATH"
45553  has_colon=`$ECHO $path | $GREP ^.:`
45554  new_path="$path"
45555  if test "x$has_colon" = x; then
45556    # Not in mixed or Windows style, start by that.
45557    new_path=`cmd //c echo $path`
45558  fi
45559
45560
45561  input_path="$new_path"
45562  # Check if we need to convert this using DOS-style short mode. If the path
45563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45564  # take no chances and rewrite it.
45565  # Note: m4 eats our [], so we need to use [ and ] instead.
45566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45567  if test "x$has_forbidden_chars" != x; then
45568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45569    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45570  fi
45571
45572
45573  windows_path="$new_path"
45574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45575    unix_path=`$CYGPATH -u "$windows_path"`
45576    new_path="$unix_path"
45577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45579    new_path="$unix_path"
45580  fi
45581
45582  if test "x$path" != "x$new_path"; then
45583    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45585$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45586  fi
45587
45588  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45589  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45590
45591  else
45592    # We're on a posix platform. Hooray! :)
45593    path="$POTENTIAL_FREETYPE_LIB_PATH"
45594    has_space=`$ECHO "$path" | $GREP " "`
45595    if test "x$has_space" != x; then
45596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45597$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45598      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45599    fi
45600
45601    # Use eval to expand a potential ~
45602    eval path="$path"
45603    if test ! -f "$path" && test ! -d "$path"; then
45604      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45605    fi
45606
45607    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45608  fi
45609
45610
45611    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45612    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45613$as_echo_n "checking for freetype includes... " >&6; }
45614    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45615$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45616    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45617    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45618$as_echo_n "checking for freetype libraries... " >&6; }
45619    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45620$as_echo "$FREETYPE_LIB_PATH" >&6; }
45621  fi
45622
45623              if test "x$FOUND_FREETYPE" != xyes; then
45624
45625  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45626  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
45627  METHOD="well-known location"
45628
45629  # First check if the files exists.
45630  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45631    # We found an arbitrary include file. That's a good sign.
45632    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45633$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45634    FOUND_FREETYPE=yes
45635
45636    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45637    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45638      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45639$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45640      FOUND_FREETYPE=no
45641    else
45642      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45643        # On Windows, we will need both .lib and .dll file.
45644        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45645          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45646$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45647          FOUND_FREETYPE=no
45648        fi
45649      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
45650        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45651        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45652      fi
45653    fi
45654  fi
45655
45656  if test "x$FOUND_FREETYPE" = xyes; then
45657
45658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45659
45660  # Input might be given as Windows format, start by converting to
45661  # unix format.
45662  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45663  new_path=`$CYGPATH -u "$path"`
45664
45665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45668  # "foo.exe" is OK but "foo" is an error.
45669  #
45670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45671  # It is also a way to make sure we got the proper file name for the real test later on.
45672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45673  if test "x$test_shortpath" = x; then
45674    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45675$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45676    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45677  fi
45678
45679  # Call helper function which possibly converts this using DOS-style short mode.
45680  # If so, the updated path is stored in $new_path.
45681
45682  input_path="$new_path"
45683  # Check if we need to convert this using DOS-style short mode. If the path
45684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45685  # take no chances and rewrite it.
45686  # Note: m4 eats our [], so we need to use [ and ] instead.
45687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45688  if test "x$has_forbidden_chars" != x; then
45689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45693      # Going to short mode and back again did indeed matter. Since short mode is
45694      # case insensitive, let's make it lowercase to improve readability.
45695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45696      # Now convert it back to Unix-stile (cygpath)
45697      input_path=`$CYGPATH -u "$shortmode_path"`
45698      new_path="$input_path"
45699    fi
45700  fi
45701
45702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45703  if test "x$test_cygdrive_prefix" = x; then
45704    # As a simple fix, exclude /usr/bin since it's not a real path.
45705    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45707      # a path prefixed by /cygdrive for fixpath to work.
45708      new_path="$CYGWIN_ROOT_PATH$input_path"
45709    fi
45710  fi
45711
45712
45713  if test "x$path" != "x$new_path"; then
45714    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45716$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45717  fi
45718
45719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45720
45721  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45722  has_colon=`$ECHO $path | $GREP ^.:`
45723  new_path="$path"
45724  if test "x$has_colon" = x; then
45725    # Not in mixed or Windows style, start by that.
45726    new_path=`cmd //c echo $path`
45727  fi
45728
45729
45730  input_path="$new_path"
45731  # Check if we need to convert this using DOS-style short mode. If the path
45732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45733  # take no chances and rewrite it.
45734  # Note: m4 eats our [], so we need to use [ and ] instead.
45735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45736  if test "x$has_forbidden_chars" != x; then
45737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45739  fi
45740
45741
45742  windows_path="$new_path"
45743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45744    unix_path=`$CYGPATH -u "$windows_path"`
45745    new_path="$unix_path"
45746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45748    new_path="$unix_path"
45749  fi
45750
45751  if test "x$path" != "x$new_path"; then
45752    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45754$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45755  fi
45756
45757  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45758  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45759
45760  else
45761    # We're on a posix platform. Hooray! :)
45762    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45763    has_space=`$ECHO "$path" | $GREP " "`
45764    if test "x$has_space" != x; then
45765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45766$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45767      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45768    fi
45769
45770    # Use eval to expand a potential ~
45771    eval path="$path"
45772    if test ! -f "$path" && test ! -d "$path"; then
45773      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45774    fi
45775
45776    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45777  fi
45778
45779
45780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45781
45782  # Input might be given as Windows format, start by converting to
45783  # unix format.
45784  path="$POTENTIAL_FREETYPE_LIB_PATH"
45785  new_path=`$CYGPATH -u "$path"`
45786
45787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45790  # "foo.exe" is OK but "foo" is an error.
45791  #
45792  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45793  # It is also a way to make sure we got the proper file name for the real test later on.
45794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45795  if test "x$test_shortpath" = x; then
45796    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45797$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45798    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45799  fi
45800
45801  # Call helper function which possibly converts this using DOS-style short mode.
45802  # If so, the updated path is stored in $new_path.
45803
45804  input_path="$new_path"
45805  # Check if we need to convert this using DOS-style short mode. If the path
45806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45807  # take no chances and rewrite it.
45808  # Note: m4 eats our [], so we need to use [ and ] instead.
45809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45810  if test "x$has_forbidden_chars" != x; then
45811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45815      # Going to short mode and back again did indeed matter. Since short mode is
45816      # case insensitive, let's make it lowercase to improve readability.
45817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45818      # Now convert it back to Unix-stile (cygpath)
45819      input_path=`$CYGPATH -u "$shortmode_path"`
45820      new_path="$input_path"
45821    fi
45822  fi
45823
45824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45825  if test "x$test_cygdrive_prefix" = x; then
45826    # As a simple fix, exclude /usr/bin since it's not a real path.
45827    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45829      # a path prefixed by /cygdrive for fixpath to work.
45830      new_path="$CYGWIN_ROOT_PATH$input_path"
45831    fi
45832  fi
45833
45834
45835  if test "x$path" != "x$new_path"; then
45836    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45838$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45839  fi
45840
45841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45842
45843  path="$POTENTIAL_FREETYPE_LIB_PATH"
45844  has_colon=`$ECHO $path | $GREP ^.:`
45845  new_path="$path"
45846  if test "x$has_colon" = x; then
45847    # Not in mixed or Windows style, start by that.
45848    new_path=`cmd //c echo $path`
45849  fi
45850
45851
45852  input_path="$new_path"
45853  # Check if we need to convert this using DOS-style short mode. If the path
45854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45855  # take no chances and rewrite it.
45856  # Note: m4 eats our [], so we need to use [ and ] instead.
45857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45858  if test "x$has_forbidden_chars" != x; then
45859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45861  fi
45862
45863
45864  windows_path="$new_path"
45865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45866    unix_path=`$CYGPATH -u "$windows_path"`
45867    new_path="$unix_path"
45868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45870    new_path="$unix_path"
45871  fi
45872
45873  if test "x$path" != "x$new_path"; then
45874    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45876$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45877  fi
45878
45879  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45880  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45881
45882  else
45883    # We're on a posix platform. Hooray! :)
45884    path="$POTENTIAL_FREETYPE_LIB_PATH"
45885    has_space=`$ECHO "$path" | $GREP " "`
45886    if test "x$has_space" != x; then
45887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45888$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45889      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45890    fi
45891
45892    # Use eval to expand a potential ~
45893    eval path="$path"
45894    if test ! -f "$path" && test ! -d "$path"; then
45895      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45896    fi
45897
45898    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45899  fi
45900
45901
45902    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45903    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45904$as_echo_n "checking for freetype includes... " >&6; }
45905    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45906$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45907    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45908    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45909$as_echo_n "checking for freetype libraries... " >&6; }
45910    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45911$as_echo "$FREETYPE_LIB_PATH" >&6; }
45912  fi
45913
45914              fi
45915            fi
45916          fi
45917        fi
45918      fi # end check in well-known locations
45919
45920      if test "x$FOUND_FREETYPE" != xyes; then
45921
45922  # Print a helpful message on how to acquire the necessary build dependency.
45923  # freetype is the help tag: freetype, cups, pulse, alsa etc
45924  MISSING_DEPENDENCY=freetype
45925
45926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45927    cygwin_help $MISSING_DEPENDENCY
45928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45929    msys_help $MISSING_DEPENDENCY
45930  else
45931    PKGHANDLER_COMMAND=
45932
45933    case $PKGHANDLER in
45934      apt-get)
45935        apt_help     $MISSING_DEPENDENCY ;;
45936      yum)
45937        yum_help     $MISSING_DEPENDENCY ;;
45938      port)
45939        port_help    $MISSING_DEPENDENCY ;;
45940      pkgutil)
45941        pkgutil_help $MISSING_DEPENDENCY ;;
45942      pkgadd)
45943        pkgadd_help  $MISSING_DEPENDENCY ;;
45944    esac
45945
45946    if test "x$PKGHANDLER_COMMAND" != x; then
45947      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45948    fi
45949  fi
45950
45951        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
45952      fi
45953    fi # end user specified settings
45954
45955    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
45956    if test "x$FREETYPE_CFLAGS" = x; then
45957
45958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45959
45960  # Input might be given as Windows format, start by converting to
45961  # unix format.
45962  path="$FREETYPE_INCLUDE_PATH"
45963  new_path=`$CYGPATH -u "$path"`
45964
45965  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45966  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45967  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45968  # "foo.exe" is OK but "foo" is an error.
45969  #
45970  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45971  # It is also a way to make sure we got the proper file name for the real test later on.
45972  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45973  if test "x$test_shortpath" = x; then
45974    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45975$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45976    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
45977  fi
45978
45979  # Call helper function which possibly converts this using DOS-style short mode.
45980  # If so, the updated path is stored in $new_path.
45981
45982  input_path="$new_path"
45983  # Check if we need to convert this using DOS-style short mode. If the path
45984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45985  # take no chances and rewrite it.
45986  # Note: m4 eats our [], so we need to use [ and ] instead.
45987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45988  if test "x$has_forbidden_chars" != x; then
45989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45990    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45991    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45992    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45993      # Going to short mode and back again did indeed matter. Since short mode is
45994      # case insensitive, let's make it lowercase to improve readability.
45995      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45996      # Now convert it back to Unix-stile (cygpath)
45997      input_path=`$CYGPATH -u "$shortmode_path"`
45998      new_path="$input_path"
45999    fi
46000  fi
46001
46002  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46003  if test "x$test_cygdrive_prefix" = x; then
46004    # As a simple fix, exclude /usr/bin since it's not a real path.
46005    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46006      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46007      # a path prefixed by /cygdrive for fixpath to work.
46008      new_path="$CYGWIN_ROOT_PATH$input_path"
46009    fi
46010  fi
46011
46012
46013  if test "x$path" != "x$new_path"; then
46014    FREETYPE_INCLUDE_PATH="$new_path"
46015    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46016$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46017  fi
46018
46019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46020
46021  path="$FREETYPE_INCLUDE_PATH"
46022  has_colon=`$ECHO $path | $GREP ^.:`
46023  new_path="$path"
46024  if test "x$has_colon" = x; then
46025    # Not in mixed or Windows style, start by that.
46026    new_path=`cmd //c echo $path`
46027  fi
46028
46029
46030  input_path="$new_path"
46031  # Check if we need to convert this using DOS-style short mode. If the path
46032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46033  # take no chances and rewrite it.
46034  # Note: m4 eats our [], so we need to use [ and ] instead.
46035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46036  if test "x$has_forbidden_chars" != x; then
46037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46038    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46039  fi
46040
46041
46042  windows_path="$new_path"
46043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46044    unix_path=`$CYGPATH -u "$windows_path"`
46045    new_path="$unix_path"
46046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46048    new_path="$unix_path"
46049  fi
46050
46051  if test "x$path" != "x$new_path"; then
46052    FREETYPE_INCLUDE_PATH="$new_path"
46053    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46054$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46055  fi
46056
46057  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46058  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46059
46060  else
46061    # We're on a posix platform. Hooray! :)
46062    path="$FREETYPE_INCLUDE_PATH"
46063    has_space=`$ECHO "$path" | $GREP " "`
46064    if test "x$has_space" != x; then
46065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46066$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46067      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46068    fi
46069
46070    # Use eval to expand a potential ~
46071    eval path="$path"
46072    if test ! -f "$path" && test ! -d "$path"; then
46073      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46074    fi
46075
46076    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46077  fi
46078
46079      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
46080        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
46081      else
46082        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
46083      fi
46084    fi
46085
46086    if test "x$FREETYPE_LIBS" = x; then
46087
46088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46089
46090  # Input might be given as Windows format, start by converting to
46091  # unix format.
46092  path="$FREETYPE_LIB_PATH"
46093  new_path=`$CYGPATH -u "$path"`
46094
46095  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46096  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46097  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46098  # "foo.exe" is OK but "foo" is an error.
46099  #
46100  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46101  # It is also a way to make sure we got the proper file name for the real test later on.
46102  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46103  if test "x$test_shortpath" = x; then
46104    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46105$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46106    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
46107  fi
46108
46109  # Call helper function which possibly converts this using DOS-style short mode.
46110  # If so, the updated path is stored in $new_path.
46111
46112  input_path="$new_path"
46113  # Check if we need to convert this using DOS-style short mode. If the path
46114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46115  # take no chances and rewrite it.
46116  # Note: m4 eats our [], so we need to use [ and ] instead.
46117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46118  if test "x$has_forbidden_chars" != x; then
46119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46123      # Going to short mode and back again did indeed matter. Since short mode is
46124      # case insensitive, let's make it lowercase to improve readability.
46125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46126      # Now convert it back to Unix-stile (cygpath)
46127      input_path=`$CYGPATH -u "$shortmode_path"`
46128      new_path="$input_path"
46129    fi
46130  fi
46131
46132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46133  if test "x$test_cygdrive_prefix" = x; then
46134    # As a simple fix, exclude /usr/bin since it's not a real path.
46135    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46137      # a path prefixed by /cygdrive for fixpath to work.
46138      new_path="$CYGWIN_ROOT_PATH$input_path"
46139    fi
46140  fi
46141
46142
46143  if test "x$path" != "x$new_path"; then
46144    FREETYPE_LIB_PATH="$new_path"
46145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46146$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46147  fi
46148
46149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46150
46151  path="$FREETYPE_LIB_PATH"
46152  has_colon=`$ECHO $path | $GREP ^.:`
46153  new_path="$path"
46154  if test "x$has_colon" = x; then
46155    # Not in mixed or Windows style, start by that.
46156    new_path=`cmd //c echo $path`
46157  fi
46158
46159
46160  input_path="$new_path"
46161  # Check if we need to convert this using DOS-style short mode. If the path
46162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46163  # take no chances and rewrite it.
46164  # Note: m4 eats our [], so we need to use [ and ] instead.
46165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46166  if test "x$has_forbidden_chars" != x; then
46167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46168    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46169  fi
46170
46171
46172  windows_path="$new_path"
46173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46174    unix_path=`$CYGPATH -u "$windows_path"`
46175    new_path="$unix_path"
46176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46178    new_path="$unix_path"
46179  fi
46180
46181  if test "x$path" != "x$new_path"; then
46182    FREETYPE_LIB_PATH="$new_path"
46183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46184$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46185  fi
46186
46187  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46188  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46189
46190  else
46191    # We're on a posix platform. Hooray! :)
46192    path="$FREETYPE_LIB_PATH"
46193    has_space=`$ECHO "$path" | $GREP " "`
46194    if test "x$has_space" != x; then
46195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46196$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46197      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46198    fi
46199
46200    # Use eval to expand a potential ~
46201    eval path="$path"
46202    if test ! -f "$path" && test ! -d "$path"; then
46203      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46204    fi
46205
46206    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46207  fi
46208
46209      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46210        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
46211      else
46212        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
46213      fi
46214    fi
46215
46216    # Try to compile it
46217    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
46218$as_echo_n "checking if we can compile and link with freetype... " >&6; }
46219    ac_ext=cpp
46220ac_cpp='$CXXCPP $CPPFLAGS'
46221ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46222ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46223ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46224
46225    PREV_CXXCFLAGS="$CXXFLAGS"
46226    PREV_LIBS="$LIBS"
46227    PREV_CXX="$CXX"
46228    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
46229    LIBS="$LIBS $FREETYPE_LIBS"
46230    CXX="$FIXPATH $CXX"
46231    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46232/* end confdefs.h.  */
46233
46234          #include<ft2build.h>
46235          #include FT_FREETYPE_H
46236          int main () {
46237            FT_Init_FreeType(NULL);
46238            return 0;
46239          }
46240
46241_ACEOF
46242if ac_fn_cxx_try_link "$LINENO"; then :
46243
46244          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46245$as_echo "yes" >&6; }
46246
46247else
46248
46249          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46250$as_echo "no" >&6; }
46251          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
46252$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
46253          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
46254$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
46255
46256
46257  # Print a helpful message on how to acquire the necessary build dependency.
46258  # freetype is the help tag: freetype, cups, pulse, alsa etc
46259  MISSING_DEPENDENCY=freetype
46260
46261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46262    cygwin_help $MISSING_DEPENDENCY
46263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46264    msys_help $MISSING_DEPENDENCY
46265  else
46266    PKGHANDLER_COMMAND=
46267
46268    case $PKGHANDLER in
46269      apt-get)
46270        apt_help     $MISSING_DEPENDENCY ;;
46271      yum)
46272        yum_help     $MISSING_DEPENDENCY ;;
46273      port)
46274        port_help    $MISSING_DEPENDENCY ;;
46275      pkgutil)
46276        pkgutil_help $MISSING_DEPENDENCY ;;
46277      pkgadd)
46278        pkgadd_help  $MISSING_DEPENDENCY ;;
46279    esac
46280
46281    if test "x$PKGHANDLER_COMMAND" != x; then
46282      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46283    fi
46284  fi
46285
46286
46287          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
46288
46289
46290fi
46291rm -f core conftest.err conftest.$ac_objext \
46292    conftest$ac_exeext conftest.$ac_ext
46293    CXXCFLAGS="$PREV_CXXFLAGS"
46294    LIBS="$PREV_LIBS"
46295    CXX="$PREV_CXX"
46296    ac_ext=cpp
46297ac_cpp='$CXXCPP $CPPFLAGS'
46298ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46299ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46300ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46301
46302
46303    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
46304$as_echo_n "checking if we should bundle freetype... " >&6; }
46305    if test "x$BUNDLE_FREETYPE" = xyes; then
46306      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
46307    fi
46308    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
46309$as_echo "$BUNDLE_FREETYPE" >&6; }
46310
46311  fi # end freetype needed
46312
46313
46314
46315
46316
46317
46318
46319  ###############################################################################
46320  #
46321  # Check for alsa headers and libraries. Used on Linux/GNU systems.
46322  #
46323
46324# Check whether --with-alsa was given.
46325if test "${with_alsa+set}" = set; then :
46326  withval=$with_alsa;
46327fi
46328
46329
46330# Check whether --with-alsa-include was given.
46331if test "${with_alsa_include+set}" = set; then :
46332  withval=$with_alsa_include;
46333fi
46334
46335
46336# Check whether --with-alsa-lib was given.
46337if test "${with_alsa_lib+set}" = set; then :
46338  withval=$with_alsa_lib;
46339fi
46340
46341
46342  if test "x$ALSA_NOT_NEEDED" = xyes; then
46343    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
46344      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
46345$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
46346    fi
46347    ALSA_CFLAGS=
46348    ALSA_LIBS=
46349  else
46350    ALSA_FOUND=no
46351
46352    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
46353      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
46354    fi
46355
46356    if test "x${with_alsa}" != x; then
46357      ALSA_LIBS="-L${with_alsa}/lib -lasound"
46358      ALSA_CFLAGS="-I${with_alsa}/include"
46359      ALSA_FOUND=yes
46360    fi
46361    if test "x${with_alsa_include}" != x; then
46362      ALSA_CFLAGS="-I${with_alsa_include}"
46363      ALSA_FOUND=yes
46364    fi
46365    if test "x${with_alsa_lib}" != x; then
46366      ALSA_LIBS="-L${with_alsa_lib} -lasound"
46367      ALSA_FOUND=yes
46368    fi
46369    if test "x$ALSA_FOUND" = xno; then
46370
46371
46372  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
46373    # Source the builddeps file again, to make sure it uses the latest variables!
46374    . $builddepsfile
46375    # Look for a target and build machine specific resource!
46376    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
46377    if test "x$resource" = x; then
46378      # Ok, lets instead look for a target specific resource
46379      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
46380    fi
46381    if test "x$resource" = x; then
46382      # Ok, lets instead look for a build specific resource
46383      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
46384    fi
46385    if test "x$resource" = x; then
46386      # Ok, lets instead look for a generic resource
46387      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
46388      resource=${builddep_alsa}
46389    fi
46390    if test "x$resource" != x; then
46391      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
46392$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
46393      # If the resource in the builddeps.conf file is an existing directory,
46394      # for example /java/linux/cups
46395      if test -d ${resource}; then
46396        depdir=${resource}
46397      else
46398
46399  # alsa is for example mymodule
46400  # $resource is for example libs/general/libmymod_1_2_3.zip
46401  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
46402  # $with_builddeps_dir is for example /localhome/builddeps
46403  # depdir is the name of the variable into which we store the depdir, eg MYMOD
46404  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
46405  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
46406  filename=`basename $resource`
46407  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
46408  filebase=${filename%%.*}
46409  extension=${filename#*.}
46410  installdir=$with_builddeps_dir/$filebase
46411  if test ! -f $installdir/$filename.unpacked; then
46412    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
46413$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
46414    if test ! -d $installdir; then
46415      mkdir -p $installdir
46416    fi
46417    if test ! -d $installdir; then
46418      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
46419    fi
46420    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
46421    touch $tmpfile
46422    if test ! -f $tmpfile; then
46423      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
46424    fi
46425
46426  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
46427  # $tmpfile is the local file name for the downloaded file.
46428  VALID_TOOL=no
46429  if test "x$BDEPS_FTP" = xwget; then
46430    VALID_TOOL=yes
46431    wget -O $tmpfile $with_builddeps_server/$resource
46432  fi
46433  if test "x$BDEPS_FTP" = xlftp; then
46434    VALID_TOOL=yes
46435    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
46436  fi
46437  if test "x$BDEPS_FTP" = xftp; then
46438    VALID_TOOL=yes
46439    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
46440    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
46441    FTPUSERPWD=${FTPSERVER%%@*}
46442    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
46443      FTPUSER=${userpwd%%:*}
46444      FTPPWD=${userpwd#*@}
46445      FTPSERVER=${FTPSERVER#*@}
46446    else
46447      FTPUSER=ftp
46448      FTPPWD=ftp
46449    fi
46450    # the "pass" command does not work on some
46451    # ftp clients (read ftp.exe) but if it works,
46452    # passive mode is better!
46453    ( \
46454        echo "user $FTPUSER $FTPPWD"        ; \
46455        echo "pass"                         ; \
46456        echo "bin"                          ; \
46457        echo "get $FTPPATH $tmpfile"              ; \
46458    ) | ftp -in $FTPSERVER
46459  fi
46460  if test "x$VALID_TOOL" != xyes; then
46461    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
46462  fi
46463
46464    mv $tmpfile $installdir/$filename
46465    if test ! -s $installdir/$filename; then
46466      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
46467    fi
46468    case "$extension" in
46469      zip)  echo "Unzipping $installdir/$filename..."
46470        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
46471        ;;
46472      tar.gz) echo "Untaring $installdir/$filename..."
46473        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46474        ;;
46475      tgz) echo "Untaring $installdir/$filename..."
46476        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46477        ;;
46478      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
46479        ;;
46480    esac
46481  fi
46482  if test -f $installdir/$filename.unpacked; then
46483    depdir=$installdir
46484  fi
46485
46486      fi
46487      # Source the builddeps file again, because in the previous command, the depdir
46488      # was updated to point at the current build dependency install directory.
46489      . $builddepsfile
46490      # Now extract variables from the builddeps.conf files.
46491      theroot=${builddep_alsa_ROOT}
46492      thecflags=${builddep_alsa_CFLAGS}
46493      thelibs=${builddep_alsa_LIBS}
46494      if test "x$depdir" = x; then
46495        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
46496      fi
46497      ALSA=$depdir
46498      if test "x$theroot" != x; then
46499        ALSA="$theroot"
46500      fi
46501      if test "x$thecflags" != x; then
46502        ALSA_CFLAGS="$thecflags"
46503      fi
46504      if test "x$thelibs" != x; then
46505        ALSA_LIBS="$thelibs"
46506      fi
46507      ALSA_FOUND=yes
46508      else ALSA_FOUND=no
46509
46510    fi
46511    else ALSA_FOUND=no
46512
46513  fi
46514
46515    fi
46516    if test "x$ALSA_FOUND" = xno; then
46517
46518pkg_failed=no
46519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
46520$as_echo_n "checking for ALSA... " >&6; }
46521
46522if test -n "$ALSA_CFLAGS"; then
46523    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
46524 elif test -n "$PKG_CONFIG"; then
46525    if test -n "$PKG_CONFIG" && \
46526    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46527  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46528  ac_status=$?
46529  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46530  test $ac_status = 0; }; then
46531  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
46532else
46533  pkg_failed=yes
46534fi
46535 else
46536    pkg_failed=untried
46537fi
46538if test -n "$ALSA_LIBS"; then
46539    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
46540 elif test -n "$PKG_CONFIG"; then
46541    if test -n "$PKG_CONFIG" && \
46542    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46543  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46544  ac_status=$?
46545  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46546  test $ac_status = 0; }; then
46547  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
46548else
46549  pkg_failed=yes
46550fi
46551 else
46552    pkg_failed=untried
46553fi
46554
46555
46556
46557if test $pkg_failed = yes; then
46558
46559if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
46560        _pkg_short_errors_supported=yes
46561else
46562        _pkg_short_errors_supported=no
46563fi
46564        if test $_pkg_short_errors_supported = yes; then
46565	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
46566        else
46567	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
46568        fi
46569	# Put the nasty error message in config.log where it belongs
46570	echo "$ALSA_PKG_ERRORS" >&5
46571
46572	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46573$as_echo "no" >&6; }
46574                ALSA_FOUND=no
46575elif test $pkg_failed = untried; then
46576	ALSA_FOUND=no
46577else
46578	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
46579	ALSA_LIBS=$pkg_cv_ALSA_LIBS
46580        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46581$as_echo "yes" >&6; }
46582	ALSA_FOUND=yes
46583fi
46584    fi
46585    if test "x$ALSA_FOUND" = xno; then
46586      for ac_header in alsa/asoundlib.h
46587do :
46588  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
46589if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
46590  cat >>confdefs.h <<_ACEOF
46591#define HAVE_ALSA_ASOUNDLIB_H 1
46592_ACEOF
46593
46594            ALSA_FOUND=yes
46595            ALSA_CFLAGS=-Iignoreme
46596            ALSA_LIBS=-lasound
46597            DEFAULT_ALSA=yes
46598
46599else
46600  ALSA_FOUND=no
46601fi
46602
46603done
46604
46605    fi
46606    if test "x$ALSA_FOUND" = xno; then
46607
46608  # Print a helpful message on how to acquire the necessary build dependency.
46609  # alsa is the help tag: freetype, cups, pulse, alsa etc
46610  MISSING_DEPENDENCY=alsa
46611
46612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46613    cygwin_help $MISSING_DEPENDENCY
46614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46615    msys_help $MISSING_DEPENDENCY
46616  else
46617    PKGHANDLER_COMMAND=
46618
46619    case $PKGHANDLER in
46620      apt-get)
46621        apt_help     $MISSING_DEPENDENCY ;;
46622      yum)
46623        yum_help     $MISSING_DEPENDENCY ;;
46624      port)
46625        port_help    $MISSING_DEPENDENCY ;;
46626      pkgutil)
46627        pkgutil_help $MISSING_DEPENDENCY ;;
46628      pkgadd)
46629        pkgadd_help  $MISSING_DEPENDENCY ;;
46630    esac
46631
46632    if test "x$PKGHANDLER_COMMAND" != x; then
46633      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46634    fi
46635  fi
46636
46637      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
46638    fi
46639  fi
46640
46641
46642
46643
46644
46645
46646  ###############################################################################
46647  #
46648  # Check for the jpeg library
46649  #
46650
46651  USE_EXTERNAL_LIBJPEG=true
46652  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
46653$as_echo_n "checking for main in -ljpeg... " >&6; }
46654if ${ac_cv_lib_jpeg_main+:} false; then :
46655  $as_echo_n "(cached) " >&6
46656else
46657  ac_check_lib_save_LIBS=$LIBS
46658LIBS="-ljpeg  $LIBS"
46659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46660/* end confdefs.h.  */
46661
46662
46663int
46664main ()
46665{
46666return main ();
46667  ;
46668  return 0;
46669}
46670_ACEOF
46671if ac_fn_cxx_try_link "$LINENO"; then :
46672  ac_cv_lib_jpeg_main=yes
46673else
46674  ac_cv_lib_jpeg_main=no
46675fi
46676rm -f core conftest.err conftest.$ac_objext \
46677    conftest$ac_exeext conftest.$ac_ext
46678LIBS=$ac_check_lib_save_LIBS
46679fi
46680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
46681$as_echo "$ac_cv_lib_jpeg_main" >&6; }
46682if test "x$ac_cv_lib_jpeg_main" = xyes; then :
46683  cat >>confdefs.h <<_ACEOF
46684#define HAVE_LIBJPEG 1
46685_ACEOF
46686
46687  LIBS="-ljpeg $LIBS"
46688
46689else
46690   USE_EXTERNAL_LIBJPEG=false
46691      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
46692$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
46693
46694fi
46695
46696
46697
46698  ###############################################################################
46699  #
46700  # Check for the gif library
46701  #
46702
46703
46704# Check whether --with-giflib was given.
46705if test "${with_giflib+set}" = set; then :
46706  withval=$with_giflib;
46707fi
46708
46709
46710
46711  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
46712$as_echo_n "checking for which giflib to use... " >&6; }
46713
46714  # default is bundled
46715  DEFAULT_GIFLIB=bundled
46716
46717  #
46718  # if user didn't specify, use DEFAULT_GIFLIB
46719  #
46720  if test "x${with_giflib}" = "x"; then
46721    with_giflib=${DEFAULT_GIFLIB}
46722  fi
46723
46724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
46725$as_echo "${with_giflib}" >&6; }
46726
46727  if test "x${with_giflib}" = "xbundled"; then
46728    USE_EXTERNAL_LIBGIF=false
46729  elif test "x${with_giflib}" = "xsystem"; then
46730    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
46731if test "x$ac_cv_header_gif_lib_h" = xyes; then :
46732
46733else
46734   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
46735fi
46736
46737
46738    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
46739$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
46740if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
46741  $as_echo_n "(cached) " >&6
46742else
46743  ac_check_lib_save_LIBS=$LIBS
46744LIBS="-lgif  $LIBS"
46745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46746/* end confdefs.h.  */
46747
46748/* Override any GCC internal prototype to avoid an error.
46749   Use char because int might match the return type of a GCC
46750   builtin and then its argument prototype would still apply.  */
46751#ifdef __cplusplus
46752extern "C"
46753#endif
46754char DGifGetCode ();
46755int
46756main ()
46757{
46758return DGifGetCode ();
46759  ;
46760  return 0;
46761}
46762_ACEOF
46763if ac_fn_cxx_try_link "$LINENO"; then :
46764  ac_cv_lib_gif_DGifGetCode=yes
46765else
46766  ac_cv_lib_gif_DGifGetCode=no
46767fi
46768rm -f core conftest.err conftest.$ac_objext \
46769    conftest$ac_exeext conftest.$ac_ext
46770LIBS=$ac_check_lib_save_LIBS
46771fi
46772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
46773$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
46774if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
46775  cat >>confdefs.h <<_ACEOF
46776#define HAVE_LIBGIF 1
46777_ACEOF
46778
46779  LIBS="-lgif $LIBS"
46780
46781else
46782   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
46783fi
46784
46785
46786    USE_EXTERNAL_LIBGIF=true
46787  else
46788    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
46789  fi
46790
46791
46792  ###############################################################################
46793  #
46794  # Check for the zlib library
46795  #
46796
46797
46798# Check whether --with-zlib was given.
46799if test "${with_zlib+set}" = set; then :
46800  withval=$with_zlib;
46801fi
46802
46803
46804  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
46805$as_echo_n "checking for compress in -lz... " >&6; }
46806if ${ac_cv_lib_z_compress+:} false; then :
46807  $as_echo_n "(cached) " >&6
46808else
46809  ac_check_lib_save_LIBS=$LIBS
46810LIBS="-lz  $LIBS"
46811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46812/* end confdefs.h.  */
46813
46814/* Override any GCC internal prototype to avoid an error.
46815   Use char because int might match the return type of a GCC
46816   builtin and then its argument prototype would still apply.  */
46817#ifdef __cplusplus
46818extern "C"
46819#endif
46820char compress ();
46821int
46822main ()
46823{
46824return compress ();
46825  ;
46826  return 0;
46827}
46828_ACEOF
46829if ac_fn_cxx_try_link "$LINENO"; then :
46830  ac_cv_lib_z_compress=yes
46831else
46832  ac_cv_lib_z_compress=no
46833fi
46834rm -f core conftest.err conftest.$ac_objext \
46835    conftest$ac_exeext conftest.$ac_ext
46836LIBS=$ac_check_lib_save_LIBS
46837fi
46838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
46839$as_echo "$ac_cv_lib_z_compress" >&6; }
46840if test "x$ac_cv_lib_z_compress" = xyes; then :
46841   ZLIB_FOUND=yes
46842else
46843   ZLIB_FOUND=no
46844fi
46845
46846
46847  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
46848$as_echo_n "checking for which zlib to use... " >&6; }
46849
46850  DEFAULT_ZLIB=bundled
46851  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46852    #
46853    # On macosx default is system...on others default is
46854    #
46855    DEFAULT_ZLIB=system
46856  fi
46857
46858  if test "x${ZLIB_FOUND}" != "xyes"; then
46859    #
46860    # If we don't find any system...set default to bundled
46861    #
46862    DEFAULT_ZLIB=bundled
46863  fi
46864
46865  #
46866  # If user didn't specify, use DEFAULT_ZLIB
46867  #
46868  if test "x${with_zlib}" = "x"; then
46869    with_zlib=${DEFAULT_ZLIB}
46870  fi
46871
46872  if test "x${with_zlib}" = "xbundled"; then
46873    USE_EXTERNAL_LIBZ=false
46874    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
46875$as_echo "bundled" >&6; }
46876  elif test "x${with_zlib}" = "xsystem"; then
46877    if test "x${ZLIB_FOUND}" = "xyes"; then
46878      USE_EXTERNAL_LIBZ=true
46879      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
46880$as_echo "system" >&6; }
46881    else
46882      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
46883$as_echo "system not found" >&6; }
46884      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
46885    fi
46886  else
46887    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
46888  fi
46889
46890
46891
46892  ###############################################################################
46893  LIBZIP_CAN_USE_MMAP=true
46894
46895
46896
46897  ###############################################################################
46898  #
46899  # Check if altzone exists in time.h
46900  #
46901
46902  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46903/* end confdefs.h.  */
46904#include <time.h>
46905int
46906main ()
46907{
46908return (int)altzone;
46909  ;
46910  return 0;
46911}
46912_ACEOF
46913if ac_fn_cxx_try_link "$LINENO"; then :
46914  has_altzone=yes
46915else
46916  has_altzone=no
46917fi
46918rm -f core conftest.err conftest.$ac_objext \
46919    conftest$ac_exeext conftest.$ac_ext
46920  if test "x$has_altzone" = xyes; then
46921
46922$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
46923
46924  fi
46925
46926  ###############################################################################
46927  #
46928  # Check the maths library
46929  #
46930
46931  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
46932$as_echo_n "checking for cos in -lm... " >&6; }
46933if ${ac_cv_lib_m_cos+:} false; then :
46934  $as_echo_n "(cached) " >&6
46935else
46936  ac_check_lib_save_LIBS=$LIBS
46937LIBS="-lm  $LIBS"
46938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46939/* end confdefs.h.  */
46940
46941/* Override any GCC internal prototype to avoid an error.
46942   Use char because int might match the return type of a GCC
46943   builtin and then its argument prototype would still apply.  */
46944#ifdef __cplusplus
46945extern "C"
46946#endif
46947char cos ();
46948int
46949main ()
46950{
46951return cos ();
46952  ;
46953  return 0;
46954}
46955_ACEOF
46956if ac_fn_cxx_try_link "$LINENO"; then :
46957  ac_cv_lib_m_cos=yes
46958else
46959  ac_cv_lib_m_cos=no
46960fi
46961rm -f core conftest.err conftest.$ac_objext \
46962    conftest$ac_exeext conftest.$ac_ext
46963LIBS=$ac_check_lib_save_LIBS
46964fi
46965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
46966$as_echo "$ac_cv_lib_m_cos" >&6; }
46967if test "x$ac_cv_lib_m_cos" = xyes; then :
46968  cat >>confdefs.h <<_ACEOF
46969#define HAVE_LIBM 1
46970_ACEOF
46971
46972  LIBS="-lm $LIBS"
46973
46974else
46975
46976        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
46977$as_echo "$as_me: Maths library was not found" >&6;}
46978
46979
46980fi
46981
46982
46983
46984  ###############################################################################
46985  #
46986  # Check for libdl.so
46987
46988  save_LIBS="$LIBS"
46989  LIBS=""
46990  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
46991$as_echo_n "checking for dlopen in -ldl... " >&6; }
46992if ${ac_cv_lib_dl_dlopen+:} false; then :
46993  $as_echo_n "(cached) " >&6
46994else
46995  ac_check_lib_save_LIBS=$LIBS
46996LIBS="-ldl  $LIBS"
46997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46998/* end confdefs.h.  */
46999
47000/* Override any GCC internal prototype to avoid an error.
47001   Use char because int might match the return type of a GCC
47002   builtin and then its argument prototype would still apply.  */
47003#ifdef __cplusplus
47004extern "C"
47005#endif
47006char dlopen ();
47007int
47008main ()
47009{
47010return dlopen ();
47011  ;
47012  return 0;
47013}
47014_ACEOF
47015if ac_fn_cxx_try_link "$LINENO"; then :
47016  ac_cv_lib_dl_dlopen=yes
47017else
47018  ac_cv_lib_dl_dlopen=no
47019fi
47020rm -f core conftest.err conftest.$ac_objext \
47021    conftest$ac_exeext conftest.$ac_ext
47022LIBS=$ac_check_lib_save_LIBS
47023fi
47024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
47025$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
47026if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
47027  cat >>confdefs.h <<_ACEOF
47028#define HAVE_LIBDL 1
47029_ACEOF
47030
47031  LIBS="-ldl $LIBS"
47032
47033fi
47034
47035  LIBDL="$LIBS"
47036
47037  LIBS="$save_LIBS"
47038
47039
47040  ###############################################################################
47041  #
47042  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47043  # dynamic build is configured on command line.
47044  #
47045
47046# Check whether --with-stdc++lib was given.
47047if test "${with_stdc__lib+set}" = set; then :
47048  withval=$with_stdc__lib;
47049        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47050                && test "x$with_stdc__lib" != xdefault; then
47051          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47052        fi
47053
47054else
47055  with_stdc__lib=default
47056
47057fi
47058
47059
47060  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47061    # Test if -lstdc++ works.
47062    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47063$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47064    ac_ext=cpp
47065ac_cpp='$CXXCPP $CPPFLAGS'
47066ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47067ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47068ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47069
47070    OLD_CXXFLAGS="$CXXFLAGS"
47071    CXXFLAGS="$CXXFLAGS -lstdc++"
47072    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47073/* end confdefs.h.  */
47074
47075int
47076main ()
47077{
47078return 0;
47079  ;
47080  return 0;
47081}
47082_ACEOF
47083if ac_fn_cxx_try_link "$LINENO"; then :
47084  has_dynamic_libstdcxx=yes
47085else
47086  has_dynamic_libstdcxx=no
47087fi
47088rm -f core conftest.err conftest.$ac_objext \
47089    conftest$ac_exeext conftest.$ac_ext
47090    CXXFLAGS="$OLD_CXXFLAGS"
47091    ac_ext=cpp
47092ac_cpp='$CXXCPP $CPPFLAGS'
47093ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47094ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47095ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47096
47097    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47098$as_echo "$has_dynamic_libstdcxx" >&6; }
47099
47100    # Test if stdc++ can be linked statically.
47101    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47102$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47103    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47104    ac_ext=cpp
47105ac_cpp='$CXXCPP $CPPFLAGS'
47106ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47107ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47108ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47109
47110    OLD_LIBS="$LIBS"
47111    OLD_CXX="$CXX"
47112    LIBS="$STATIC_STDCXX_FLAGS"
47113    CXX="$CC"
47114    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47115/* end confdefs.h.  */
47116
47117int
47118main ()
47119{
47120return 0;
47121  ;
47122  return 0;
47123}
47124_ACEOF
47125if ac_fn_cxx_try_link "$LINENO"; then :
47126  has_static_libstdcxx=yes
47127else
47128  has_static_libstdcxx=no
47129fi
47130rm -f core conftest.err conftest.$ac_objext \
47131    conftest$ac_exeext conftest.$ac_ext
47132    LIBS="$OLD_LIBS"
47133    CXX="$OLD_CXX"
47134    ac_ext=cpp
47135ac_cpp='$CXXCPP $CPPFLAGS'
47136ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47137ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47138ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47139
47140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47141$as_echo "$has_static_libstdcxx" >&6; }
47142
47143    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47144      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47145    fi
47146
47147    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47148      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47149    fi
47150
47151    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47152      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47153    fi
47154
47155    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47156$as_echo_n "checking how to link with libstdc++... " >&6; }
47157    # If dynamic was requested, it's available since it would fail above otherwise.
47158    # If dynamic wasn't requested, go with static unless it isn't available.
47159    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47160      LIBCXX="$LIBCXX -lstdc++"
47161      LDCXX="$CXX"
47162      STATIC_CXX_SETTING="STATIC_CXX=false"
47163      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47164$as_echo "dynamic" >&6; }
47165    else
47166      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47167      LDCXX="$CC"
47168      STATIC_CXX_SETTING="STATIC_CXX=true"
47169      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47170$as_echo "static" >&6; }
47171    fi
47172  fi
47173
47174
47175  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47176    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
47177
47178pkg_failed=no
47179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
47180$as_echo_n "checking for LIBFFI... " >&6; }
47181
47182if test -n "$LIBFFI_CFLAGS"; then
47183    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
47184 elif test -n "$PKG_CONFIG"; then
47185    if test -n "$PKG_CONFIG" && \
47186    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47187  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47188  ac_status=$?
47189  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47190  test $ac_status = 0; }; then
47191  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
47192else
47193  pkg_failed=yes
47194fi
47195 else
47196    pkg_failed=untried
47197fi
47198if test -n "$LIBFFI_LIBS"; then
47199    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
47200 elif test -n "$PKG_CONFIG"; then
47201    if test -n "$PKG_CONFIG" && \
47202    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47203  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47204  ac_status=$?
47205  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47206  test $ac_status = 0; }; then
47207  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
47208else
47209  pkg_failed=yes
47210fi
47211 else
47212    pkg_failed=untried
47213fi
47214
47215
47216
47217if test $pkg_failed = yes; then
47218
47219if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47220        _pkg_short_errors_supported=yes
47221else
47222        _pkg_short_errors_supported=no
47223fi
47224        if test $_pkg_short_errors_supported = yes; then
47225	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
47226        else
47227	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
47228        fi
47229	# Put the nasty error message in config.log where it belongs
47230	echo "$LIBFFI_PKG_ERRORS" >&5
47231
47232	as_fn_error $? "Package requirements (libffi) were not met:
47233
47234$LIBFFI_PKG_ERRORS
47235
47236Consider adjusting the PKG_CONFIG_PATH environment variable if you
47237installed software in a non-standard prefix.
47238
47239Alternatively, you may set the environment variables LIBFFI_CFLAGS
47240and LIBFFI_LIBS to avoid the need to call pkg-config.
47241See the pkg-config man page for more details.
47242" "$LINENO" 5
47243elif test $pkg_failed = untried; then
47244	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47245$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47246as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
47247is in your PATH or set the PKG_CONFIG environment variable to the full
47248path to pkg-config.
47249
47250Alternatively, you may set the environment variables LIBFFI_CFLAGS
47251and LIBFFI_LIBS to avoid the need to call pkg-config.
47252See the pkg-config man page for more details.
47253
47254To get pkg-config, see <http://pkg-config.freedesktop.org/>.
47255See \`config.log' for more details" "$LINENO" 5; }
47256else
47257	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
47258	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
47259        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47260$as_echo "yes" >&6; }
47261	:
47262fi
47263
47264  fi
47265
47266  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47267    # Extract the first word of "llvm-config", so it can be a program name with args.
47268set dummy llvm-config; ac_word=$2
47269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47270$as_echo_n "checking for $ac_word... " >&6; }
47271if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
47272  $as_echo_n "(cached) " >&6
47273else
47274  if test -n "$LLVM_CONFIG"; then
47275  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
47276else
47277as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47278for as_dir in $PATH
47279do
47280  IFS=$as_save_IFS
47281  test -z "$as_dir" && as_dir=.
47282    for ac_exec_ext in '' $ac_executable_extensions; do
47283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47284    ac_cv_prog_LLVM_CONFIG="llvm-config"
47285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47286    break 2
47287  fi
47288done
47289  done
47290IFS=$as_save_IFS
47291
47292fi
47293fi
47294LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
47295if test -n "$LLVM_CONFIG"; then
47296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
47297$as_echo "$LLVM_CONFIG" >&6; }
47298else
47299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47300$as_echo "no" >&6; }
47301fi
47302
47303
47304
47305    if test "x$LLVM_CONFIG" != xllvm-config; then
47306      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
47307    fi
47308
47309    llvm_components="jit mcjit engine nativecodegen native"
47310    unset LLVM_CFLAGS
47311    for flag in $("$LLVM_CONFIG" --cxxflags); do
47312      if echo "${flag}" | grep -q '^-[ID]'; then
47313        if test "${flag}" != "-D_DEBUG" ; then
47314          if test "${LLVM_CFLAGS}" != "" ; then
47315            LLVM_CFLAGS="${LLVM_CFLAGS} "
47316          fi
47317          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
47318        fi
47319      fi
47320    done
47321    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
47322    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
47323
47324    unset LLVM_LDFLAGS
47325    for flag in $("${LLVM_CONFIG}" --ldflags); do
47326      if echo "${flag}" | grep -q '^-L'; then
47327        if test "${LLVM_LDFLAGS}" != ""; then
47328          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
47329        fi
47330        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
47331      fi
47332    done
47333
47334    unset LLVM_LIBS
47335    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
47336      if echo "${flag}" | grep -q '^-l'; then
47337        if test "${LLVM_LIBS}" != ""; then
47338          LLVM_LIBS="${LLVM_LIBS} "
47339        fi
47340        LLVM_LIBS="${LLVM_LIBS}${flag}"
47341      fi
47342    done
47343
47344
47345
47346
47347  fi
47348
47349  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47350  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
47351    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47352  fi
47353
47354  # TODO better (platform agnostic) test
47355  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
47356    LIBCXX="-lstdc++"
47357  fi
47358
47359
47360
47361
47362  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47363
47364
47365# Check whether --with-msvcr-dll was given.
47366if test "${with_msvcr_dll+set}" = set; then :
47367  withval=$with_msvcr_dll;
47368fi
47369
47370
47371  if test "x$with_msvcr_dll" != x; then
47372    # If given explicitely by user, do not probe. If not present, fail directly.
47373
47374  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
47375  METHOD="--with-msvcr-dll"
47376  if test -e "$POSSIBLE_MSVCR_DLL"; then
47377    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47378$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47379
47380    # Need to check if the found msvcr is correct architecture
47381    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47382$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47383    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47384    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47385      CORRECT_MSVCR_ARCH=386
47386    else
47387      CORRECT_MSVCR_ARCH=x86-64
47388    fi
47389    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47390      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47391$as_echo "ok" >&6; }
47392      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47393      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47394$as_echo_n "checking for msvcr100.dll... " >&6; }
47395      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47396$as_echo "$MSVCR_DLL" >&6; }
47397    else
47398      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47399$as_echo "incorrect, ignoring" >&6; }
47400      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47401$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47402    fi
47403  fi
47404
47405    if test "x$MSVCR_DLL" = x; then
47406      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
47407    fi
47408  fi
47409
47410  if test "x$MSVCR_DLL" = x; then
47411    # Probe: Using well-known location from Visual Studio 10.0
47412    if test "x$VCINSTALLDIR" != x; then
47413      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
47414
47415  windows_path="$CYGWIN_VC_INSTALL_DIR"
47416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47417    unix_path=`$CYGPATH -u "$windows_path"`
47418    CYGWIN_VC_INSTALL_DIR="$unix_path"
47419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47421    CYGWIN_VC_INSTALL_DIR="$unix_path"
47422  fi
47423
47424      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47425        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
47426      else
47427        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
47428      fi
47429
47430  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47431  METHOD="well-known location in VCINSTALLDIR"
47432  if test -e "$POSSIBLE_MSVCR_DLL"; then
47433    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47434$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47435
47436    # Need to check if the found msvcr is correct architecture
47437    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47438$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47439    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47440    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47441      CORRECT_MSVCR_ARCH=386
47442    else
47443      CORRECT_MSVCR_ARCH=x86-64
47444    fi
47445    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47446      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47447$as_echo "ok" >&6; }
47448      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47449      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47450$as_echo_n "checking for msvcr100.dll... " >&6; }
47451      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47452$as_echo "$MSVCR_DLL" >&6; }
47453    else
47454      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47455$as_echo "incorrect, ignoring" >&6; }
47456      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47457$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47458    fi
47459  fi
47460
47461    fi
47462  fi
47463
47464  if test "x$MSVCR_DLL" = x; then
47465    # Probe: Check in the Boot JDK directory.
47466    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
47467
47468  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47469  METHOD="well-known location in Boot JDK"
47470  if test -e "$POSSIBLE_MSVCR_DLL"; then
47471    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47472$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47473
47474    # Need to check if the found msvcr is correct architecture
47475    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47476$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47477    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47478    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47479      CORRECT_MSVCR_ARCH=386
47480    else
47481      CORRECT_MSVCR_ARCH=x86-64
47482    fi
47483    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47484      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47485$as_echo "ok" >&6; }
47486      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47487      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47488$as_echo_n "checking for msvcr100.dll... " >&6; }
47489      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47490$as_echo "$MSVCR_DLL" >&6; }
47491    else
47492      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47493$as_echo "incorrect, ignoring" >&6; }
47494      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47495$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47496    fi
47497  fi
47498
47499  fi
47500
47501  if test "x$MSVCR_DLL" = x; then
47502    # Probe: Look in the Windows system32 directory
47503    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
47504
47505  windows_path="$CYGWIN_SYSTEMROOT"
47506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47507    unix_path=`$CYGPATH -u "$windows_path"`
47508    CYGWIN_SYSTEMROOT="$unix_path"
47509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47511    CYGWIN_SYSTEMROOT="$unix_path"
47512  fi
47513
47514    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
47515
47516  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47517  METHOD="well-known location in SYSTEMROOT"
47518  if test -e "$POSSIBLE_MSVCR_DLL"; then
47519    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47520$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47521
47522    # Need to check if the found msvcr is correct architecture
47523    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47524$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47525    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47526    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47527      CORRECT_MSVCR_ARCH=386
47528    else
47529      CORRECT_MSVCR_ARCH=x86-64
47530    fi
47531    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47532      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47533$as_echo "ok" >&6; }
47534      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47535      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47536$as_echo_n "checking for msvcr100.dll... " >&6; }
47537      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47538$as_echo "$MSVCR_DLL" >&6; }
47539    else
47540      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47541$as_echo "incorrect, ignoring" >&6; }
47542      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47543$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47544    fi
47545  fi
47546
47547  fi
47548
47549  if test "x$MSVCR_DLL" = x; then
47550    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
47551    if test "x$VS100COMNTOOLS" != x; then
47552      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
47553
47554  windows_path="$CYGWIN_VS_TOOLS_DIR"
47555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47556    unix_path=`$CYGPATH -u "$windows_path"`
47557    CYGWIN_VS_TOOLS_DIR="$unix_path"
47558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47560    CYGWIN_VS_TOOLS_DIR="$unix_path"
47561  fi
47562
47563      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47564        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
47565      else
47566        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
47567      fi
47568
47569  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47570  METHOD="search of VS100COMNTOOLS"
47571  if test -e "$POSSIBLE_MSVCR_DLL"; then
47572    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47573$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47574
47575    # Need to check if the found msvcr is correct architecture
47576    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47577$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47578    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47579    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47580      CORRECT_MSVCR_ARCH=386
47581    else
47582      CORRECT_MSVCR_ARCH=x86-64
47583    fi
47584    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47585      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47586$as_echo "ok" >&6; }
47587      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47588      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47589$as_echo_n "checking for msvcr100.dll... " >&6; }
47590      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47591$as_echo "$MSVCR_DLL" >&6; }
47592    else
47593      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47594$as_echo "incorrect, ignoring" >&6; }
47595      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47596$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47597    fi
47598  fi
47599
47600    fi
47601  fi
47602
47603  if test "x$MSVCR_DLL" = x; then
47604    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
47605    # (This was the original behaviour; kept since it might turn up something)
47606    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
47607      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47608        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
47609      else
47610        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
47611        if test "x$POSSIBLE_MSVCR_DLL" = x; then
47612          # We're grasping at straws now...
47613          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
47614        fi
47615      fi
47616
47617
47618  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47619  METHOD="search of VCINSTALLDIR"
47620  if test -e "$POSSIBLE_MSVCR_DLL"; then
47621    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47622$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47623
47624    # Need to check if the found msvcr is correct architecture
47625    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47626$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47627    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47628    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47629      CORRECT_MSVCR_ARCH=386
47630    else
47631      CORRECT_MSVCR_ARCH=x86-64
47632    fi
47633    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47634      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47635$as_echo "ok" >&6; }
47636      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47637      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47638$as_echo_n "checking for msvcr100.dll... " >&6; }
47639      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47640$as_echo "$MSVCR_DLL" >&6; }
47641    else
47642      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47643$as_echo "incorrect, ignoring" >&6; }
47644      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47645$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47646    fi
47647  fi
47648
47649    fi
47650  fi
47651
47652  if test "x$MSVCR_DLL" = x; then
47653    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47654$as_echo_n "checking for msvcr100.dll... " >&6; }
47655    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47656$as_echo "no" >&6; }
47657    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
47658  fi
47659
47660
47661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47662
47663  # Input might be given as Windows format, start by converting to
47664  # unix format.
47665  path="$MSVCR_DLL"
47666  new_path=`$CYGPATH -u "$path"`
47667
47668  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47669  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47670  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47671  # "foo.exe" is OK but "foo" is an error.
47672  #
47673  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47674  # It is also a way to make sure we got the proper file name for the real test later on.
47675  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47676  if test "x$test_shortpath" = x; then
47677    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
47678$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
47679    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
47680  fi
47681
47682  # Call helper function which possibly converts this using DOS-style short mode.
47683  # If so, the updated path is stored in $new_path.
47684
47685  input_path="$new_path"
47686  # Check if we need to convert this using DOS-style short mode. If the path
47687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47688  # take no chances and rewrite it.
47689  # Note: m4 eats our [], so we need to use [ and ] instead.
47690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47691  if test "x$has_forbidden_chars" != x; then
47692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47693    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47694    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47695    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47696      # Going to short mode and back again did indeed matter. Since short mode is
47697      # case insensitive, let's make it lowercase to improve readability.
47698      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47699      # Now convert it back to Unix-stile (cygpath)
47700      input_path=`$CYGPATH -u "$shortmode_path"`
47701      new_path="$input_path"
47702    fi
47703  fi
47704
47705  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47706  if test "x$test_cygdrive_prefix" = x; then
47707    # As a simple fix, exclude /usr/bin since it's not a real path.
47708    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47709      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47710      # a path prefixed by /cygdrive for fixpath to work.
47711      new_path="$CYGWIN_ROOT_PATH$input_path"
47712    fi
47713  fi
47714
47715
47716  if test "x$path" != "x$new_path"; then
47717    MSVCR_DLL="$new_path"
47718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
47719$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
47720  fi
47721
47722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47723
47724  path="$MSVCR_DLL"
47725  has_colon=`$ECHO $path | $GREP ^.:`
47726  new_path="$path"
47727  if test "x$has_colon" = x; then
47728    # Not in mixed or Windows style, start by that.
47729    new_path=`cmd //c echo $path`
47730  fi
47731
47732
47733  input_path="$new_path"
47734  # Check if we need to convert this using DOS-style short mode. If the path
47735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47736  # take no chances and rewrite it.
47737  # Note: m4 eats our [], so we need to use [ and ] instead.
47738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47739  if test "x$has_forbidden_chars" != x; then
47740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47742  fi
47743
47744
47745  windows_path="$new_path"
47746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47747    unix_path=`$CYGPATH -u "$windows_path"`
47748    new_path="$unix_path"
47749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47751    new_path="$unix_path"
47752  fi
47753
47754  if test "x$path" != "x$new_path"; then
47755    MSVCR_DLL="$new_path"
47756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
47757$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
47758  fi
47759
47760  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47761  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47762
47763  else
47764    # We're on a posix platform. Hooray! :)
47765    path="$MSVCR_DLL"
47766    has_space=`$ECHO "$path" | $GREP " "`
47767    if test "x$has_space" != x; then
47768      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
47769$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
47770      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47771    fi
47772
47773    # Use eval to expand a potential ~
47774    eval path="$path"
47775    if test ! -f "$path" && test ! -d "$path"; then
47776      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47777    fi
47778
47779    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
47780  fi
47781
47782
47783
47784
47785# Check whether --with-dxsdk was given.
47786if test "${with_dxsdk+set}" = set; then :
47787  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
47788$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
47789fi
47790
47791
47792
47793
47794# Check whether --with-dxsdk-lib was given.
47795if test "${with_dxsdk_lib+set}" = set; then :
47796  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
47797$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
47798fi
47799
47800
47801
47802
47803# Check whether --with-dxsdk-include was given.
47804if test "${with_dxsdk_include+set}" = set; then :
47805  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
47806$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
47807fi
47808
47809
47810  fi
47811
47812
47813
47814###############################################################################
47815#
47816# We need to do some final tweaking, when everything else is done.
47817#
47818###############################################################################
47819
47820
47821  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
47822
47823
47824  # The name of the Service Agent jar.
47825  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
47826  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47827    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
47828  fi
47829
47830
47831
47832    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
47833$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
47834
47835    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
47836      ENABLE_INTREE_EC=yes
47837      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47838$as_echo "yes" >&6; }
47839    else
47840      ENABLE_INTREE_EC=no
47841      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47842$as_echo "no" >&6; }
47843    fi
47844
47845
47846
47847
47848###############################################################################
47849#
47850# Configure parts of the build that only affect the build performance,
47851# not the result.
47852#
47853###############################################################################
47854
47855
47856  # How many cores do we have on this build system?
47857
47858# Check whether --with-num-cores was given.
47859if test "${with_num_cores+set}" = set; then :
47860  withval=$with_num_cores;
47861fi
47862
47863  if test "x$with_num_cores" = x; then
47864    # The number of cores were not specified, try to probe them.
47865
47866  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
47867$as_echo_n "checking for number of cores... " >&6; }
47868  NUM_CORES=1
47869  FOUND_CORES=no
47870
47871  if test -f /proc/cpuinfo; then
47872    # Looks like a Linux (or cygwin) system
47873    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
47874    FOUND_CORES=yes
47875  elif test -x /usr/sbin/psrinfo; then
47876    # Looks like a Solaris system
47877    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
47878    FOUND_CORES=yes
47879  elif test -x /usr/sbin/system_profiler; then
47880    # Looks like a MacOSX system
47881    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
47882    FOUND_CORES=yes
47883  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
47884    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
47885    FOUND_CORES=yes
47886  elif test -n "$NUMBER_OF_PROCESSORS"; then
47887    # On windows, look in the env
47888    NUM_CORES=$NUMBER_OF_PROCESSORS
47889    FOUND_CORES=yes
47890  fi
47891
47892  if test "x$FOUND_CORES" = xyes; then
47893    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
47894$as_echo "$NUM_CORES" >&6; }
47895  else
47896    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
47897$as_echo "could not detect number of cores, defaulting to 1" >&6; }
47898    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
47899$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
47900  fi
47901
47902  else
47903    NUM_CORES=$with_num_cores
47904  fi
47905
47906
47907
47908  # How much memory do we have on this build system?
47909
47910# Check whether --with-memory-size was given.
47911if test "${with_memory_size+set}" = set; then :
47912  withval=$with_memory_size;
47913fi
47914
47915  if test "x$with_memory_size" = x; then
47916    # The memory size was not specified, try to probe it.
47917
47918  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
47919$as_echo_n "checking for memory size... " >&6; }
47920  # Default to 1024 MB
47921  MEMORY_SIZE=1024
47922  FOUND_MEM=no
47923
47924  if test -f /proc/meminfo; then
47925    # Looks like a Linux (or cygwin) system
47926    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
47927    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
47928    FOUND_MEM=yes
47929  elif test -x /usr/sbin/prtconf; then
47930    # Looks like a Solaris or AIX system
47931    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
47932    FOUND_MEM=yes
47933  elif test -x /usr/sbin/system_profiler; then
47934    # Looks like a MacOSX system
47935    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
47936    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
47937    FOUND_MEM=yes
47938  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
47939    # Windows, but without cygwin
47940    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
47941    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
47942    FOUND_MEM=yes
47943  fi
47944
47945  if test "x$FOUND_MEM" = xyes; then
47946    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
47947$as_echo "$MEMORY_SIZE MB" >&6; }
47948  else
47949    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
47950$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
47951    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
47952$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
47953  fi
47954
47955  else
47956    MEMORY_SIZE=$with_memory_size
47957  fi
47958
47959
47960
47961  # Provide a decent default number of parallel jobs for make depending on
47962  # number of cores, amount of memory and machine architecture.
47963
47964# Check whether --with-jobs was given.
47965if test "${with_jobs+set}" = set; then :
47966  withval=$with_jobs;
47967fi
47968
47969  if test "x$with_jobs" = x; then
47970    # Number of jobs was not specified, calculate.
47971    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
47972$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
47973    # Approximate memory in GB, rounding up a bit.
47974    memory_gb=`expr $MEMORY_SIZE / 1100`
47975    # Pick the lowest of memory in gb and number of cores.
47976    if test "$memory_gb" -lt "$NUM_CORES"; then
47977      JOBS="$memory_gb"
47978    else
47979      JOBS="$NUM_CORES"
47980      # On bigger machines, leave some room for other processes to run
47981      if test "$JOBS" -gt "4"; then
47982        JOBS=`expr $JOBS '*' 90 / 100`
47983      fi
47984    fi
47985    # Cap number of jobs to 16
47986    if test "$JOBS" -gt "16"; then
47987      JOBS=16
47988    fi
47989    if test "$JOBS" -eq "0"; then
47990      JOBS=1
47991    fi
47992    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
47993$as_echo "$JOBS" >&6; }
47994  else
47995    JOBS=$with_jobs
47996  fi
47997
47998
47999
48000# Setup smart javac (after cores and memory have been setup)
48001
48002
48003# Check whether --with-sjavac-server-java was given.
48004if test "${with_sjavac_server_java+set}" = set; then :
48005  withval=$with_sjavac_server_java;
48006fi
48007
48008
48009  if test "x$with_sjavac_server_java" != x; then
48010    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
48011    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
48012    if test "x$FOUND_VERSION" = x; then
48013      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
48014    fi
48015  else
48016    SJAVAC_SERVER_JAVA=""
48017    # Hotspot specific options.
48018
48019  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
48020  $ECHO "Command: $JAVA -verbosegc -version" >&5
48021  OUTPUT=`$JAVA -verbosegc -version 2>&1`
48022  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48023  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48024  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48025    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
48026    JVM_ARG_OK=true
48027  else
48028    $ECHO "Arg failed:" >&5
48029    $ECHO "$OUTPUT" >&5
48030    JVM_ARG_OK=false
48031  fi
48032
48033    # JRockit specific options.
48034
48035  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
48036  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
48037  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
48038  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48039  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48040  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48041    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
48042    JVM_ARG_OK=true
48043  else
48044    $ECHO "Arg failed:" >&5
48045    $ECHO "$OUTPUT" >&5
48046    JVM_ARG_OK=false
48047  fi
48048
48049    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
48050  fi
48051
48052
48053  if test "$MEMORY_SIZE" -gt "2500"; then
48054
48055  $ECHO "Check if jvm arg is ok: -d64" >&5
48056  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
48057  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
48058  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48059  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48060  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48061    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
48062    JVM_ARG_OK=true
48063  else
48064    $ECHO "Arg failed:" >&5
48065    $ECHO "$OUTPUT" >&5
48066    JVM_ARG_OK=false
48067  fi
48068
48069    if test "$JVM_ARG_OK" = true; then
48070      JVM_64BIT=true
48071      JVM_ARG_OK=false
48072    fi
48073  fi
48074
48075  if test "$JVM_64BIT" = true; then
48076    if test "$MEMORY_SIZE" -gt "17000"; then
48077
48078  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
48079  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
48080  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
48081  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48082  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48083  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48084    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
48085    JVM_ARG_OK=true
48086  else
48087    $ECHO "Arg failed:" >&5
48088    $ECHO "$OUTPUT" >&5
48089    JVM_ARG_OK=false
48090  fi
48091
48092    fi
48093    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
48094
48095  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
48096  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
48097  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
48098  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48099  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48100  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48101    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
48102    JVM_ARG_OK=true
48103  else
48104    $ECHO "Arg failed:" >&5
48105    $ECHO "$OUTPUT" >&5
48106    JVM_ARG_OK=false
48107  fi
48108
48109    fi
48110    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
48111
48112  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
48113  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
48114  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
48115  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48116  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48117  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48118    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
48119    JVM_ARG_OK=true
48120  else
48121    $ECHO "Arg failed:" >&5
48122    $ECHO "$OUTPUT" >&5
48123    JVM_ARG_OK=false
48124  fi
48125
48126    fi
48127    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
48128
48129  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
48130  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
48131  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
48132  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48133  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48134  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48135    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
48136    JVM_ARG_OK=true
48137  else
48138    $ECHO "Arg failed:" >&5
48139    $ECHO "$OUTPUT" >&5
48140    JVM_ARG_OK=false
48141  fi
48142
48143    fi
48144  fi
48145  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
48146
48147  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
48148  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
48149  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
48150  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48151  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48152  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48153    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
48154    JVM_ARG_OK=true
48155  else
48156    $ECHO "Arg failed:" >&5
48157    $ECHO "$OUTPUT" >&5
48158    JVM_ARG_OK=false
48159  fi
48160
48161  fi
48162  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
48163
48164  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
48165  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
48166  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
48167  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48168  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48169  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48170    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
48171    JVM_ARG_OK=true
48172  else
48173    $ECHO "Arg failed:" >&5
48174    $ECHO "$OUTPUT" >&5
48175    JVM_ARG_OK=false
48176  fi
48177
48178  fi
48179  if test "$JVM_ARG_OK" = false; then
48180
48181  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
48182  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
48183  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
48184  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48185  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48186  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48187    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
48188    JVM_ARG_OK=true
48189  else
48190    $ECHO "Arg failed:" >&5
48191    $ECHO "$OUTPUT" >&5
48192    JVM_ARG_OK=false
48193  fi
48194
48195  fi
48196
48197  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
48198$as_echo_n "checking whether to use sjavac... " >&6; }
48199  # Check whether --enable-sjavac was given.
48200if test "${enable_sjavac+set}" = set; then :
48201  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
48202else
48203  ENABLE_SJAVAC='no'
48204fi
48205
48206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
48207$as_echo "$ENABLE_SJAVAC" >&6; }
48208
48209
48210  if test "x$ENABLE_SJAVAC" = xyes; then
48211    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
48212  else
48213    SJAVAC_SERVER_DIR=
48214  fi
48215
48216
48217
48218# Can the C/C++ compiler use precompiled headers?
48219
48220
48221  ###############################################################################
48222  #
48223  # Can the C/C++ compiler use precompiled headers?
48224  #
48225  # Check whether --enable-precompiled-headers was given.
48226if test "${enable_precompiled_headers+set}" = set; then :
48227  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
48228else
48229  ENABLE_PRECOMPH=yes
48230fi
48231
48232
48233  USE_PRECOMPILED_HEADER=1
48234  if test "x$ENABLE_PRECOMPH" = xno; then
48235    USE_PRECOMPILED_HEADER=0
48236  fi
48237
48238  if test "x$ENABLE_PRECOMPH" = xyes; then
48239    # Check that the compiler actually supports precomp headers.
48240    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48241      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
48242$as_echo_n "checking that precompiled headers work... " >&6; }
48243      echo "int alfa();" > conftest.h
48244      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
48245      if test ! -f conftest.hpp.gch; then
48246        USE_PRECOMPILED_HEADER=0
48247        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48248$as_echo "no" >&6; }
48249      else
48250        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48251$as_echo "yes" >&6; }
48252      fi
48253      rm -f conftest.h conftest.hpp.gch
48254    fi
48255  fi
48256
48257
48258
48259
48260# Setup use of ccache, if available
48261
48262  # Check whether --enable-ccache was given.
48263if test "${enable_ccache+set}" = set; then :
48264  enableval=$enable_ccache;
48265fi
48266
48267
48268  CCACHE=
48269  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
48270$as_echo_n "checking is ccache enabled... " >&6; }
48271  ENABLE_CCACHE=$enable_ccache
48272  if test "x$enable_ccache" = xyes; then
48273    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48274$as_echo "yes" >&6; }
48275    OLD_PATH="$PATH"
48276    if test "x$TOOLS_DIR" != x; then
48277      PATH=$TOOLS_DIR:$PATH
48278    fi
48279
48280
48281
48282  # Publish this variable in the help.
48283
48284
48285  if test "x$CCACHE" = x; then
48286    # The variable is not set by user, try to locate tool using the code snippet
48287    for ac_prog in ccache
48288do
48289  # Extract the first word of "$ac_prog", so it can be a program name with args.
48290set dummy $ac_prog; ac_word=$2
48291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48292$as_echo_n "checking for $ac_word... " >&6; }
48293if ${ac_cv_path_CCACHE+:} false; then :
48294  $as_echo_n "(cached) " >&6
48295else
48296  case $CCACHE in
48297  [\\/]* | ?:[\\/]*)
48298  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48299  ;;
48300  *)
48301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48302for as_dir in $PATH
48303do
48304  IFS=$as_save_IFS
48305  test -z "$as_dir" && as_dir=.
48306    for ac_exec_ext in '' $ac_executable_extensions; do
48307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48308    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48310    break 2
48311  fi
48312done
48313  done
48314IFS=$as_save_IFS
48315
48316  ;;
48317esac
48318fi
48319CCACHE=$ac_cv_path_CCACHE
48320if test -n "$CCACHE"; then
48321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48322$as_echo "$CCACHE" >&6; }
48323else
48324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48325$as_echo "no" >&6; }
48326fi
48327
48328
48329  test -n "$CCACHE" && break
48330done
48331
48332  else
48333    # The variable is set, but is it from the command line or the environment?
48334
48335    # Try to remove the string !CCACHE! from our list.
48336    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
48337    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48338      # If it failed, the variable was not from the command line. Ignore it,
48339      # but warn the user (except for BASH, which is always set by the calling BASH).
48340      if test "xCCACHE" != xBASH; then
48341        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
48342$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
48343      fi
48344      # Try to locate tool using the code snippet
48345      for ac_prog in ccache
48346do
48347  # Extract the first word of "$ac_prog", so it can be a program name with args.
48348set dummy $ac_prog; ac_word=$2
48349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48350$as_echo_n "checking for $ac_word... " >&6; }
48351if ${ac_cv_path_CCACHE+:} false; then :
48352  $as_echo_n "(cached) " >&6
48353else
48354  case $CCACHE in
48355  [\\/]* | ?:[\\/]*)
48356  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48357  ;;
48358  *)
48359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48360for as_dir in $PATH
48361do
48362  IFS=$as_save_IFS
48363  test -z "$as_dir" && as_dir=.
48364    for ac_exec_ext in '' $ac_executable_extensions; do
48365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48366    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48368    break 2
48369  fi
48370done
48371  done
48372IFS=$as_save_IFS
48373
48374  ;;
48375esac
48376fi
48377CCACHE=$ac_cv_path_CCACHE
48378if test -n "$CCACHE"; then
48379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48380$as_echo "$CCACHE" >&6; }
48381else
48382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48383$as_echo "no" >&6; }
48384fi
48385
48386
48387  test -n "$CCACHE" && break
48388done
48389
48390    else
48391      # If it succeeded, then it was overridden by the user. We will use it
48392      # for the tool.
48393
48394      # First remove it from the list of overridden variables, so we can test
48395      # for unknown variables in the end.
48396      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48397
48398      # Check if the provided tool contains a complete path.
48399      tool_specified="$CCACHE"
48400      tool_basename="${tool_specified##*/}"
48401      if test "x$tool_basename" = "x$tool_specified"; then
48402        # A command without a complete path is provided, search $PATH.
48403        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
48404$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
48405        # Extract the first word of "$tool_basename", so it can be a program name with args.
48406set dummy $tool_basename; ac_word=$2
48407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48408$as_echo_n "checking for $ac_word... " >&6; }
48409if ${ac_cv_path_CCACHE+:} false; then :
48410  $as_echo_n "(cached) " >&6
48411else
48412  case $CCACHE in
48413  [\\/]* | ?:[\\/]*)
48414  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48415  ;;
48416  *)
48417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48418for as_dir in $PATH
48419do
48420  IFS=$as_save_IFS
48421  test -z "$as_dir" && as_dir=.
48422    for ac_exec_ext in '' $ac_executable_extensions; do
48423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48424    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48426    break 2
48427  fi
48428done
48429  done
48430IFS=$as_save_IFS
48431
48432  ;;
48433esac
48434fi
48435CCACHE=$ac_cv_path_CCACHE
48436if test -n "$CCACHE"; then
48437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48438$as_echo "$CCACHE" >&6; }
48439else
48440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48441$as_echo "no" >&6; }
48442fi
48443
48444
48445        if test "x$CCACHE" = x; then
48446          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48447        fi
48448      else
48449        # Otherwise we believe it is a complete path. Use it as it is.
48450        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
48451$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
48452        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
48453$as_echo_n "checking for CCACHE... " >&6; }
48454        if test ! -x "$tool_specified"; then
48455          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48456$as_echo "not found" >&6; }
48457          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
48458        fi
48459        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48460$as_echo "$tool_specified" >&6; }
48461      fi
48462    fi
48463  fi
48464
48465
48466
48467  if test "x$CCACHE" = x; then
48468    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
48469  fi
48470
48471
48472    CCACHE_STATUS="enabled"
48473    PATH="$OLD_PATH"
48474  elif test "x$enable_ccache" = xno; then
48475    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
48476$as_echo "no, explicitly disabled" >&6; }
48477  elif test "x$enable_ccache" = x; then
48478    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48479$as_echo "no" >&6; }
48480  else
48481    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
48482$as_echo "unknown" >&6; }
48483    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
48484  fi
48485
48486
48487
48488# Check whether --with-ccache-dir was given.
48489if test "${with_ccache_dir+set}" = set; then :
48490  withval=$with_ccache_dir;
48491fi
48492
48493
48494  if test "x$with_ccache_dir" != x; then
48495    # When using a non home ccache directory, assume the use is to share ccache files
48496    # with other users. Thus change the umask.
48497    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
48498    if test "x$CCACHE" = x; then
48499      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
48500$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
48501    fi
48502  fi
48503
48504  if test "x$CCACHE" != x; then
48505
48506  if test "x$CCACHE" != x; then
48507    # Only use ccache if it is 3.1.4 or later, which supports
48508    # precompiled headers.
48509    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
48510$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
48511    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
48512    if test "x$HAS_GOOD_CCACHE" = x; then
48513      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
48514$as_echo "no, disabling ccache" >&6; }
48515      CCACHE=
48516      CCACHE_STATUS="disabled"
48517    else
48518      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48519$as_echo "yes" >&6; }
48520      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
48521$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
48522      PUSHED_FLAGS="$CXXFLAGS"
48523      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
48524      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48525/* end confdefs.h.  */
48526
48527int
48528main ()
48529{
48530
48531  ;
48532  return 0;
48533}
48534_ACEOF
48535if ac_fn_cxx_try_compile "$LINENO"; then :
48536  CC_KNOWS_CCACHE_TRICK=yes
48537else
48538  CC_KNOWS_CCACHE_TRICK=no
48539fi
48540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48541      CXXFLAGS="$PUSHED_FLAGS"
48542      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
48543        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48544$as_echo "yes" >&6; }
48545      else
48546        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
48547$as_echo "no, disabling ccaching of precompiled headers" >&6; }
48548        CCACHE=
48549        CCACHE_STATUS="disabled"
48550      fi
48551    fi
48552  fi
48553
48554  if test "x$CCACHE" != x; then
48555    CCACHE_SLOPPINESS=time_macros
48556    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
48557    CCACHE_FLAGS=-fpch-preprocess
48558
48559    if test "x$SET_CCACHE_DIR" != x; then
48560      mkdir -p $CCACHE_DIR > /dev/null 2>&1
48561      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
48562    fi
48563  fi
48564
48565  fi
48566
48567
48568###############################################################################
48569#
48570# And now the finish...
48571#
48572###############################################################################
48573
48574# Check for some common pitfalls
48575
48576  if test x"$OPENJDK_BUILD_OS" = xwindows; then
48577    file_to_test="$SRC_ROOT/LICENSE"
48578    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
48579      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
48580    fi
48581  fi
48582
48583
48584  # Did user specify any unknown variables?
48585
48586  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
48587    # Replace the separating ! with spaces before presenting for end user.
48588    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
48589    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
48590$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
48591  fi
48592
48593
48594  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
48595$as_echo_n "checking if build directory is on local disk... " >&6; }
48596
48597  # df -l lists only local disks; if the given directory is not found then
48598  # a non-zero exit code is given
48599  if test "x$DF" = x; then
48600    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48601      # msys does not have df; use Windows "net use" instead.
48602      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
48603      if test "x$IS_NETWORK_DISK" = x; then
48604        OUTPUT_DIR_IS_LOCAL="yes"
48605      else
48606        OUTPUT_DIR_IS_LOCAL="no"
48607      fi
48608    else
48609      # No df here, say it's local
48610      OUTPUT_DIR_IS_LOCAL="yes"
48611    fi
48612  else
48613    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
48614      OUTPUT_DIR_IS_LOCAL="yes"
48615    else
48616      OUTPUT_DIR_IS_LOCAL="no"
48617    fi
48618  fi
48619
48620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
48621$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
48622
48623
48624
48625  # Check if the user has any old-style ALT_ variables set.
48626  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
48627
48628  # Before generating output files, test if they exist. If they do, this is a reconfigure.
48629  # Since we can't properly handle the dependencies for this, warn the user about the situation
48630  if test -e $OUTPUT_ROOT/spec.gmk; then
48631    IS_RECONFIGURE=yes
48632  else
48633    IS_RECONFIGURE=no
48634  fi
48635
48636
48637# At the end, call the custom hook. (Dummy macro if no custom sources available)
48638
48639
48640# We're messing a bit with internal autoconf variables to put the config.status
48641# in the output directory instead of the current directory.
48642CONFIG_STATUS="$OUTPUT_ROOT/config.status"
48643
48644# Create the actual output files. Now the main work of configure is done.
48645cat >confcache <<\_ACEOF
48646# This file is a shell script that caches the results of configure
48647# tests run on this system so they can be shared between configure
48648# scripts and configure runs, see configure's option --config-cache.
48649# It is not useful on other systems.  If it contains results you don't
48650# want to keep, you may remove or edit it.
48651#
48652# config.status only pays attention to the cache file if you give it
48653# the --recheck option to rerun configure.
48654#
48655# `ac_cv_env_foo' variables (set or unset) will be overridden when
48656# loading this file, other *unset* `ac_cv_foo' will be assigned the
48657# following values.
48658
48659_ACEOF
48660
48661# The following way of writing the cache mishandles newlines in values,
48662# but we know of no workaround that is simple, portable, and efficient.
48663# So, we kill variables containing newlines.
48664# Ultrix sh set writes to stderr and can't be redirected directly,
48665# and sets the high bit in the cache file unless we assign to the vars.
48666(
48667  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
48668    eval ac_val=\$$ac_var
48669    case $ac_val in #(
48670    *${as_nl}*)
48671      case $ac_var in #(
48672      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
48673$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
48674      esac
48675      case $ac_var in #(
48676      _ | IFS | as_nl) ;; #(
48677      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
48678      *) { eval $ac_var=; unset $ac_var;} ;;
48679      esac ;;
48680    esac
48681  done
48682
48683  (set) 2>&1 |
48684    case $as_nl`(ac_space=' '; set) 2>&1` in #(
48685    *${as_nl}ac_space=\ *)
48686      # `set' does not quote correctly, so add quotes: double-quote
48687      # substitution turns \\\\ into \\, and sed turns \\ into \.
48688      sed -n \
48689	"s/'/'\\\\''/g;
48690	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
48691      ;; #(
48692    *)
48693      # `set' quotes correctly as required by POSIX, so do not add quotes.
48694      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
48695      ;;
48696    esac |
48697    sort
48698) |
48699  sed '
48700     /^ac_cv_env_/b end
48701     t clear
48702     :clear
48703     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
48704     t end
48705     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
48706     :end' >>confcache
48707if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
48708  if test -w "$cache_file"; then
48709    if test "x$cache_file" != "x/dev/null"; then
48710      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
48711$as_echo "$as_me: updating cache $cache_file" >&6;}
48712      if test ! -f "$cache_file" || test -h "$cache_file"; then
48713	cat confcache >"$cache_file"
48714      else
48715        case $cache_file in #(
48716        */* | ?:*)
48717	  mv -f confcache "$cache_file"$$ &&
48718	  mv -f "$cache_file"$$ "$cache_file" ;; #(
48719        *)
48720	  mv -f confcache "$cache_file" ;;
48721	esac
48722      fi
48723    fi
48724  else
48725    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
48726$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
48727  fi
48728fi
48729rm -f confcache
48730
48731test "x$prefix" = xNONE && prefix=$ac_default_prefix
48732# Let make expand exec_prefix.
48733test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
48734
48735DEFS=-DHAVE_CONFIG_H
48736
48737ac_libobjs=
48738ac_ltlibobjs=
48739U=
48740for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
48741  # 1. Remove the extension, and $U if already installed.
48742  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
48743  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
48744  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
48745  #    will be set to the directory where LIBOBJS objects are built.
48746  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
48747  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
48748done
48749LIBOBJS=$ac_libobjs
48750
48751LTLIBOBJS=$ac_ltlibobjs
48752
48753
48754
48755: "${CONFIG_STATUS=./config.status}"
48756ac_write_fail=0
48757ac_clean_files_save=$ac_clean_files
48758ac_clean_files="$ac_clean_files $CONFIG_STATUS"
48759{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
48760$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
48761as_write_fail=0
48762cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
48763#! $SHELL
48764# Generated by $as_me.
48765# Run this file to recreate the current configuration.
48766# Compiler output produced by configure, useful for debugging
48767# configure, is in config.log if it exists.
48768
48769debug=false
48770ac_cs_recheck=false
48771ac_cs_silent=false
48772
48773SHELL=\${CONFIG_SHELL-$SHELL}
48774export SHELL
48775_ASEOF
48776cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
48777## -------------------- ##
48778## M4sh Initialization. ##
48779## -------------------- ##
48780
48781# Be more Bourne compatible
48782DUALCASE=1; export DUALCASE # for MKS sh
48783if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
48784  emulate sh
48785  NULLCMD=:
48786  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
48787  # is contrary to our usage.  Disable this feature.
48788  alias -g '${1+"$@"}'='"$@"'
48789  setopt NO_GLOB_SUBST
48790else
48791  case `(set -o) 2>/dev/null` in #(
48792  *posix*) :
48793    set -o posix ;; #(
48794  *) :
48795     ;;
48796esac
48797fi
48798
48799
48800as_nl='
48801'
48802export as_nl
48803# Printing a long string crashes Solaris 7 /usr/bin/printf.
48804as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
48805as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48806as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
48807# Prefer a ksh shell builtin over an external printf program on Solaris,
48808# but without wasting forks for bash or zsh.
48809if test -z "$BASH_VERSION$ZSH_VERSION" \
48810    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48811  as_echo='print -r --'
48812  as_echo_n='print -rn --'
48813elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48814  as_echo='printf %s\n'
48815  as_echo_n='printf %s'
48816else
48817  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
48818    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
48819    as_echo_n='/usr/ucb/echo -n'
48820  else
48821    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
48822    as_echo_n_body='eval
48823      arg=$1;
48824      case $arg in #(
48825      *"$as_nl"*)
48826	expr "X$arg" : "X\\(.*\\)$as_nl";
48827	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
48828      esac;
48829      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
48830    '
48831    export as_echo_n_body
48832    as_echo_n='sh -c $as_echo_n_body as_echo'
48833  fi
48834  export as_echo_body
48835  as_echo='sh -c $as_echo_body as_echo'
48836fi
48837
48838# The user is always right.
48839if test "${PATH_SEPARATOR+set}" != set; then
48840  PATH_SEPARATOR=:
48841  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
48842    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
48843      PATH_SEPARATOR=';'
48844  }
48845fi
48846
48847
48848# IFS
48849# We need space, tab and new line, in precisely that order.  Quoting is
48850# there to prevent editors from complaining about space-tab.
48851# (If _AS_PATH_WALK were called with IFS unset, it would disable word
48852# splitting by setting IFS to empty value.)
48853IFS=" ""	$as_nl"
48854
48855# Find who we are.  Look in the path if we contain no directory separator.
48856as_myself=
48857case $0 in #((
48858  *[\\/]* ) as_myself=$0 ;;
48859  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48860for as_dir in $PATH
48861do
48862  IFS=$as_save_IFS
48863  test -z "$as_dir" && as_dir=.
48864    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
48865  done
48866IFS=$as_save_IFS
48867
48868     ;;
48869esac
48870# We did not find ourselves, most probably we were run as `sh COMMAND'
48871# in which case we are not to be found in the path.
48872if test "x$as_myself" = x; then
48873  as_myself=$0
48874fi
48875if test ! -f "$as_myself"; then
48876  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
48877  exit 1
48878fi
48879
48880# Unset variables that we do not need and which cause bugs (e.g. in
48881# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
48882# suppresses any "Segmentation fault" message there.  '((' could
48883# trigger a bug in pdksh 5.2.14.
48884for as_var in BASH_ENV ENV MAIL MAILPATH
48885do eval test x\${$as_var+set} = xset \
48886  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
48887done
48888PS1='$ '
48889PS2='> '
48890PS4='+ '
48891
48892# NLS nuisances.
48893LC_ALL=C
48894export LC_ALL
48895LANGUAGE=C
48896export LANGUAGE
48897
48898# CDPATH.
48899(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
48900
48901
48902# as_fn_error STATUS ERROR [LINENO LOG_FD]
48903# ----------------------------------------
48904# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
48905# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
48906# script with STATUS, using 1 if that was 0.
48907as_fn_error ()
48908{
48909  as_status=$1; test $as_status -eq 0 && as_status=1
48910  if test "$4"; then
48911    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
48912    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
48913  fi
48914  $as_echo "$as_me: error: $2" >&2
48915  as_fn_exit $as_status
48916} # as_fn_error
48917
48918
48919# as_fn_set_status STATUS
48920# -----------------------
48921# Set $? to STATUS, without forking.
48922as_fn_set_status ()
48923{
48924  return $1
48925} # as_fn_set_status
48926
48927# as_fn_exit STATUS
48928# -----------------
48929# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
48930as_fn_exit ()
48931{
48932  set +e
48933  as_fn_set_status $1
48934  exit $1
48935} # as_fn_exit
48936
48937# as_fn_unset VAR
48938# ---------------
48939# Portably unset VAR.
48940as_fn_unset ()
48941{
48942  { eval $1=; unset $1;}
48943}
48944as_unset=as_fn_unset
48945# as_fn_append VAR VALUE
48946# ----------------------
48947# Append the text in VALUE to the end of the definition contained in VAR. Take
48948# advantage of any shell optimizations that allow amortized linear growth over
48949# repeated appends, instead of the typical quadratic growth present in naive
48950# implementations.
48951if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
48952  eval 'as_fn_append ()
48953  {
48954    eval $1+=\$2
48955  }'
48956else
48957  as_fn_append ()
48958  {
48959    eval $1=\$$1\$2
48960  }
48961fi # as_fn_append
48962
48963# as_fn_arith ARG...
48964# ------------------
48965# Perform arithmetic evaluation on the ARGs, and store the result in the
48966# global $as_val. Take advantage of shells that can avoid forks. The arguments
48967# must be portable across $(()) and expr.
48968if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
48969  eval 'as_fn_arith ()
48970  {
48971    as_val=$(( $* ))
48972  }'
48973else
48974  as_fn_arith ()
48975  {
48976    as_val=`expr "$@" || test $? -eq 1`
48977  }
48978fi # as_fn_arith
48979
48980
48981if expr a : '\(a\)' >/dev/null 2>&1 &&
48982   test "X`expr 00001 : '.*\(...\)'`" = X001; then
48983  as_expr=expr
48984else
48985  as_expr=false
48986fi
48987
48988if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
48989  as_basename=basename
48990else
48991  as_basename=false
48992fi
48993
48994if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
48995  as_dirname=dirname
48996else
48997  as_dirname=false
48998fi
48999
49000as_me=`$as_basename -- "$0" ||
49001$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
49002	 X"$0" : 'X\(//\)$' \| \
49003	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
49004$as_echo X/"$0" |
49005    sed '/^.*\/\([^/][^/]*\)\/*$/{
49006	    s//\1/
49007	    q
49008	  }
49009	  /^X\/\(\/\/\)$/{
49010	    s//\1/
49011	    q
49012	  }
49013	  /^X\/\(\/\).*/{
49014	    s//\1/
49015	    q
49016	  }
49017	  s/.*/./; q'`
49018
49019# Avoid depending upon Character Ranges.
49020as_cr_letters='abcdefghijklmnopqrstuvwxyz'
49021as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
49022as_cr_Letters=$as_cr_letters$as_cr_LETTERS
49023as_cr_digits='0123456789'
49024as_cr_alnum=$as_cr_Letters$as_cr_digits
49025
49026ECHO_C= ECHO_N= ECHO_T=
49027case `echo -n x` in #(((((
49028-n*)
49029  case `echo 'xy\c'` in
49030  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
49031  xy)  ECHO_C='\c';;
49032  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
49033       ECHO_T='	';;
49034  esac;;
49035*)
49036  ECHO_N='-n';;
49037esac
49038
49039rm -f conf$$ conf$$.exe conf$$.file
49040if test -d conf$$.dir; then
49041  rm -f conf$$.dir/conf$$.file
49042else
49043  rm -f conf$$.dir
49044  mkdir conf$$.dir 2>/dev/null
49045fi
49046if (echo >conf$$.file) 2>/dev/null; then
49047  if ln -s conf$$.file conf$$ 2>/dev/null; then
49048    as_ln_s='ln -s'
49049    # ... but there are two gotchas:
49050    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
49051    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
49052    # In both cases, we have to default to `cp -pR'.
49053    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
49054      as_ln_s='cp -pR'
49055  elif ln conf$$.file conf$$ 2>/dev/null; then
49056    as_ln_s=ln
49057  else
49058    as_ln_s='cp -pR'
49059  fi
49060else
49061  as_ln_s='cp -pR'
49062fi
49063rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
49064rmdir conf$$.dir 2>/dev/null
49065
49066
49067# as_fn_mkdir_p
49068# -------------
49069# Create "$as_dir" as a directory, including parents if necessary.
49070as_fn_mkdir_p ()
49071{
49072
49073  case $as_dir in #(
49074  -*) as_dir=./$as_dir;;
49075  esac
49076  test -d "$as_dir" || eval $as_mkdir_p || {
49077    as_dirs=
49078    while :; do
49079      case $as_dir in #(
49080      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
49081      *) as_qdir=$as_dir;;
49082      esac
49083      as_dirs="'$as_qdir' $as_dirs"
49084      as_dir=`$as_dirname -- "$as_dir" ||
49085$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49086	 X"$as_dir" : 'X\(//\)[^/]' \| \
49087	 X"$as_dir" : 'X\(//\)$' \| \
49088	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
49089$as_echo X"$as_dir" |
49090    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49091	    s//\1/
49092	    q
49093	  }
49094	  /^X\(\/\/\)[^/].*/{
49095	    s//\1/
49096	    q
49097	  }
49098	  /^X\(\/\/\)$/{
49099	    s//\1/
49100	    q
49101	  }
49102	  /^X\(\/\).*/{
49103	    s//\1/
49104	    q
49105	  }
49106	  s/.*/./; q'`
49107      test -d "$as_dir" && break
49108    done
49109    test -z "$as_dirs" || eval "mkdir $as_dirs"
49110  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
49111
49112
49113} # as_fn_mkdir_p
49114if mkdir -p . 2>/dev/null; then
49115  as_mkdir_p='mkdir -p "$as_dir"'
49116else
49117  test -d ./-p && rmdir ./-p
49118  as_mkdir_p=false
49119fi
49120
49121
49122# as_fn_executable_p FILE
49123# -----------------------
49124# Test if FILE is an executable regular file.
49125as_fn_executable_p ()
49126{
49127  test -f "$1" && test -x "$1"
49128} # as_fn_executable_p
49129as_test_x='test -x'
49130as_executable_p=as_fn_executable_p
49131
49132# Sed expression to map a string onto a valid CPP name.
49133as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
49134
49135# Sed expression to map a string onto a valid variable name.
49136as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
49137
49138
49139exec 6>&1
49140## ----------------------------------- ##
49141## Main body of $CONFIG_STATUS script. ##
49142## ----------------------------------- ##
49143_ASEOF
49144test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
49145
49146cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49147# Save the log message, to keep $0 and so on meaningful, and to
49148# report actual input values of CONFIG_FILES etc. instead of their
49149# values after options handling.
49150ac_log="
49151This file was extended by OpenJDK $as_me jdk9, which was
49152generated by GNU Autoconf 2.69.  Invocation command line was
49153
49154  CONFIG_FILES    = $CONFIG_FILES
49155  CONFIG_HEADERS  = $CONFIG_HEADERS
49156  CONFIG_LINKS    = $CONFIG_LINKS
49157  CONFIG_COMMANDS = $CONFIG_COMMANDS
49158  $ $0 $@
49159
49160on `(hostname || uname -n) 2>/dev/null | sed 1q`
49161"
49162
49163_ACEOF
49164
49165case $ac_config_files in *"
49166"*) set x $ac_config_files; shift; ac_config_files=$*;;
49167esac
49168
49169case $ac_config_headers in *"
49170"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
49171esac
49172
49173
49174cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49175# Files that config.status was made for.
49176config_files="$ac_config_files"
49177config_headers="$ac_config_headers"
49178
49179_ACEOF
49180
49181cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49182ac_cs_usage="\
49183\`$as_me' instantiates files and other configuration actions
49184from templates according to the current configuration.  Unless the files
49185and actions are specified as TAGs, all are instantiated by default.
49186
49187Usage: $0 [OPTION]... [TAG]...
49188
49189  -h, --help       print this help, then exit
49190  -V, --version    print version number and configuration settings, then exit
49191      --config     print configuration, then exit
49192  -q, --quiet, --silent
49193                   do not print progress messages
49194  -d, --debug      don't remove temporary files
49195      --recheck    update $as_me by reconfiguring in the same conditions
49196      --file=FILE[:TEMPLATE]
49197                   instantiate the configuration file FILE
49198      --header=FILE[:TEMPLATE]
49199                   instantiate the configuration header FILE
49200
49201Configuration files:
49202$config_files
49203
49204Configuration headers:
49205$config_headers
49206
49207Report bugs to <build-dev@openjdk.java.net>.
49208OpenJDK home page: <http://openjdk.java.net>."
49209
49210_ACEOF
49211cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49212ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
49213ac_cs_version="\\
49214OpenJDK config.status jdk9
49215configured by $0, generated by GNU Autoconf 2.69,
49216  with options \\"\$ac_cs_config\\"
49217
49218Copyright (C) 2012 Free Software Foundation, Inc.
49219This config.status script is free software; the Free Software Foundation
49220gives unlimited permission to copy, distribute and modify it."
49221
49222ac_pwd='$ac_pwd'
49223srcdir='$srcdir'
49224AWK='$AWK'
49225test -n "\$AWK" || AWK=awk
49226_ACEOF
49227
49228cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49229# The default lists apply if the user does not specify any file.
49230ac_need_defaults=:
49231while test $# != 0
49232do
49233  case $1 in
49234  --*=?*)
49235    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49236    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
49237    ac_shift=:
49238    ;;
49239  --*=)
49240    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49241    ac_optarg=
49242    ac_shift=:
49243    ;;
49244  *)
49245    ac_option=$1
49246    ac_optarg=$2
49247    ac_shift=shift
49248    ;;
49249  esac
49250
49251  case $ac_option in
49252  # Handling of the options.
49253  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
49254    ac_cs_recheck=: ;;
49255  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
49256    $as_echo "$ac_cs_version"; exit ;;
49257  --config | --confi | --conf | --con | --co | --c )
49258    $as_echo "$ac_cs_config"; exit ;;
49259  --debug | --debu | --deb | --de | --d | -d )
49260    debug=: ;;
49261  --file | --fil | --fi | --f )
49262    $ac_shift
49263    case $ac_optarg in
49264    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49265    '') as_fn_error $? "missing file argument" ;;
49266    esac
49267    as_fn_append CONFIG_FILES " '$ac_optarg'"
49268    ac_need_defaults=false;;
49269  --header | --heade | --head | --hea )
49270    $ac_shift
49271    case $ac_optarg in
49272    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49273    esac
49274    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
49275    ac_need_defaults=false;;
49276  --he | --h)
49277    # Conflict between --help and --header
49278    as_fn_error $? "ambiguous option: \`$1'
49279Try \`$0 --help' for more information.";;
49280  --help | --hel | -h )
49281    $as_echo "$ac_cs_usage"; exit ;;
49282  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
49283  | -silent | --silent | --silen | --sile | --sil | --si | --s)
49284    ac_cs_silent=: ;;
49285
49286  # This is an error.
49287  -*) as_fn_error $? "unrecognized option: \`$1'
49288Try \`$0 --help' for more information." ;;
49289
49290  *) as_fn_append ac_config_targets " $1"
49291     ac_need_defaults=false ;;
49292
49293  esac
49294  shift
49295done
49296
49297ac_configure_extra_args=
49298
49299if $ac_cs_silent; then
49300  exec 6>/dev/null
49301  ac_configure_extra_args="$ac_configure_extra_args --silent"
49302fi
49303
49304_ACEOF
49305cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49306if \$ac_cs_recheck; then
49307  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
49308  shift
49309  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
49310  CONFIG_SHELL='$SHELL'
49311  export CONFIG_SHELL
49312  exec "\$@"
49313fi
49314
49315_ACEOF
49316cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49317exec 5>>config.log
49318{
49319  echo
49320  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
49321## Running $as_me. ##
49322_ASBOX
49323  $as_echo "$ac_log"
49324} >&5
49325
49326_ACEOF
49327cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49328_ACEOF
49329
49330cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49331
49332# Handling of arguments.
49333for ac_config_target in $ac_config_targets
49334do
49335  case $ac_config_target in
49336    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
49337    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
49338    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
49339    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
49340    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
49341    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
49342    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
49343
49344  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
49345  esac
49346done
49347
49348
49349# If the user did not use the arguments to specify the items to instantiate,
49350# then the envvar interface is used.  Set only those that are not.
49351# We use the long form for the default assignment because of an extremely
49352# bizarre bug on SunOS 4.1.3.
49353if $ac_need_defaults; then
49354  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
49355  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
49356fi
49357
49358# Have a temporary directory for convenience.  Make it in the build tree
49359# simply because there is no reason against having it here, and in addition,
49360# creating and moving files from /tmp can sometimes cause problems.
49361# Hook for its removal unless debugging.
49362# Note that there is a small window in which the directory will not be cleaned:
49363# after its creation but before its name has been assigned to `$tmp'.
49364$debug ||
49365{
49366  tmp= ac_tmp=
49367  trap 'exit_status=$?
49368  : "${ac_tmp:=$tmp}"
49369  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
49370' 0
49371  trap 'as_fn_exit 1' 1 2 13 15
49372}
49373# Create a (secure) tmp directory for tmp files.
49374
49375{
49376  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
49377  test -d "$tmp"
49378}  ||
49379{
49380  tmp=./conf$$-$RANDOM
49381  (umask 077 && mkdir "$tmp")
49382} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
49383ac_tmp=$tmp
49384
49385# Set up the scripts for CONFIG_FILES section.
49386# No need to generate them if there are no CONFIG_FILES.
49387# This happens for instance with `./config.status config.h'.
49388if test -n "$CONFIG_FILES"; then
49389
49390
49391ac_cr=`echo X | tr X '\015'`
49392# On cygwin, bash can eat \r inside `` if the user requested igncr.
49393# But we know of no other shell where ac_cr would be empty at this
49394# point, so we can use a bashism as a fallback.
49395if test "x$ac_cr" = x; then
49396  eval ac_cr=\$\'\\r\'
49397fi
49398ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
49399if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
49400  ac_cs_awk_cr='\\r'
49401else
49402  ac_cs_awk_cr=$ac_cr
49403fi
49404
49405echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
49406_ACEOF
49407
49408
49409{
49410  echo "cat >conf$$subs.awk <<_ACEOF" &&
49411  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
49412  echo "_ACEOF"
49413} >conf$$subs.sh ||
49414  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49415ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
49416ac_delim='%!_!# '
49417for ac_last_try in false false false false false :; do
49418  . ./conf$$subs.sh ||
49419    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49420
49421  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
49422  if test $ac_delim_n = $ac_delim_num; then
49423    break
49424  elif $ac_last_try; then
49425    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49426  else
49427    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49428  fi
49429done
49430rm -f conf$$subs.sh
49431
49432cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49433cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
49434_ACEOF
49435sed -n '
49436h
49437s/^/S["/; s/!.*/"]=/
49438p
49439g
49440s/^[^!]*!//
49441:repl
49442t repl
49443s/'"$ac_delim"'$//
49444t delim
49445:nl
49446h
49447s/\(.\{148\}\)..*/\1/
49448t more1
49449s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
49450p
49451n
49452b repl
49453:more1
49454s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49455p
49456g
49457s/.\{148\}//
49458t nl
49459:delim
49460h
49461s/\(.\{148\}\)..*/\1/
49462t more2
49463s/["\\]/\\&/g; s/^/"/; s/$/"/
49464p
49465b
49466:more2
49467s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49468p
49469g
49470s/.\{148\}//
49471t delim
49472' <conf$$subs.awk | sed '
49473/^[^""]/{
49474  N
49475  s/\n//
49476}
49477' >>$CONFIG_STATUS || ac_write_fail=1
49478rm -f conf$$subs.awk
49479cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49480_ACAWK
49481cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
49482  for (key in S) S_is_set[key] = 1
49483  FS = ""
49484
49485}
49486{
49487  line = $ 0
49488  nfields = split(line, field, "@")
49489  substed = 0
49490  len = length(field[1])
49491  for (i = 2; i < nfields; i++) {
49492    key = field[i]
49493    keylen = length(key)
49494    if (S_is_set[key]) {
49495      value = S[key]
49496      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
49497      len += length(value) + length(field[++i])
49498      substed = 1
49499    } else
49500      len += 1 + keylen
49501  }
49502
49503  print line
49504}
49505
49506_ACAWK
49507_ACEOF
49508cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49509if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
49510  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
49511else
49512  cat
49513fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
49514  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
49515_ACEOF
49516
49517# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
49518# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
49519# trailing colons and then remove the whole line if VPATH becomes empty
49520# (actually we leave an empty line to preserve line numbers).
49521if test "x$srcdir" = x.; then
49522  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
49523h
49524s///
49525s/^/:/
49526s/[	 ]*$/:/
49527s/:\$(srcdir):/:/g
49528s/:\${srcdir}:/:/g
49529s/:@srcdir@:/:/g
49530s/^:*//
49531s/:*$//
49532x
49533s/\(=[	 ]*\).*/\1/
49534G
49535s/\n//
49536s/^[^=]*=[	 ]*$//
49537}'
49538fi
49539
49540cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49541fi # test -n "$CONFIG_FILES"
49542
49543# Set up the scripts for CONFIG_HEADERS section.
49544# No need to generate them if there are no CONFIG_HEADERS.
49545# This happens for instance with `./config.status Makefile'.
49546if test -n "$CONFIG_HEADERS"; then
49547cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
49548BEGIN {
49549_ACEOF
49550
49551# Transform confdefs.h into an awk script `defines.awk', embedded as
49552# here-document in config.status, that substitutes the proper values into
49553# config.h.in to produce config.h.
49554
49555# Create a delimiter string that does not exist in confdefs.h, to ease
49556# handling of long lines.
49557ac_delim='%!_!# '
49558for ac_last_try in false false :; do
49559  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
49560  if test -z "$ac_tt"; then
49561    break
49562  elif $ac_last_try; then
49563    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
49564  else
49565    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49566  fi
49567done
49568
49569# For the awk script, D is an array of macro values keyed by name,
49570# likewise P contains macro parameters if any.  Preserve backslash
49571# newline sequences.
49572
49573ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
49574sed -n '
49575s/.\{148\}/&'"$ac_delim"'/g
49576t rset
49577:rset
49578s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
49579t def
49580d
49581:def
49582s/\\$//
49583t bsnl
49584s/["\\]/\\&/g
49585s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
49586D["\1"]=" \3"/p
49587s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
49588d
49589:bsnl
49590s/["\\]/\\&/g
49591s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
49592D["\1"]=" \3\\\\\\n"\\/p
49593t cont
49594s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
49595t cont
49596d
49597:cont
49598n
49599s/.\{148\}/&'"$ac_delim"'/g
49600t clear
49601:clear
49602s/\\$//
49603t bsnlc
49604s/["\\]/\\&/g; s/^/"/; s/$/"/p
49605d
49606:bsnlc
49607s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
49608b cont
49609' <confdefs.h | sed '
49610s/'"$ac_delim"'/"\\\
49611"/g' >>$CONFIG_STATUS || ac_write_fail=1
49612
49613cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49614  for (key in D) D_is_set[key] = 1
49615  FS = ""
49616}
49617/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
49618  line = \$ 0
49619  split(line, arg, " ")
49620  if (arg[1] == "#") {
49621    defundef = arg[2]
49622    mac1 = arg[3]
49623  } else {
49624    defundef = substr(arg[1], 2)
49625    mac1 = arg[2]
49626  }
49627  split(mac1, mac2, "(") #)
49628  macro = mac2[1]
49629  prefix = substr(line, 1, index(line, defundef) - 1)
49630  if (D_is_set[macro]) {
49631    # Preserve the white space surrounding the "#".
49632    print prefix "define", macro P[macro] D[macro]
49633    next
49634  } else {
49635    # Replace #undef with comments.  This is necessary, for example,
49636    # in the case of _POSIX_SOURCE, which is predefined and required
49637    # on some systems where configure will not decide to define it.
49638    if (defundef == "undef") {
49639      print "/*", prefix defundef, macro, "*/"
49640      next
49641    }
49642  }
49643}
49644{ print }
49645_ACAWK
49646_ACEOF
49647cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49648  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
49649fi # test -n "$CONFIG_HEADERS"
49650
49651
49652eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
49653shift
49654for ac_tag
49655do
49656  case $ac_tag in
49657  :[FHLC]) ac_mode=$ac_tag; continue;;
49658  esac
49659  case $ac_mode$ac_tag in
49660  :[FHL]*:*);;
49661  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
49662  :[FH]-) ac_tag=-:-;;
49663  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
49664  esac
49665  ac_save_IFS=$IFS
49666  IFS=:
49667  set x $ac_tag
49668  IFS=$ac_save_IFS
49669  shift
49670  ac_file=$1
49671  shift
49672
49673  case $ac_mode in
49674  :L) ac_source=$1;;
49675  :[FH])
49676    ac_file_inputs=
49677    for ac_f
49678    do
49679      case $ac_f in
49680      -) ac_f="$ac_tmp/stdin";;
49681      *) # Look for the file first in the build tree, then in the source tree
49682	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
49683	 # because $ac_f cannot contain `:'.
49684	 test -f "$ac_f" ||
49685	   case $ac_f in
49686	   [\\/$]*) false;;
49687	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
49688	   esac ||
49689	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
49690      esac
49691      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
49692      as_fn_append ac_file_inputs " '$ac_f'"
49693    done
49694
49695    # Let's still pretend it is `configure' which instantiates (i.e., don't
49696    # use $as_me), people would be surprised to read:
49697    #    /* config.h.  Generated by config.status.  */
49698    configure_input='Generated from '`
49699	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
49700	`' by configure.'
49701    if test x"$ac_file" != x-; then
49702      configure_input="$ac_file.  $configure_input"
49703      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
49704$as_echo "$as_me: creating $ac_file" >&6;}
49705    fi
49706    # Neutralize special characters interpreted by sed in replacement strings.
49707    case $configure_input in #(
49708    *\&* | *\|* | *\\* )
49709       ac_sed_conf_input=`$as_echo "$configure_input" |
49710       sed 's/[\\\\&|]/\\\\&/g'`;; #(
49711    *) ac_sed_conf_input=$configure_input;;
49712    esac
49713
49714    case $ac_tag in
49715    *:-:* | *:-) cat >"$ac_tmp/stdin" \
49716      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
49717    esac
49718    ;;
49719  esac
49720
49721  ac_dir=`$as_dirname -- "$ac_file" ||
49722$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49723	 X"$ac_file" : 'X\(//\)[^/]' \| \
49724	 X"$ac_file" : 'X\(//\)$' \| \
49725	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
49726$as_echo X"$ac_file" |
49727    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49728	    s//\1/
49729	    q
49730	  }
49731	  /^X\(\/\/\)[^/].*/{
49732	    s//\1/
49733	    q
49734	  }
49735	  /^X\(\/\/\)$/{
49736	    s//\1/
49737	    q
49738	  }
49739	  /^X\(\/\).*/{
49740	    s//\1/
49741	    q
49742	  }
49743	  s/.*/./; q'`
49744  as_dir="$ac_dir"; as_fn_mkdir_p
49745  ac_builddir=.
49746
49747case "$ac_dir" in
49748.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
49749*)
49750  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
49751  # A ".." for each directory in $ac_dir_suffix.
49752  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
49753  case $ac_top_builddir_sub in
49754  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
49755  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
49756  esac ;;
49757esac
49758ac_abs_top_builddir=$ac_pwd
49759ac_abs_builddir=$ac_pwd$ac_dir_suffix
49760# for backward compatibility:
49761ac_top_builddir=$ac_top_build_prefix
49762
49763case $srcdir in
49764  .)  # We are building in place.
49765    ac_srcdir=.
49766    ac_top_srcdir=$ac_top_builddir_sub
49767    ac_abs_top_srcdir=$ac_pwd ;;
49768  [\\/]* | ?:[\\/]* )  # Absolute name.
49769    ac_srcdir=$srcdir$ac_dir_suffix;
49770    ac_top_srcdir=$srcdir
49771    ac_abs_top_srcdir=$srcdir ;;
49772  *) # Relative name.
49773    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
49774    ac_top_srcdir=$ac_top_build_prefix$srcdir
49775    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
49776esac
49777ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
49778
49779
49780  case $ac_mode in
49781  :F)
49782  #
49783  # CONFIG_FILE
49784  #
49785
49786_ACEOF
49787
49788cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49789# If the template does not know about datarootdir, expand it.
49790# FIXME: This hack should be removed a few years after 2.60.
49791ac_datarootdir_hack=; ac_datarootdir_seen=
49792ac_sed_dataroot='
49793/datarootdir/ {
49794  p
49795  q
49796}
49797/@datadir@/p
49798/@docdir@/p
49799/@infodir@/p
49800/@localedir@/p
49801/@mandir@/p'
49802case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
49803*datarootdir*) ac_datarootdir_seen=yes;;
49804*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
49805  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
49806$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
49807_ACEOF
49808cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49809  ac_datarootdir_hack='
49810  s&@datadir@&$datadir&g
49811  s&@docdir@&$docdir&g
49812  s&@infodir@&$infodir&g
49813  s&@localedir@&$localedir&g
49814  s&@mandir@&$mandir&g
49815  s&\\\${datarootdir}&$datarootdir&g' ;;
49816esac
49817_ACEOF
49818
49819# Neutralize VPATH when `$srcdir' = `.'.
49820# Shell code in configure.ac might set extrasub.
49821# FIXME: do we really want to maintain this feature?
49822cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49823ac_sed_extra="$ac_vpsub
49824$extrasub
49825_ACEOF
49826cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49827:t
49828/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
49829s|@configure_input@|$ac_sed_conf_input|;t t
49830s&@top_builddir@&$ac_top_builddir_sub&;t t
49831s&@top_build_prefix@&$ac_top_build_prefix&;t t
49832s&@srcdir@&$ac_srcdir&;t t
49833s&@abs_srcdir@&$ac_abs_srcdir&;t t
49834s&@top_srcdir@&$ac_top_srcdir&;t t
49835s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
49836s&@builddir@&$ac_builddir&;t t
49837s&@abs_builddir@&$ac_abs_builddir&;t t
49838s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
49839$ac_datarootdir_hack
49840"
49841eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
49842  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49843
49844test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
49845  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
49846  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
49847      "$ac_tmp/out"`; test -z "$ac_out"; } &&
49848  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
49849which seems to be undefined.  Please make sure it is defined" >&5
49850$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
49851which seems to be undefined.  Please make sure it is defined" >&2;}
49852
49853  rm -f "$ac_tmp/stdin"
49854  case $ac_file in
49855  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
49856  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
49857  esac \
49858  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49859 ;;
49860  :H)
49861  #
49862  # CONFIG_HEADER
49863  #
49864  if test x"$ac_file" != x-; then
49865    {
49866      $as_echo "/* $configure_input  */" \
49867      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
49868    } >"$ac_tmp/config.h" \
49869      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49870    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
49871      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
49872$as_echo "$as_me: $ac_file is unchanged" >&6;}
49873    else
49874      rm -f "$ac_file"
49875      mv "$ac_tmp/config.h" "$ac_file" \
49876	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
49877    fi
49878  else
49879    $as_echo "/* $configure_input  */" \
49880      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
49881      || as_fn_error $? "could not create -" "$LINENO" 5
49882  fi
49883 ;;
49884
49885
49886  esac
49887
49888done # for ac_tag
49889
49890
49891as_fn_exit 0
49892_ACEOF
49893ac_clean_files=$ac_clean_files_save
49894
49895test $ac_write_fail = 0 ||
49896  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
49897
49898
49899# configure is writing to config.log, and then calls config.status.
49900# config.status does its own redirection, appending to config.log.
49901# Unfortunately, on DOS this fails, as config.log is still kept open
49902# by configure, so config.status won't be able to write to it; its
49903# output is simply discarded.  So we exec the FD to /dev/null,
49904# effectively closing config.log, so it can be properly (re)opened and
49905# appended to by config.status.  When coming back to configure, we
49906# need to make the FD available again.
49907if test "$no_create" != yes; then
49908  ac_cs_success=:
49909  ac_config_status_args=
49910  test "$silent" = yes &&
49911    ac_config_status_args="$ac_config_status_args --quiet"
49912  exec 5>/dev/null
49913  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
49914  exec 5>>config.log
49915  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
49916  # would make configure fail if this is the last instruction.
49917  $ac_cs_success || as_fn_exit 1
49918fi
49919if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
49920  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
49921$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
49922fi
49923
49924
49925# Try to move the config.log file to the output directory.
49926if test -e ./config.log; then
49927  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
49928fi
49929
49930# Make the compare script executable
49931$CHMOD +x $OUTPUT_ROOT/compare.sh
49932
49933# Finally output some useful information to the user
49934
49935  # Finally output some useful information to the user
49936
49937  printf "\n"
49938  printf "====================================================\n"
49939  if test "x$no_create" != "xyes"; then
49940    if test "x$IS_RECONFIGURE" != "xyes"; then
49941      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
49942    else
49943      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
49944    fi
49945  else
49946    if test "x$IS_RECONFIGURE" != "xyes"; then
49947      printf "A configuration has been successfully checked but not created\n"
49948    else
49949      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
49950    fi
49951  fi
49952  if test "x$CONFIGURE_COMMAND_LINE" != x; then
49953    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
49954  else
49955    printf "using default settings.\n"
49956  fi
49957
49958  printf "\n"
49959  printf "Configuration summary:\n"
49960  printf "* Debug level:    $DEBUG_LEVEL\n"
49961  printf "* JDK variant:    $JDK_VARIANT\n"
49962  printf "* JVM variants:   $with_jvm_variants\n"
49963  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
49964
49965  printf "\n"
49966  printf "Tools summary:\n"
49967  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
49968    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
49969  fi
49970  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
49971  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
49972  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
49973  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
49974
49975  printf "\n"
49976  printf "Build performance summary:\n"
49977  printf "* Cores to use:   $JOBS\n"
49978  printf "* Memory limit:   $MEMORY_SIZE MB\n"
49979  if test "x$CCACHE_STATUS" != "x"; then
49980    printf "* ccache status:  $CCACHE_STATUS\n"
49981  fi
49982  printf "\n"
49983
49984  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
49985    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
49986    printf "will result in longer build times.\n"
49987    printf "\n"
49988  fi
49989
49990  if test "x$FOUND_ALT_VARIABLES" != "x"; then
49991    printf "WARNING: You have old-style ALT_ environment variables set.\n"
49992    printf "These are not respected, and will be ignored. It is recommended\n"
49993    printf "that you clean your environment. The following variables are set:\n"
49994    printf "$FOUND_ALT_VARIABLES\n"
49995    printf "\n"
49996  fi
49997
49998  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
49999    printf "WARNING: Your build output directory is not on a local disk.\n"
50000    printf "This will severely degrade build performance!\n"
50001    printf "It is recommended that you create an output directory on a local disk,\n"
50002    printf "and run the configure script again from that directory.\n"
50003    printf "\n"
50004  fi
50005
50006  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
50007    printf "WARNING: The result of this configuration has overridden an older\n"
50008    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
50009    printf "proper build. Failure to do so might result in strange build problems.\n"
50010    printf "\n"
50011  fi
50012
50013  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
50014    printf "WARNING: The result of this configuration was not saved.\n"
50015    printf "You should run without '--no-create | -n' to create the configuration.\n"
50016    printf "\n"
50017  fi
50018
50019