generated-configure.sh revision 1004:fc3eade662a8
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CCACHE
633USE_PRECOMPILED_HEADER
634SJAVAC_SERVER_DIR
635ENABLE_SJAVAC
636SJAVAC_SERVER_JAVA
637JOBS
638MEMORY_SIZE
639NUM_CORES
640ENABLE_INTREE_EC
641SALIB_NAME
642HOTSPOT_MAKE_ARGS
643MSVCR_DLL
644LIBCXX
645LLVM_LIBS
646LLVM_LDFLAGS
647LLVM_CFLAGS
648LLVM_CONFIG
649LIBFFI_LIBS
650LIBFFI_CFLAGS
651STATIC_CXX_SETTING
652LIBDL
653LIBM
654LIBZIP_CAN_USE_MMAP
655USE_EXTERNAL_LIBZ
656USE_EXTERNAL_LIBPNG
657PNG_LIBS
658PNG_CFLAGS
659USE_EXTERNAL_LIBGIF
660USE_EXTERNAL_LIBJPEG
661ALSA_LIBS
662ALSA_CFLAGS
663FREETYPE_BUNDLE_LIB_PATH
664FREETYPE_LIBS
665FREETYPE_CFLAGS
666CUPS_CFLAGS
667OPENWIN_HOME
668X_EXTRA_LIBS
669X_LIBS
670X_PRE_LIBS
671X_CFLAGS
672XMKMF
673FIXPATH
674ZIP_DEBUGINFO_FILES
675ENABLE_DEBUG_SYMBOLS
676CFLAGS_WARNINGS_ARE_ERRORS
677COMPILER_SUPPORTS_TARGET_BITS_FLAG
678ZERO_ARCHFLAG
679LDFLAGS_CXX_JDK
680LDFLAGS_JDKEXE_SUFFIX
681LDFLAGS_JDKLIB_SUFFIX
682LDFLAGS_JDKEXE
683LDFLAGS_JDKLIB
684CXXFLAGS_JDKEXE
685CXXFLAGS_JDKLIB
686CFLAGS_JDKEXE
687CFLAGS_JDKLIB
688MACOSX_VERSION_MIN
689LEGACY_EXTRA_LDFLAGS
690LEGACY_EXTRA_CXXFLAGS
691LEGACY_EXTRA_CFLAGS
692CXX_O_FLAG_NONE
693CXX_O_FLAG_NORM
694CXX_O_FLAG_HI
695CXX_O_FLAG_HIGHEST
696C_O_FLAG_NONE
697C_O_FLAG_NORM
698C_O_FLAG_HI
699C_O_FLAG_HIGHEST
700CXXFLAGS_DEBUG_SYMBOLS
701CFLAGS_DEBUG_SYMBOLS
702CXX_FLAG_DEPS
703C_FLAG_DEPS
704SET_SHARED_LIBRARY_MAPFILE
705SET_SHARED_LIBRARY_NAME
706SET_SHARED_LIBRARY_ORIGIN
707SET_EXECUTABLE_ORIGIN
708SHARED_LIBRARY_FLAGS
709CXX_FLAG_REORDER
710C_FLAG_REORDER
711RC_FLAGS
712AR_OUT_OPTION
713LD_OUT_OPTION
714EXE_OUT_OPTION
715CC_OUT_OPTION
716POST_MCS_CMD
717POST_STRIP_CMD
718ARFLAGS
719COMPILER_TARGET_BITS_FLAG
720JT_HOME
721JTREGEXE
722USING_BROKEN_SUSE_LD
723PACKAGE_PATH
724LDEXECXX
725LDEXE
726USE_CLANG
727HOTSPOT_LD
728HOTSPOT_CXX
729HOTSPOT_RC
730HOTSPOT_MT
731BUILD_LD
732BUILD_CXX
733BUILD_CC
734ac_ct_OBJDUMP
735OBJDUMP
736ac_ct_OBJCOPY
737OBJCOPY
738ac_ct_NM
739ac_ct_STRIP
740MCS
741GNM
742NM
743STRIP
744DUMPBIN
745RC
746MT
747LIPO
748ac_ct_OBJC
749OBJCFLAGS
750OBJC
751ac_ct_AR
752AR
753AS
754LDCXX
755LD
756CXXCPP
757CPP
758ac_ct_CXX
759CXXFLAGS
760CXX
761ac_ct_PROPER_COMPILER_CXX
762PROPER_COMPILER_CXX
763TOOLS_DIR_CXX
764POTENTIAL_CXX
765OBJEXT
766EXEEXT
767ac_ct_CC
768CPPFLAGS
769LDFLAGS
770CFLAGS
771CC
772ac_ct_PROPER_COMPILER_CC
773PROPER_COMPILER_CC
774TOOLS_DIR_CC
775POTENTIAL_CC
776VS_PATH
777VS_LIB
778VS_INCLUDE
779CYGWIN_LINK
780EXE_SUFFIX
781OBJ_SUFFIX
782STATIC_LIBRARY
783SHARED_LIBRARY
784STATIC_LIBRARY_SUFFIX
785SHARED_LIBRARY_SUFFIX
786LIBRARY_PREFIX
787TOOLCHAIN_TYPE
788BUILD_HOTSPOT
789HOTSPOT_DIST
790BUILD_OUTPUT
791OVERRIDE_SRC_ROOT
792ADD_SRC_ROOT
793JDK_TOPDIR
794NASHORN_TOPDIR
795HOTSPOT_TOPDIR
796JAXWS_TOPDIR
797JAXP_TOPDIR
798CORBA_TOPDIR
799LANGTOOLS_TOPDIR
800JAVA_FLAGS_SMALL
801JAVA_FLAGS_BIG
802JAVA_FLAGS
803JAVAC_FLAGS
804BOOT_JDK_SOURCETARGET
805JARSIGNER
806NATIVE2ASCII
807JAR
808JAVAH
809JAVAC
810JAVA
811BOOT_JDK
812BOOT_TOOLSJAR
813BOOT_RTJAR
814JAVA_CHECK
815JAVAC_CHECK
816COOKED_BUILD_NUMBER
817JDK_VERSION
818COPYRIGHT_YEAR
819MACOSX_BUNDLE_ID_BASE
820MACOSX_BUNDLE_NAME_BASE
821COMPANY_NAME
822JDK_RC_PLATFORM_NAME
823PRODUCT_SUFFIX
824PRODUCT_NAME
825LAUNCHER_NAME
826MILESTONE
827JDK_BUILD_NUMBER
828JDK_UPDATE_VERSION
829JDK_MICRO_VERSION
830JDK_MINOR_VERSION
831JDK_MAJOR_VERSION
832USER_RELEASE_SUFFIX
833COMPRESS_JARS
834RMICONNECTOR_IIOP
835UNLIMITED_CRYPTO
836CACERTS_FILE
837TEST_IN_BUILD
838BUILD_HEADLESS
839SUPPORT_HEADFUL
840SUPPORT_HEADLESS
841BDEPS_FTP
842BDEPS_UNZIP
843OS_VERSION_MICRO
844OS_VERSION_MINOR
845OS_VERSION_MAJOR
846PKG_CONFIG
847CODESIGN
848XATTR
849DSYMUTIL
850IS_GNU_TIME
851TIME
852STAT
853HG
854READELF
855OTOOL
856LDD
857ZIP
858UNZIP
859FIND_DELETE
860MAKE
861CHECK_TOOLSDIR_MAKE
862CHECK_TOOLSDIR_GMAKE
863CHECK_MAKE
864CHECK_GMAKE
865PKGHANDLER
866OUTPUT_ROOT
867CONF_NAME
868SPEC
869BUILD_VARIANT_RELEASE
870DEBUG_CLASSFILES
871FASTDEBUG
872VARIANT
873DEBUG_LEVEL
874MACOSX_UNIVERSAL
875INCLUDE_SA
876JVM_VARIANT_CORE
877JVM_VARIANT_ZEROSHARK
878JVM_VARIANT_ZERO
879JVM_VARIANT_KERNEL
880JVM_VARIANT_MINIMAL1
881JVM_VARIANT_CLIENT
882JVM_VARIANT_SERVER
883JVM_VARIANTS
884JVM_INTERPRETER
885JDK_VARIANT
886SET_OPENJDK
887BUILD_LOG_WRAPPER
888BUILD_LOG_PREVIOUS
889BUILD_LOG
890SYS_ROOT
891TOPDIR
892PATH_SEP
893ZERO_ARCHDEF
894DEFINE_CROSS_COMPILE_ARCH
895LP64
896OPENJDK_TARGET_OS_EXPORT_DIR
897OPENJDK_TARGET_OS_API_DIR
898OPENJDK_TARGET_CPU_JLI_CFLAGS
899OPENJDK_TARGET_CPU_OSARCH
900OPENJDK_TARGET_CPU_ISADIR
901OPENJDK_TARGET_CPU_LIBDIR
902OPENJDK_TARGET_CPU_LEGACY_LIB
903OPENJDK_TARGET_CPU_LEGACY
904REQUIRED_OS_VERSION
905REQUIRED_OS_NAME
906COMPILE_TYPE
907OPENJDK_TARGET_CPU_ENDIAN
908OPENJDK_TARGET_CPU_BITS
909OPENJDK_TARGET_CPU_ARCH
910OPENJDK_TARGET_CPU
911OPENJDK_TARGET_OS_API
912OPENJDK_TARGET_OS
913OPENJDK_BUILD_CPU_ENDIAN
914OPENJDK_BUILD_CPU_BITS
915OPENJDK_BUILD_CPU_ARCH
916OPENJDK_BUILD_CPU
917OPENJDK_BUILD_OS_API
918OPENJDK_BUILD_OS
919OPENJDK_BUILD_AUTOCONF_NAME
920OPENJDK_TARGET_AUTOCONF_NAME
921target_os
922target_vendor
923target_cpu
924target
925host_os
926host_vendor
927host_cpu
928host
929build_os
930build_vendor
931build_cpu
932build
933SETFILE
934DF
935READLINK
936CYGPATH
937SED
938FGREP
939EGREP
940GREP
941AWK
942XARGS
943WHICH
944WC
945UNIQ
946UNAME
947TR
948TOUCH
949TEE
950TAR
951TAIL
952SORT
953SH
954RM
955PRINTF
956NAWK
957MV
958MKTEMP
959MKDIR
960LS
961LN
962HEAD
963FIND
964FILE
965EXPR
966ECHO
967DIRNAME
968DIFF
969DATE
970CUT
971CPIO
972CP
973COMM
974CMP
975CHMOD
976CAT
977BASH
978BASENAME
979DATE_WHEN_CONFIGURED
980CONFIGURE_COMMAND_LINE
981target_alias
982host_alias
983build_alias
984LIBS
985ECHO_T
986ECHO_N
987ECHO_C
988DEFS
989mandir
990localedir
991libdir
992psdir
993pdfdir
994dvidir
995htmldir
996infodir
997docdir
998oldincludedir
999includedir
1000localstatedir
1001sharedstatedir
1002sysconfdir
1003datadir
1004datarootdir
1005libexecdir
1006sbindir
1007bindir
1008program_transform_name
1009prefix
1010exec_prefix
1011PACKAGE_URL
1012PACKAGE_BUGREPORT
1013PACKAGE_STRING
1014PACKAGE_VERSION
1015PACKAGE_TARNAME
1016PACKAGE_NAME
1017PATH_SEPARATOR
1018SHELL'
1019ac_subst_files=''
1020ac_user_opts='
1021enable_option_checking
1022with_target_bits
1023with_sys_root
1024with_tools_dir
1025with_devkit
1026enable_openjdk_only
1027with_custom_make_dir
1028with_jdk_variant
1029with_jvm_interpreter
1030with_jvm_variants
1031enable_debug
1032with_debug_level
1033with_conf_name
1034with_builddeps_conf
1035with_builddeps_server
1036with_builddeps_dir
1037with_builddeps_group
1038enable_headful
1039enable_hotspot_test_in_build
1040with_cacerts_file
1041enable_unlimited_crypto
1042enable_rmiconnector_iiop
1043with_milestone
1044with_update_version
1045with_user_release_suffix
1046with_build_number
1047with_boot_jdk
1048with_boot_jdk_jvmargs
1049with_add_source_root
1050with_override_source_root
1051with_adds_and_overrides
1052with_override_langtools
1053with_override_corba
1054with_override_jaxp
1055with_override_jaxws
1056with_override_hotspot
1057with_override_nashorn
1058with_override_jdk
1059with_import_hotspot
1060with_toolchain_type
1061with_jtreg
1062with_extra_cflags
1063with_extra_cxxflags
1064with_extra_ldflags
1065enable_debug_symbols
1066enable_zip_debug_info
1067enable_macosx_runtime_support
1068with_x
1069with_cups
1070with_cups_include
1071with_freetype
1072with_freetype_include
1073with_freetype_lib
1074enable_freetype_bundling
1075with_alsa
1076with_alsa_include
1077with_alsa_lib
1078with_giflib
1079with_libpng
1080with_zlib
1081with_stdc__lib
1082with_msvcr_dll
1083with_dxsdk
1084with_dxsdk_lib
1085with_dxsdk_include
1086with_num_cores
1087with_memory_size
1088with_jobs
1089with_sjavac_server_java
1090enable_sjavac
1091enable_precompiled_headers
1092enable_ccache
1093with_ccache_dir
1094'
1095      ac_precious_vars='build_alias
1096host_alias
1097target_alias
1098BASENAME
1099BASH
1100CAT
1101CHMOD
1102CMP
1103COMM
1104CP
1105CPIO
1106CUT
1107DATE
1108DIFF
1109DIRNAME
1110ECHO
1111EXPR
1112FILE
1113FIND
1114HEAD
1115LN
1116LS
1117MKDIR
1118MKTEMP
1119MV
1120NAWK
1121PRINTF
1122RM
1123SH
1124SORT
1125TAIL
1126TAR
1127TEE
1128TOUCH
1129TR
1130UNAME
1131UNIQ
1132WC
1133WHICH
1134XARGS
1135AWK
1136GREP
1137EGREP
1138FGREP
1139SED
1140CYGPATH
1141READLINK
1142DF
1143SETFILE
1144UNZIP
1145ZIP
1146LDD
1147OTOOL
1148READELF
1149HG
1150STAT
1151TIME
1152DSYMUTIL
1153XATTR
1154CODESIGN
1155PKG_CONFIG
1156JAVA
1157JAVAC
1158JAVAH
1159JAR
1160NATIVE2ASCII
1161JARSIGNER
1162CC
1163CFLAGS
1164LDFLAGS
1165LIBS
1166CPPFLAGS
1167CXX
1168CXXFLAGS
1169CCC
1170CPP
1171CXXCPP
1172AS
1173AR
1174OBJC
1175OBJCFLAGS
1176LIPO
1177STRIP
1178NM
1179GNM
1180MCS
1181OBJCOPY
1182OBJDUMP
1183BUILD_CC
1184BUILD_CXX
1185BUILD_LD
1186JTREGEXE
1187XMKMF
1188FREETYPE_CFLAGS
1189FREETYPE_LIBS
1190ALSA_CFLAGS
1191ALSA_LIBS
1192PNG_CFLAGS
1193PNG_LIBS
1194LIBFFI_CFLAGS
1195LIBFFI_LIBS
1196CCACHE'
1197
1198
1199# Initialize some variables set by options.
1200ac_init_help=
1201ac_init_version=false
1202ac_unrecognized_opts=
1203ac_unrecognized_sep=
1204# The variables have the same names as the options, with
1205# dashes changed to underlines.
1206cache_file=/dev/null
1207exec_prefix=NONE
1208no_create=
1209no_recursion=
1210prefix=NONE
1211program_prefix=NONE
1212program_suffix=NONE
1213program_transform_name=s,x,x,
1214silent=
1215site=
1216srcdir=
1217verbose=
1218x_includes=NONE
1219x_libraries=NONE
1220
1221# Installation directory options.
1222# These are left unexpanded so users can "make install exec_prefix=/foo"
1223# and all the variables that are supposed to be based on exec_prefix
1224# by default will actually change.
1225# Use braces instead of parens because sh, perl, etc. also accept them.
1226# (The list follows the same order as the GNU Coding Standards.)
1227bindir='${exec_prefix}/bin'
1228sbindir='${exec_prefix}/sbin'
1229libexecdir='${exec_prefix}/libexec'
1230datarootdir='${prefix}/share'
1231datadir='${datarootdir}'
1232sysconfdir='${prefix}/etc'
1233sharedstatedir='${prefix}/com'
1234localstatedir='${prefix}/var'
1235includedir='${prefix}/include'
1236oldincludedir='/usr/include'
1237docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1238infodir='${datarootdir}/info'
1239htmldir='${docdir}'
1240dvidir='${docdir}'
1241pdfdir='${docdir}'
1242psdir='${docdir}'
1243libdir='${exec_prefix}/lib'
1244localedir='${datarootdir}/locale'
1245mandir='${datarootdir}/man'
1246
1247ac_prev=
1248ac_dashdash=
1249for ac_option
1250do
1251  # If the previous option needs an argument, assign it.
1252  if test -n "$ac_prev"; then
1253    eval $ac_prev=\$ac_option
1254    ac_prev=
1255    continue
1256  fi
1257
1258  case $ac_option in
1259  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1260  *=)   ac_optarg= ;;
1261  *)    ac_optarg=yes ;;
1262  esac
1263
1264  # Accept the important Cygnus configure options, so we can diagnose typos.
1265
1266  case $ac_dashdash$ac_option in
1267  --)
1268    ac_dashdash=yes ;;
1269
1270  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1271    ac_prev=bindir ;;
1272  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1273    bindir=$ac_optarg ;;
1274
1275  -build | --build | --buil | --bui | --bu)
1276    ac_prev=build_alias ;;
1277  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1278    build_alias=$ac_optarg ;;
1279
1280  -cache-file | --cache-file | --cache-fil | --cache-fi \
1281  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1282    ac_prev=cache_file ;;
1283  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1284  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1285    cache_file=$ac_optarg ;;
1286
1287  --config-cache | -C)
1288    cache_file=config.cache ;;
1289
1290  -datadir | --datadir | --datadi | --datad)
1291    ac_prev=datadir ;;
1292  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1293    datadir=$ac_optarg ;;
1294
1295  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1296  | --dataroo | --dataro | --datar)
1297    ac_prev=datarootdir ;;
1298  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1299  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1300    datarootdir=$ac_optarg ;;
1301
1302  -disable-* | --disable-*)
1303    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1304    # Reject names that are not valid shell variable names.
1305    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1306      as_fn_error $? "invalid feature name: $ac_useropt"
1307    ac_useropt_orig=$ac_useropt
1308    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1309    case $ac_user_opts in
1310      *"
1311"enable_$ac_useropt"
1312"*) ;;
1313      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1314	 ac_unrecognized_sep=', ';;
1315    esac
1316    eval enable_$ac_useropt=no ;;
1317
1318  -docdir | --docdir | --docdi | --doc | --do)
1319    ac_prev=docdir ;;
1320  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1321    docdir=$ac_optarg ;;
1322
1323  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1324    ac_prev=dvidir ;;
1325  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1326    dvidir=$ac_optarg ;;
1327
1328  -enable-* | --enable-*)
1329    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1330    # Reject names that are not valid shell variable names.
1331    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1332      as_fn_error $? "invalid feature name: $ac_useropt"
1333    ac_useropt_orig=$ac_useropt
1334    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1335    case $ac_user_opts in
1336      *"
1337"enable_$ac_useropt"
1338"*) ;;
1339      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1340	 ac_unrecognized_sep=', ';;
1341    esac
1342    eval enable_$ac_useropt=\$ac_optarg ;;
1343
1344  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1345  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1346  | --exec | --exe | --ex)
1347    ac_prev=exec_prefix ;;
1348  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1349  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1350  | --exec=* | --exe=* | --ex=*)
1351    exec_prefix=$ac_optarg ;;
1352
1353  -gas | --gas | --ga | --g)
1354    # Obsolete; use --with-gas.
1355    with_gas=yes ;;
1356
1357  -help | --help | --hel | --he | -h)
1358    ac_init_help=long ;;
1359  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1360    ac_init_help=recursive ;;
1361  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1362    ac_init_help=short ;;
1363
1364  -host | --host | --hos | --ho)
1365    ac_prev=host_alias ;;
1366  -host=* | --host=* | --hos=* | --ho=*)
1367    host_alias=$ac_optarg ;;
1368
1369  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1370    ac_prev=htmldir ;;
1371  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1372  | --ht=*)
1373    htmldir=$ac_optarg ;;
1374
1375  -includedir | --includedir | --includedi | --included | --include \
1376  | --includ | --inclu | --incl | --inc)
1377    ac_prev=includedir ;;
1378  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1379  | --includ=* | --inclu=* | --incl=* | --inc=*)
1380    includedir=$ac_optarg ;;
1381
1382  -infodir | --infodir | --infodi | --infod | --info | --inf)
1383    ac_prev=infodir ;;
1384  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1385    infodir=$ac_optarg ;;
1386
1387  -libdir | --libdir | --libdi | --libd)
1388    ac_prev=libdir ;;
1389  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1390    libdir=$ac_optarg ;;
1391
1392  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1393  | --libexe | --libex | --libe)
1394    ac_prev=libexecdir ;;
1395  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1396  | --libexe=* | --libex=* | --libe=*)
1397    libexecdir=$ac_optarg ;;
1398
1399  -localedir | --localedir | --localedi | --localed | --locale)
1400    ac_prev=localedir ;;
1401  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1402    localedir=$ac_optarg ;;
1403
1404  -localstatedir | --localstatedir | --localstatedi | --localstated \
1405  | --localstate | --localstat | --localsta | --localst | --locals)
1406    ac_prev=localstatedir ;;
1407  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1408  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1409    localstatedir=$ac_optarg ;;
1410
1411  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1412    ac_prev=mandir ;;
1413  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1414    mandir=$ac_optarg ;;
1415
1416  -nfp | --nfp | --nf)
1417    # Obsolete; use --without-fp.
1418    with_fp=no ;;
1419
1420  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1421  | --no-cr | --no-c | -n)
1422    no_create=yes ;;
1423
1424  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1425  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1426    no_recursion=yes ;;
1427
1428  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1429  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1430  | --oldin | --oldi | --old | --ol | --o)
1431    ac_prev=oldincludedir ;;
1432  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1433  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1434  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1435    oldincludedir=$ac_optarg ;;
1436
1437  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1438    ac_prev=prefix ;;
1439  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1440    prefix=$ac_optarg ;;
1441
1442  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1443  | --program-pre | --program-pr | --program-p)
1444    ac_prev=program_prefix ;;
1445  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1446  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1447    program_prefix=$ac_optarg ;;
1448
1449  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1450  | --program-suf | --program-su | --program-s)
1451    ac_prev=program_suffix ;;
1452  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1453  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1454    program_suffix=$ac_optarg ;;
1455
1456  -program-transform-name | --program-transform-name \
1457  | --program-transform-nam | --program-transform-na \
1458  | --program-transform-n | --program-transform- \
1459  | --program-transform | --program-transfor \
1460  | --program-transfo | --program-transf \
1461  | --program-trans | --program-tran \
1462  | --progr-tra | --program-tr | --program-t)
1463    ac_prev=program_transform_name ;;
1464  -program-transform-name=* | --program-transform-name=* \
1465  | --program-transform-nam=* | --program-transform-na=* \
1466  | --program-transform-n=* | --program-transform-=* \
1467  | --program-transform=* | --program-transfor=* \
1468  | --program-transfo=* | --program-transf=* \
1469  | --program-trans=* | --program-tran=* \
1470  | --progr-tra=* | --program-tr=* | --program-t=*)
1471    program_transform_name=$ac_optarg ;;
1472
1473  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1474    ac_prev=pdfdir ;;
1475  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1476    pdfdir=$ac_optarg ;;
1477
1478  -psdir | --psdir | --psdi | --psd | --ps)
1479    ac_prev=psdir ;;
1480  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1481    psdir=$ac_optarg ;;
1482
1483  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1484  | -silent | --silent | --silen | --sile | --sil)
1485    silent=yes ;;
1486
1487  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1488    ac_prev=sbindir ;;
1489  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1490  | --sbi=* | --sb=*)
1491    sbindir=$ac_optarg ;;
1492
1493  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1494  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1495  | --sharedst | --shareds | --shared | --share | --shar \
1496  | --sha | --sh)
1497    ac_prev=sharedstatedir ;;
1498  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1499  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1500  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1501  | --sha=* | --sh=*)
1502    sharedstatedir=$ac_optarg ;;
1503
1504  -site | --site | --sit)
1505    ac_prev=site ;;
1506  -site=* | --site=* | --sit=*)
1507    site=$ac_optarg ;;
1508
1509  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1510    ac_prev=srcdir ;;
1511  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1512    srcdir=$ac_optarg ;;
1513
1514  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1515  | --syscon | --sysco | --sysc | --sys | --sy)
1516    ac_prev=sysconfdir ;;
1517  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1518  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1519    sysconfdir=$ac_optarg ;;
1520
1521  -target | --target | --targe | --targ | --tar | --ta | --t)
1522    ac_prev=target_alias ;;
1523  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1524    target_alias=$ac_optarg ;;
1525
1526  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1527    verbose=yes ;;
1528
1529  -version | --version | --versio | --versi | --vers | -V)
1530    ac_init_version=: ;;
1531
1532  -with-* | --with-*)
1533    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1534    # Reject names that are not valid shell variable names.
1535    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1536      as_fn_error $? "invalid package name: $ac_useropt"
1537    ac_useropt_orig=$ac_useropt
1538    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1539    case $ac_user_opts in
1540      *"
1541"with_$ac_useropt"
1542"*) ;;
1543      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1544	 ac_unrecognized_sep=', ';;
1545    esac
1546    eval with_$ac_useropt=\$ac_optarg ;;
1547
1548  -without-* | --without-*)
1549    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1550    # Reject names that are not valid shell variable names.
1551    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1552      as_fn_error $? "invalid package name: $ac_useropt"
1553    ac_useropt_orig=$ac_useropt
1554    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1555    case $ac_user_opts in
1556      *"
1557"with_$ac_useropt"
1558"*) ;;
1559      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1560	 ac_unrecognized_sep=', ';;
1561    esac
1562    eval with_$ac_useropt=no ;;
1563
1564  --x)
1565    # Obsolete; use --with-x.
1566    with_x=yes ;;
1567
1568  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1569  | --x-incl | --x-inc | --x-in | --x-i)
1570    ac_prev=x_includes ;;
1571  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1572  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1573    x_includes=$ac_optarg ;;
1574
1575  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1576  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1577    ac_prev=x_libraries ;;
1578  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1579  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1580    x_libraries=$ac_optarg ;;
1581
1582  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1583Try \`$0 --help' for more information"
1584    ;;
1585
1586  *=*)
1587    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1588    # Reject names that are not valid shell variable names.
1589    case $ac_envvar in #(
1590      '' | [0-9]* | *[!_$as_cr_alnum]* )
1591      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1592    esac
1593    eval $ac_envvar=\$ac_optarg
1594    export $ac_envvar ;;
1595
1596  *)
1597    # FIXME: should be removed in autoconf 3.0.
1598    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1599    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1600      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1601    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1602    ;;
1603
1604  esac
1605done
1606
1607if test -n "$ac_prev"; then
1608  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1609  as_fn_error $? "missing argument to $ac_option"
1610fi
1611
1612if test -n "$ac_unrecognized_opts"; then
1613  case $enable_option_checking in
1614    no) ;;
1615    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1616    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1617  esac
1618fi
1619
1620# Check all directory arguments for consistency.
1621for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1622		datadir sysconfdir sharedstatedir localstatedir includedir \
1623		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1624		libdir localedir mandir
1625do
1626  eval ac_val=\$$ac_var
1627  # Remove trailing slashes.
1628  case $ac_val in
1629    */ )
1630      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1631      eval $ac_var=\$ac_val;;
1632  esac
1633  # Be sure to have absolute directory names.
1634  case $ac_val in
1635    [\\/$]* | ?:[\\/]* )  continue;;
1636    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1637  esac
1638  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1639done
1640
1641# There might be people who depend on the old broken behavior: `$host'
1642# used to hold the argument of --host etc.
1643# FIXME: To remove some day.
1644build=$build_alias
1645host=$host_alias
1646target=$target_alias
1647
1648# FIXME: To remove some day.
1649if test "x$host_alias" != x; then
1650  if test "x$build_alias" = x; then
1651    cross_compiling=maybe
1652  elif test "x$build_alias" != "x$host_alias"; then
1653    cross_compiling=yes
1654  fi
1655fi
1656
1657ac_tool_prefix=
1658test -n "$host_alias" && ac_tool_prefix=$host_alias-
1659
1660test "$silent" = yes && exec 6>/dev/null
1661
1662
1663ac_pwd=`pwd` && test -n "$ac_pwd" &&
1664ac_ls_di=`ls -di .` &&
1665ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1666  as_fn_error $? "working directory cannot be determined"
1667test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1668  as_fn_error $? "pwd does not report name of working directory"
1669
1670
1671# Find the source files, if location was not specified.
1672if test -z "$srcdir"; then
1673  ac_srcdir_defaulted=yes
1674  # Try the directory containing this script, then the parent directory.
1675  ac_confdir=`$as_dirname -- "$as_myself" ||
1676$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1677	 X"$as_myself" : 'X\(//\)[^/]' \| \
1678	 X"$as_myself" : 'X\(//\)$' \| \
1679	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1680$as_echo X"$as_myself" |
1681    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1682	    s//\1/
1683	    q
1684	  }
1685	  /^X\(\/\/\)[^/].*/{
1686	    s//\1/
1687	    q
1688	  }
1689	  /^X\(\/\/\)$/{
1690	    s//\1/
1691	    q
1692	  }
1693	  /^X\(\/\).*/{
1694	    s//\1/
1695	    q
1696	  }
1697	  s/.*/./; q'`
1698  srcdir=$ac_confdir
1699  if test ! -r "$srcdir/$ac_unique_file"; then
1700    srcdir=..
1701  fi
1702else
1703  ac_srcdir_defaulted=no
1704fi
1705if test ! -r "$srcdir/$ac_unique_file"; then
1706  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1707  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1708fi
1709ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1710ac_abs_confdir=`(
1711	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1712	pwd)`
1713# When building in place, set srcdir=.
1714if test "$ac_abs_confdir" = "$ac_pwd"; then
1715  srcdir=.
1716fi
1717# Remove unnecessary trailing slashes from srcdir.
1718# Double slashes in file names in object file debugging info
1719# mess up M-x gdb in Emacs.
1720case $srcdir in
1721*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1722esac
1723for ac_var in $ac_precious_vars; do
1724  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1725  eval ac_env_${ac_var}_value=\$${ac_var}
1726  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1727  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1728done
1729
1730#
1731# Report the --help message.
1732#
1733if test "$ac_init_help" = "long"; then
1734  # Omit some internal or obsolete options to make the list less imposing.
1735  # This message is too long to be a string in the A/UX 3.1 sh.
1736  cat <<_ACEOF
1737\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1738
1739Usage: $0 [OPTION]... [VAR=VALUE]...
1740
1741To assign environment variables (e.g., CC, CFLAGS...), specify them as
1742VAR=VALUE.  See below for descriptions of some of the useful variables.
1743
1744Defaults for the options are specified in brackets.
1745
1746Configuration:
1747  -h, --help              display this help and exit
1748      --help=short        display options specific to this package
1749      --help=recursive    display the short help of all the included packages
1750  -V, --version           display version information and exit
1751  -q, --quiet, --silent   do not print \`checking ...' messages
1752      --cache-file=FILE   cache test results in FILE [disabled]
1753  -C, --config-cache      alias for \`--cache-file=config.cache'
1754  -n, --no-create         do not create output files
1755      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1756
1757Installation directories:
1758  --prefix=PREFIX         install architecture-independent files in PREFIX
1759                          [$ac_default_prefix]
1760  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1761                          [PREFIX]
1762
1763By default, \`make install' will install all the files in
1764\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1765an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1766for instance \`--prefix=\$HOME'.
1767
1768For better control, use the options below.
1769
1770Fine tuning of the installation directories:
1771  --bindir=DIR            user executables [EPREFIX/bin]
1772  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1773  --libexecdir=DIR        program executables [EPREFIX/libexec]
1774  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1775  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1776  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1777  --libdir=DIR            object code libraries [EPREFIX/lib]
1778  --includedir=DIR        C header files [PREFIX/include]
1779  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1780  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1781  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1782  --infodir=DIR           info documentation [DATAROOTDIR/info]
1783  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1784  --mandir=DIR            man documentation [DATAROOTDIR/man]
1785  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1786  --htmldir=DIR           html documentation [DOCDIR]
1787  --dvidir=DIR            dvi documentation [DOCDIR]
1788  --pdfdir=DIR            pdf documentation [DOCDIR]
1789  --psdir=DIR             ps documentation [DOCDIR]
1790_ACEOF
1791
1792  cat <<\_ACEOF
1793
1794X features:
1795  --x-includes=DIR    X include files are in DIR
1796  --x-libraries=DIR   X library files are in DIR
1797
1798System types:
1799  --build=BUILD     configure for building on BUILD [guessed]
1800  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1801  --target=TARGET   configure for building compilers for TARGET [HOST]
1802_ACEOF
1803fi
1804
1805if test -n "$ac_init_help"; then
1806  case $ac_init_help in
1807     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1808   esac
1809  cat <<\_ACEOF
1810
1811Optional Features:
1812  --disable-option-checking  ignore unrecognized --enable/--with options
1813  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1814  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1815  --enable-openjdk-only   suppress building custom source even if present
1816                          [disabled]
1817  --enable-debug          set the debug level to fastdebug (shorthand for
1818                          --with-debug-level=fastdebug) [disabled]
1819  --disable-headful       disable building headful support (graphical UI
1820                          support) [enabled]
1821  --enable-hotspot-test-in-build
1822                          run the Queens test after Hotspot build [disabled]
1823  --enable-unlimited-crypto
1824                          Enable unlimited crypto policy [disabled]
1825  --enable-rmiconnector-iiop
1826                          enable the JMX RMIConnector iiop transport
1827                          [disabled]
1828  --disable-debug-symbols disable generation of debug symbols [enabled]
1829  --disable-zip-debug-info
1830                          disable zipping of debug-info files [enabled]
1831  --enable-macosx-runtime-support
1832                          Deprecated. Option is kept for backwards
1833                          compatibility and is ignored
1834  --disable-freetype-bundling
1835                          disable bundling of the freetype library with the
1836                          build result [enabled on Windows or when using
1837                          --with-freetype, disabled otherwise]
1838  --enable-sjavac         use sjavac to do fast incremental compiles
1839                          [disabled]
1840  --disable-precompiled-headers
1841                          disable using precompiled headers when compiling C++
1842                          [enabled]
1843  --enable-ccache         enable using ccache to speed up recompilations
1844                          [disabled]
1845
1846Optional Packages:
1847  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1848  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1849  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1850                          support it), e.g. --with-target-bits=32 [guessed]
1851  --with-sys-root         pass this sys-root to the compilers and tools (for
1852                          cross-compiling)
1853  --with-tools-dir        search this directory for compilers and tools (for
1854                          cross-compiling)
1855  --with-devkit           use this directory as base for tools-dir and
1856                          sys-root (for cross-compiling)
1857  --with-custom-make-dir  Deprecated. Option is kept for backwards
1858                          compatibility and is ignored
1859  --with-jdk-variant      JDK variant to build (normal) [normal]
1860  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1861  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1862                          client, minimal1, kernel, zero, zeroshark, core)
1863                          [server]
1864  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1865                          optimized (HotSpot build only)) [release]
1866  --with-conf-name        use this as the name of the configuration [generated
1867                          from important configuration options]
1868  --with-builddeps-conf   use this configuration file for the builddeps
1869  --with-builddeps-server download and use build dependencies from this server
1870                          url
1871  --with-builddeps-dir    store downloaded build dependencies here
1872                          [/localhome/builddeps]
1873  --with-builddeps-group  chgrp the downloaded build dependencies to this
1874                          group
1875  --with-cacerts-file     specify alternative cacerts file
1876  --with-milestone        Set milestone value for build [internal]
1877  --with-update-version   Set update version value for build [b00]
1878  --with-user-release-suffix
1879                          Add a custom string to the version string if build
1880                          number is not set.[username_builddateb00]
1881  --with-build-number     Set build number value for build [b00]
1882  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1883  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1884                          invocations of boot JDK, overriding the default
1885                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1886                          -enableassertions"
1887  --with-add-source-root  for each and every source directory, look in this
1888                          additional source root for the same directory; if it
1889                          exists and have files in it, include it in the build
1890  --with-override-source-root
1891                          for each and every source directory, look in this
1892                          override source root for the same directory; if it
1893                          exists, use that directory instead and ignore the
1894                          directory in the original source root
1895  --with-adds-and-overrides
1896                          use the subdirs 'adds' and 'overrides' in the
1897                          specified directory as add-source-root and
1898                          override-source-root
1899  --with-override-langtools
1900                          use this langtools dir for the build
1901  --with-override-corba   use this corba dir for the build
1902  --with-override-jaxp    use this jaxp dir for the build
1903  --with-override-jaxws   use this jaxws dir for the build
1904  --with-override-hotspot use this hotspot dir for the build
1905  --with-override-nashorn use this nashorn dir for the build
1906  --with-override-jdk     use this jdk dir for the build
1907  --with-import-hotspot   import hotspot binaries from this jdk image or
1908                          hotspot build dist dir instead of building from
1909                          source
1910  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1911                          to show possible values [platform dependent]
1912  --with-jtreg            Regression Test Harness [probed]
1913  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1914  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1915  --with-extra-ldflags    extra flags to be used when linking jdk
1916  --with-x                use the X Window System
1917  --with-cups             specify prefix directory for the cups package
1918                          (expecting the headers under PATH/include)
1919  --with-cups-include     specify directory for the cups include files
1920  --with-freetype         specify prefix directory for the freetype package
1921                          (expecting the libraries under PATH/lib and the
1922                          headers under PATH/include)
1923  --with-freetype-include specify directory for the freetype include files
1924  --with-freetype-lib     specify directory for the freetype library
1925  --with-alsa             specify prefix directory for the alsa package
1926                          (expecting the libraries under PATH/lib and the
1927                          headers under PATH/include)
1928  --with-alsa-include     specify directory for the alsa include files
1929  --with-alsa-lib         specify directory for the alsa library
1930  --with-giflib           use giflib from build system or OpenJDK source
1931                          (system, bundled) [bundled]
1932  --with-libpng           use libpng from build system or OpenJDK source
1933                          (system, bundled) [bundled]
1934  --with-zlib             use zlib from build system or OpenJDK source
1935                          (system, bundled) [bundled]
1936  --with-stdc++lib=<static>,<dynamic>,<default>
1937                          force linking of the C++ runtime on Linux to either
1938                          static or dynamic, default is static with dynamic as
1939                          fallback
1940  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1941                          only) [probed]
1942  --with-dxsdk            Deprecated. Option is kept for backwards
1943                          compatibility and is ignored
1944  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1945                          compatibility and is ignored
1946  --with-dxsdk-include    Deprecated. Option is kept for backwards
1947                          compatibility and is ignored
1948  --with-num-cores        number of cores in the build system, e.g.
1949                          --with-num-cores=8 [probed]
1950  --with-memory-size      memory (in MB) available in the build system, e.g.
1951                          --with-memory-size=1024 [probed]
1952  --with-jobs             number of parallel jobs to let make run [calculated
1953                          based on cores and memory]
1954  --with-sjavac-server-java
1955                          use this java binary for running the sjavac
1956                          background server [Boot JDK java]
1957  --with-ccache-dir       where to store ccache files [~/.ccache]
1958
1959Some influential environment variables:
1960  BASENAME    Override default value for BASENAME
1961  BASH        Override default value for BASH
1962  CAT         Override default value for CAT
1963  CHMOD       Override default value for CHMOD
1964  CMP         Override default value for CMP
1965  COMM        Override default value for COMM
1966  CP          Override default value for CP
1967  CPIO        Override default value for CPIO
1968  CUT         Override default value for CUT
1969  DATE        Override default value for DATE
1970  DIFF        Override default value for DIFF
1971  DIRNAME     Override default value for DIRNAME
1972  ECHO        Override default value for ECHO
1973  EXPR        Override default value for EXPR
1974  FILE        Override default value for FILE
1975  FIND        Override default value for FIND
1976  HEAD        Override default value for HEAD
1977  LN          Override default value for LN
1978  LS          Override default value for LS
1979  MKDIR       Override default value for MKDIR
1980  MKTEMP      Override default value for MKTEMP
1981  MV          Override default value for MV
1982  NAWK        Override default value for NAWK
1983  PRINTF      Override default value for PRINTF
1984  RM          Override default value for RM
1985  SH          Override default value for SH
1986  SORT        Override default value for SORT
1987  TAIL        Override default value for TAIL
1988  TAR         Override default value for TAR
1989  TEE         Override default value for TEE
1990  TOUCH       Override default value for TOUCH
1991  TR          Override default value for TR
1992  UNAME       Override default value for UNAME
1993  UNIQ        Override default value for UNIQ
1994  WC          Override default value for WC
1995  WHICH       Override default value for WHICH
1996  XARGS       Override default value for XARGS
1997  AWK         Override default value for AWK
1998  GREP        Override default value for GREP
1999  EGREP       Override default value for EGREP
2000  FGREP       Override default value for FGREP
2001  SED         Override default value for SED
2002  CYGPATH     Override default value for CYGPATH
2003  READLINK    Override default value for READLINK
2004  DF          Override default value for DF
2005  SETFILE     Override default value for SETFILE
2006  UNZIP       Override default value for UNZIP
2007  ZIP         Override default value for ZIP
2008  LDD         Override default value for LDD
2009  OTOOL       Override default value for OTOOL
2010  READELF     Override default value for READELF
2011  HG          Override default value for HG
2012  STAT        Override default value for STAT
2013  TIME        Override default value for TIME
2014  DSYMUTIL    Override default value for DSYMUTIL
2015  XATTR       Override default value for XATTR
2016  CODESIGN    Override default value for CODESIGN
2017  PKG_CONFIG  path to pkg-config utility
2018  JAVA        Override default value for JAVA
2019  JAVAC       Override default value for JAVAC
2020  JAVAH       Override default value for JAVAH
2021  JAR         Override default value for JAR
2022  NATIVE2ASCII
2023              Override default value for NATIVE2ASCII
2024  JARSIGNER   Override default value for JARSIGNER
2025  CC          C compiler command
2026  CFLAGS      C compiler flags
2027  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2028              nonstandard directory <lib dir>
2029  LIBS        libraries to pass to the linker, e.g. -l<library>
2030  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2031              you have headers in a nonstandard directory <include dir>
2032  CXX         C++ compiler command
2033  CXXFLAGS    C++ compiler flags
2034  CPP         C preprocessor
2035  CXXCPP      C++ preprocessor
2036  AS          Override default value for AS
2037  AR          Override default value for AR
2038  OBJC        Objective C compiler command
2039  OBJCFLAGS   Objective C compiler flags
2040  LIPO        Override default value for LIPO
2041  STRIP       Override default value for STRIP
2042  NM          Override default value for NM
2043  GNM         Override default value for GNM
2044  MCS         Override default value for MCS
2045  OBJCOPY     Override default value for OBJCOPY
2046  OBJDUMP     Override default value for OBJDUMP
2047  BUILD_CC    Override default value for BUILD_CC
2048  BUILD_CXX   Override default value for BUILD_CXX
2049  BUILD_LD    Override default value for BUILD_LD
2050  JTREGEXE    Override default value for JTREGEXE
2051  XMKMF       Path to xmkmf, Makefile generator for X Window System
2052  FREETYPE_CFLAGS
2053              C compiler flags for FREETYPE, overriding pkg-config
2054  FREETYPE_LIBS
2055              linker flags for FREETYPE, overriding pkg-config
2056  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2057  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2058  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2059  PNG_LIBS    linker flags for PNG, overriding pkg-config
2060  LIBFFI_CFLAGS
2061              C compiler flags for LIBFFI, overriding pkg-config
2062  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2063  CCACHE      Override default value for CCACHE
2064
2065Use these variables to override the choices made by `configure' or to help
2066it to find libraries and programs with nonstandard names/locations.
2067
2068Report bugs to <build-dev@openjdk.java.net>.
2069OpenJDK home page: <http://openjdk.java.net>.
2070_ACEOF
2071ac_status=$?
2072fi
2073
2074if test "$ac_init_help" = "recursive"; then
2075  # If there are subdirs, report their specific --help.
2076  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2077    test -d "$ac_dir" ||
2078      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2079      continue
2080    ac_builddir=.
2081
2082case "$ac_dir" in
2083.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2084*)
2085  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2086  # A ".." for each directory in $ac_dir_suffix.
2087  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2088  case $ac_top_builddir_sub in
2089  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2090  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2091  esac ;;
2092esac
2093ac_abs_top_builddir=$ac_pwd
2094ac_abs_builddir=$ac_pwd$ac_dir_suffix
2095# for backward compatibility:
2096ac_top_builddir=$ac_top_build_prefix
2097
2098case $srcdir in
2099  .)  # We are building in place.
2100    ac_srcdir=.
2101    ac_top_srcdir=$ac_top_builddir_sub
2102    ac_abs_top_srcdir=$ac_pwd ;;
2103  [\\/]* | ?:[\\/]* )  # Absolute name.
2104    ac_srcdir=$srcdir$ac_dir_suffix;
2105    ac_top_srcdir=$srcdir
2106    ac_abs_top_srcdir=$srcdir ;;
2107  *) # Relative name.
2108    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2109    ac_top_srcdir=$ac_top_build_prefix$srcdir
2110    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2111esac
2112ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2113
2114    cd "$ac_dir" || { ac_status=$?; continue; }
2115    # Check for guested configure.
2116    if test -f "$ac_srcdir/configure.gnu"; then
2117      echo &&
2118      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2119    elif test -f "$ac_srcdir/configure"; then
2120      echo &&
2121      $SHELL "$ac_srcdir/configure" --help=recursive
2122    else
2123      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2124    fi || ac_status=$?
2125    cd "$ac_pwd" || { ac_status=$?; break; }
2126  done
2127fi
2128
2129test -n "$ac_init_help" && exit $ac_status
2130if $ac_init_version; then
2131  cat <<\_ACEOF
2132OpenJDK configure jdk9
2133generated by GNU Autoconf 2.69
2134
2135Copyright (C) 2012 Free Software Foundation, Inc.
2136This configure script is free software; the Free Software Foundation
2137gives unlimited permission to copy, distribute and modify it.
2138_ACEOF
2139  exit
2140fi
2141
2142## ------------------------ ##
2143## Autoconf initialization. ##
2144## ------------------------ ##
2145
2146# ac_fn_c_try_compile LINENO
2147# --------------------------
2148# Try to compile conftest.$ac_ext, and return whether this succeeded.
2149ac_fn_c_try_compile ()
2150{
2151  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2152  rm -f conftest.$ac_objext
2153  if { { ac_try="$ac_compile"
2154case "(($ac_try" in
2155  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2156  *) ac_try_echo=$ac_try;;
2157esac
2158eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2159$as_echo "$ac_try_echo"; } >&5
2160  (eval "$ac_compile") 2>conftest.err
2161  ac_status=$?
2162  if test -s conftest.err; then
2163    grep -v '^ *+' conftest.err >conftest.er1
2164    cat conftest.er1 >&5
2165    mv -f conftest.er1 conftest.err
2166  fi
2167  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2168  test $ac_status = 0; } && {
2169	 test -z "$ac_c_werror_flag" ||
2170	 test ! -s conftest.err
2171       } && test -s conftest.$ac_objext; then :
2172  ac_retval=0
2173else
2174  $as_echo "$as_me: failed program was:" >&5
2175sed 's/^/| /' conftest.$ac_ext >&5
2176
2177	ac_retval=1
2178fi
2179  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2180  as_fn_set_status $ac_retval
2181
2182} # ac_fn_c_try_compile
2183
2184# ac_fn_cxx_try_compile LINENO
2185# ----------------------------
2186# Try to compile conftest.$ac_ext, and return whether this succeeded.
2187ac_fn_cxx_try_compile ()
2188{
2189  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2190  rm -f conftest.$ac_objext
2191  if { { ac_try="$ac_compile"
2192case "(($ac_try" in
2193  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2194  *) ac_try_echo=$ac_try;;
2195esac
2196eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2197$as_echo "$ac_try_echo"; } >&5
2198  (eval "$ac_compile") 2>conftest.err
2199  ac_status=$?
2200  if test -s conftest.err; then
2201    grep -v '^ *+' conftest.err >conftest.er1
2202    cat conftest.er1 >&5
2203    mv -f conftest.er1 conftest.err
2204  fi
2205  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2206  test $ac_status = 0; } && {
2207	 test -z "$ac_cxx_werror_flag" ||
2208	 test ! -s conftest.err
2209       } && test -s conftest.$ac_objext; then :
2210  ac_retval=0
2211else
2212  $as_echo "$as_me: failed program was:" >&5
2213sed 's/^/| /' conftest.$ac_ext >&5
2214
2215	ac_retval=1
2216fi
2217  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2218  as_fn_set_status $ac_retval
2219
2220} # ac_fn_cxx_try_compile
2221
2222# ac_fn_c_try_cpp LINENO
2223# ----------------------
2224# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2225ac_fn_c_try_cpp ()
2226{
2227  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2228  if { { ac_try="$ac_cpp conftest.$ac_ext"
2229case "(($ac_try" in
2230  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2231  *) ac_try_echo=$ac_try;;
2232esac
2233eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2234$as_echo "$ac_try_echo"; } >&5
2235  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2236  ac_status=$?
2237  if test -s conftest.err; then
2238    grep -v '^ *+' conftest.err >conftest.er1
2239    cat conftest.er1 >&5
2240    mv -f conftest.er1 conftest.err
2241  fi
2242  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2243  test $ac_status = 0; } > conftest.i && {
2244	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2245	 test ! -s conftest.err
2246       }; then :
2247  ac_retval=0
2248else
2249  $as_echo "$as_me: failed program was:" >&5
2250sed 's/^/| /' conftest.$ac_ext >&5
2251
2252    ac_retval=1
2253fi
2254  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2255  as_fn_set_status $ac_retval
2256
2257} # ac_fn_c_try_cpp
2258
2259# ac_fn_cxx_try_cpp LINENO
2260# ------------------------
2261# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2262ac_fn_cxx_try_cpp ()
2263{
2264  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2265  if { { ac_try="$ac_cpp conftest.$ac_ext"
2266case "(($ac_try" in
2267  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2268  *) ac_try_echo=$ac_try;;
2269esac
2270eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2271$as_echo "$ac_try_echo"; } >&5
2272  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2273  ac_status=$?
2274  if test -s conftest.err; then
2275    grep -v '^ *+' conftest.err >conftest.er1
2276    cat conftest.er1 >&5
2277    mv -f conftest.er1 conftest.err
2278  fi
2279  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2280  test $ac_status = 0; } > conftest.i && {
2281	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2282	 test ! -s conftest.err
2283       }; then :
2284  ac_retval=0
2285else
2286  $as_echo "$as_me: failed program was:" >&5
2287sed 's/^/| /' conftest.$ac_ext >&5
2288
2289    ac_retval=1
2290fi
2291  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2292  as_fn_set_status $ac_retval
2293
2294} # ac_fn_cxx_try_cpp
2295
2296# ac_fn_objc_try_compile LINENO
2297# -----------------------------
2298# Try to compile conftest.$ac_ext, and return whether this succeeded.
2299ac_fn_objc_try_compile ()
2300{
2301  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2302  rm -f conftest.$ac_objext
2303  if { { ac_try="$ac_compile"
2304case "(($ac_try" in
2305  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2306  *) ac_try_echo=$ac_try;;
2307esac
2308eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2309$as_echo "$ac_try_echo"; } >&5
2310  (eval "$ac_compile") 2>conftest.err
2311  ac_status=$?
2312  if test -s conftest.err; then
2313    grep -v '^ *+' conftest.err >conftest.er1
2314    cat conftest.er1 >&5
2315    mv -f conftest.er1 conftest.err
2316  fi
2317  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2318  test $ac_status = 0; } && {
2319	 test -z "$ac_objc_werror_flag" ||
2320	 test ! -s conftest.err
2321       } && test -s conftest.$ac_objext; then :
2322  ac_retval=0
2323else
2324  $as_echo "$as_me: failed program was:" >&5
2325sed 's/^/| /' conftest.$ac_ext >&5
2326
2327	ac_retval=1
2328fi
2329  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2330  as_fn_set_status $ac_retval
2331
2332} # ac_fn_objc_try_compile
2333
2334# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2335# ---------------------------------------------------------
2336# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2337# the include files in INCLUDES and setting the cache variable VAR
2338# accordingly.
2339ac_fn_cxx_check_header_mongrel ()
2340{
2341  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2342  if eval \${$3+:} false; then :
2343  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2344$as_echo_n "checking for $2... " >&6; }
2345if eval \${$3+:} false; then :
2346  $as_echo_n "(cached) " >&6
2347fi
2348eval ac_res=\$$3
2349	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2350$as_echo "$ac_res" >&6; }
2351else
2352  # Is the header compilable?
2353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2354$as_echo_n "checking $2 usability... " >&6; }
2355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2356/* end confdefs.h.  */
2357$4
2358#include <$2>
2359_ACEOF
2360if ac_fn_cxx_try_compile "$LINENO"; then :
2361  ac_header_compiler=yes
2362else
2363  ac_header_compiler=no
2364fi
2365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2367$as_echo "$ac_header_compiler" >&6; }
2368
2369# Is the header present?
2370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2371$as_echo_n "checking $2 presence... " >&6; }
2372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2373/* end confdefs.h.  */
2374#include <$2>
2375_ACEOF
2376if ac_fn_cxx_try_cpp "$LINENO"; then :
2377  ac_header_preproc=yes
2378else
2379  ac_header_preproc=no
2380fi
2381rm -f conftest.err conftest.i conftest.$ac_ext
2382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2383$as_echo "$ac_header_preproc" >&6; }
2384
2385# So?  What about this header?
2386case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2387  yes:no: )
2388    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2389$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2390    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2391$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2392    ;;
2393  no:yes:* )
2394    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2395$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2396    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2397$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2398    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2399$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2400    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2401$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2402    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2403$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2404( $as_echo "## ----------------------------------------- ##
2405## Report this to build-dev@openjdk.java.net ##
2406## ----------------------------------------- ##"
2407     ) | sed "s/^/$as_me: WARNING:     /" >&2
2408    ;;
2409esac
2410  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2411$as_echo_n "checking for $2... " >&6; }
2412if eval \${$3+:} false; then :
2413  $as_echo_n "(cached) " >&6
2414else
2415  eval "$3=\$ac_header_compiler"
2416fi
2417eval ac_res=\$$3
2418	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2419$as_echo "$ac_res" >&6; }
2420fi
2421  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2422
2423} # ac_fn_cxx_check_header_mongrel
2424
2425# ac_fn_cxx_try_run LINENO
2426# ------------------------
2427# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2428# that executables *can* be run.
2429ac_fn_cxx_try_run ()
2430{
2431  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2432  if { { ac_try="$ac_link"
2433case "(($ac_try" in
2434  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2435  *) ac_try_echo=$ac_try;;
2436esac
2437eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2438$as_echo "$ac_try_echo"; } >&5
2439  (eval "$ac_link") 2>&5
2440  ac_status=$?
2441  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2442  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2443  { { case "(($ac_try" in
2444  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2445  *) ac_try_echo=$ac_try;;
2446esac
2447eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2448$as_echo "$ac_try_echo"; } >&5
2449  (eval "$ac_try") 2>&5
2450  ac_status=$?
2451  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2452  test $ac_status = 0; }; }; then :
2453  ac_retval=0
2454else
2455  $as_echo "$as_me: program exited with status $ac_status" >&5
2456       $as_echo "$as_me: failed program was:" >&5
2457sed 's/^/| /' conftest.$ac_ext >&5
2458
2459       ac_retval=$ac_status
2460fi
2461  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2462  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2463  as_fn_set_status $ac_retval
2464
2465} # ac_fn_cxx_try_run
2466
2467# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2468# ---------------------------------------------------------
2469# Tests whether HEADER exists and can be compiled using the include files in
2470# INCLUDES, setting the cache variable VAR accordingly.
2471ac_fn_cxx_check_header_compile ()
2472{
2473  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2474  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2475$as_echo_n "checking for $2... " >&6; }
2476if eval \${$3+:} false; then :
2477  $as_echo_n "(cached) " >&6
2478else
2479  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2480/* end confdefs.h.  */
2481$4
2482#include <$2>
2483_ACEOF
2484if ac_fn_cxx_try_compile "$LINENO"; then :
2485  eval "$3=yes"
2486else
2487  eval "$3=no"
2488fi
2489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2490fi
2491eval ac_res=\$$3
2492	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2493$as_echo "$ac_res" >&6; }
2494  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2495
2496} # ac_fn_cxx_check_header_compile
2497
2498# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2499# ----------------------------------------------
2500# Tries to find the compile-time value of EXPR in a program that includes
2501# INCLUDES, setting VAR accordingly. Returns whether the value could be
2502# computed
2503ac_fn_cxx_compute_int ()
2504{
2505  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2506  if test "$cross_compiling" = yes; then
2507    # Depending upon the size, compute the lo and hi bounds.
2508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2509/* end confdefs.h.  */
2510$4
2511int
2512main ()
2513{
2514static int test_array [1 - 2 * !(($2) >= 0)];
2515test_array [0] = 0;
2516return test_array [0];
2517
2518  ;
2519  return 0;
2520}
2521_ACEOF
2522if ac_fn_cxx_try_compile "$LINENO"; then :
2523  ac_lo=0 ac_mid=0
2524  while :; do
2525    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2526/* end confdefs.h.  */
2527$4
2528int
2529main ()
2530{
2531static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2532test_array [0] = 0;
2533return test_array [0];
2534
2535  ;
2536  return 0;
2537}
2538_ACEOF
2539if ac_fn_cxx_try_compile "$LINENO"; then :
2540  ac_hi=$ac_mid; break
2541else
2542  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2543			if test $ac_lo -le $ac_mid; then
2544			  ac_lo= ac_hi=
2545			  break
2546			fi
2547			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2548fi
2549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2550  done
2551else
2552  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2553/* end confdefs.h.  */
2554$4
2555int
2556main ()
2557{
2558static int test_array [1 - 2 * !(($2) < 0)];
2559test_array [0] = 0;
2560return test_array [0];
2561
2562  ;
2563  return 0;
2564}
2565_ACEOF
2566if ac_fn_cxx_try_compile "$LINENO"; then :
2567  ac_hi=-1 ac_mid=-1
2568  while :; do
2569    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2570/* end confdefs.h.  */
2571$4
2572int
2573main ()
2574{
2575static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2576test_array [0] = 0;
2577return test_array [0];
2578
2579  ;
2580  return 0;
2581}
2582_ACEOF
2583if ac_fn_cxx_try_compile "$LINENO"; then :
2584  ac_lo=$ac_mid; break
2585else
2586  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2587			if test $ac_mid -le $ac_hi; then
2588			  ac_lo= ac_hi=
2589			  break
2590			fi
2591			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2592fi
2593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2594  done
2595else
2596  ac_lo= ac_hi=
2597fi
2598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2599fi
2600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2601# Binary search between lo and hi bounds.
2602while test "x$ac_lo" != "x$ac_hi"; do
2603  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2604  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2605/* end confdefs.h.  */
2606$4
2607int
2608main ()
2609{
2610static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2611test_array [0] = 0;
2612return test_array [0];
2613
2614  ;
2615  return 0;
2616}
2617_ACEOF
2618if ac_fn_cxx_try_compile "$LINENO"; then :
2619  ac_hi=$ac_mid
2620else
2621  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2622fi
2623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2624done
2625case $ac_lo in #((
2626?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2627'') ac_retval=1 ;;
2628esac
2629  else
2630    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2631/* end confdefs.h.  */
2632$4
2633static long int longval () { return $2; }
2634static unsigned long int ulongval () { return $2; }
2635#include <stdio.h>
2636#include <stdlib.h>
2637int
2638main ()
2639{
2640
2641  FILE *f = fopen ("conftest.val", "w");
2642  if (! f)
2643    return 1;
2644  if (($2) < 0)
2645    {
2646      long int i = longval ();
2647      if (i != ($2))
2648	return 1;
2649      fprintf (f, "%ld", i);
2650    }
2651  else
2652    {
2653      unsigned long int i = ulongval ();
2654      if (i != ($2))
2655	return 1;
2656      fprintf (f, "%lu", i);
2657    }
2658  /* Do not output a trailing newline, as this causes \r\n confusion
2659     on some platforms.  */
2660  return ferror (f) || fclose (f) != 0;
2661
2662  ;
2663  return 0;
2664}
2665_ACEOF
2666if ac_fn_cxx_try_run "$LINENO"; then :
2667  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2668else
2669  ac_retval=1
2670fi
2671rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2672  conftest.$ac_objext conftest.beam conftest.$ac_ext
2673rm -f conftest.val
2674
2675  fi
2676  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2677  as_fn_set_status $ac_retval
2678
2679} # ac_fn_cxx_compute_int
2680
2681# ac_fn_cxx_try_link LINENO
2682# -------------------------
2683# Try to link conftest.$ac_ext, and return whether this succeeded.
2684ac_fn_cxx_try_link ()
2685{
2686  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2687  rm -f conftest.$ac_objext conftest$ac_exeext
2688  if { { ac_try="$ac_link"
2689case "(($ac_try" in
2690  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2691  *) ac_try_echo=$ac_try;;
2692esac
2693eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2694$as_echo "$ac_try_echo"; } >&5
2695  (eval "$ac_link") 2>conftest.err
2696  ac_status=$?
2697  if test -s conftest.err; then
2698    grep -v '^ *+' conftest.err >conftest.er1
2699    cat conftest.er1 >&5
2700    mv -f conftest.er1 conftest.err
2701  fi
2702  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2703  test $ac_status = 0; } && {
2704	 test -z "$ac_cxx_werror_flag" ||
2705	 test ! -s conftest.err
2706       } && test -s conftest$ac_exeext && {
2707	 test "$cross_compiling" = yes ||
2708	 test -x conftest$ac_exeext
2709       }; then :
2710  ac_retval=0
2711else
2712  $as_echo "$as_me: failed program was:" >&5
2713sed 's/^/| /' conftest.$ac_ext >&5
2714
2715	ac_retval=1
2716fi
2717  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2718  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2719  # interfere with the next link command; also delete a directory that is
2720  # left behind by Apple's compiler.  We do this before executing the actions.
2721  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2722  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2723  as_fn_set_status $ac_retval
2724
2725} # ac_fn_cxx_try_link
2726
2727# ac_fn_cxx_check_func LINENO FUNC VAR
2728# ------------------------------------
2729# Tests whether FUNC exists, setting the cache variable VAR accordingly
2730ac_fn_cxx_check_func ()
2731{
2732  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2733  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2734$as_echo_n "checking for $2... " >&6; }
2735if eval \${$3+:} false; then :
2736  $as_echo_n "(cached) " >&6
2737else
2738  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2739/* end confdefs.h.  */
2740/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2741   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2742#define $2 innocuous_$2
2743
2744/* System header to define __stub macros and hopefully few prototypes,
2745    which can conflict with char $2 (); below.
2746    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2747    <limits.h> exists even on freestanding compilers.  */
2748
2749#ifdef __STDC__
2750# include <limits.h>
2751#else
2752# include <assert.h>
2753#endif
2754
2755#undef $2
2756
2757/* Override any GCC internal prototype to avoid an error.
2758   Use char because int might match the return type of a GCC
2759   builtin and then its argument prototype would still apply.  */
2760#ifdef __cplusplus
2761extern "C"
2762#endif
2763char $2 ();
2764/* The GNU C library defines this for functions which it implements
2765    to always fail with ENOSYS.  Some functions are actually named
2766    something starting with __ and the normal name is an alias.  */
2767#if defined __stub_$2 || defined __stub___$2
2768choke me
2769#endif
2770
2771int
2772main ()
2773{
2774return $2 ();
2775  ;
2776  return 0;
2777}
2778_ACEOF
2779if ac_fn_cxx_try_link "$LINENO"; then :
2780  eval "$3=yes"
2781else
2782  eval "$3=no"
2783fi
2784rm -f core conftest.err conftest.$ac_objext \
2785    conftest$ac_exeext conftest.$ac_ext
2786fi
2787eval ac_res=\$$3
2788	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2789$as_echo "$ac_res" >&6; }
2790  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2791
2792} # ac_fn_cxx_check_func
2793
2794# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2795# -------------------------------------------------------
2796# Tests whether HEADER exists and can be compiled using the include files in
2797# INCLUDES, setting the cache variable VAR accordingly.
2798ac_fn_c_check_header_compile ()
2799{
2800  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2801  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2802$as_echo_n "checking for $2... " >&6; }
2803if eval \${$3+:} false; then :
2804  $as_echo_n "(cached) " >&6
2805else
2806  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2807/* end confdefs.h.  */
2808$4
2809#include <$2>
2810_ACEOF
2811if ac_fn_c_try_compile "$LINENO"; then :
2812  eval "$3=yes"
2813else
2814  eval "$3=no"
2815fi
2816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2817fi
2818eval ac_res=\$$3
2819	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2820$as_echo "$ac_res" >&6; }
2821  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2822
2823} # ac_fn_c_check_header_compile
2824cat >config.log <<_ACEOF
2825This file contains any messages produced by compilers while
2826running configure, to aid debugging if configure makes a mistake.
2827
2828It was created by OpenJDK $as_me jdk9, which was
2829generated by GNU Autoconf 2.69.  Invocation command line was
2830
2831  $ $0 $@
2832
2833_ACEOF
2834exec 5>>config.log
2835{
2836cat <<_ASUNAME
2837## --------- ##
2838## Platform. ##
2839## --------- ##
2840
2841hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2842uname -m = `(uname -m) 2>/dev/null || echo unknown`
2843uname -r = `(uname -r) 2>/dev/null || echo unknown`
2844uname -s = `(uname -s) 2>/dev/null || echo unknown`
2845uname -v = `(uname -v) 2>/dev/null || echo unknown`
2846
2847/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2848/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2849
2850/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2851/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2852/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2853/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2854/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2855/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2856/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2857
2858_ASUNAME
2859
2860as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2861for as_dir in $PATH
2862do
2863  IFS=$as_save_IFS
2864  test -z "$as_dir" && as_dir=.
2865    $as_echo "PATH: $as_dir"
2866  done
2867IFS=$as_save_IFS
2868
2869} >&5
2870
2871cat >&5 <<_ACEOF
2872
2873
2874## ----------- ##
2875## Core tests. ##
2876## ----------- ##
2877
2878_ACEOF
2879
2880
2881# Keep a trace of the command line.
2882# Strip out --no-create and --no-recursion so they do not pile up.
2883# Strip out --silent because we don't want to record it for future runs.
2884# Also quote any args containing shell meta-characters.
2885# Make two passes to allow for proper duplicate-argument suppression.
2886ac_configure_args=
2887ac_configure_args0=
2888ac_configure_args1=
2889ac_must_keep_next=false
2890for ac_pass in 1 2
2891do
2892  for ac_arg
2893  do
2894    case $ac_arg in
2895    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2896    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2897    | -silent | --silent | --silen | --sile | --sil)
2898      continue ;;
2899    *\'*)
2900      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2901    esac
2902    case $ac_pass in
2903    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2904    2)
2905      as_fn_append ac_configure_args1 " '$ac_arg'"
2906      if test $ac_must_keep_next = true; then
2907	ac_must_keep_next=false # Got value, back to normal.
2908      else
2909	case $ac_arg in
2910	  *=* | --config-cache | -C | -disable-* | --disable-* \
2911	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2912	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2913	  | -with-* | --with-* | -without-* | --without-* | --x)
2914	    case "$ac_configure_args0 " in
2915	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2916	    esac
2917	    ;;
2918	  -* ) ac_must_keep_next=true ;;
2919	esac
2920      fi
2921      as_fn_append ac_configure_args " '$ac_arg'"
2922      ;;
2923    esac
2924  done
2925done
2926{ ac_configure_args0=; unset ac_configure_args0;}
2927{ ac_configure_args1=; unset ac_configure_args1;}
2928
2929# When interrupted or exit'd, cleanup temporary files, and complete
2930# config.log.  We remove comments because anyway the quotes in there
2931# would cause problems or look ugly.
2932# WARNING: Use '\'' to represent an apostrophe within the trap.
2933# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2934trap 'exit_status=$?
2935  # Save into config.log some information that might help in debugging.
2936  {
2937    echo
2938
2939    $as_echo "## ---------------- ##
2940## Cache variables. ##
2941## ---------------- ##"
2942    echo
2943    # The following way of writing the cache mishandles newlines in values,
2944(
2945  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2946    eval ac_val=\$$ac_var
2947    case $ac_val in #(
2948    *${as_nl}*)
2949      case $ac_var in #(
2950      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2951$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2952      esac
2953      case $ac_var in #(
2954      _ | IFS | as_nl) ;; #(
2955      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2956      *) { eval $ac_var=; unset $ac_var;} ;;
2957      esac ;;
2958    esac
2959  done
2960  (set) 2>&1 |
2961    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2962    *${as_nl}ac_space=\ *)
2963      sed -n \
2964	"s/'\''/'\''\\\\'\'''\''/g;
2965	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2966      ;; #(
2967    *)
2968      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2969      ;;
2970    esac |
2971    sort
2972)
2973    echo
2974
2975    $as_echo "## ----------------- ##
2976## Output variables. ##
2977## ----------------- ##"
2978    echo
2979    for ac_var in $ac_subst_vars
2980    do
2981      eval ac_val=\$$ac_var
2982      case $ac_val in
2983      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2984      esac
2985      $as_echo "$ac_var='\''$ac_val'\''"
2986    done | sort
2987    echo
2988
2989    if test -n "$ac_subst_files"; then
2990      $as_echo "## ------------------- ##
2991## File substitutions. ##
2992## ------------------- ##"
2993      echo
2994      for ac_var in $ac_subst_files
2995      do
2996	eval ac_val=\$$ac_var
2997	case $ac_val in
2998	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2999	esac
3000	$as_echo "$ac_var='\''$ac_val'\''"
3001      done | sort
3002      echo
3003    fi
3004
3005    if test -s confdefs.h; then
3006      $as_echo "## ----------- ##
3007## confdefs.h. ##
3008## ----------- ##"
3009      echo
3010      cat confdefs.h
3011      echo
3012    fi
3013    test "$ac_signal" != 0 &&
3014      $as_echo "$as_me: caught signal $ac_signal"
3015    $as_echo "$as_me: exit $exit_status"
3016  } >&5
3017  rm -f core *.core core.conftest.* &&
3018    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3019    exit $exit_status
3020' 0
3021for ac_signal in 1 2 13 15; do
3022  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3023done
3024ac_signal=0
3025
3026# confdefs.h avoids OS command line length limits that DEFS can exceed.
3027rm -f -r conftest* confdefs.h
3028
3029$as_echo "/* confdefs.h */" > confdefs.h
3030
3031# Predefined preprocessor variables.
3032
3033cat >>confdefs.h <<_ACEOF
3034#define PACKAGE_NAME "$PACKAGE_NAME"
3035_ACEOF
3036
3037cat >>confdefs.h <<_ACEOF
3038#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3039_ACEOF
3040
3041cat >>confdefs.h <<_ACEOF
3042#define PACKAGE_VERSION "$PACKAGE_VERSION"
3043_ACEOF
3044
3045cat >>confdefs.h <<_ACEOF
3046#define PACKAGE_STRING "$PACKAGE_STRING"
3047_ACEOF
3048
3049cat >>confdefs.h <<_ACEOF
3050#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3051_ACEOF
3052
3053cat >>confdefs.h <<_ACEOF
3054#define PACKAGE_URL "$PACKAGE_URL"
3055_ACEOF
3056
3057
3058# Let the site file select an alternate cache file if it wants to.
3059# Prefer an explicitly selected file to automatically selected ones.
3060ac_site_file1=NONE
3061ac_site_file2=NONE
3062if test -n "$CONFIG_SITE"; then
3063  # We do not want a PATH search for config.site.
3064  case $CONFIG_SITE in #((
3065    -*)  ac_site_file1=./$CONFIG_SITE;;
3066    */*) ac_site_file1=$CONFIG_SITE;;
3067    *)   ac_site_file1=./$CONFIG_SITE;;
3068  esac
3069elif test "x$prefix" != xNONE; then
3070  ac_site_file1=$prefix/share/config.site
3071  ac_site_file2=$prefix/etc/config.site
3072else
3073  ac_site_file1=$ac_default_prefix/share/config.site
3074  ac_site_file2=$ac_default_prefix/etc/config.site
3075fi
3076for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3077do
3078  test "x$ac_site_file" = xNONE && continue
3079  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3080    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3081$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3082    sed 's/^/| /' "$ac_site_file" >&5
3083    . "$ac_site_file" \
3084      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3085$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3086as_fn_error $? "failed to load site script $ac_site_file
3087See \`config.log' for more details" "$LINENO" 5; }
3088  fi
3089done
3090
3091if test -r "$cache_file"; then
3092  # Some versions of bash will fail to source /dev/null (special files
3093  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3094  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3095    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3096$as_echo "$as_me: loading cache $cache_file" >&6;}
3097    case $cache_file in
3098      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3099      *)                      . "./$cache_file";;
3100    esac
3101  fi
3102else
3103  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3104$as_echo "$as_me: creating cache $cache_file" >&6;}
3105  >$cache_file
3106fi
3107
3108# Check that the precious variables saved in the cache have kept the same
3109# value.
3110ac_cache_corrupted=false
3111for ac_var in $ac_precious_vars; do
3112  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3113  eval ac_new_set=\$ac_env_${ac_var}_set
3114  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3115  eval ac_new_val=\$ac_env_${ac_var}_value
3116  case $ac_old_set,$ac_new_set in
3117    set,)
3118      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3119$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3120      ac_cache_corrupted=: ;;
3121    ,set)
3122      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3123$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3124      ac_cache_corrupted=: ;;
3125    ,);;
3126    *)
3127      if test "x$ac_old_val" != "x$ac_new_val"; then
3128	# differences in whitespace do not lead to failure.
3129	ac_old_val_w=`echo x $ac_old_val`
3130	ac_new_val_w=`echo x $ac_new_val`
3131	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3132	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3133$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3134	  ac_cache_corrupted=:
3135	else
3136	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3137$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3138	  eval $ac_var=\$ac_old_val
3139	fi
3140	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3141$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3142	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3143$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3144      fi;;
3145  esac
3146  # Pass precious variables to config.status.
3147  if test "$ac_new_set" = set; then
3148    case $ac_new_val in
3149    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3150    *) ac_arg=$ac_var=$ac_new_val ;;
3151    esac
3152    case " $ac_configure_args " in
3153      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3154      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3155    esac
3156  fi
3157done
3158if $ac_cache_corrupted; then
3159  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3160$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3161  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3162$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3163  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3164fi
3165## -------------------- ##
3166## Main body of script. ##
3167## -------------------- ##
3168
3169ac_ext=c
3170ac_cpp='$CPP $CPPFLAGS'
3171ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3172ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3173ac_compiler_gnu=$ac_cv_c_compiler_gnu
3174
3175
3176
3177ac_aux_dir=
3178for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3179  if test -f "$ac_dir/install-sh"; then
3180    ac_aux_dir=$ac_dir
3181    ac_install_sh="$ac_aux_dir/install-sh -c"
3182    break
3183  elif test -f "$ac_dir/install.sh"; then
3184    ac_aux_dir=$ac_dir
3185    ac_install_sh="$ac_aux_dir/install.sh -c"
3186    break
3187  elif test -f "$ac_dir/shtool"; then
3188    ac_aux_dir=$ac_dir
3189    ac_install_sh="$ac_aux_dir/shtool install -c"
3190    break
3191  fi
3192done
3193if test -z "$ac_aux_dir"; then
3194  as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
3195fi
3196
3197# These three variables are undocumented and unsupported,
3198# and are intended to be withdrawn in a future Autoconf release.
3199# They can cause serious problems if a builder's source tree is in a directory
3200# whose full name contains unusual characters.
3201ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3202ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3203ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3204
3205
3206# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3207
3208#
3209# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3210# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3211#
3212# This code is free software; you can redistribute it and/or modify it
3213# under the terms of the GNU General Public License version 2 only, as
3214# published by the Free Software Foundation.  Oracle designates this
3215# particular file as subject to the "Classpath" exception as provided
3216# by Oracle in the LICENSE file that accompanied this code.
3217#
3218# This code is distributed in the hope that it will be useful, but WITHOUT
3219# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3220# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3221# version 2 for more details (a copy is included in the LICENSE file that
3222# accompanied this code).
3223#
3224# You should have received a copy of the GNU General Public License version
3225# 2 along with this work; if not, write to the Free Software Foundation,
3226# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3227#
3228# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3229# or visit www.oracle.com if you need additional information or have any
3230# questions.
3231#
3232
3233#
3234# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3235#
3236# This program is free software; you can redistribute it and/or modify
3237# it under the terms of the GNU General Public License as published by
3238# the Free Software Foundation; either version 2 of the License, or
3239# (at your option) any later version.
3240#
3241# This program is distributed in the hope that it will be useful, but
3242# WITHOUT ANY WARRANTY; without even the implied warranty of
3243# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3244# General Public License for more details.
3245#
3246# You should have received a copy of the GNU General Public License
3247# along with this program; if not, write to the Free Software
3248# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3249#
3250# As a special exception to the GNU General Public License, if you
3251# distribute this file as part of a program that contains a
3252# configuration script generated by Autoconf, you may include it under
3253# the same distribution terms that you use for the rest of that program.
3254
3255# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3256# ----------------------------------
3257# PKG_PROG_PKG_CONFIG
3258
3259# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3260#
3261# Check to see whether a particular set of modules exists.  Similar
3262# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3263#
3264#
3265# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3266# this or PKG_CHECK_MODULES is called, or make sure to call
3267# PKG_CHECK_EXISTS manually
3268# --------------------------------------------------------------
3269
3270
3271
3272# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3273# ---------------------------------------------
3274# _PKG_CONFIG
3275
3276# _PKG_SHORT_ERRORS_SUPPORTED
3277# -----------------------------
3278# _PKG_SHORT_ERRORS_SUPPORTED
3279
3280
3281# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3282# [ACTION-IF-NOT-FOUND])
3283#
3284#
3285# Note that if there is a possibility the first call to
3286# PKG_CHECK_MODULES might not happen, you should be sure to include an
3287# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3288#
3289#
3290# --------------------------------------------------------------
3291# PKG_CHECK_MODULES
3292
3293
3294# Include these first...
3295#
3296# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3297# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3298#
3299# This code is free software; you can redistribute it and/or modify it
3300# under the terms of the GNU General Public License version 2 only, as
3301# published by the Free Software Foundation.  Oracle designates this
3302# particular file as subject to the "Classpath" exception as provided
3303# by Oracle in the LICENSE file that accompanied this code.
3304#
3305# This code is distributed in the hope that it will be useful, but WITHOUT
3306# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3307# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3308# version 2 for more details (a copy is included in the LICENSE file that
3309# accompanied this code).
3310#
3311# You should have received a copy of the GNU General Public License version
3312# 2 along with this work; if not, write to the Free Software Foundation,
3313# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3314#
3315# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3316# or visit www.oracle.com if you need additional information or have any
3317# questions.
3318#
3319
3320# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3321# If so, then append $1 to $2 \
3322# Also set JVM_ARG_OK to true/false depending on outcome.
3323
3324
3325# Appends a string to a path variable, only adding the : when needed.
3326
3327
3328# This will make sure the given variable points to a full and proper
3329# path. This means:
3330# 1) There will be no spaces in the path. On posix platforms,
3331#    spaces in the path will result in an error. On Windows,
3332#    the path will be rewritten using short-style to be space-free.
3333# 2) The path will be absolute, and it will be in unix-style (on
3334#     cygwin).
3335# $1: The name of the variable to fix
3336
3337
3338# This will make sure the given variable points to a executable
3339# with a full and proper path. This means:
3340# 1) There will be no spaces in the path. On posix platforms,
3341#    spaces in the path will result in an error. On Windows,
3342#    the path will be rewritten using short-style to be space-free.
3343# 2) The path will be absolute, and it will be in unix-style (on
3344#     cygwin).
3345# Any arguments given to the executable is preserved.
3346# If the input variable does not have a directory specification, then
3347# it need to be in the PATH.
3348# $1: The name of the variable to fix
3349
3350
3351
3352
3353# Register a --with argument but mark it as deprecated
3354# $1: The name of the with argument to deprecate, not including --with-
3355
3356
3357# Register a --enable argument but mark it as deprecated
3358# $1: The name of the with argument to deprecate, not including --enable-
3359# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3360
3361
3362
3363
3364# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3365# $1: variable to check
3366
3367
3368# Check that there are no unprocessed overridden variables left.
3369# If so, they are an incorrect argument and we will exit with an error.
3370
3371
3372# Setup a tool for the given variable. If correctly specified by the user,
3373# use that value, otherwise search for the tool using the supplied code snippet.
3374# $1: variable to set
3375# $2: code snippet to call to look for the tool
3376
3377
3378# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3379# $1: variable to set
3380# $2: executable name (or list of names) to look for
3381
3382
3383# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3384# $1: variable to set
3385# $2: executable name (or list of names) to look for
3386
3387
3388# Like BASIC_PATH_PROGS but fails if no tool was found.
3389# $1: variable to set
3390# $2: executable name (or list of names) to look for
3391
3392
3393# Like BASIC_SETUP_TOOL but fails if no tool was found.
3394# $1: variable to set
3395# $2: autoconf macro to call to look for the special tool
3396
3397
3398# Setup the most fundamental tools that relies on not much else to set up,
3399# but is used by much of the early bootstrap code.
3400
3401
3402# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3403
3404
3405
3406
3407
3408
3409
3410#%%% Simple tools %%%
3411
3412# Check if we have found a usable version of make
3413# $1: the path to a potential make binary (or empty)
3414# $2: the description on how we found this
3415
3416
3417# Goes looking for a usable version of GNU make.
3418
3419
3420
3421
3422
3423
3424# Check if build directory is on local disk. If not possible to determine,
3425# we prefer to claim it's local.
3426# Argument 1: directory to test
3427# Argument 2: what to do if it is on local disk
3428# Argument 3: what to do otherwise (remote disk or failure)
3429
3430
3431# Check that source files have basic read permissions set. This might
3432# not be the case in cygwin in certain conditions.
3433
3434
3435
3436
3437#
3438# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3439# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3440#
3441# This code is free software; you can redistribute it and/or modify it
3442# under the terms of the GNU General Public License version 2 only, as
3443# published by the Free Software Foundation.  Oracle designates this
3444# particular file as subject to the "Classpath" exception as provided
3445# by Oracle in the LICENSE file that accompanied this code.
3446#
3447# This code is distributed in the hope that it will be useful, but WITHOUT
3448# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3449# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3450# version 2 for more details (a copy is included in the LICENSE file that
3451# accompanied this code).
3452#
3453# You should have received a copy of the GNU General Public License version
3454# 2 along with this work; if not, write to the Free Software Foundation,
3455# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3456#
3457# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3458# or visit www.oracle.com if you need additional information or have any
3459# questions.
3460#
3461
3462
3463
3464
3465
3466# Helper function which possibly converts a path using DOS-style short mode.
3467# If so, the updated path is stored in $new_path.
3468# $1: The path to check
3469
3470
3471# Helper function which possibly converts a path using DOS-style short mode.
3472# If so, the updated path is stored in $new_path.
3473# $1: The path to check
3474
3475
3476# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3477# and could probably be heavily simplified. However, all changes in this
3478# area tend to need lot of testing in different scenarios, and in lack of
3479# proper unit testing, cleaning this up has not been deemed worth the effort
3480# at the moment.
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3491
3492
3493
3494
3495#
3496# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3497# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3498#
3499# This code is free software; you can redistribute it and/or modify it
3500# under the terms of the GNU General Public License version 2 only, as
3501# published by the Free Software Foundation.  Oracle designates this
3502# particular file as subject to the "Classpath" exception as provided
3503# by Oracle in the LICENSE file that accompanied this code.
3504#
3505# This code is distributed in the hope that it will be useful, but WITHOUT
3506# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3507# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3508# version 2 for more details (a copy is included in the LICENSE file that
3509# accompanied this code).
3510#
3511# You should have received a copy of the GNU General Public License version
3512# 2 along with this work; if not, write to the Free Software Foundation,
3513# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3514#
3515# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3516# or visit www.oracle.com if you need additional information or have any
3517# questions.
3518#
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530# ... then the rest
3531#
3532# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3533# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3534#
3535# This code is free software; you can redistribute it and/or modify it
3536# under the terms of the GNU General Public License version 2 only, as
3537# published by the Free Software Foundation.  Oracle designates this
3538# particular file as subject to the "Classpath" exception as provided
3539# by Oracle in the LICENSE file that accompanied this code.
3540#
3541# This code is distributed in the hope that it will be useful, but WITHOUT
3542# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3543# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3544# version 2 for more details (a copy is included in the LICENSE file that
3545# accompanied this code).
3546#
3547# You should have received a copy of the GNU General Public License version
3548# 2 along with this work; if not, write to the Free Software Foundation,
3549# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3550#
3551# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3552# or visit www.oracle.com if you need additional information or have any
3553# questions.
3554#
3555
3556########################################################################
3557# This file handles detection of the Boot JDK. The Boot JDK detection
3558# process has been developed as a response to solve a complex real-world
3559# problem. Initially, it was simple, but it has grown as platform after
3560# platform, idiosyncracy after idiosyncracy has been supported.
3561#
3562# The basic idea is this:
3563# 1) You need an acceptable *) JDK to use as a Boot JDK
3564# 2) There are several ways to locate a JDK, that are mostly platform
3565#    dependent **)
3566# 3) You can have multiple JDKs installed
3567# 4) If possible, configure should try to dig out an acceptable JDK
3568#    automatically, without having to resort to command-line options
3569#
3570# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3571#     javac) and not a JRE, etc.
3572#
3573# **) On Windows we typically use a well-known path.
3574#     On MacOSX we typically use the tool java_home.
3575#     On Linux we typically find javac in the $PATH, and then follow a
3576#     chain of symlinks that often ends up in a real JDK.
3577#
3578# This leads to the code where we check in different ways to locate a
3579# JDK, and if one is found, check if it is acceptable. If not, we print
3580# our reasons for rejecting it (useful when debugging non-working
3581# configure situations) and continue checking the next one.
3582########################################################################
3583
3584# Execute the check given as argument, and verify the result
3585# If the Boot JDK was previously found, do nothing
3586# $1 A command line (typically autoconf macro) to execute
3587
3588
3589# Test: Is bootjdk explicitely set by command line arguments?
3590
3591
3592# Test: Is bootjdk available from builddeps?
3593
3594
3595# Test: Is $JAVA_HOME set?
3596
3597
3598# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3599
3600
3601# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3602# $1: Argument to the java_home binary (optional)
3603
3604
3605# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3606
3607
3608# Look for a jdk in the given path. If there are multiple, try to select the newest.
3609# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3610# $1 = Path to directory containing jdk installations.
3611# $2 = String to append to the found JDK directory to get the proper JDK home
3612
3613
3614# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3615# environmental variable as base for where to look.
3616# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3617
3618
3619# Test: Is there a JDK installed in default, well-known locations?
3620
3621
3622# Check that a command-line tool in the Boot JDK is correct
3623# $1 = name of variable to assign
3624# $2 = name of binary
3625
3626
3627###############################################################################
3628#
3629# We need a Boot JDK to bootstrap the build.
3630#
3631
3632
3633
3634
3635
3636#
3637# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3638# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3639#
3640# This code is free software; you can redistribute it and/or modify it
3641# under the terms of the GNU General Public License version 2 only, as
3642# published by the Free Software Foundation.  Oracle designates this
3643# particular file as subject to the "Classpath" exception as provided
3644# by Oracle in the LICENSE file that accompanied this code.
3645#
3646# This code is distributed in the hope that it will be useful, but WITHOUT
3647# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3648# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3649# version 2 for more details (a copy is included in the LICENSE file that
3650# accompanied this code).
3651#
3652# You should have received a copy of the GNU General Public License version
3653# 2 along with this work; if not, write to the Free Software Foundation,
3654# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3655#
3656# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3657# or visit www.oracle.com if you need additional information or have any
3658# questions.
3659#
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680#
3681# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3682# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3683#
3684# This code is free software; you can redistribute it and/or modify it
3685# under the terms of the GNU General Public License version 2 only, as
3686# published by the Free Software Foundation.  Oracle designates this
3687# particular file as subject to the "Classpath" exception as provided
3688# by Oracle in the LICENSE file that accompanied this code.
3689#
3690# This code is distributed in the hope that it will be useful, but WITHOUT
3691# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3692# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3693# version 2 for more details (a copy is included in the LICENSE file that
3694# accompanied this code).
3695#
3696# You should have received a copy of the GNU General Public License version
3697# 2 along with this work; if not, write to the Free Software Foundation,
3698# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3699#
3700# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3701# or visit www.oracle.com if you need additional information or have any
3702# questions.
3703#
3704
3705
3706
3707
3708
3709# Documentation on common flags used for solstudio in HIGHEST.
3710#
3711# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3712#          done with care, there are some assumptions below that need to
3713#          be understood about the use of pointers, and IEEE behavior.
3714#
3715# -fns: Use non-standard floating point mode (not IEEE 754)
3716# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3717# -fsingle: Use single precision floating point with 'float'
3718# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3719#   (Source with excessing pointer casting and data access with mixed
3720#    pointer types are not recommended)
3721# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3722#   (If you expect perfect errno behavior, do not use this)
3723# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3724# -xrestrict: Pointer parameters to functions do not overlap
3725#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3726#    If you pass in multiple pointers to the same data, do not use this)
3727# -xlibmil: Inline some library routines
3728#   (If you expect perfect errno behavior, do not use this)
3729# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3730#   (If you expect perfect errno behavior, do not use this)
3731#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3732
3733    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3734    # Bug?
3735    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3736    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3737    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3738    #fi
3739
3740
3741
3742
3743
3744
3745# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3746#                                   [RUN-IF-FALSE])
3747# ------------------------------------------------------------
3748# Check that the c and c++ compilers support an argument
3749
3750
3751
3752
3753#
3754# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3755# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3756#
3757# This code is free software; you can redistribute it and/or modify it
3758# under the terms of the GNU General Public License version 2 only, as
3759# published by the Free Software Foundation.  Oracle designates this
3760# particular file as subject to the "Classpath" exception as provided
3761# by Oracle in the LICENSE file that accompanied this code.
3762#
3763# This code is distributed in the hope that it will be useful, but WITHOUT
3764# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3765# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3766# version 2 for more details (a copy is included in the LICENSE file that
3767# accompanied this code).
3768#
3769# You should have received a copy of the GNU General Public License version
3770# 2 along with this work; if not, write to the Free Software Foundation,
3771# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3772#
3773# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3774# or visit www.oracle.com if you need additional information or have any
3775# questions.
3776#
3777
3778
3779
3780
3781
3782cygwin_help() {
3783  case $1 in
3784    unzip)
3785      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3786      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3787      ;;
3788    zip)
3789      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3790      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3791      ;;
3792    make)
3793      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3794      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3795      ;;
3796    freetype)
3797      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3798        HELP_MSG="To install freetype, run:
3799wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3800chmod +x /tmp/freetype-setup.exe
3801/tmp/freetype-setup.exe
3802Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3803After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3804      else
3805        HELP_MSG="You need to build a 64-bit version of freetype.
3806This is not readily available.
3807You can find source code and build instructions on
3808http://www.freetype.org/
3809If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3810      fi
3811      ;;
3812  esac
3813}
3814
3815msys_help() {
3816  PKGHANDLER_COMMAND=""
3817}
3818
3819apt_help() {
3820  case $1 in
3821    devkit)
3822      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3823    openjdk)
3824      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3825    alsa)
3826      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3827    cups)
3828      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3829    freetype)
3830      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3831    pulse)
3832      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3833    x11)
3834      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3835    ccache)
3836      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3837  esac
3838}
3839
3840yum_help() {
3841  case $1 in
3842    devkit)
3843      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3844    openjdk)
3845      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3846    alsa)
3847      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3848    cups)
3849      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3850    freetype)
3851      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3852    pulse)
3853      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3854    x11)
3855      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3856    ccache)
3857      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3858  esac
3859}
3860
3861port_help() {
3862  PKGHANDLER_COMMAND=""
3863}
3864
3865pkgutil_help() {
3866  PKGHANDLER_COMMAND=""
3867}
3868
3869pkgadd_help() {
3870  PKGHANDLER_COMMAND=""
3871}
3872
3873# This function will check if we're called from the "configure" wrapper while
3874# printing --help. If so, we will print out additional information that can
3875# only be extracted within the autoconf script, and then exit. This must be
3876# called at the very beginning in configure.ac.
3877
3878
3879
3880
3881#
3882# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3883# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3884#
3885# This code is free software; you can redistribute it and/or modify it
3886# under the terms of the GNU General Public License version 2 only, as
3887# published by the Free Software Foundation.  Oracle designates this
3888# particular file as subject to the "Classpath" exception as provided
3889# by Oracle in the LICENSE file that accompanied this code.
3890#
3891# This code is distributed in the hope that it will be useful, but WITHOUT
3892# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3893# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3894# version 2 for more details (a copy is included in the LICENSE file that
3895# accompanied this code).
3896#
3897# You should have received a copy of the GNU General Public License version
3898# 2 along with this work; if not, write to the Free Software Foundation,
3899# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3900#
3901# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3902# or visit www.oracle.com if you need additional information or have any
3903# questions.
3904#
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915###############################################################################
3916#
3917# Should we build only OpenJDK even if closed sources are present?
3918#
3919
3920
3921
3922
3923###############################################################################
3924#
3925# Setup version numbers
3926#
3927
3928
3929
3930
3931
3932
3933#
3934# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3935# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3936#
3937# This code is free software; you can redistribute it and/or modify it
3938# under the terms of the GNU General Public License version 2 only, as
3939# published by the Free Software Foundation.  Oracle designates this
3940# particular file as subject to the "Classpath" exception as provided
3941# by Oracle in the LICENSE file that accompanied this code.
3942#
3943# This code is distributed in the hope that it will be useful, but WITHOUT
3944# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3945# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3946# version 2 for more details (a copy is included in the LICENSE file that
3947# accompanied this code).
3948#
3949# You should have received a copy of the GNU General Public License version
3950# 2 along with this work; if not, write to the Free Software Foundation,
3951# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3952#
3953# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3954# or visit www.oracle.com if you need additional information or have any
3955# questions.
3956#
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976#
3977# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3978# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3979#
3980# This code is free software; you can redistribute it and/or modify it
3981# under the terms of the GNU General Public License version 2 only, as
3982# published by the Free Software Foundation.  Oracle designates this
3983# particular file as subject to the "Classpath" exception as provided
3984# by Oracle in the LICENSE file that accompanied this code.
3985#
3986# This code is distributed in the hope that it will be useful, but WITHOUT
3987# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3988# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3989# version 2 for more details (a copy is included in the LICENSE file that
3990# accompanied this code).
3991#
3992# You should have received a copy of the GNU General Public License version
3993# 2 along with this work; if not, write to the Free Software Foundation,
3994# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3995#
3996# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3997# or visit www.oracle.com if you need additional information or have any
3998# questions.
3999#
4000
4001# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4002# Converts autoconf style CPU name to OpenJDK style, into
4003# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4004
4005
4006# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4007# Converts autoconf style OS name to OpenJDK style, into
4008# VAR_OS and VAR_OS_API.
4009
4010
4011# Expects $host_os $host_cpu $build_os and $build_cpu
4012# and $with_target_bits to have been setup!
4013#
4014# Translate the standard triplet(quadruplet) definition
4015# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4016# OPENJDK_BUILD_OS, etc.
4017
4018
4019# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4020# accordingly. Must be done after setting up build and target system, but before
4021# doing anything else with these values.
4022
4023
4024# Setup the legacy variables, for controlling the old makefiles.
4025#
4026
4027
4028
4029
4030#%%% Build and target systems %%%
4031
4032
4033
4034
4035# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4036# Add -mX to various FLAGS variables.
4037
4038
4039
4040
4041
4042
4043#
4044# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4045# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4046#
4047# This code is free software; you can redistribute it and/or modify it
4048# under the terms of the GNU General Public License version 2 only, as
4049# published by the Free Software Foundation.  Oracle designates this
4050# particular file as subject to the "Classpath" exception as provided
4051# by Oracle in the LICENSE file that accompanied this code.
4052#
4053# This code is distributed in the hope that it will be useful, but WITHOUT
4054# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4055# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4056# version 2 for more details (a copy is included in the LICENSE file that
4057# accompanied this code).
4058#
4059# You should have received a copy of the GNU General Public License version
4060# 2 along with this work; if not, write to the Free Software Foundation,
4061# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4062#
4063# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4064# or visit www.oracle.com if you need additional information or have any
4065# questions.
4066#
4067
4068
4069
4070
4071
4072
4073
4074
4075#
4076# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4077# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4078#
4079# This code is free software; you can redistribute it and/or modify it
4080# under the terms of the GNU General Public License version 2 only, as
4081# published by the Free Software Foundation.  Oracle designates this
4082# particular file as subject to the "Classpath" exception as provided
4083# by Oracle in the LICENSE file that accompanied this code.
4084#
4085# This code is distributed in the hope that it will be useful, but WITHOUT
4086# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4087# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4088# version 2 for more details (a copy is included in the LICENSE file that
4089# accompanied this code).
4090#
4091# You should have received a copy of the GNU General Public License version
4092# 2 along with this work; if not, write to the Free Software Foundation,
4093# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4094#
4095# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4096# or visit www.oracle.com if you need additional information or have any
4097# questions.
4098#
4099
4100########################################################################
4101# This file is responsible for detecting, verifying and setting up the
4102# toolchain, i.e. the compiler, linker and related utilities. It will setup
4103# proper paths to the binaries, but it will not setup any flags.
4104#
4105# The binaries used is determined by the toolchain type, which is the family of
4106# compilers and related tools that are used.
4107########################################################################
4108
4109
4110# All valid toolchains, regardless of platform (used by help.m4)
4111VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4112
4113# These toolchains are valid on different platforms
4114VALID_TOOLCHAINS_linux="gcc clang"
4115VALID_TOOLCHAINS_solaris="solstudio"
4116VALID_TOOLCHAINS_macosx="gcc clang"
4117VALID_TOOLCHAINS_aix="xlc"
4118VALID_TOOLCHAINS_windows="microsoft"
4119
4120# Toolchain descriptions
4121TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4122TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4123TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4124TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4125TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4126
4127# Setup a number of variables describing how native output files are
4128# named on this platform/toolchain.
4129
4130
4131# Determine which toolchain type to use, and make sure it is valid for this
4132# platform. Setup various information about the selected toolchain.
4133
4134
4135# Before we start detecting the toolchain executables, we might need some
4136# special setup, e.g. additional paths etc.
4137
4138
4139# Restore path, etc
4140
4141
4142# Check if a compiler is of the toolchain type we expect, and save the version
4143# information from it. If the compiler does not match the expected type,
4144# this function will abort using AC_MSG_ERROR. If it matches, the version will
4145# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4146# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4147#
4148# $1 = compiler to test (CC or CXX)
4149# $2 = human readable name of compiler (C or C++)
4150
4151
4152# Try to locate the given C or C++ compiler in the path, or otherwise.
4153#
4154# $1 = compiler to test (CC or CXX)
4155# $2 = human readable name of compiler (C or C++)
4156# $3 = list of compiler names to search for
4157
4158
4159# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4160# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4161# archiver (AR). Verify that the compilers are correct according to the
4162# toolchain type.
4163
4164
4165# Setup additional tools that is considered a part of the toolchain, but not the
4166# core part. Many of these are highly platform-specific and do not exist,
4167# and/or are not needed on all platforms.
4168
4169
4170# Setup the build tools (i.e, the compiler and linker used to build programs
4171# that should be run on the build platform, not the target platform, as a build
4172# helper). Since the non-cross-compile case uses the normal, target compilers
4173# for this, we can only do this after these have been setup.
4174
4175
4176# Setup legacy variables that are still needed as alternative ways to refer to
4177# parts of the toolchain.
4178
4179
4180# Do some additional checks on the detected tools.
4181
4182
4183# Setup the JTReg Regression Test Harness.
4184
4185
4186#
4187# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4188# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4189#
4190# This code is free software; you can redistribute it and/or modify it
4191# under the terms of the GNU General Public License version 2 only, as
4192# published by the Free Software Foundation.  Oracle designates this
4193# particular file as subject to the "Classpath" exception as provided
4194# by Oracle in the LICENSE file that accompanied this code.
4195#
4196# This code is distributed in the hope that it will be useful, but WITHOUT
4197# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4198# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4199# version 2 for more details (a copy is included in the LICENSE file that
4200# accompanied this code).
4201#
4202# You should have received a copy of the GNU General Public License version
4203# 2 along with this work; if not, write to the Free Software Foundation,
4204# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4205#
4206# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4207# or visit www.oracle.com if you need additional information or have any
4208# questions.
4209#
4210
4211
4212
4213
4214
4215
4216
4217# Check if the VS env variables were setup prior to running configure.
4218# If not, then find vcvarsall.bat and run it automatically, and integrate
4219# the set env variables into the spec file.
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230# This line needs to be here, verbatim, after all includes and the dummy hook
4231# definitions. It is replaced with custom functionality when building
4232# custom sources.
4233#CUSTOM_AUTOCONF_INCLUDE
4234
4235# Do not change or remove the following line, it is needed for consistency checks:
4236DATE_WHEN_GENERATED=1395652496
4237
4238###############################################################################
4239#
4240# Initialization / Boot-strapping
4241#
4242# The bootstrapping process needs to solve the "chicken or the egg" problem,
4243# thus it jumps back and forth, each time gaining something needed later on.
4244#
4245###############################################################################
4246
4247# If we are requested to print additional help, do that and then exit.
4248# This must be the very first call.
4249
4250  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4251    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4252    $PRINTF "Which are valid to use depends on the build platform.\n"
4253    for toolchain in $VALID_TOOLCHAINS_all; do
4254      # Use indirect variable referencing
4255      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4256      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4257      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4258    done
4259
4260    # And now exit directly
4261    exit 0
4262  fi
4263
4264
4265# Basic initialization that must happen first of all in the normal process.
4266
4267  # Save the original command line. This is passed to us by the wrapper configure script.
4268
4269  DATE_WHEN_CONFIGURED=`LANG=C date`
4270
4271  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4272$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4273  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4274$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4275
4276
4277  # Start with tools that do not need have cross compilation support
4278  # and can be expected to be found in the default PATH. These tools are
4279  # used by configure. Nor are these tools expected to be found in the
4280  # devkit from the builddeps server either, since they are
4281  # needed to download the devkit.
4282
4283  # First are all the simple required tools.
4284
4285
4286
4287  # Publish this variable in the help.
4288
4289
4290  if test "x$BASENAME" = x; then
4291    # The variable is not set by user, try to locate tool using the code snippet
4292    for ac_prog in basename
4293do
4294  # Extract the first word of "$ac_prog", so it can be a program name with args.
4295set dummy $ac_prog; ac_word=$2
4296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4297$as_echo_n "checking for $ac_word... " >&6; }
4298if ${ac_cv_path_BASENAME+:} false; then :
4299  $as_echo_n "(cached) " >&6
4300else
4301  case $BASENAME in
4302  [\\/]* | ?:[\\/]*)
4303  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4304  ;;
4305  *)
4306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4307for as_dir in $PATH
4308do
4309  IFS=$as_save_IFS
4310  test -z "$as_dir" && as_dir=.
4311    for ac_exec_ext in '' $ac_executable_extensions; do
4312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4313    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4315    break 2
4316  fi
4317done
4318  done
4319IFS=$as_save_IFS
4320
4321  ;;
4322esac
4323fi
4324BASENAME=$ac_cv_path_BASENAME
4325if test -n "$BASENAME"; then
4326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4327$as_echo "$BASENAME" >&6; }
4328else
4329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4330$as_echo "no" >&6; }
4331fi
4332
4333
4334  test -n "$BASENAME" && break
4335done
4336
4337  else
4338    # The variable is set, but is it from the command line or the environment?
4339
4340    # Try to remove the string !BASENAME! from our list.
4341    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4342    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4343      # If it failed, the variable was not from the command line. Ignore it,
4344      # but warn the user (except for BASH, which is always set by the calling BASH).
4345      if test "xBASENAME" != xBASH; then
4346        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4347$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4348      fi
4349      # Try to locate tool using the code snippet
4350      for ac_prog in basename
4351do
4352  # Extract the first word of "$ac_prog", so it can be a program name with args.
4353set dummy $ac_prog; ac_word=$2
4354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4355$as_echo_n "checking for $ac_word... " >&6; }
4356if ${ac_cv_path_BASENAME+:} false; then :
4357  $as_echo_n "(cached) " >&6
4358else
4359  case $BASENAME in
4360  [\\/]* | ?:[\\/]*)
4361  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4362  ;;
4363  *)
4364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4365for as_dir in $PATH
4366do
4367  IFS=$as_save_IFS
4368  test -z "$as_dir" && as_dir=.
4369    for ac_exec_ext in '' $ac_executable_extensions; do
4370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4371    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4373    break 2
4374  fi
4375done
4376  done
4377IFS=$as_save_IFS
4378
4379  ;;
4380esac
4381fi
4382BASENAME=$ac_cv_path_BASENAME
4383if test -n "$BASENAME"; then
4384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4385$as_echo "$BASENAME" >&6; }
4386else
4387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4388$as_echo "no" >&6; }
4389fi
4390
4391
4392  test -n "$BASENAME" && break
4393done
4394
4395    else
4396      # If it succeeded, then it was overridden by the user. We will use it
4397      # for the tool.
4398
4399      # First remove it from the list of overridden variables, so we can test
4400      # for unknown variables in the end.
4401      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4402
4403      # Check if the provided tool contains a complete path.
4404      tool_specified="$BASENAME"
4405      tool_basename="${tool_specified##*/}"
4406      if test "x$tool_basename" = "x$tool_specified"; then
4407        # A command without a complete path is provided, search $PATH.
4408        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4409$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4410        # Extract the first word of "$tool_basename", so it can be a program name with args.
4411set dummy $tool_basename; ac_word=$2
4412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4413$as_echo_n "checking for $ac_word... " >&6; }
4414if ${ac_cv_path_BASENAME+:} false; then :
4415  $as_echo_n "(cached) " >&6
4416else
4417  case $BASENAME in
4418  [\\/]* | ?:[\\/]*)
4419  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4420  ;;
4421  *)
4422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4423for as_dir in $PATH
4424do
4425  IFS=$as_save_IFS
4426  test -z "$as_dir" && as_dir=.
4427    for ac_exec_ext in '' $ac_executable_extensions; do
4428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4429    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4431    break 2
4432  fi
4433done
4434  done
4435IFS=$as_save_IFS
4436
4437  ;;
4438esac
4439fi
4440BASENAME=$ac_cv_path_BASENAME
4441if test -n "$BASENAME"; then
4442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4443$as_echo "$BASENAME" >&6; }
4444else
4445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4446$as_echo "no" >&6; }
4447fi
4448
4449
4450        if test "x$BASENAME" = x; then
4451          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4452        fi
4453      else
4454        # Otherwise we believe it is a complete path. Use it as it is.
4455        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4456$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4457        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4458$as_echo_n "checking for BASENAME... " >&6; }
4459        if test ! -x "$tool_specified"; then
4460          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4461$as_echo "not found" >&6; }
4462          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4463        fi
4464        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4465$as_echo "$tool_specified" >&6; }
4466      fi
4467    fi
4468  fi
4469
4470
4471
4472  if test "x$BASENAME" = x; then
4473    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4474  fi
4475
4476
4477
4478
4479
4480  # Publish this variable in the help.
4481
4482
4483  if test "x$BASH" = x; then
4484    # The variable is not set by user, try to locate tool using the code snippet
4485    for ac_prog in bash
4486do
4487  # Extract the first word of "$ac_prog", so it can be a program name with args.
4488set dummy $ac_prog; ac_word=$2
4489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4490$as_echo_n "checking for $ac_word... " >&6; }
4491if ${ac_cv_path_BASH+:} false; then :
4492  $as_echo_n "(cached) " >&6
4493else
4494  case $BASH in
4495  [\\/]* | ?:[\\/]*)
4496  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4497  ;;
4498  *)
4499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4500for as_dir in $PATH
4501do
4502  IFS=$as_save_IFS
4503  test -z "$as_dir" && as_dir=.
4504    for ac_exec_ext in '' $ac_executable_extensions; do
4505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4506    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4508    break 2
4509  fi
4510done
4511  done
4512IFS=$as_save_IFS
4513
4514  ;;
4515esac
4516fi
4517BASH=$ac_cv_path_BASH
4518if test -n "$BASH"; then
4519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4520$as_echo "$BASH" >&6; }
4521else
4522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4523$as_echo "no" >&6; }
4524fi
4525
4526
4527  test -n "$BASH" && break
4528done
4529
4530  else
4531    # The variable is set, but is it from the command line or the environment?
4532
4533    # Try to remove the string !BASH! from our list.
4534    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4535    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4536      # If it failed, the variable was not from the command line. Ignore it,
4537      # but warn the user (except for BASH, which is always set by the calling BASH).
4538      if test "xBASH" != xBASH; then
4539        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4540$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4541      fi
4542      # Try to locate tool using the code snippet
4543      for ac_prog in bash
4544do
4545  # Extract the first word of "$ac_prog", so it can be a program name with args.
4546set dummy $ac_prog; ac_word=$2
4547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4548$as_echo_n "checking for $ac_word... " >&6; }
4549if ${ac_cv_path_BASH+:} false; then :
4550  $as_echo_n "(cached) " >&6
4551else
4552  case $BASH in
4553  [\\/]* | ?:[\\/]*)
4554  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4555  ;;
4556  *)
4557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4558for as_dir in $PATH
4559do
4560  IFS=$as_save_IFS
4561  test -z "$as_dir" && as_dir=.
4562    for ac_exec_ext in '' $ac_executable_extensions; do
4563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4564    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4566    break 2
4567  fi
4568done
4569  done
4570IFS=$as_save_IFS
4571
4572  ;;
4573esac
4574fi
4575BASH=$ac_cv_path_BASH
4576if test -n "$BASH"; then
4577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4578$as_echo "$BASH" >&6; }
4579else
4580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4581$as_echo "no" >&6; }
4582fi
4583
4584
4585  test -n "$BASH" && break
4586done
4587
4588    else
4589      # If it succeeded, then it was overridden by the user. We will use it
4590      # for the tool.
4591
4592      # First remove it from the list of overridden variables, so we can test
4593      # for unknown variables in the end.
4594      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4595
4596      # Check if the provided tool contains a complete path.
4597      tool_specified="$BASH"
4598      tool_basename="${tool_specified##*/}"
4599      if test "x$tool_basename" = "x$tool_specified"; then
4600        # A command without a complete path is provided, search $PATH.
4601        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4602$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4603        # Extract the first word of "$tool_basename", so it can be a program name with args.
4604set dummy $tool_basename; ac_word=$2
4605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4606$as_echo_n "checking for $ac_word... " >&6; }
4607if ${ac_cv_path_BASH+:} false; then :
4608  $as_echo_n "(cached) " >&6
4609else
4610  case $BASH in
4611  [\\/]* | ?:[\\/]*)
4612  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4613  ;;
4614  *)
4615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4616for as_dir in $PATH
4617do
4618  IFS=$as_save_IFS
4619  test -z "$as_dir" && as_dir=.
4620    for ac_exec_ext in '' $ac_executable_extensions; do
4621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4622    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4624    break 2
4625  fi
4626done
4627  done
4628IFS=$as_save_IFS
4629
4630  ;;
4631esac
4632fi
4633BASH=$ac_cv_path_BASH
4634if test -n "$BASH"; then
4635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4636$as_echo "$BASH" >&6; }
4637else
4638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4639$as_echo "no" >&6; }
4640fi
4641
4642
4643        if test "x$BASH" = x; then
4644          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4645        fi
4646      else
4647        # Otherwise we believe it is a complete path. Use it as it is.
4648        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4649$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4650        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4651$as_echo_n "checking for BASH... " >&6; }
4652        if test ! -x "$tool_specified"; then
4653          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4654$as_echo "not found" >&6; }
4655          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4656        fi
4657        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4658$as_echo "$tool_specified" >&6; }
4659      fi
4660    fi
4661  fi
4662
4663
4664
4665  if test "x$BASH" = x; then
4666    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4667  fi
4668
4669
4670
4671
4672
4673  # Publish this variable in the help.
4674
4675
4676  if test "x$CAT" = x; then
4677    # The variable is not set by user, try to locate tool using the code snippet
4678    for ac_prog in cat
4679do
4680  # Extract the first word of "$ac_prog", so it can be a program name with args.
4681set dummy $ac_prog; ac_word=$2
4682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4683$as_echo_n "checking for $ac_word... " >&6; }
4684if ${ac_cv_path_CAT+:} false; then :
4685  $as_echo_n "(cached) " >&6
4686else
4687  case $CAT in
4688  [\\/]* | ?:[\\/]*)
4689  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4690  ;;
4691  *)
4692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4693for as_dir in $PATH
4694do
4695  IFS=$as_save_IFS
4696  test -z "$as_dir" && as_dir=.
4697    for ac_exec_ext in '' $ac_executable_extensions; do
4698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4699    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4701    break 2
4702  fi
4703done
4704  done
4705IFS=$as_save_IFS
4706
4707  ;;
4708esac
4709fi
4710CAT=$ac_cv_path_CAT
4711if test -n "$CAT"; then
4712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4713$as_echo "$CAT" >&6; }
4714else
4715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4716$as_echo "no" >&6; }
4717fi
4718
4719
4720  test -n "$CAT" && break
4721done
4722
4723  else
4724    # The variable is set, but is it from the command line or the environment?
4725
4726    # Try to remove the string !CAT! from our list.
4727    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4728    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4729      # If it failed, the variable was not from the command line. Ignore it,
4730      # but warn the user (except for BASH, which is always set by the calling BASH).
4731      if test "xCAT" != xBASH; then
4732        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4733$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4734      fi
4735      # Try to locate tool using the code snippet
4736      for ac_prog in cat
4737do
4738  # Extract the first word of "$ac_prog", so it can be a program name with args.
4739set dummy $ac_prog; ac_word=$2
4740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4741$as_echo_n "checking for $ac_word... " >&6; }
4742if ${ac_cv_path_CAT+:} false; then :
4743  $as_echo_n "(cached) " >&6
4744else
4745  case $CAT in
4746  [\\/]* | ?:[\\/]*)
4747  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4748  ;;
4749  *)
4750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4751for as_dir in $PATH
4752do
4753  IFS=$as_save_IFS
4754  test -z "$as_dir" && as_dir=.
4755    for ac_exec_ext in '' $ac_executable_extensions; do
4756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4757    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4759    break 2
4760  fi
4761done
4762  done
4763IFS=$as_save_IFS
4764
4765  ;;
4766esac
4767fi
4768CAT=$ac_cv_path_CAT
4769if test -n "$CAT"; then
4770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4771$as_echo "$CAT" >&6; }
4772else
4773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4774$as_echo "no" >&6; }
4775fi
4776
4777
4778  test -n "$CAT" && break
4779done
4780
4781    else
4782      # If it succeeded, then it was overridden by the user. We will use it
4783      # for the tool.
4784
4785      # First remove it from the list of overridden variables, so we can test
4786      # for unknown variables in the end.
4787      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4788
4789      # Check if the provided tool contains a complete path.
4790      tool_specified="$CAT"
4791      tool_basename="${tool_specified##*/}"
4792      if test "x$tool_basename" = "x$tool_specified"; then
4793        # A command without a complete path is provided, search $PATH.
4794        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4795$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4796        # Extract the first word of "$tool_basename", so it can be a program name with args.
4797set dummy $tool_basename; ac_word=$2
4798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4799$as_echo_n "checking for $ac_word... " >&6; }
4800if ${ac_cv_path_CAT+:} false; then :
4801  $as_echo_n "(cached) " >&6
4802else
4803  case $CAT in
4804  [\\/]* | ?:[\\/]*)
4805  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4806  ;;
4807  *)
4808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4809for as_dir in $PATH
4810do
4811  IFS=$as_save_IFS
4812  test -z "$as_dir" && as_dir=.
4813    for ac_exec_ext in '' $ac_executable_extensions; do
4814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4815    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4817    break 2
4818  fi
4819done
4820  done
4821IFS=$as_save_IFS
4822
4823  ;;
4824esac
4825fi
4826CAT=$ac_cv_path_CAT
4827if test -n "$CAT"; then
4828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4829$as_echo "$CAT" >&6; }
4830else
4831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4832$as_echo "no" >&6; }
4833fi
4834
4835
4836        if test "x$CAT" = x; then
4837          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4838        fi
4839      else
4840        # Otherwise we believe it is a complete path. Use it as it is.
4841        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4842$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4843        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4844$as_echo_n "checking for CAT... " >&6; }
4845        if test ! -x "$tool_specified"; then
4846          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4847$as_echo "not found" >&6; }
4848          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4849        fi
4850        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4851$as_echo "$tool_specified" >&6; }
4852      fi
4853    fi
4854  fi
4855
4856
4857
4858  if test "x$CAT" = x; then
4859    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4860  fi
4861
4862
4863
4864
4865
4866  # Publish this variable in the help.
4867
4868
4869  if test "x$CHMOD" = x; then
4870    # The variable is not set by user, try to locate tool using the code snippet
4871    for ac_prog in chmod
4872do
4873  # Extract the first word of "$ac_prog", so it can be a program name with args.
4874set dummy $ac_prog; ac_word=$2
4875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4876$as_echo_n "checking for $ac_word... " >&6; }
4877if ${ac_cv_path_CHMOD+:} false; then :
4878  $as_echo_n "(cached) " >&6
4879else
4880  case $CHMOD in
4881  [\\/]* | ?:[\\/]*)
4882  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4883  ;;
4884  *)
4885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4886for as_dir in $PATH
4887do
4888  IFS=$as_save_IFS
4889  test -z "$as_dir" && as_dir=.
4890    for ac_exec_ext in '' $ac_executable_extensions; do
4891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4892    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4894    break 2
4895  fi
4896done
4897  done
4898IFS=$as_save_IFS
4899
4900  ;;
4901esac
4902fi
4903CHMOD=$ac_cv_path_CHMOD
4904if test -n "$CHMOD"; then
4905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4906$as_echo "$CHMOD" >&6; }
4907else
4908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4909$as_echo "no" >&6; }
4910fi
4911
4912
4913  test -n "$CHMOD" && break
4914done
4915
4916  else
4917    # The variable is set, but is it from the command line or the environment?
4918
4919    # Try to remove the string !CHMOD! from our list.
4920    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
4921    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4922      # If it failed, the variable was not from the command line. Ignore it,
4923      # but warn the user (except for BASH, which is always set by the calling BASH).
4924      if test "xCHMOD" != xBASH; then
4925        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
4926$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
4927      fi
4928      # Try to locate tool using the code snippet
4929      for ac_prog in chmod
4930do
4931  # Extract the first word of "$ac_prog", so it can be a program name with args.
4932set dummy $ac_prog; ac_word=$2
4933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4934$as_echo_n "checking for $ac_word... " >&6; }
4935if ${ac_cv_path_CHMOD+:} false; then :
4936  $as_echo_n "(cached) " >&6
4937else
4938  case $CHMOD in
4939  [\\/]* | ?:[\\/]*)
4940  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4941  ;;
4942  *)
4943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4944for as_dir in $PATH
4945do
4946  IFS=$as_save_IFS
4947  test -z "$as_dir" && as_dir=.
4948    for ac_exec_ext in '' $ac_executable_extensions; do
4949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4950    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4952    break 2
4953  fi
4954done
4955  done
4956IFS=$as_save_IFS
4957
4958  ;;
4959esac
4960fi
4961CHMOD=$ac_cv_path_CHMOD
4962if test -n "$CHMOD"; then
4963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4964$as_echo "$CHMOD" >&6; }
4965else
4966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4967$as_echo "no" >&6; }
4968fi
4969
4970
4971  test -n "$CHMOD" && break
4972done
4973
4974    else
4975      # If it succeeded, then it was overridden by the user. We will use it
4976      # for the tool.
4977
4978      # First remove it from the list of overridden variables, so we can test
4979      # for unknown variables in the end.
4980      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4981
4982      # Check if the provided tool contains a complete path.
4983      tool_specified="$CHMOD"
4984      tool_basename="${tool_specified##*/}"
4985      if test "x$tool_basename" = "x$tool_specified"; then
4986        # A command without a complete path is provided, search $PATH.
4987        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
4988$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
4989        # Extract the first word of "$tool_basename", so it can be a program name with args.
4990set dummy $tool_basename; ac_word=$2
4991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4992$as_echo_n "checking for $ac_word... " >&6; }
4993if ${ac_cv_path_CHMOD+:} false; then :
4994  $as_echo_n "(cached) " >&6
4995else
4996  case $CHMOD in
4997  [\\/]* | ?:[\\/]*)
4998  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4999  ;;
5000  *)
5001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5002for as_dir in $PATH
5003do
5004  IFS=$as_save_IFS
5005  test -z "$as_dir" && as_dir=.
5006    for ac_exec_ext in '' $ac_executable_extensions; do
5007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5008    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5010    break 2
5011  fi
5012done
5013  done
5014IFS=$as_save_IFS
5015
5016  ;;
5017esac
5018fi
5019CHMOD=$ac_cv_path_CHMOD
5020if test -n "$CHMOD"; then
5021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5022$as_echo "$CHMOD" >&6; }
5023else
5024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5025$as_echo "no" >&6; }
5026fi
5027
5028
5029        if test "x$CHMOD" = x; then
5030          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5031        fi
5032      else
5033        # Otherwise we believe it is a complete path. Use it as it is.
5034        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5035$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5036        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5037$as_echo_n "checking for CHMOD... " >&6; }
5038        if test ! -x "$tool_specified"; then
5039          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5040$as_echo "not found" >&6; }
5041          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5042        fi
5043        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5044$as_echo "$tool_specified" >&6; }
5045      fi
5046    fi
5047  fi
5048
5049
5050
5051  if test "x$CHMOD" = x; then
5052    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5053  fi
5054
5055
5056
5057
5058
5059  # Publish this variable in the help.
5060
5061
5062  if test "x$CMP" = x; then
5063    # The variable is not set by user, try to locate tool using the code snippet
5064    for ac_prog in cmp
5065do
5066  # Extract the first word of "$ac_prog", so it can be a program name with args.
5067set dummy $ac_prog; ac_word=$2
5068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5069$as_echo_n "checking for $ac_word... " >&6; }
5070if ${ac_cv_path_CMP+:} false; then :
5071  $as_echo_n "(cached) " >&6
5072else
5073  case $CMP in
5074  [\\/]* | ?:[\\/]*)
5075  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5076  ;;
5077  *)
5078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5079for as_dir in $PATH
5080do
5081  IFS=$as_save_IFS
5082  test -z "$as_dir" && as_dir=.
5083    for ac_exec_ext in '' $ac_executable_extensions; do
5084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5085    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5087    break 2
5088  fi
5089done
5090  done
5091IFS=$as_save_IFS
5092
5093  ;;
5094esac
5095fi
5096CMP=$ac_cv_path_CMP
5097if test -n "$CMP"; then
5098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5099$as_echo "$CMP" >&6; }
5100else
5101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5102$as_echo "no" >&6; }
5103fi
5104
5105
5106  test -n "$CMP" && break
5107done
5108
5109  else
5110    # The variable is set, but is it from the command line or the environment?
5111
5112    # Try to remove the string !CMP! from our list.
5113    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5114    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5115      # If it failed, the variable was not from the command line. Ignore it,
5116      # but warn the user (except for BASH, which is always set by the calling BASH).
5117      if test "xCMP" != xBASH; then
5118        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5119$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5120      fi
5121      # Try to locate tool using the code snippet
5122      for ac_prog in cmp
5123do
5124  # Extract the first word of "$ac_prog", so it can be a program name with args.
5125set dummy $ac_prog; ac_word=$2
5126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5127$as_echo_n "checking for $ac_word... " >&6; }
5128if ${ac_cv_path_CMP+:} false; then :
5129  $as_echo_n "(cached) " >&6
5130else
5131  case $CMP in
5132  [\\/]* | ?:[\\/]*)
5133  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5134  ;;
5135  *)
5136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5137for as_dir in $PATH
5138do
5139  IFS=$as_save_IFS
5140  test -z "$as_dir" && as_dir=.
5141    for ac_exec_ext in '' $ac_executable_extensions; do
5142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5143    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5145    break 2
5146  fi
5147done
5148  done
5149IFS=$as_save_IFS
5150
5151  ;;
5152esac
5153fi
5154CMP=$ac_cv_path_CMP
5155if test -n "$CMP"; then
5156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5157$as_echo "$CMP" >&6; }
5158else
5159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5160$as_echo "no" >&6; }
5161fi
5162
5163
5164  test -n "$CMP" && break
5165done
5166
5167    else
5168      # If it succeeded, then it was overridden by the user. We will use it
5169      # for the tool.
5170
5171      # First remove it from the list of overridden variables, so we can test
5172      # for unknown variables in the end.
5173      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5174
5175      # Check if the provided tool contains a complete path.
5176      tool_specified="$CMP"
5177      tool_basename="${tool_specified##*/}"
5178      if test "x$tool_basename" = "x$tool_specified"; then
5179        # A command without a complete path is provided, search $PATH.
5180        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5181$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5182        # Extract the first word of "$tool_basename", so it can be a program name with args.
5183set dummy $tool_basename; ac_word=$2
5184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5185$as_echo_n "checking for $ac_word... " >&6; }
5186if ${ac_cv_path_CMP+:} false; then :
5187  $as_echo_n "(cached) " >&6
5188else
5189  case $CMP in
5190  [\\/]* | ?:[\\/]*)
5191  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5192  ;;
5193  *)
5194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5195for as_dir in $PATH
5196do
5197  IFS=$as_save_IFS
5198  test -z "$as_dir" && as_dir=.
5199    for ac_exec_ext in '' $ac_executable_extensions; do
5200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5201    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5203    break 2
5204  fi
5205done
5206  done
5207IFS=$as_save_IFS
5208
5209  ;;
5210esac
5211fi
5212CMP=$ac_cv_path_CMP
5213if test -n "$CMP"; then
5214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5215$as_echo "$CMP" >&6; }
5216else
5217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5218$as_echo "no" >&6; }
5219fi
5220
5221
5222        if test "x$CMP" = x; then
5223          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5224        fi
5225      else
5226        # Otherwise we believe it is a complete path. Use it as it is.
5227        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5228$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5229        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5230$as_echo_n "checking for CMP... " >&6; }
5231        if test ! -x "$tool_specified"; then
5232          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5233$as_echo "not found" >&6; }
5234          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5235        fi
5236        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5237$as_echo "$tool_specified" >&6; }
5238      fi
5239    fi
5240  fi
5241
5242
5243
5244  if test "x$CMP" = x; then
5245    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5246  fi
5247
5248
5249
5250
5251
5252  # Publish this variable in the help.
5253
5254
5255  if test "x$COMM" = x; then
5256    # The variable is not set by user, try to locate tool using the code snippet
5257    for ac_prog in comm
5258do
5259  # Extract the first word of "$ac_prog", so it can be a program name with args.
5260set dummy $ac_prog; ac_word=$2
5261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5262$as_echo_n "checking for $ac_word... " >&6; }
5263if ${ac_cv_path_COMM+:} false; then :
5264  $as_echo_n "(cached) " >&6
5265else
5266  case $COMM in
5267  [\\/]* | ?:[\\/]*)
5268  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5269  ;;
5270  *)
5271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5272for as_dir in $PATH
5273do
5274  IFS=$as_save_IFS
5275  test -z "$as_dir" && as_dir=.
5276    for ac_exec_ext in '' $ac_executable_extensions; do
5277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5278    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5280    break 2
5281  fi
5282done
5283  done
5284IFS=$as_save_IFS
5285
5286  ;;
5287esac
5288fi
5289COMM=$ac_cv_path_COMM
5290if test -n "$COMM"; then
5291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5292$as_echo "$COMM" >&6; }
5293else
5294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5295$as_echo "no" >&6; }
5296fi
5297
5298
5299  test -n "$COMM" && break
5300done
5301
5302  else
5303    # The variable is set, but is it from the command line or the environment?
5304
5305    # Try to remove the string !COMM! from our list.
5306    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5307    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5308      # If it failed, the variable was not from the command line. Ignore it,
5309      # but warn the user (except for BASH, which is always set by the calling BASH).
5310      if test "xCOMM" != xBASH; then
5311        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5312$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5313      fi
5314      # Try to locate tool using the code snippet
5315      for ac_prog in comm
5316do
5317  # Extract the first word of "$ac_prog", so it can be a program name with args.
5318set dummy $ac_prog; ac_word=$2
5319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5320$as_echo_n "checking for $ac_word... " >&6; }
5321if ${ac_cv_path_COMM+:} false; then :
5322  $as_echo_n "(cached) " >&6
5323else
5324  case $COMM in
5325  [\\/]* | ?:[\\/]*)
5326  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5327  ;;
5328  *)
5329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5330for as_dir in $PATH
5331do
5332  IFS=$as_save_IFS
5333  test -z "$as_dir" && as_dir=.
5334    for ac_exec_ext in '' $ac_executable_extensions; do
5335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5336    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5338    break 2
5339  fi
5340done
5341  done
5342IFS=$as_save_IFS
5343
5344  ;;
5345esac
5346fi
5347COMM=$ac_cv_path_COMM
5348if test -n "$COMM"; then
5349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5350$as_echo "$COMM" >&6; }
5351else
5352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5353$as_echo "no" >&6; }
5354fi
5355
5356
5357  test -n "$COMM" && break
5358done
5359
5360    else
5361      # If it succeeded, then it was overridden by the user. We will use it
5362      # for the tool.
5363
5364      # First remove it from the list of overridden variables, so we can test
5365      # for unknown variables in the end.
5366      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5367
5368      # Check if the provided tool contains a complete path.
5369      tool_specified="$COMM"
5370      tool_basename="${tool_specified##*/}"
5371      if test "x$tool_basename" = "x$tool_specified"; then
5372        # A command without a complete path is provided, search $PATH.
5373        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5374$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5375        # Extract the first word of "$tool_basename", so it can be a program name with args.
5376set dummy $tool_basename; ac_word=$2
5377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5378$as_echo_n "checking for $ac_word... " >&6; }
5379if ${ac_cv_path_COMM+:} false; then :
5380  $as_echo_n "(cached) " >&6
5381else
5382  case $COMM in
5383  [\\/]* | ?:[\\/]*)
5384  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5385  ;;
5386  *)
5387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5388for as_dir in $PATH
5389do
5390  IFS=$as_save_IFS
5391  test -z "$as_dir" && as_dir=.
5392    for ac_exec_ext in '' $ac_executable_extensions; do
5393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5394    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5396    break 2
5397  fi
5398done
5399  done
5400IFS=$as_save_IFS
5401
5402  ;;
5403esac
5404fi
5405COMM=$ac_cv_path_COMM
5406if test -n "$COMM"; then
5407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5408$as_echo "$COMM" >&6; }
5409else
5410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5411$as_echo "no" >&6; }
5412fi
5413
5414
5415        if test "x$COMM" = x; then
5416          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5417        fi
5418      else
5419        # Otherwise we believe it is a complete path. Use it as it is.
5420        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5421$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5422        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5423$as_echo_n "checking for COMM... " >&6; }
5424        if test ! -x "$tool_specified"; then
5425          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5426$as_echo "not found" >&6; }
5427          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5428        fi
5429        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5430$as_echo "$tool_specified" >&6; }
5431      fi
5432    fi
5433  fi
5434
5435
5436
5437  if test "x$COMM" = x; then
5438    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5439  fi
5440
5441
5442
5443
5444
5445  # Publish this variable in the help.
5446
5447
5448  if test "x$CP" = x; then
5449    # The variable is not set by user, try to locate tool using the code snippet
5450    for ac_prog in cp
5451do
5452  # Extract the first word of "$ac_prog", so it can be a program name with args.
5453set dummy $ac_prog; ac_word=$2
5454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5455$as_echo_n "checking for $ac_word... " >&6; }
5456if ${ac_cv_path_CP+:} false; then :
5457  $as_echo_n "(cached) " >&6
5458else
5459  case $CP in
5460  [\\/]* | ?:[\\/]*)
5461  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5462  ;;
5463  *)
5464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5465for as_dir in $PATH
5466do
5467  IFS=$as_save_IFS
5468  test -z "$as_dir" && as_dir=.
5469    for ac_exec_ext in '' $ac_executable_extensions; do
5470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5471    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5473    break 2
5474  fi
5475done
5476  done
5477IFS=$as_save_IFS
5478
5479  ;;
5480esac
5481fi
5482CP=$ac_cv_path_CP
5483if test -n "$CP"; then
5484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5485$as_echo "$CP" >&6; }
5486else
5487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5488$as_echo "no" >&6; }
5489fi
5490
5491
5492  test -n "$CP" && break
5493done
5494
5495  else
5496    # The variable is set, but is it from the command line or the environment?
5497
5498    # Try to remove the string !CP! from our list.
5499    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5500    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5501      # If it failed, the variable was not from the command line. Ignore it,
5502      # but warn the user (except for BASH, which is always set by the calling BASH).
5503      if test "xCP" != xBASH; then
5504        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5505$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5506      fi
5507      # Try to locate tool using the code snippet
5508      for ac_prog in cp
5509do
5510  # Extract the first word of "$ac_prog", so it can be a program name with args.
5511set dummy $ac_prog; ac_word=$2
5512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5513$as_echo_n "checking for $ac_word... " >&6; }
5514if ${ac_cv_path_CP+:} false; then :
5515  $as_echo_n "(cached) " >&6
5516else
5517  case $CP in
5518  [\\/]* | ?:[\\/]*)
5519  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5520  ;;
5521  *)
5522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5523for as_dir in $PATH
5524do
5525  IFS=$as_save_IFS
5526  test -z "$as_dir" && as_dir=.
5527    for ac_exec_ext in '' $ac_executable_extensions; do
5528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5529    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5531    break 2
5532  fi
5533done
5534  done
5535IFS=$as_save_IFS
5536
5537  ;;
5538esac
5539fi
5540CP=$ac_cv_path_CP
5541if test -n "$CP"; then
5542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5543$as_echo "$CP" >&6; }
5544else
5545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5546$as_echo "no" >&6; }
5547fi
5548
5549
5550  test -n "$CP" && break
5551done
5552
5553    else
5554      # If it succeeded, then it was overridden by the user. We will use it
5555      # for the tool.
5556
5557      # First remove it from the list of overridden variables, so we can test
5558      # for unknown variables in the end.
5559      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5560
5561      # Check if the provided tool contains a complete path.
5562      tool_specified="$CP"
5563      tool_basename="${tool_specified##*/}"
5564      if test "x$tool_basename" = "x$tool_specified"; then
5565        # A command without a complete path is provided, search $PATH.
5566        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5567$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5568        # Extract the first word of "$tool_basename", so it can be a program name with args.
5569set dummy $tool_basename; ac_word=$2
5570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5571$as_echo_n "checking for $ac_word... " >&6; }
5572if ${ac_cv_path_CP+:} false; then :
5573  $as_echo_n "(cached) " >&6
5574else
5575  case $CP in
5576  [\\/]* | ?:[\\/]*)
5577  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5578  ;;
5579  *)
5580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5581for as_dir in $PATH
5582do
5583  IFS=$as_save_IFS
5584  test -z "$as_dir" && as_dir=.
5585    for ac_exec_ext in '' $ac_executable_extensions; do
5586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5587    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5589    break 2
5590  fi
5591done
5592  done
5593IFS=$as_save_IFS
5594
5595  ;;
5596esac
5597fi
5598CP=$ac_cv_path_CP
5599if test -n "$CP"; then
5600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5601$as_echo "$CP" >&6; }
5602else
5603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5604$as_echo "no" >&6; }
5605fi
5606
5607
5608        if test "x$CP" = x; then
5609          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5610        fi
5611      else
5612        # Otherwise we believe it is a complete path. Use it as it is.
5613        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5614$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5615        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5616$as_echo_n "checking for CP... " >&6; }
5617        if test ! -x "$tool_specified"; then
5618          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5619$as_echo "not found" >&6; }
5620          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5621        fi
5622        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5623$as_echo "$tool_specified" >&6; }
5624      fi
5625    fi
5626  fi
5627
5628
5629
5630  if test "x$CP" = x; then
5631    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5632  fi
5633
5634
5635
5636
5637
5638  # Publish this variable in the help.
5639
5640
5641  if test "x$CPIO" = x; then
5642    # The variable is not set by user, try to locate tool using the code snippet
5643    for ac_prog in cpio
5644do
5645  # Extract the first word of "$ac_prog", so it can be a program name with args.
5646set dummy $ac_prog; ac_word=$2
5647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5648$as_echo_n "checking for $ac_word... " >&6; }
5649if ${ac_cv_path_CPIO+:} false; then :
5650  $as_echo_n "(cached) " >&6
5651else
5652  case $CPIO in
5653  [\\/]* | ?:[\\/]*)
5654  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5655  ;;
5656  *)
5657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5658for as_dir in $PATH
5659do
5660  IFS=$as_save_IFS
5661  test -z "$as_dir" && as_dir=.
5662    for ac_exec_ext in '' $ac_executable_extensions; do
5663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5664    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5666    break 2
5667  fi
5668done
5669  done
5670IFS=$as_save_IFS
5671
5672  ;;
5673esac
5674fi
5675CPIO=$ac_cv_path_CPIO
5676if test -n "$CPIO"; then
5677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5678$as_echo "$CPIO" >&6; }
5679else
5680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5681$as_echo "no" >&6; }
5682fi
5683
5684
5685  test -n "$CPIO" && break
5686done
5687
5688  else
5689    # The variable is set, but is it from the command line or the environment?
5690
5691    # Try to remove the string !CPIO! from our list.
5692    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
5693    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5694      # If it failed, the variable was not from the command line. Ignore it,
5695      # but warn the user (except for BASH, which is always set by the calling BASH).
5696      if test "xCPIO" != xBASH; then
5697        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
5698$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
5699      fi
5700      # Try to locate tool using the code snippet
5701      for ac_prog in cpio
5702do
5703  # Extract the first word of "$ac_prog", so it can be a program name with args.
5704set dummy $ac_prog; ac_word=$2
5705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5706$as_echo_n "checking for $ac_word... " >&6; }
5707if ${ac_cv_path_CPIO+:} false; then :
5708  $as_echo_n "(cached) " >&6
5709else
5710  case $CPIO in
5711  [\\/]* | ?:[\\/]*)
5712  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5713  ;;
5714  *)
5715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5716for as_dir in $PATH
5717do
5718  IFS=$as_save_IFS
5719  test -z "$as_dir" && as_dir=.
5720    for ac_exec_ext in '' $ac_executable_extensions; do
5721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5722    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5724    break 2
5725  fi
5726done
5727  done
5728IFS=$as_save_IFS
5729
5730  ;;
5731esac
5732fi
5733CPIO=$ac_cv_path_CPIO
5734if test -n "$CPIO"; then
5735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5736$as_echo "$CPIO" >&6; }
5737else
5738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5739$as_echo "no" >&6; }
5740fi
5741
5742
5743  test -n "$CPIO" && break
5744done
5745
5746    else
5747      # If it succeeded, then it was overridden by the user. We will use it
5748      # for the tool.
5749
5750      # First remove it from the list of overridden variables, so we can test
5751      # for unknown variables in the end.
5752      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5753
5754      # Check if the provided tool contains a complete path.
5755      tool_specified="$CPIO"
5756      tool_basename="${tool_specified##*/}"
5757      if test "x$tool_basename" = "x$tool_specified"; then
5758        # A command without a complete path is provided, search $PATH.
5759        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
5760$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
5761        # Extract the first word of "$tool_basename", so it can be a program name with args.
5762set dummy $tool_basename; ac_word=$2
5763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5764$as_echo_n "checking for $ac_word... " >&6; }
5765if ${ac_cv_path_CPIO+:} false; then :
5766  $as_echo_n "(cached) " >&6
5767else
5768  case $CPIO in
5769  [\\/]* | ?:[\\/]*)
5770  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5771  ;;
5772  *)
5773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5774for as_dir in $PATH
5775do
5776  IFS=$as_save_IFS
5777  test -z "$as_dir" && as_dir=.
5778    for ac_exec_ext in '' $ac_executable_extensions; do
5779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5780    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5782    break 2
5783  fi
5784done
5785  done
5786IFS=$as_save_IFS
5787
5788  ;;
5789esac
5790fi
5791CPIO=$ac_cv_path_CPIO
5792if test -n "$CPIO"; then
5793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5794$as_echo "$CPIO" >&6; }
5795else
5796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5797$as_echo "no" >&6; }
5798fi
5799
5800
5801        if test "x$CPIO" = x; then
5802          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5803        fi
5804      else
5805        # Otherwise we believe it is a complete path. Use it as it is.
5806        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
5807$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
5808        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
5809$as_echo_n "checking for CPIO... " >&6; }
5810        if test ! -x "$tool_specified"; then
5811          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5812$as_echo "not found" >&6; }
5813          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
5814        fi
5815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5816$as_echo "$tool_specified" >&6; }
5817      fi
5818    fi
5819  fi
5820
5821
5822
5823  if test "x$CPIO" = x; then
5824    as_fn_error $? "Could not find required tool for CPIO" "$LINENO" 5
5825  fi
5826
5827
5828
5829
5830
5831  # Publish this variable in the help.
5832
5833
5834  if test "x$CUT" = x; then
5835    # The variable is not set by user, try to locate tool using the code snippet
5836    for ac_prog in cut
5837do
5838  # Extract the first word of "$ac_prog", so it can be a program name with args.
5839set dummy $ac_prog; ac_word=$2
5840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5841$as_echo_n "checking for $ac_word... " >&6; }
5842if ${ac_cv_path_CUT+:} false; then :
5843  $as_echo_n "(cached) " >&6
5844else
5845  case $CUT in
5846  [\\/]* | ?:[\\/]*)
5847  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5848  ;;
5849  *)
5850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5851for as_dir in $PATH
5852do
5853  IFS=$as_save_IFS
5854  test -z "$as_dir" && as_dir=.
5855    for ac_exec_ext in '' $ac_executable_extensions; do
5856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5857    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5859    break 2
5860  fi
5861done
5862  done
5863IFS=$as_save_IFS
5864
5865  ;;
5866esac
5867fi
5868CUT=$ac_cv_path_CUT
5869if test -n "$CUT"; then
5870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5871$as_echo "$CUT" >&6; }
5872else
5873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5874$as_echo "no" >&6; }
5875fi
5876
5877
5878  test -n "$CUT" && break
5879done
5880
5881  else
5882    # The variable is set, but is it from the command line or the environment?
5883
5884    # Try to remove the string !CUT! from our list.
5885    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5886    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5887      # If it failed, the variable was not from the command line. Ignore it,
5888      # but warn the user (except for BASH, which is always set by the calling BASH).
5889      if test "xCUT" != xBASH; then
5890        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5891$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5892      fi
5893      # Try to locate tool using the code snippet
5894      for ac_prog in cut
5895do
5896  # Extract the first word of "$ac_prog", so it can be a program name with args.
5897set dummy $ac_prog; ac_word=$2
5898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5899$as_echo_n "checking for $ac_word... " >&6; }
5900if ${ac_cv_path_CUT+:} false; then :
5901  $as_echo_n "(cached) " >&6
5902else
5903  case $CUT in
5904  [\\/]* | ?:[\\/]*)
5905  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5906  ;;
5907  *)
5908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5909for as_dir in $PATH
5910do
5911  IFS=$as_save_IFS
5912  test -z "$as_dir" && as_dir=.
5913    for ac_exec_ext in '' $ac_executable_extensions; do
5914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5915    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5917    break 2
5918  fi
5919done
5920  done
5921IFS=$as_save_IFS
5922
5923  ;;
5924esac
5925fi
5926CUT=$ac_cv_path_CUT
5927if test -n "$CUT"; then
5928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5929$as_echo "$CUT" >&6; }
5930else
5931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5932$as_echo "no" >&6; }
5933fi
5934
5935
5936  test -n "$CUT" && break
5937done
5938
5939    else
5940      # If it succeeded, then it was overridden by the user. We will use it
5941      # for the tool.
5942
5943      # First remove it from the list of overridden variables, so we can test
5944      # for unknown variables in the end.
5945      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5946
5947      # Check if the provided tool contains a complete path.
5948      tool_specified="$CUT"
5949      tool_basename="${tool_specified##*/}"
5950      if test "x$tool_basename" = "x$tool_specified"; then
5951        # A command without a complete path is provided, search $PATH.
5952        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5953$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5954        # Extract the first word of "$tool_basename", so it can be a program name with args.
5955set dummy $tool_basename; ac_word=$2
5956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5957$as_echo_n "checking for $ac_word... " >&6; }
5958if ${ac_cv_path_CUT+:} false; then :
5959  $as_echo_n "(cached) " >&6
5960else
5961  case $CUT in
5962  [\\/]* | ?:[\\/]*)
5963  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5964  ;;
5965  *)
5966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5967for as_dir in $PATH
5968do
5969  IFS=$as_save_IFS
5970  test -z "$as_dir" && as_dir=.
5971    for ac_exec_ext in '' $ac_executable_extensions; do
5972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5973    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5975    break 2
5976  fi
5977done
5978  done
5979IFS=$as_save_IFS
5980
5981  ;;
5982esac
5983fi
5984CUT=$ac_cv_path_CUT
5985if test -n "$CUT"; then
5986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5987$as_echo "$CUT" >&6; }
5988else
5989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5990$as_echo "no" >&6; }
5991fi
5992
5993
5994        if test "x$CUT" = x; then
5995          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5996        fi
5997      else
5998        # Otherwise we believe it is a complete path. Use it as it is.
5999        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6000$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6001        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6002$as_echo_n "checking for CUT... " >&6; }
6003        if test ! -x "$tool_specified"; then
6004          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6005$as_echo "not found" >&6; }
6006          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6007        fi
6008        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6009$as_echo "$tool_specified" >&6; }
6010      fi
6011    fi
6012  fi
6013
6014
6015
6016  if test "x$CUT" = x; then
6017    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6018  fi
6019
6020
6021
6022
6023
6024  # Publish this variable in the help.
6025
6026
6027  if test "x$DATE" = x; then
6028    # The variable is not set by user, try to locate tool using the code snippet
6029    for ac_prog in date
6030do
6031  # Extract the first word of "$ac_prog", so it can be a program name with args.
6032set dummy $ac_prog; ac_word=$2
6033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6034$as_echo_n "checking for $ac_word... " >&6; }
6035if ${ac_cv_path_DATE+:} false; then :
6036  $as_echo_n "(cached) " >&6
6037else
6038  case $DATE in
6039  [\\/]* | ?:[\\/]*)
6040  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6041  ;;
6042  *)
6043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6044for as_dir in $PATH
6045do
6046  IFS=$as_save_IFS
6047  test -z "$as_dir" && as_dir=.
6048    for ac_exec_ext in '' $ac_executable_extensions; do
6049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6050    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6052    break 2
6053  fi
6054done
6055  done
6056IFS=$as_save_IFS
6057
6058  ;;
6059esac
6060fi
6061DATE=$ac_cv_path_DATE
6062if test -n "$DATE"; then
6063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6064$as_echo "$DATE" >&6; }
6065else
6066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6067$as_echo "no" >&6; }
6068fi
6069
6070
6071  test -n "$DATE" && break
6072done
6073
6074  else
6075    # The variable is set, but is it from the command line or the environment?
6076
6077    # Try to remove the string !DATE! from our list.
6078    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6079    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6080      # If it failed, the variable was not from the command line. Ignore it,
6081      # but warn the user (except for BASH, which is always set by the calling BASH).
6082      if test "xDATE" != xBASH; then
6083        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6084$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6085      fi
6086      # Try to locate tool using the code snippet
6087      for ac_prog in date
6088do
6089  # Extract the first word of "$ac_prog", so it can be a program name with args.
6090set dummy $ac_prog; ac_word=$2
6091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6092$as_echo_n "checking for $ac_word... " >&6; }
6093if ${ac_cv_path_DATE+:} false; then :
6094  $as_echo_n "(cached) " >&6
6095else
6096  case $DATE in
6097  [\\/]* | ?:[\\/]*)
6098  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6099  ;;
6100  *)
6101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6102for as_dir in $PATH
6103do
6104  IFS=$as_save_IFS
6105  test -z "$as_dir" && as_dir=.
6106    for ac_exec_ext in '' $ac_executable_extensions; do
6107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6108    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6110    break 2
6111  fi
6112done
6113  done
6114IFS=$as_save_IFS
6115
6116  ;;
6117esac
6118fi
6119DATE=$ac_cv_path_DATE
6120if test -n "$DATE"; then
6121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6122$as_echo "$DATE" >&6; }
6123else
6124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6125$as_echo "no" >&6; }
6126fi
6127
6128
6129  test -n "$DATE" && break
6130done
6131
6132    else
6133      # If it succeeded, then it was overridden by the user. We will use it
6134      # for the tool.
6135
6136      # First remove it from the list of overridden variables, so we can test
6137      # for unknown variables in the end.
6138      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6139
6140      # Check if the provided tool contains a complete path.
6141      tool_specified="$DATE"
6142      tool_basename="${tool_specified##*/}"
6143      if test "x$tool_basename" = "x$tool_specified"; then
6144        # A command without a complete path is provided, search $PATH.
6145        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6146$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6147        # Extract the first word of "$tool_basename", so it can be a program name with args.
6148set dummy $tool_basename; ac_word=$2
6149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6150$as_echo_n "checking for $ac_word... " >&6; }
6151if ${ac_cv_path_DATE+:} false; then :
6152  $as_echo_n "(cached) " >&6
6153else
6154  case $DATE in
6155  [\\/]* | ?:[\\/]*)
6156  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6157  ;;
6158  *)
6159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6160for as_dir in $PATH
6161do
6162  IFS=$as_save_IFS
6163  test -z "$as_dir" && as_dir=.
6164    for ac_exec_ext in '' $ac_executable_extensions; do
6165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6166    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6168    break 2
6169  fi
6170done
6171  done
6172IFS=$as_save_IFS
6173
6174  ;;
6175esac
6176fi
6177DATE=$ac_cv_path_DATE
6178if test -n "$DATE"; then
6179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6180$as_echo "$DATE" >&6; }
6181else
6182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6183$as_echo "no" >&6; }
6184fi
6185
6186
6187        if test "x$DATE" = x; then
6188          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6189        fi
6190      else
6191        # Otherwise we believe it is a complete path. Use it as it is.
6192        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6193$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6194        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6195$as_echo_n "checking for DATE... " >&6; }
6196        if test ! -x "$tool_specified"; then
6197          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6198$as_echo "not found" >&6; }
6199          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6200        fi
6201        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6202$as_echo "$tool_specified" >&6; }
6203      fi
6204    fi
6205  fi
6206
6207
6208
6209  if test "x$DATE" = x; then
6210    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6211  fi
6212
6213
6214
6215
6216
6217  # Publish this variable in the help.
6218
6219
6220  if test "x$DIFF" = x; then
6221    # The variable is not set by user, try to locate tool using the code snippet
6222    for ac_prog in gdiff diff
6223do
6224  # Extract the first word of "$ac_prog", so it can be a program name with args.
6225set dummy $ac_prog; ac_word=$2
6226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6227$as_echo_n "checking for $ac_word... " >&6; }
6228if ${ac_cv_path_DIFF+:} false; then :
6229  $as_echo_n "(cached) " >&6
6230else
6231  case $DIFF in
6232  [\\/]* | ?:[\\/]*)
6233  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6234  ;;
6235  *)
6236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6237for as_dir in $PATH
6238do
6239  IFS=$as_save_IFS
6240  test -z "$as_dir" && as_dir=.
6241    for ac_exec_ext in '' $ac_executable_extensions; do
6242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6243    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6245    break 2
6246  fi
6247done
6248  done
6249IFS=$as_save_IFS
6250
6251  ;;
6252esac
6253fi
6254DIFF=$ac_cv_path_DIFF
6255if test -n "$DIFF"; then
6256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6257$as_echo "$DIFF" >&6; }
6258else
6259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6260$as_echo "no" >&6; }
6261fi
6262
6263
6264  test -n "$DIFF" && break
6265done
6266
6267  else
6268    # The variable is set, but is it from the command line or the environment?
6269
6270    # Try to remove the string !DIFF! from our list.
6271    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6272    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6273      # If it failed, the variable was not from the command line. Ignore it,
6274      # but warn the user (except for BASH, which is always set by the calling BASH).
6275      if test "xDIFF" != xBASH; then
6276        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6277$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6278      fi
6279      # Try to locate tool using the code snippet
6280      for ac_prog in gdiff diff
6281do
6282  # Extract the first word of "$ac_prog", so it can be a program name with args.
6283set dummy $ac_prog; ac_word=$2
6284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6285$as_echo_n "checking for $ac_word... " >&6; }
6286if ${ac_cv_path_DIFF+:} false; then :
6287  $as_echo_n "(cached) " >&6
6288else
6289  case $DIFF in
6290  [\\/]* | ?:[\\/]*)
6291  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6292  ;;
6293  *)
6294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6295for as_dir in $PATH
6296do
6297  IFS=$as_save_IFS
6298  test -z "$as_dir" && as_dir=.
6299    for ac_exec_ext in '' $ac_executable_extensions; do
6300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6301    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6303    break 2
6304  fi
6305done
6306  done
6307IFS=$as_save_IFS
6308
6309  ;;
6310esac
6311fi
6312DIFF=$ac_cv_path_DIFF
6313if test -n "$DIFF"; then
6314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6315$as_echo "$DIFF" >&6; }
6316else
6317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6318$as_echo "no" >&6; }
6319fi
6320
6321
6322  test -n "$DIFF" && break
6323done
6324
6325    else
6326      # If it succeeded, then it was overridden by the user. We will use it
6327      # for the tool.
6328
6329      # First remove it from the list of overridden variables, so we can test
6330      # for unknown variables in the end.
6331      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6332
6333      # Check if the provided tool contains a complete path.
6334      tool_specified="$DIFF"
6335      tool_basename="${tool_specified##*/}"
6336      if test "x$tool_basename" = "x$tool_specified"; then
6337        # A command without a complete path is provided, search $PATH.
6338        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6339$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6340        # Extract the first word of "$tool_basename", so it can be a program name with args.
6341set dummy $tool_basename; ac_word=$2
6342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6343$as_echo_n "checking for $ac_word... " >&6; }
6344if ${ac_cv_path_DIFF+:} false; then :
6345  $as_echo_n "(cached) " >&6
6346else
6347  case $DIFF in
6348  [\\/]* | ?:[\\/]*)
6349  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6350  ;;
6351  *)
6352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6353for as_dir in $PATH
6354do
6355  IFS=$as_save_IFS
6356  test -z "$as_dir" && as_dir=.
6357    for ac_exec_ext in '' $ac_executable_extensions; do
6358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6359    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6361    break 2
6362  fi
6363done
6364  done
6365IFS=$as_save_IFS
6366
6367  ;;
6368esac
6369fi
6370DIFF=$ac_cv_path_DIFF
6371if test -n "$DIFF"; then
6372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6373$as_echo "$DIFF" >&6; }
6374else
6375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6376$as_echo "no" >&6; }
6377fi
6378
6379
6380        if test "x$DIFF" = x; then
6381          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6382        fi
6383      else
6384        # Otherwise we believe it is a complete path. Use it as it is.
6385        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6386$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6387        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6388$as_echo_n "checking for DIFF... " >&6; }
6389        if test ! -x "$tool_specified"; then
6390          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6391$as_echo "not found" >&6; }
6392          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6393        fi
6394        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6395$as_echo "$tool_specified" >&6; }
6396      fi
6397    fi
6398  fi
6399
6400
6401
6402  if test "x$DIFF" = x; then
6403    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6404  fi
6405
6406
6407
6408
6409
6410  # Publish this variable in the help.
6411
6412
6413  if test "x$DIRNAME" = x; then
6414    # The variable is not set by user, try to locate tool using the code snippet
6415    for ac_prog in dirname
6416do
6417  # Extract the first word of "$ac_prog", so it can be a program name with args.
6418set dummy $ac_prog; ac_word=$2
6419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6420$as_echo_n "checking for $ac_word... " >&6; }
6421if ${ac_cv_path_DIRNAME+:} false; then :
6422  $as_echo_n "(cached) " >&6
6423else
6424  case $DIRNAME in
6425  [\\/]* | ?:[\\/]*)
6426  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6427  ;;
6428  *)
6429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6430for as_dir in $PATH
6431do
6432  IFS=$as_save_IFS
6433  test -z "$as_dir" && as_dir=.
6434    for ac_exec_ext in '' $ac_executable_extensions; do
6435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6436    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6438    break 2
6439  fi
6440done
6441  done
6442IFS=$as_save_IFS
6443
6444  ;;
6445esac
6446fi
6447DIRNAME=$ac_cv_path_DIRNAME
6448if test -n "$DIRNAME"; then
6449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6450$as_echo "$DIRNAME" >&6; }
6451else
6452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6453$as_echo "no" >&6; }
6454fi
6455
6456
6457  test -n "$DIRNAME" && break
6458done
6459
6460  else
6461    # The variable is set, but is it from the command line or the environment?
6462
6463    # Try to remove the string !DIRNAME! from our list.
6464    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6465    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6466      # If it failed, the variable was not from the command line. Ignore it,
6467      # but warn the user (except for BASH, which is always set by the calling BASH).
6468      if test "xDIRNAME" != xBASH; then
6469        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6470$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6471      fi
6472      # Try to locate tool using the code snippet
6473      for ac_prog in dirname
6474do
6475  # Extract the first word of "$ac_prog", so it can be a program name with args.
6476set dummy $ac_prog; ac_word=$2
6477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6478$as_echo_n "checking for $ac_word... " >&6; }
6479if ${ac_cv_path_DIRNAME+:} false; then :
6480  $as_echo_n "(cached) " >&6
6481else
6482  case $DIRNAME in
6483  [\\/]* | ?:[\\/]*)
6484  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6485  ;;
6486  *)
6487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6488for as_dir in $PATH
6489do
6490  IFS=$as_save_IFS
6491  test -z "$as_dir" && as_dir=.
6492    for ac_exec_ext in '' $ac_executable_extensions; do
6493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6494    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6496    break 2
6497  fi
6498done
6499  done
6500IFS=$as_save_IFS
6501
6502  ;;
6503esac
6504fi
6505DIRNAME=$ac_cv_path_DIRNAME
6506if test -n "$DIRNAME"; then
6507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6508$as_echo "$DIRNAME" >&6; }
6509else
6510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6511$as_echo "no" >&6; }
6512fi
6513
6514
6515  test -n "$DIRNAME" && break
6516done
6517
6518    else
6519      # If it succeeded, then it was overridden by the user. We will use it
6520      # for the tool.
6521
6522      # First remove it from the list of overridden variables, so we can test
6523      # for unknown variables in the end.
6524      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6525
6526      # Check if the provided tool contains a complete path.
6527      tool_specified="$DIRNAME"
6528      tool_basename="${tool_specified##*/}"
6529      if test "x$tool_basename" = "x$tool_specified"; then
6530        # A command without a complete path is provided, search $PATH.
6531        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6532$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6533        # Extract the first word of "$tool_basename", so it can be a program name with args.
6534set dummy $tool_basename; ac_word=$2
6535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6536$as_echo_n "checking for $ac_word... " >&6; }
6537if ${ac_cv_path_DIRNAME+:} false; then :
6538  $as_echo_n "(cached) " >&6
6539else
6540  case $DIRNAME in
6541  [\\/]* | ?:[\\/]*)
6542  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6543  ;;
6544  *)
6545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6546for as_dir in $PATH
6547do
6548  IFS=$as_save_IFS
6549  test -z "$as_dir" && as_dir=.
6550    for ac_exec_ext in '' $ac_executable_extensions; do
6551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6552    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6554    break 2
6555  fi
6556done
6557  done
6558IFS=$as_save_IFS
6559
6560  ;;
6561esac
6562fi
6563DIRNAME=$ac_cv_path_DIRNAME
6564if test -n "$DIRNAME"; then
6565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6566$as_echo "$DIRNAME" >&6; }
6567else
6568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6569$as_echo "no" >&6; }
6570fi
6571
6572
6573        if test "x$DIRNAME" = x; then
6574          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6575        fi
6576      else
6577        # Otherwise we believe it is a complete path. Use it as it is.
6578        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6579$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6580        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6581$as_echo_n "checking for DIRNAME... " >&6; }
6582        if test ! -x "$tool_specified"; then
6583          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6584$as_echo "not found" >&6; }
6585          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6586        fi
6587        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6588$as_echo "$tool_specified" >&6; }
6589      fi
6590    fi
6591  fi
6592
6593
6594
6595  if test "x$DIRNAME" = x; then
6596    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6597  fi
6598
6599
6600
6601
6602
6603  # Publish this variable in the help.
6604
6605
6606  if test "x$ECHO" = x; then
6607    # The variable is not set by user, try to locate tool using the code snippet
6608    for ac_prog in echo
6609do
6610  # Extract the first word of "$ac_prog", so it can be a program name with args.
6611set dummy $ac_prog; ac_word=$2
6612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6613$as_echo_n "checking for $ac_word... " >&6; }
6614if ${ac_cv_path_ECHO+:} false; then :
6615  $as_echo_n "(cached) " >&6
6616else
6617  case $ECHO in
6618  [\\/]* | ?:[\\/]*)
6619  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6620  ;;
6621  *)
6622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6623for as_dir in $PATH
6624do
6625  IFS=$as_save_IFS
6626  test -z "$as_dir" && as_dir=.
6627    for ac_exec_ext in '' $ac_executable_extensions; do
6628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6629    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6631    break 2
6632  fi
6633done
6634  done
6635IFS=$as_save_IFS
6636
6637  ;;
6638esac
6639fi
6640ECHO=$ac_cv_path_ECHO
6641if test -n "$ECHO"; then
6642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6643$as_echo "$ECHO" >&6; }
6644else
6645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6646$as_echo "no" >&6; }
6647fi
6648
6649
6650  test -n "$ECHO" && break
6651done
6652
6653  else
6654    # The variable is set, but is it from the command line or the environment?
6655
6656    # Try to remove the string !ECHO! from our list.
6657    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6658    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6659      # If it failed, the variable was not from the command line. Ignore it,
6660      # but warn the user (except for BASH, which is always set by the calling BASH).
6661      if test "xECHO" != xBASH; then
6662        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6663$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6664      fi
6665      # Try to locate tool using the code snippet
6666      for ac_prog in echo
6667do
6668  # Extract the first word of "$ac_prog", so it can be a program name with args.
6669set dummy $ac_prog; ac_word=$2
6670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6671$as_echo_n "checking for $ac_word... " >&6; }
6672if ${ac_cv_path_ECHO+:} false; then :
6673  $as_echo_n "(cached) " >&6
6674else
6675  case $ECHO in
6676  [\\/]* | ?:[\\/]*)
6677  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6678  ;;
6679  *)
6680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6681for as_dir in $PATH
6682do
6683  IFS=$as_save_IFS
6684  test -z "$as_dir" && as_dir=.
6685    for ac_exec_ext in '' $ac_executable_extensions; do
6686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6687    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6689    break 2
6690  fi
6691done
6692  done
6693IFS=$as_save_IFS
6694
6695  ;;
6696esac
6697fi
6698ECHO=$ac_cv_path_ECHO
6699if test -n "$ECHO"; then
6700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6701$as_echo "$ECHO" >&6; }
6702else
6703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6704$as_echo "no" >&6; }
6705fi
6706
6707
6708  test -n "$ECHO" && break
6709done
6710
6711    else
6712      # If it succeeded, then it was overridden by the user. We will use it
6713      # for the tool.
6714
6715      # First remove it from the list of overridden variables, so we can test
6716      # for unknown variables in the end.
6717      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6718
6719      # Check if the provided tool contains a complete path.
6720      tool_specified="$ECHO"
6721      tool_basename="${tool_specified##*/}"
6722      if test "x$tool_basename" = "x$tool_specified"; then
6723        # A command without a complete path is provided, search $PATH.
6724        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6725$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6726        # Extract the first word of "$tool_basename", so it can be a program name with args.
6727set dummy $tool_basename; ac_word=$2
6728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6729$as_echo_n "checking for $ac_word... " >&6; }
6730if ${ac_cv_path_ECHO+:} false; then :
6731  $as_echo_n "(cached) " >&6
6732else
6733  case $ECHO in
6734  [\\/]* | ?:[\\/]*)
6735  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6736  ;;
6737  *)
6738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6739for as_dir in $PATH
6740do
6741  IFS=$as_save_IFS
6742  test -z "$as_dir" && as_dir=.
6743    for ac_exec_ext in '' $ac_executable_extensions; do
6744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6745    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6747    break 2
6748  fi
6749done
6750  done
6751IFS=$as_save_IFS
6752
6753  ;;
6754esac
6755fi
6756ECHO=$ac_cv_path_ECHO
6757if test -n "$ECHO"; then
6758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6759$as_echo "$ECHO" >&6; }
6760else
6761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6762$as_echo "no" >&6; }
6763fi
6764
6765
6766        if test "x$ECHO" = x; then
6767          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6768        fi
6769      else
6770        # Otherwise we believe it is a complete path. Use it as it is.
6771        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6772$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6773        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6774$as_echo_n "checking for ECHO... " >&6; }
6775        if test ! -x "$tool_specified"; then
6776          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6777$as_echo "not found" >&6; }
6778          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6779        fi
6780        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6781$as_echo "$tool_specified" >&6; }
6782      fi
6783    fi
6784  fi
6785
6786
6787
6788  if test "x$ECHO" = x; then
6789    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6790  fi
6791
6792
6793
6794
6795
6796  # Publish this variable in the help.
6797
6798
6799  if test "x$EXPR" = x; then
6800    # The variable is not set by user, try to locate tool using the code snippet
6801    for ac_prog in expr
6802do
6803  # Extract the first word of "$ac_prog", so it can be a program name with args.
6804set dummy $ac_prog; ac_word=$2
6805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6806$as_echo_n "checking for $ac_word... " >&6; }
6807if ${ac_cv_path_EXPR+:} false; then :
6808  $as_echo_n "(cached) " >&6
6809else
6810  case $EXPR in
6811  [\\/]* | ?:[\\/]*)
6812  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6813  ;;
6814  *)
6815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6816for as_dir in $PATH
6817do
6818  IFS=$as_save_IFS
6819  test -z "$as_dir" && as_dir=.
6820    for ac_exec_ext in '' $ac_executable_extensions; do
6821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6822    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6824    break 2
6825  fi
6826done
6827  done
6828IFS=$as_save_IFS
6829
6830  ;;
6831esac
6832fi
6833EXPR=$ac_cv_path_EXPR
6834if test -n "$EXPR"; then
6835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6836$as_echo "$EXPR" >&6; }
6837else
6838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6839$as_echo "no" >&6; }
6840fi
6841
6842
6843  test -n "$EXPR" && break
6844done
6845
6846  else
6847    # The variable is set, but is it from the command line or the environment?
6848
6849    # Try to remove the string !EXPR! from our list.
6850    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6851    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6852      # If it failed, the variable was not from the command line. Ignore it,
6853      # but warn the user (except for BASH, which is always set by the calling BASH).
6854      if test "xEXPR" != xBASH; then
6855        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6856$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6857      fi
6858      # Try to locate tool using the code snippet
6859      for ac_prog in expr
6860do
6861  # Extract the first word of "$ac_prog", so it can be a program name with args.
6862set dummy $ac_prog; ac_word=$2
6863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6864$as_echo_n "checking for $ac_word... " >&6; }
6865if ${ac_cv_path_EXPR+:} false; then :
6866  $as_echo_n "(cached) " >&6
6867else
6868  case $EXPR in
6869  [\\/]* | ?:[\\/]*)
6870  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6871  ;;
6872  *)
6873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6874for as_dir in $PATH
6875do
6876  IFS=$as_save_IFS
6877  test -z "$as_dir" && as_dir=.
6878    for ac_exec_ext in '' $ac_executable_extensions; do
6879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6880    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6882    break 2
6883  fi
6884done
6885  done
6886IFS=$as_save_IFS
6887
6888  ;;
6889esac
6890fi
6891EXPR=$ac_cv_path_EXPR
6892if test -n "$EXPR"; then
6893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6894$as_echo "$EXPR" >&6; }
6895else
6896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6897$as_echo "no" >&6; }
6898fi
6899
6900
6901  test -n "$EXPR" && break
6902done
6903
6904    else
6905      # If it succeeded, then it was overridden by the user. We will use it
6906      # for the tool.
6907
6908      # First remove it from the list of overridden variables, so we can test
6909      # for unknown variables in the end.
6910      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6911
6912      # Check if the provided tool contains a complete path.
6913      tool_specified="$EXPR"
6914      tool_basename="${tool_specified##*/}"
6915      if test "x$tool_basename" = "x$tool_specified"; then
6916        # A command without a complete path is provided, search $PATH.
6917        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6918$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6919        # Extract the first word of "$tool_basename", so it can be a program name with args.
6920set dummy $tool_basename; ac_word=$2
6921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6922$as_echo_n "checking for $ac_word... " >&6; }
6923if ${ac_cv_path_EXPR+:} false; then :
6924  $as_echo_n "(cached) " >&6
6925else
6926  case $EXPR in
6927  [\\/]* | ?:[\\/]*)
6928  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6929  ;;
6930  *)
6931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6932for as_dir in $PATH
6933do
6934  IFS=$as_save_IFS
6935  test -z "$as_dir" && as_dir=.
6936    for ac_exec_ext in '' $ac_executable_extensions; do
6937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6938    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6940    break 2
6941  fi
6942done
6943  done
6944IFS=$as_save_IFS
6945
6946  ;;
6947esac
6948fi
6949EXPR=$ac_cv_path_EXPR
6950if test -n "$EXPR"; then
6951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6952$as_echo "$EXPR" >&6; }
6953else
6954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6955$as_echo "no" >&6; }
6956fi
6957
6958
6959        if test "x$EXPR" = x; then
6960          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6961        fi
6962      else
6963        # Otherwise we believe it is a complete path. Use it as it is.
6964        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6965$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6966        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6967$as_echo_n "checking for EXPR... " >&6; }
6968        if test ! -x "$tool_specified"; then
6969          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6970$as_echo "not found" >&6; }
6971          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6972        fi
6973        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6974$as_echo "$tool_specified" >&6; }
6975      fi
6976    fi
6977  fi
6978
6979
6980
6981  if test "x$EXPR" = x; then
6982    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6983  fi
6984
6985
6986
6987
6988
6989  # Publish this variable in the help.
6990
6991
6992  if test "x$FILE" = x; then
6993    # The variable is not set by user, try to locate tool using the code snippet
6994    for ac_prog in file
6995do
6996  # Extract the first word of "$ac_prog", so it can be a program name with args.
6997set dummy $ac_prog; ac_word=$2
6998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6999$as_echo_n "checking for $ac_word... " >&6; }
7000if ${ac_cv_path_FILE+:} false; then :
7001  $as_echo_n "(cached) " >&6
7002else
7003  case $FILE in
7004  [\\/]* | ?:[\\/]*)
7005  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7006  ;;
7007  *)
7008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7009for as_dir in $PATH
7010do
7011  IFS=$as_save_IFS
7012  test -z "$as_dir" && as_dir=.
7013    for ac_exec_ext in '' $ac_executable_extensions; do
7014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7015    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7017    break 2
7018  fi
7019done
7020  done
7021IFS=$as_save_IFS
7022
7023  ;;
7024esac
7025fi
7026FILE=$ac_cv_path_FILE
7027if test -n "$FILE"; then
7028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7029$as_echo "$FILE" >&6; }
7030else
7031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7032$as_echo "no" >&6; }
7033fi
7034
7035
7036  test -n "$FILE" && break
7037done
7038
7039  else
7040    # The variable is set, but is it from the command line or the environment?
7041
7042    # Try to remove the string !FILE! from our list.
7043    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7044    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7045      # If it failed, the variable was not from the command line. Ignore it,
7046      # but warn the user (except for BASH, which is always set by the calling BASH).
7047      if test "xFILE" != xBASH; then
7048        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7049$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7050      fi
7051      # Try to locate tool using the code snippet
7052      for ac_prog in file
7053do
7054  # Extract the first word of "$ac_prog", so it can be a program name with args.
7055set dummy $ac_prog; ac_word=$2
7056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7057$as_echo_n "checking for $ac_word... " >&6; }
7058if ${ac_cv_path_FILE+:} false; then :
7059  $as_echo_n "(cached) " >&6
7060else
7061  case $FILE in
7062  [\\/]* | ?:[\\/]*)
7063  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7064  ;;
7065  *)
7066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7067for as_dir in $PATH
7068do
7069  IFS=$as_save_IFS
7070  test -z "$as_dir" && as_dir=.
7071    for ac_exec_ext in '' $ac_executable_extensions; do
7072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7073    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7075    break 2
7076  fi
7077done
7078  done
7079IFS=$as_save_IFS
7080
7081  ;;
7082esac
7083fi
7084FILE=$ac_cv_path_FILE
7085if test -n "$FILE"; then
7086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7087$as_echo "$FILE" >&6; }
7088else
7089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7090$as_echo "no" >&6; }
7091fi
7092
7093
7094  test -n "$FILE" && break
7095done
7096
7097    else
7098      # If it succeeded, then it was overridden by the user. We will use it
7099      # for the tool.
7100
7101      # First remove it from the list of overridden variables, so we can test
7102      # for unknown variables in the end.
7103      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7104
7105      # Check if the provided tool contains a complete path.
7106      tool_specified="$FILE"
7107      tool_basename="${tool_specified##*/}"
7108      if test "x$tool_basename" = "x$tool_specified"; then
7109        # A command without a complete path is provided, search $PATH.
7110        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7111$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7112        # Extract the first word of "$tool_basename", so it can be a program name with args.
7113set dummy $tool_basename; ac_word=$2
7114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7115$as_echo_n "checking for $ac_word... " >&6; }
7116if ${ac_cv_path_FILE+:} false; then :
7117  $as_echo_n "(cached) " >&6
7118else
7119  case $FILE in
7120  [\\/]* | ?:[\\/]*)
7121  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7122  ;;
7123  *)
7124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7125for as_dir in $PATH
7126do
7127  IFS=$as_save_IFS
7128  test -z "$as_dir" && as_dir=.
7129    for ac_exec_ext in '' $ac_executable_extensions; do
7130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7131    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7133    break 2
7134  fi
7135done
7136  done
7137IFS=$as_save_IFS
7138
7139  ;;
7140esac
7141fi
7142FILE=$ac_cv_path_FILE
7143if test -n "$FILE"; then
7144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7145$as_echo "$FILE" >&6; }
7146else
7147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7148$as_echo "no" >&6; }
7149fi
7150
7151
7152        if test "x$FILE" = x; then
7153          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7154        fi
7155      else
7156        # Otherwise we believe it is a complete path. Use it as it is.
7157        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7158$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7159        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7160$as_echo_n "checking for FILE... " >&6; }
7161        if test ! -x "$tool_specified"; then
7162          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7163$as_echo "not found" >&6; }
7164          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7165        fi
7166        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7167$as_echo "$tool_specified" >&6; }
7168      fi
7169    fi
7170  fi
7171
7172
7173
7174  if test "x$FILE" = x; then
7175    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7176  fi
7177
7178
7179
7180
7181
7182  # Publish this variable in the help.
7183
7184
7185  if test "x$FIND" = x; then
7186    # The variable is not set by user, try to locate tool using the code snippet
7187    for ac_prog in find
7188do
7189  # Extract the first word of "$ac_prog", so it can be a program name with args.
7190set dummy $ac_prog; ac_word=$2
7191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7192$as_echo_n "checking for $ac_word... " >&6; }
7193if ${ac_cv_path_FIND+:} false; then :
7194  $as_echo_n "(cached) " >&6
7195else
7196  case $FIND in
7197  [\\/]* | ?:[\\/]*)
7198  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7199  ;;
7200  *)
7201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7202for as_dir in $PATH
7203do
7204  IFS=$as_save_IFS
7205  test -z "$as_dir" && as_dir=.
7206    for ac_exec_ext in '' $ac_executable_extensions; do
7207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7208    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7210    break 2
7211  fi
7212done
7213  done
7214IFS=$as_save_IFS
7215
7216  ;;
7217esac
7218fi
7219FIND=$ac_cv_path_FIND
7220if test -n "$FIND"; then
7221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7222$as_echo "$FIND" >&6; }
7223else
7224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7225$as_echo "no" >&6; }
7226fi
7227
7228
7229  test -n "$FIND" && break
7230done
7231
7232  else
7233    # The variable is set, but is it from the command line or the environment?
7234
7235    # Try to remove the string !FIND! from our list.
7236    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7237    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7238      # If it failed, the variable was not from the command line. Ignore it,
7239      # but warn the user (except for BASH, which is always set by the calling BASH).
7240      if test "xFIND" != xBASH; then
7241        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7242$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7243      fi
7244      # Try to locate tool using the code snippet
7245      for ac_prog in find
7246do
7247  # Extract the first word of "$ac_prog", so it can be a program name with args.
7248set dummy $ac_prog; ac_word=$2
7249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7250$as_echo_n "checking for $ac_word... " >&6; }
7251if ${ac_cv_path_FIND+:} false; then :
7252  $as_echo_n "(cached) " >&6
7253else
7254  case $FIND in
7255  [\\/]* | ?:[\\/]*)
7256  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7257  ;;
7258  *)
7259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7260for as_dir in $PATH
7261do
7262  IFS=$as_save_IFS
7263  test -z "$as_dir" && as_dir=.
7264    for ac_exec_ext in '' $ac_executable_extensions; do
7265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7266    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7268    break 2
7269  fi
7270done
7271  done
7272IFS=$as_save_IFS
7273
7274  ;;
7275esac
7276fi
7277FIND=$ac_cv_path_FIND
7278if test -n "$FIND"; then
7279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7280$as_echo "$FIND" >&6; }
7281else
7282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7283$as_echo "no" >&6; }
7284fi
7285
7286
7287  test -n "$FIND" && break
7288done
7289
7290    else
7291      # If it succeeded, then it was overridden by the user. We will use it
7292      # for the tool.
7293
7294      # First remove it from the list of overridden variables, so we can test
7295      # for unknown variables in the end.
7296      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7297
7298      # Check if the provided tool contains a complete path.
7299      tool_specified="$FIND"
7300      tool_basename="${tool_specified##*/}"
7301      if test "x$tool_basename" = "x$tool_specified"; then
7302        # A command without a complete path is provided, search $PATH.
7303        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7304$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7305        # Extract the first word of "$tool_basename", so it can be a program name with args.
7306set dummy $tool_basename; ac_word=$2
7307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7308$as_echo_n "checking for $ac_word... " >&6; }
7309if ${ac_cv_path_FIND+:} false; then :
7310  $as_echo_n "(cached) " >&6
7311else
7312  case $FIND in
7313  [\\/]* | ?:[\\/]*)
7314  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7315  ;;
7316  *)
7317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7318for as_dir in $PATH
7319do
7320  IFS=$as_save_IFS
7321  test -z "$as_dir" && as_dir=.
7322    for ac_exec_ext in '' $ac_executable_extensions; do
7323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7324    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7326    break 2
7327  fi
7328done
7329  done
7330IFS=$as_save_IFS
7331
7332  ;;
7333esac
7334fi
7335FIND=$ac_cv_path_FIND
7336if test -n "$FIND"; then
7337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7338$as_echo "$FIND" >&6; }
7339else
7340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7341$as_echo "no" >&6; }
7342fi
7343
7344
7345        if test "x$FIND" = x; then
7346          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7347        fi
7348      else
7349        # Otherwise we believe it is a complete path. Use it as it is.
7350        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7351$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7352        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7353$as_echo_n "checking for FIND... " >&6; }
7354        if test ! -x "$tool_specified"; then
7355          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7356$as_echo "not found" >&6; }
7357          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7358        fi
7359        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7360$as_echo "$tool_specified" >&6; }
7361      fi
7362    fi
7363  fi
7364
7365
7366
7367  if test "x$FIND" = x; then
7368    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7369  fi
7370
7371
7372
7373
7374
7375  # Publish this variable in the help.
7376
7377
7378  if test "x$HEAD" = x; then
7379    # The variable is not set by user, try to locate tool using the code snippet
7380    for ac_prog in head
7381do
7382  # Extract the first word of "$ac_prog", so it can be a program name with args.
7383set dummy $ac_prog; ac_word=$2
7384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7385$as_echo_n "checking for $ac_word... " >&6; }
7386if ${ac_cv_path_HEAD+:} false; then :
7387  $as_echo_n "(cached) " >&6
7388else
7389  case $HEAD in
7390  [\\/]* | ?:[\\/]*)
7391  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7392  ;;
7393  *)
7394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7395for as_dir in $PATH
7396do
7397  IFS=$as_save_IFS
7398  test -z "$as_dir" && as_dir=.
7399    for ac_exec_ext in '' $ac_executable_extensions; do
7400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7401    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7403    break 2
7404  fi
7405done
7406  done
7407IFS=$as_save_IFS
7408
7409  ;;
7410esac
7411fi
7412HEAD=$ac_cv_path_HEAD
7413if test -n "$HEAD"; then
7414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7415$as_echo "$HEAD" >&6; }
7416else
7417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7418$as_echo "no" >&6; }
7419fi
7420
7421
7422  test -n "$HEAD" && break
7423done
7424
7425  else
7426    # The variable is set, but is it from the command line or the environment?
7427
7428    # Try to remove the string !HEAD! from our list.
7429    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7430    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7431      # If it failed, the variable was not from the command line. Ignore it,
7432      # but warn the user (except for BASH, which is always set by the calling BASH).
7433      if test "xHEAD" != xBASH; then
7434        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7435$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7436      fi
7437      # Try to locate tool using the code snippet
7438      for ac_prog in head
7439do
7440  # Extract the first word of "$ac_prog", so it can be a program name with args.
7441set dummy $ac_prog; ac_word=$2
7442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7443$as_echo_n "checking for $ac_word... " >&6; }
7444if ${ac_cv_path_HEAD+:} false; then :
7445  $as_echo_n "(cached) " >&6
7446else
7447  case $HEAD in
7448  [\\/]* | ?:[\\/]*)
7449  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7450  ;;
7451  *)
7452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7453for as_dir in $PATH
7454do
7455  IFS=$as_save_IFS
7456  test -z "$as_dir" && as_dir=.
7457    for ac_exec_ext in '' $ac_executable_extensions; do
7458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7459    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7461    break 2
7462  fi
7463done
7464  done
7465IFS=$as_save_IFS
7466
7467  ;;
7468esac
7469fi
7470HEAD=$ac_cv_path_HEAD
7471if test -n "$HEAD"; then
7472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7473$as_echo "$HEAD" >&6; }
7474else
7475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7476$as_echo "no" >&6; }
7477fi
7478
7479
7480  test -n "$HEAD" && break
7481done
7482
7483    else
7484      # If it succeeded, then it was overridden by the user. We will use it
7485      # for the tool.
7486
7487      # First remove it from the list of overridden variables, so we can test
7488      # for unknown variables in the end.
7489      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7490
7491      # Check if the provided tool contains a complete path.
7492      tool_specified="$HEAD"
7493      tool_basename="${tool_specified##*/}"
7494      if test "x$tool_basename" = "x$tool_specified"; then
7495        # A command without a complete path is provided, search $PATH.
7496        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7497$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7498        # Extract the first word of "$tool_basename", so it can be a program name with args.
7499set dummy $tool_basename; ac_word=$2
7500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7501$as_echo_n "checking for $ac_word... " >&6; }
7502if ${ac_cv_path_HEAD+:} false; then :
7503  $as_echo_n "(cached) " >&6
7504else
7505  case $HEAD in
7506  [\\/]* | ?:[\\/]*)
7507  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7508  ;;
7509  *)
7510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7511for as_dir in $PATH
7512do
7513  IFS=$as_save_IFS
7514  test -z "$as_dir" && as_dir=.
7515    for ac_exec_ext in '' $ac_executable_extensions; do
7516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7517    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7519    break 2
7520  fi
7521done
7522  done
7523IFS=$as_save_IFS
7524
7525  ;;
7526esac
7527fi
7528HEAD=$ac_cv_path_HEAD
7529if test -n "$HEAD"; then
7530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7531$as_echo "$HEAD" >&6; }
7532else
7533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7534$as_echo "no" >&6; }
7535fi
7536
7537
7538        if test "x$HEAD" = x; then
7539          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7540        fi
7541      else
7542        # Otherwise we believe it is a complete path. Use it as it is.
7543        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7544$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7545        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7546$as_echo_n "checking for HEAD... " >&6; }
7547        if test ! -x "$tool_specified"; then
7548          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7549$as_echo "not found" >&6; }
7550          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7551        fi
7552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7553$as_echo "$tool_specified" >&6; }
7554      fi
7555    fi
7556  fi
7557
7558
7559
7560  if test "x$HEAD" = x; then
7561    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7562  fi
7563
7564
7565
7566
7567
7568  # Publish this variable in the help.
7569
7570
7571  if test "x$LN" = x; then
7572    # The variable is not set by user, try to locate tool using the code snippet
7573    for ac_prog in ln
7574do
7575  # Extract the first word of "$ac_prog", so it can be a program name with args.
7576set dummy $ac_prog; ac_word=$2
7577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7578$as_echo_n "checking for $ac_word... " >&6; }
7579if ${ac_cv_path_LN+:} false; then :
7580  $as_echo_n "(cached) " >&6
7581else
7582  case $LN in
7583  [\\/]* | ?:[\\/]*)
7584  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7585  ;;
7586  *)
7587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7588for as_dir in $PATH
7589do
7590  IFS=$as_save_IFS
7591  test -z "$as_dir" && as_dir=.
7592    for ac_exec_ext in '' $ac_executable_extensions; do
7593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7594    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7596    break 2
7597  fi
7598done
7599  done
7600IFS=$as_save_IFS
7601
7602  ;;
7603esac
7604fi
7605LN=$ac_cv_path_LN
7606if test -n "$LN"; then
7607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7608$as_echo "$LN" >&6; }
7609else
7610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7611$as_echo "no" >&6; }
7612fi
7613
7614
7615  test -n "$LN" && break
7616done
7617
7618  else
7619    # The variable is set, but is it from the command line or the environment?
7620
7621    # Try to remove the string !LN! from our list.
7622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7624      # If it failed, the variable was not from the command line. Ignore it,
7625      # but warn the user (except for BASH, which is always set by the calling BASH).
7626      if test "xLN" != xBASH; then
7627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7628$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7629      fi
7630      # Try to locate tool using the code snippet
7631      for ac_prog in ln
7632do
7633  # Extract the first word of "$ac_prog", so it can be a program name with args.
7634set dummy $ac_prog; ac_word=$2
7635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7636$as_echo_n "checking for $ac_word... " >&6; }
7637if ${ac_cv_path_LN+:} false; then :
7638  $as_echo_n "(cached) " >&6
7639else
7640  case $LN in
7641  [\\/]* | ?:[\\/]*)
7642  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7643  ;;
7644  *)
7645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7646for as_dir in $PATH
7647do
7648  IFS=$as_save_IFS
7649  test -z "$as_dir" && as_dir=.
7650    for ac_exec_ext in '' $ac_executable_extensions; do
7651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7652    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7654    break 2
7655  fi
7656done
7657  done
7658IFS=$as_save_IFS
7659
7660  ;;
7661esac
7662fi
7663LN=$ac_cv_path_LN
7664if test -n "$LN"; then
7665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7666$as_echo "$LN" >&6; }
7667else
7668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7669$as_echo "no" >&6; }
7670fi
7671
7672
7673  test -n "$LN" && break
7674done
7675
7676    else
7677      # If it succeeded, then it was overridden by the user. We will use it
7678      # for the tool.
7679
7680      # First remove it from the list of overridden variables, so we can test
7681      # for unknown variables in the end.
7682      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7683
7684      # Check if the provided tool contains a complete path.
7685      tool_specified="$LN"
7686      tool_basename="${tool_specified##*/}"
7687      if test "x$tool_basename" = "x$tool_specified"; then
7688        # A command without a complete path is provided, search $PATH.
7689        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7690$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7691        # Extract the first word of "$tool_basename", so it can be a program name with args.
7692set dummy $tool_basename; ac_word=$2
7693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7694$as_echo_n "checking for $ac_word... " >&6; }
7695if ${ac_cv_path_LN+:} false; then :
7696  $as_echo_n "(cached) " >&6
7697else
7698  case $LN in
7699  [\\/]* | ?:[\\/]*)
7700  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7701  ;;
7702  *)
7703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7704for as_dir in $PATH
7705do
7706  IFS=$as_save_IFS
7707  test -z "$as_dir" && as_dir=.
7708    for ac_exec_ext in '' $ac_executable_extensions; do
7709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7710    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7712    break 2
7713  fi
7714done
7715  done
7716IFS=$as_save_IFS
7717
7718  ;;
7719esac
7720fi
7721LN=$ac_cv_path_LN
7722if test -n "$LN"; then
7723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7724$as_echo "$LN" >&6; }
7725else
7726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7727$as_echo "no" >&6; }
7728fi
7729
7730
7731        if test "x$LN" = x; then
7732          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7733        fi
7734      else
7735        # Otherwise we believe it is a complete path. Use it as it is.
7736        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7737$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7738        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7739$as_echo_n "checking for LN... " >&6; }
7740        if test ! -x "$tool_specified"; then
7741          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7742$as_echo "not found" >&6; }
7743          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7744        fi
7745        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7746$as_echo "$tool_specified" >&6; }
7747      fi
7748    fi
7749  fi
7750
7751
7752
7753  if test "x$LN" = x; then
7754    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7755  fi
7756
7757
7758
7759
7760
7761  # Publish this variable in the help.
7762
7763
7764  if test "x$LS" = x; then
7765    # The variable is not set by user, try to locate tool using the code snippet
7766    for ac_prog in ls
7767do
7768  # Extract the first word of "$ac_prog", so it can be a program name with args.
7769set dummy $ac_prog; ac_word=$2
7770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7771$as_echo_n "checking for $ac_word... " >&6; }
7772if ${ac_cv_path_LS+:} false; then :
7773  $as_echo_n "(cached) " >&6
7774else
7775  case $LS in
7776  [\\/]* | ?:[\\/]*)
7777  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7778  ;;
7779  *)
7780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7781for as_dir in $PATH
7782do
7783  IFS=$as_save_IFS
7784  test -z "$as_dir" && as_dir=.
7785    for ac_exec_ext in '' $ac_executable_extensions; do
7786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7787    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7789    break 2
7790  fi
7791done
7792  done
7793IFS=$as_save_IFS
7794
7795  ;;
7796esac
7797fi
7798LS=$ac_cv_path_LS
7799if test -n "$LS"; then
7800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7801$as_echo "$LS" >&6; }
7802else
7803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7804$as_echo "no" >&6; }
7805fi
7806
7807
7808  test -n "$LS" && break
7809done
7810
7811  else
7812    # The variable is set, but is it from the command line or the environment?
7813
7814    # Try to remove the string !LS! from our list.
7815    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7816    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7817      # If it failed, the variable was not from the command line. Ignore it,
7818      # but warn the user (except for BASH, which is always set by the calling BASH).
7819      if test "xLS" != xBASH; then
7820        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7821$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7822      fi
7823      # Try to locate tool using the code snippet
7824      for ac_prog in ls
7825do
7826  # Extract the first word of "$ac_prog", so it can be a program name with args.
7827set dummy $ac_prog; ac_word=$2
7828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7829$as_echo_n "checking for $ac_word... " >&6; }
7830if ${ac_cv_path_LS+:} false; then :
7831  $as_echo_n "(cached) " >&6
7832else
7833  case $LS in
7834  [\\/]* | ?:[\\/]*)
7835  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7836  ;;
7837  *)
7838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7839for as_dir in $PATH
7840do
7841  IFS=$as_save_IFS
7842  test -z "$as_dir" && as_dir=.
7843    for ac_exec_ext in '' $ac_executable_extensions; do
7844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7845    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7847    break 2
7848  fi
7849done
7850  done
7851IFS=$as_save_IFS
7852
7853  ;;
7854esac
7855fi
7856LS=$ac_cv_path_LS
7857if test -n "$LS"; then
7858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7859$as_echo "$LS" >&6; }
7860else
7861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7862$as_echo "no" >&6; }
7863fi
7864
7865
7866  test -n "$LS" && break
7867done
7868
7869    else
7870      # If it succeeded, then it was overridden by the user. We will use it
7871      # for the tool.
7872
7873      # First remove it from the list of overridden variables, so we can test
7874      # for unknown variables in the end.
7875      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7876
7877      # Check if the provided tool contains a complete path.
7878      tool_specified="$LS"
7879      tool_basename="${tool_specified##*/}"
7880      if test "x$tool_basename" = "x$tool_specified"; then
7881        # A command without a complete path is provided, search $PATH.
7882        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7883$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7884        # Extract the first word of "$tool_basename", so it can be a program name with args.
7885set dummy $tool_basename; ac_word=$2
7886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7887$as_echo_n "checking for $ac_word... " >&6; }
7888if ${ac_cv_path_LS+:} false; then :
7889  $as_echo_n "(cached) " >&6
7890else
7891  case $LS in
7892  [\\/]* | ?:[\\/]*)
7893  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7894  ;;
7895  *)
7896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7897for as_dir in $PATH
7898do
7899  IFS=$as_save_IFS
7900  test -z "$as_dir" && as_dir=.
7901    for ac_exec_ext in '' $ac_executable_extensions; do
7902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7903    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7905    break 2
7906  fi
7907done
7908  done
7909IFS=$as_save_IFS
7910
7911  ;;
7912esac
7913fi
7914LS=$ac_cv_path_LS
7915if test -n "$LS"; then
7916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7917$as_echo "$LS" >&6; }
7918else
7919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7920$as_echo "no" >&6; }
7921fi
7922
7923
7924        if test "x$LS" = x; then
7925          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7926        fi
7927      else
7928        # Otherwise we believe it is a complete path. Use it as it is.
7929        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7930$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7931        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7932$as_echo_n "checking for LS... " >&6; }
7933        if test ! -x "$tool_specified"; then
7934          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7935$as_echo "not found" >&6; }
7936          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7937        fi
7938        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7939$as_echo "$tool_specified" >&6; }
7940      fi
7941    fi
7942  fi
7943
7944
7945
7946  if test "x$LS" = x; then
7947    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7948  fi
7949
7950
7951
7952
7953
7954  # Publish this variable in the help.
7955
7956
7957  if test "x$MKDIR" = x; then
7958    # The variable is not set by user, try to locate tool using the code snippet
7959    for ac_prog in mkdir
7960do
7961  # Extract the first word of "$ac_prog", so it can be a program name with args.
7962set dummy $ac_prog; ac_word=$2
7963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7964$as_echo_n "checking for $ac_word... " >&6; }
7965if ${ac_cv_path_MKDIR+:} false; then :
7966  $as_echo_n "(cached) " >&6
7967else
7968  case $MKDIR in
7969  [\\/]* | ?:[\\/]*)
7970  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7971  ;;
7972  *)
7973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7974for as_dir in $PATH
7975do
7976  IFS=$as_save_IFS
7977  test -z "$as_dir" && as_dir=.
7978    for ac_exec_ext in '' $ac_executable_extensions; do
7979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7980    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7982    break 2
7983  fi
7984done
7985  done
7986IFS=$as_save_IFS
7987
7988  ;;
7989esac
7990fi
7991MKDIR=$ac_cv_path_MKDIR
7992if test -n "$MKDIR"; then
7993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7994$as_echo "$MKDIR" >&6; }
7995else
7996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7997$as_echo "no" >&6; }
7998fi
7999
8000
8001  test -n "$MKDIR" && break
8002done
8003
8004  else
8005    # The variable is set, but is it from the command line or the environment?
8006
8007    # Try to remove the string !MKDIR! from our list.
8008    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8009    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8010      # If it failed, the variable was not from the command line. Ignore it,
8011      # but warn the user (except for BASH, which is always set by the calling BASH).
8012      if test "xMKDIR" != xBASH; then
8013        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8014$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8015      fi
8016      # Try to locate tool using the code snippet
8017      for ac_prog in mkdir
8018do
8019  # Extract the first word of "$ac_prog", so it can be a program name with args.
8020set dummy $ac_prog; ac_word=$2
8021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8022$as_echo_n "checking for $ac_word... " >&6; }
8023if ${ac_cv_path_MKDIR+:} false; then :
8024  $as_echo_n "(cached) " >&6
8025else
8026  case $MKDIR in
8027  [\\/]* | ?:[\\/]*)
8028  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8029  ;;
8030  *)
8031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8032for as_dir in $PATH
8033do
8034  IFS=$as_save_IFS
8035  test -z "$as_dir" && as_dir=.
8036    for ac_exec_ext in '' $ac_executable_extensions; do
8037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8038    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8040    break 2
8041  fi
8042done
8043  done
8044IFS=$as_save_IFS
8045
8046  ;;
8047esac
8048fi
8049MKDIR=$ac_cv_path_MKDIR
8050if test -n "$MKDIR"; then
8051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8052$as_echo "$MKDIR" >&6; }
8053else
8054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8055$as_echo "no" >&6; }
8056fi
8057
8058
8059  test -n "$MKDIR" && break
8060done
8061
8062    else
8063      # If it succeeded, then it was overridden by the user. We will use it
8064      # for the tool.
8065
8066      # First remove it from the list of overridden variables, so we can test
8067      # for unknown variables in the end.
8068      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8069
8070      # Check if the provided tool contains a complete path.
8071      tool_specified="$MKDIR"
8072      tool_basename="${tool_specified##*/}"
8073      if test "x$tool_basename" = "x$tool_specified"; then
8074        # A command without a complete path is provided, search $PATH.
8075        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8076$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8077        # Extract the first word of "$tool_basename", so it can be a program name with args.
8078set dummy $tool_basename; ac_word=$2
8079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8080$as_echo_n "checking for $ac_word... " >&6; }
8081if ${ac_cv_path_MKDIR+:} false; then :
8082  $as_echo_n "(cached) " >&6
8083else
8084  case $MKDIR in
8085  [\\/]* | ?:[\\/]*)
8086  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8087  ;;
8088  *)
8089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8090for as_dir in $PATH
8091do
8092  IFS=$as_save_IFS
8093  test -z "$as_dir" && as_dir=.
8094    for ac_exec_ext in '' $ac_executable_extensions; do
8095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8096    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8098    break 2
8099  fi
8100done
8101  done
8102IFS=$as_save_IFS
8103
8104  ;;
8105esac
8106fi
8107MKDIR=$ac_cv_path_MKDIR
8108if test -n "$MKDIR"; then
8109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8110$as_echo "$MKDIR" >&6; }
8111else
8112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8113$as_echo "no" >&6; }
8114fi
8115
8116
8117        if test "x$MKDIR" = x; then
8118          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8119        fi
8120      else
8121        # Otherwise we believe it is a complete path. Use it as it is.
8122        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8123$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8124        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8125$as_echo_n "checking for MKDIR... " >&6; }
8126        if test ! -x "$tool_specified"; then
8127          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8128$as_echo "not found" >&6; }
8129          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8130        fi
8131        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8132$as_echo "$tool_specified" >&6; }
8133      fi
8134    fi
8135  fi
8136
8137
8138
8139  if test "x$MKDIR" = x; then
8140    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8141  fi
8142
8143
8144
8145
8146
8147  # Publish this variable in the help.
8148
8149
8150  if test "x$MKTEMP" = x; then
8151    # The variable is not set by user, try to locate tool using the code snippet
8152    for ac_prog in mktemp
8153do
8154  # Extract the first word of "$ac_prog", so it can be a program name with args.
8155set dummy $ac_prog; ac_word=$2
8156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8157$as_echo_n "checking for $ac_word... " >&6; }
8158if ${ac_cv_path_MKTEMP+:} false; then :
8159  $as_echo_n "(cached) " >&6
8160else
8161  case $MKTEMP in
8162  [\\/]* | ?:[\\/]*)
8163  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8164  ;;
8165  *)
8166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8167for as_dir in $PATH
8168do
8169  IFS=$as_save_IFS
8170  test -z "$as_dir" && as_dir=.
8171    for ac_exec_ext in '' $ac_executable_extensions; do
8172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8173    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8175    break 2
8176  fi
8177done
8178  done
8179IFS=$as_save_IFS
8180
8181  ;;
8182esac
8183fi
8184MKTEMP=$ac_cv_path_MKTEMP
8185if test -n "$MKTEMP"; then
8186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8187$as_echo "$MKTEMP" >&6; }
8188else
8189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8190$as_echo "no" >&6; }
8191fi
8192
8193
8194  test -n "$MKTEMP" && break
8195done
8196
8197  else
8198    # The variable is set, but is it from the command line or the environment?
8199
8200    # Try to remove the string !MKTEMP! from our list.
8201    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8202    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8203      # If it failed, the variable was not from the command line. Ignore it,
8204      # but warn the user (except for BASH, which is always set by the calling BASH).
8205      if test "xMKTEMP" != xBASH; then
8206        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8207$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8208      fi
8209      # Try to locate tool using the code snippet
8210      for ac_prog in mktemp
8211do
8212  # Extract the first word of "$ac_prog", so it can be a program name with args.
8213set dummy $ac_prog; ac_word=$2
8214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8215$as_echo_n "checking for $ac_word... " >&6; }
8216if ${ac_cv_path_MKTEMP+:} false; then :
8217  $as_echo_n "(cached) " >&6
8218else
8219  case $MKTEMP in
8220  [\\/]* | ?:[\\/]*)
8221  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8222  ;;
8223  *)
8224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8225for as_dir in $PATH
8226do
8227  IFS=$as_save_IFS
8228  test -z "$as_dir" && as_dir=.
8229    for ac_exec_ext in '' $ac_executable_extensions; do
8230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8231    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8233    break 2
8234  fi
8235done
8236  done
8237IFS=$as_save_IFS
8238
8239  ;;
8240esac
8241fi
8242MKTEMP=$ac_cv_path_MKTEMP
8243if test -n "$MKTEMP"; then
8244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8245$as_echo "$MKTEMP" >&6; }
8246else
8247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8248$as_echo "no" >&6; }
8249fi
8250
8251
8252  test -n "$MKTEMP" && break
8253done
8254
8255    else
8256      # If it succeeded, then it was overridden by the user. We will use it
8257      # for the tool.
8258
8259      # First remove it from the list of overridden variables, so we can test
8260      # for unknown variables in the end.
8261      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8262
8263      # Check if the provided tool contains a complete path.
8264      tool_specified="$MKTEMP"
8265      tool_basename="${tool_specified##*/}"
8266      if test "x$tool_basename" = "x$tool_specified"; then
8267        # A command without a complete path is provided, search $PATH.
8268        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8269$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8270        # Extract the first word of "$tool_basename", so it can be a program name with args.
8271set dummy $tool_basename; ac_word=$2
8272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8273$as_echo_n "checking for $ac_word... " >&6; }
8274if ${ac_cv_path_MKTEMP+:} false; then :
8275  $as_echo_n "(cached) " >&6
8276else
8277  case $MKTEMP in
8278  [\\/]* | ?:[\\/]*)
8279  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8280  ;;
8281  *)
8282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8283for as_dir in $PATH
8284do
8285  IFS=$as_save_IFS
8286  test -z "$as_dir" && as_dir=.
8287    for ac_exec_ext in '' $ac_executable_extensions; do
8288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8289    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8291    break 2
8292  fi
8293done
8294  done
8295IFS=$as_save_IFS
8296
8297  ;;
8298esac
8299fi
8300MKTEMP=$ac_cv_path_MKTEMP
8301if test -n "$MKTEMP"; then
8302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8303$as_echo "$MKTEMP" >&6; }
8304else
8305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8306$as_echo "no" >&6; }
8307fi
8308
8309
8310        if test "x$MKTEMP" = x; then
8311          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8312        fi
8313      else
8314        # Otherwise we believe it is a complete path. Use it as it is.
8315        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8316$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8317        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8318$as_echo_n "checking for MKTEMP... " >&6; }
8319        if test ! -x "$tool_specified"; then
8320          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8321$as_echo "not found" >&6; }
8322          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8323        fi
8324        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8325$as_echo "$tool_specified" >&6; }
8326      fi
8327    fi
8328  fi
8329
8330
8331
8332  if test "x$MKTEMP" = x; then
8333    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8334  fi
8335
8336
8337
8338
8339
8340  # Publish this variable in the help.
8341
8342
8343  if test "x$MV" = x; then
8344    # The variable is not set by user, try to locate tool using the code snippet
8345    for ac_prog in mv
8346do
8347  # Extract the first word of "$ac_prog", so it can be a program name with args.
8348set dummy $ac_prog; ac_word=$2
8349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8350$as_echo_n "checking for $ac_word... " >&6; }
8351if ${ac_cv_path_MV+:} false; then :
8352  $as_echo_n "(cached) " >&6
8353else
8354  case $MV in
8355  [\\/]* | ?:[\\/]*)
8356  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8357  ;;
8358  *)
8359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8360for as_dir in $PATH
8361do
8362  IFS=$as_save_IFS
8363  test -z "$as_dir" && as_dir=.
8364    for ac_exec_ext in '' $ac_executable_extensions; do
8365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8366    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8368    break 2
8369  fi
8370done
8371  done
8372IFS=$as_save_IFS
8373
8374  ;;
8375esac
8376fi
8377MV=$ac_cv_path_MV
8378if test -n "$MV"; then
8379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8380$as_echo "$MV" >&6; }
8381else
8382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8383$as_echo "no" >&6; }
8384fi
8385
8386
8387  test -n "$MV" && break
8388done
8389
8390  else
8391    # The variable is set, but is it from the command line or the environment?
8392
8393    # Try to remove the string !MV! from our list.
8394    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8395    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8396      # If it failed, the variable was not from the command line. Ignore it,
8397      # but warn the user (except for BASH, which is always set by the calling BASH).
8398      if test "xMV" != xBASH; then
8399        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8400$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8401      fi
8402      # Try to locate tool using the code snippet
8403      for ac_prog in mv
8404do
8405  # Extract the first word of "$ac_prog", so it can be a program name with args.
8406set dummy $ac_prog; ac_word=$2
8407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8408$as_echo_n "checking for $ac_word... " >&6; }
8409if ${ac_cv_path_MV+:} false; then :
8410  $as_echo_n "(cached) " >&6
8411else
8412  case $MV in
8413  [\\/]* | ?:[\\/]*)
8414  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8415  ;;
8416  *)
8417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8418for as_dir in $PATH
8419do
8420  IFS=$as_save_IFS
8421  test -z "$as_dir" && as_dir=.
8422    for ac_exec_ext in '' $ac_executable_extensions; do
8423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8424    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8426    break 2
8427  fi
8428done
8429  done
8430IFS=$as_save_IFS
8431
8432  ;;
8433esac
8434fi
8435MV=$ac_cv_path_MV
8436if test -n "$MV"; then
8437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8438$as_echo "$MV" >&6; }
8439else
8440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8441$as_echo "no" >&6; }
8442fi
8443
8444
8445  test -n "$MV" && break
8446done
8447
8448    else
8449      # If it succeeded, then it was overridden by the user. We will use it
8450      # for the tool.
8451
8452      # First remove it from the list of overridden variables, so we can test
8453      # for unknown variables in the end.
8454      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8455
8456      # Check if the provided tool contains a complete path.
8457      tool_specified="$MV"
8458      tool_basename="${tool_specified##*/}"
8459      if test "x$tool_basename" = "x$tool_specified"; then
8460        # A command without a complete path is provided, search $PATH.
8461        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8462$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8463        # Extract the first word of "$tool_basename", so it can be a program name with args.
8464set dummy $tool_basename; ac_word=$2
8465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8466$as_echo_n "checking for $ac_word... " >&6; }
8467if ${ac_cv_path_MV+:} false; then :
8468  $as_echo_n "(cached) " >&6
8469else
8470  case $MV in
8471  [\\/]* | ?:[\\/]*)
8472  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8473  ;;
8474  *)
8475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8476for as_dir in $PATH
8477do
8478  IFS=$as_save_IFS
8479  test -z "$as_dir" && as_dir=.
8480    for ac_exec_ext in '' $ac_executable_extensions; do
8481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8482    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8484    break 2
8485  fi
8486done
8487  done
8488IFS=$as_save_IFS
8489
8490  ;;
8491esac
8492fi
8493MV=$ac_cv_path_MV
8494if test -n "$MV"; then
8495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8496$as_echo "$MV" >&6; }
8497else
8498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8499$as_echo "no" >&6; }
8500fi
8501
8502
8503        if test "x$MV" = x; then
8504          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8505        fi
8506      else
8507        # Otherwise we believe it is a complete path. Use it as it is.
8508        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8509$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8510        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8511$as_echo_n "checking for MV... " >&6; }
8512        if test ! -x "$tool_specified"; then
8513          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8514$as_echo "not found" >&6; }
8515          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8516        fi
8517        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8518$as_echo "$tool_specified" >&6; }
8519      fi
8520    fi
8521  fi
8522
8523
8524
8525  if test "x$MV" = x; then
8526    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8527  fi
8528
8529
8530
8531
8532
8533  # Publish this variable in the help.
8534
8535
8536  if test "x$NAWK" = x; then
8537    # The variable is not set by user, try to locate tool using the code snippet
8538    for ac_prog in nawk gawk awk
8539do
8540  # Extract the first word of "$ac_prog", so it can be a program name with args.
8541set dummy $ac_prog; ac_word=$2
8542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8543$as_echo_n "checking for $ac_word... " >&6; }
8544if ${ac_cv_path_NAWK+:} false; then :
8545  $as_echo_n "(cached) " >&6
8546else
8547  case $NAWK in
8548  [\\/]* | ?:[\\/]*)
8549  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8550  ;;
8551  *)
8552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8553for as_dir in $PATH
8554do
8555  IFS=$as_save_IFS
8556  test -z "$as_dir" && as_dir=.
8557    for ac_exec_ext in '' $ac_executable_extensions; do
8558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8559    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8561    break 2
8562  fi
8563done
8564  done
8565IFS=$as_save_IFS
8566
8567  ;;
8568esac
8569fi
8570NAWK=$ac_cv_path_NAWK
8571if test -n "$NAWK"; then
8572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8573$as_echo "$NAWK" >&6; }
8574else
8575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8576$as_echo "no" >&6; }
8577fi
8578
8579
8580  test -n "$NAWK" && break
8581done
8582
8583  else
8584    # The variable is set, but is it from the command line or the environment?
8585
8586    # Try to remove the string !NAWK! from our list.
8587    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8588    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8589      # If it failed, the variable was not from the command line. Ignore it,
8590      # but warn the user (except for BASH, which is always set by the calling BASH).
8591      if test "xNAWK" != xBASH; then
8592        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8593$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8594      fi
8595      # Try to locate tool using the code snippet
8596      for ac_prog in nawk gawk awk
8597do
8598  # Extract the first word of "$ac_prog", so it can be a program name with args.
8599set dummy $ac_prog; ac_word=$2
8600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8601$as_echo_n "checking for $ac_word... " >&6; }
8602if ${ac_cv_path_NAWK+:} false; then :
8603  $as_echo_n "(cached) " >&6
8604else
8605  case $NAWK in
8606  [\\/]* | ?:[\\/]*)
8607  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8608  ;;
8609  *)
8610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8611for as_dir in $PATH
8612do
8613  IFS=$as_save_IFS
8614  test -z "$as_dir" && as_dir=.
8615    for ac_exec_ext in '' $ac_executable_extensions; do
8616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8617    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8619    break 2
8620  fi
8621done
8622  done
8623IFS=$as_save_IFS
8624
8625  ;;
8626esac
8627fi
8628NAWK=$ac_cv_path_NAWK
8629if test -n "$NAWK"; then
8630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8631$as_echo "$NAWK" >&6; }
8632else
8633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8634$as_echo "no" >&6; }
8635fi
8636
8637
8638  test -n "$NAWK" && break
8639done
8640
8641    else
8642      # If it succeeded, then it was overridden by the user. We will use it
8643      # for the tool.
8644
8645      # First remove it from the list of overridden variables, so we can test
8646      # for unknown variables in the end.
8647      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8648
8649      # Check if the provided tool contains a complete path.
8650      tool_specified="$NAWK"
8651      tool_basename="${tool_specified##*/}"
8652      if test "x$tool_basename" = "x$tool_specified"; then
8653        # A command without a complete path is provided, search $PATH.
8654        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8655$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8656        # Extract the first word of "$tool_basename", so it can be a program name with args.
8657set dummy $tool_basename; ac_word=$2
8658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8659$as_echo_n "checking for $ac_word... " >&6; }
8660if ${ac_cv_path_NAWK+:} false; then :
8661  $as_echo_n "(cached) " >&6
8662else
8663  case $NAWK in
8664  [\\/]* | ?:[\\/]*)
8665  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8666  ;;
8667  *)
8668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8669for as_dir in $PATH
8670do
8671  IFS=$as_save_IFS
8672  test -z "$as_dir" && as_dir=.
8673    for ac_exec_ext in '' $ac_executable_extensions; do
8674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8675    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8677    break 2
8678  fi
8679done
8680  done
8681IFS=$as_save_IFS
8682
8683  ;;
8684esac
8685fi
8686NAWK=$ac_cv_path_NAWK
8687if test -n "$NAWK"; then
8688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8689$as_echo "$NAWK" >&6; }
8690else
8691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8692$as_echo "no" >&6; }
8693fi
8694
8695
8696        if test "x$NAWK" = x; then
8697          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8698        fi
8699      else
8700        # Otherwise we believe it is a complete path. Use it as it is.
8701        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8702$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8704$as_echo_n "checking for NAWK... " >&6; }
8705        if test ! -x "$tool_specified"; then
8706          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8707$as_echo "not found" >&6; }
8708          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8709        fi
8710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8711$as_echo "$tool_specified" >&6; }
8712      fi
8713    fi
8714  fi
8715
8716
8717
8718  if test "x$NAWK" = x; then
8719    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8720  fi
8721
8722
8723
8724
8725
8726  # Publish this variable in the help.
8727
8728
8729  if test "x$PRINTF" = x; then
8730    # The variable is not set by user, try to locate tool using the code snippet
8731    for ac_prog in printf
8732do
8733  # Extract the first word of "$ac_prog", so it can be a program name with args.
8734set dummy $ac_prog; ac_word=$2
8735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8736$as_echo_n "checking for $ac_word... " >&6; }
8737if ${ac_cv_path_PRINTF+:} false; then :
8738  $as_echo_n "(cached) " >&6
8739else
8740  case $PRINTF in
8741  [\\/]* | ?:[\\/]*)
8742  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8743  ;;
8744  *)
8745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8746for as_dir in $PATH
8747do
8748  IFS=$as_save_IFS
8749  test -z "$as_dir" && as_dir=.
8750    for ac_exec_ext in '' $ac_executable_extensions; do
8751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8752    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8754    break 2
8755  fi
8756done
8757  done
8758IFS=$as_save_IFS
8759
8760  ;;
8761esac
8762fi
8763PRINTF=$ac_cv_path_PRINTF
8764if test -n "$PRINTF"; then
8765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8766$as_echo "$PRINTF" >&6; }
8767else
8768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8769$as_echo "no" >&6; }
8770fi
8771
8772
8773  test -n "$PRINTF" && break
8774done
8775
8776  else
8777    # The variable is set, but is it from the command line or the environment?
8778
8779    # Try to remove the string !PRINTF! from our list.
8780    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8781    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8782      # If it failed, the variable was not from the command line. Ignore it,
8783      # but warn the user (except for BASH, which is always set by the calling BASH).
8784      if test "xPRINTF" != xBASH; then
8785        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8786$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8787      fi
8788      # Try to locate tool using the code snippet
8789      for ac_prog in printf
8790do
8791  # Extract the first word of "$ac_prog", so it can be a program name with args.
8792set dummy $ac_prog; ac_word=$2
8793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8794$as_echo_n "checking for $ac_word... " >&6; }
8795if ${ac_cv_path_PRINTF+:} false; then :
8796  $as_echo_n "(cached) " >&6
8797else
8798  case $PRINTF in
8799  [\\/]* | ?:[\\/]*)
8800  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8801  ;;
8802  *)
8803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8804for as_dir in $PATH
8805do
8806  IFS=$as_save_IFS
8807  test -z "$as_dir" && as_dir=.
8808    for ac_exec_ext in '' $ac_executable_extensions; do
8809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8810    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8812    break 2
8813  fi
8814done
8815  done
8816IFS=$as_save_IFS
8817
8818  ;;
8819esac
8820fi
8821PRINTF=$ac_cv_path_PRINTF
8822if test -n "$PRINTF"; then
8823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8824$as_echo "$PRINTF" >&6; }
8825else
8826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8827$as_echo "no" >&6; }
8828fi
8829
8830
8831  test -n "$PRINTF" && break
8832done
8833
8834    else
8835      # If it succeeded, then it was overridden by the user. We will use it
8836      # for the tool.
8837
8838      # First remove it from the list of overridden variables, so we can test
8839      # for unknown variables in the end.
8840      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8841
8842      # Check if the provided tool contains a complete path.
8843      tool_specified="$PRINTF"
8844      tool_basename="${tool_specified##*/}"
8845      if test "x$tool_basename" = "x$tool_specified"; then
8846        # A command without a complete path is provided, search $PATH.
8847        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8848$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8849        # Extract the first word of "$tool_basename", so it can be a program name with args.
8850set dummy $tool_basename; ac_word=$2
8851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8852$as_echo_n "checking for $ac_word... " >&6; }
8853if ${ac_cv_path_PRINTF+:} false; then :
8854  $as_echo_n "(cached) " >&6
8855else
8856  case $PRINTF in
8857  [\\/]* | ?:[\\/]*)
8858  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8859  ;;
8860  *)
8861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8862for as_dir in $PATH
8863do
8864  IFS=$as_save_IFS
8865  test -z "$as_dir" && as_dir=.
8866    for ac_exec_ext in '' $ac_executable_extensions; do
8867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8868    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8870    break 2
8871  fi
8872done
8873  done
8874IFS=$as_save_IFS
8875
8876  ;;
8877esac
8878fi
8879PRINTF=$ac_cv_path_PRINTF
8880if test -n "$PRINTF"; then
8881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8882$as_echo "$PRINTF" >&6; }
8883else
8884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8885$as_echo "no" >&6; }
8886fi
8887
8888
8889        if test "x$PRINTF" = x; then
8890          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8891        fi
8892      else
8893        # Otherwise we believe it is a complete path. Use it as it is.
8894        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8895$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8896        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8897$as_echo_n "checking for PRINTF... " >&6; }
8898        if test ! -x "$tool_specified"; then
8899          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8900$as_echo "not found" >&6; }
8901          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8902        fi
8903        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8904$as_echo "$tool_specified" >&6; }
8905      fi
8906    fi
8907  fi
8908
8909
8910
8911  if test "x$PRINTF" = x; then
8912    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8913  fi
8914
8915
8916
8917
8918
8919  # Publish this variable in the help.
8920
8921
8922  if test "x$RM" = x; then
8923    # The variable is not set by user, try to locate tool using the code snippet
8924    for ac_prog in rm
8925do
8926  # Extract the first word of "$ac_prog", so it can be a program name with args.
8927set dummy $ac_prog; ac_word=$2
8928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8929$as_echo_n "checking for $ac_word... " >&6; }
8930if ${ac_cv_path_RM+:} false; then :
8931  $as_echo_n "(cached) " >&6
8932else
8933  case $RM in
8934  [\\/]* | ?:[\\/]*)
8935  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8936  ;;
8937  *)
8938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8939for as_dir in $PATH
8940do
8941  IFS=$as_save_IFS
8942  test -z "$as_dir" && as_dir=.
8943    for ac_exec_ext in '' $ac_executable_extensions; do
8944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8945    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8947    break 2
8948  fi
8949done
8950  done
8951IFS=$as_save_IFS
8952
8953  ;;
8954esac
8955fi
8956RM=$ac_cv_path_RM
8957if test -n "$RM"; then
8958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8959$as_echo "$RM" >&6; }
8960else
8961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8962$as_echo "no" >&6; }
8963fi
8964
8965
8966  test -n "$RM" && break
8967done
8968
8969  else
8970    # The variable is set, but is it from the command line or the environment?
8971
8972    # Try to remove the string !RM! from our list.
8973    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8974    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8975      # If it failed, the variable was not from the command line. Ignore it,
8976      # but warn the user (except for BASH, which is always set by the calling BASH).
8977      if test "xRM" != xBASH; then
8978        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8979$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8980      fi
8981      # Try to locate tool using the code snippet
8982      for ac_prog in rm
8983do
8984  # Extract the first word of "$ac_prog", so it can be a program name with args.
8985set dummy $ac_prog; ac_word=$2
8986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8987$as_echo_n "checking for $ac_word... " >&6; }
8988if ${ac_cv_path_RM+:} false; then :
8989  $as_echo_n "(cached) " >&6
8990else
8991  case $RM in
8992  [\\/]* | ?:[\\/]*)
8993  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8994  ;;
8995  *)
8996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8997for as_dir in $PATH
8998do
8999  IFS=$as_save_IFS
9000  test -z "$as_dir" && as_dir=.
9001    for ac_exec_ext in '' $ac_executable_extensions; do
9002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9003    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9005    break 2
9006  fi
9007done
9008  done
9009IFS=$as_save_IFS
9010
9011  ;;
9012esac
9013fi
9014RM=$ac_cv_path_RM
9015if test -n "$RM"; then
9016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9017$as_echo "$RM" >&6; }
9018else
9019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9020$as_echo "no" >&6; }
9021fi
9022
9023
9024  test -n "$RM" && break
9025done
9026
9027    else
9028      # If it succeeded, then it was overridden by the user. We will use it
9029      # for the tool.
9030
9031      # First remove it from the list of overridden variables, so we can test
9032      # for unknown variables in the end.
9033      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9034
9035      # Check if the provided tool contains a complete path.
9036      tool_specified="$RM"
9037      tool_basename="${tool_specified##*/}"
9038      if test "x$tool_basename" = "x$tool_specified"; then
9039        # A command without a complete path is provided, search $PATH.
9040        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9041$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9042        # Extract the first word of "$tool_basename", so it can be a program name with args.
9043set dummy $tool_basename; ac_word=$2
9044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9045$as_echo_n "checking for $ac_word... " >&6; }
9046if ${ac_cv_path_RM+:} false; then :
9047  $as_echo_n "(cached) " >&6
9048else
9049  case $RM in
9050  [\\/]* | ?:[\\/]*)
9051  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9052  ;;
9053  *)
9054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9055for as_dir in $PATH
9056do
9057  IFS=$as_save_IFS
9058  test -z "$as_dir" && as_dir=.
9059    for ac_exec_ext in '' $ac_executable_extensions; do
9060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9061    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9063    break 2
9064  fi
9065done
9066  done
9067IFS=$as_save_IFS
9068
9069  ;;
9070esac
9071fi
9072RM=$ac_cv_path_RM
9073if test -n "$RM"; then
9074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9075$as_echo "$RM" >&6; }
9076else
9077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9078$as_echo "no" >&6; }
9079fi
9080
9081
9082        if test "x$RM" = x; then
9083          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9084        fi
9085      else
9086        # Otherwise we believe it is a complete path. Use it as it is.
9087        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9088$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9089        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9090$as_echo_n "checking for RM... " >&6; }
9091        if test ! -x "$tool_specified"; then
9092          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9093$as_echo "not found" >&6; }
9094          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9095        fi
9096        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9097$as_echo "$tool_specified" >&6; }
9098      fi
9099    fi
9100  fi
9101
9102
9103
9104  if test "x$RM" = x; then
9105    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9106  fi
9107
9108
9109
9110
9111
9112  # Publish this variable in the help.
9113
9114
9115  if test "x$SH" = x; then
9116    # The variable is not set by user, try to locate tool using the code snippet
9117    for ac_prog in sh
9118do
9119  # Extract the first word of "$ac_prog", so it can be a program name with args.
9120set dummy $ac_prog; ac_word=$2
9121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9122$as_echo_n "checking for $ac_word... " >&6; }
9123if ${ac_cv_path_SH+:} false; then :
9124  $as_echo_n "(cached) " >&6
9125else
9126  case $SH in
9127  [\\/]* | ?:[\\/]*)
9128  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9129  ;;
9130  *)
9131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9132for as_dir in $PATH
9133do
9134  IFS=$as_save_IFS
9135  test -z "$as_dir" && as_dir=.
9136    for ac_exec_ext in '' $ac_executable_extensions; do
9137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9138    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9140    break 2
9141  fi
9142done
9143  done
9144IFS=$as_save_IFS
9145
9146  ;;
9147esac
9148fi
9149SH=$ac_cv_path_SH
9150if test -n "$SH"; then
9151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9152$as_echo "$SH" >&6; }
9153else
9154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9155$as_echo "no" >&6; }
9156fi
9157
9158
9159  test -n "$SH" && break
9160done
9161
9162  else
9163    # The variable is set, but is it from the command line or the environment?
9164
9165    # Try to remove the string !SH! from our list.
9166    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9167    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9168      # If it failed, the variable was not from the command line. Ignore it,
9169      # but warn the user (except for BASH, which is always set by the calling BASH).
9170      if test "xSH" != xBASH; then
9171        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9172$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9173      fi
9174      # Try to locate tool using the code snippet
9175      for ac_prog in sh
9176do
9177  # Extract the first word of "$ac_prog", so it can be a program name with args.
9178set dummy $ac_prog; ac_word=$2
9179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9180$as_echo_n "checking for $ac_word... " >&6; }
9181if ${ac_cv_path_SH+:} false; then :
9182  $as_echo_n "(cached) " >&6
9183else
9184  case $SH in
9185  [\\/]* | ?:[\\/]*)
9186  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9187  ;;
9188  *)
9189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9190for as_dir in $PATH
9191do
9192  IFS=$as_save_IFS
9193  test -z "$as_dir" && as_dir=.
9194    for ac_exec_ext in '' $ac_executable_extensions; do
9195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9196    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9198    break 2
9199  fi
9200done
9201  done
9202IFS=$as_save_IFS
9203
9204  ;;
9205esac
9206fi
9207SH=$ac_cv_path_SH
9208if test -n "$SH"; then
9209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9210$as_echo "$SH" >&6; }
9211else
9212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9213$as_echo "no" >&6; }
9214fi
9215
9216
9217  test -n "$SH" && break
9218done
9219
9220    else
9221      # If it succeeded, then it was overridden by the user. We will use it
9222      # for the tool.
9223
9224      # First remove it from the list of overridden variables, so we can test
9225      # for unknown variables in the end.
9226      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9227
9228      # Check if the provided tool contains a complete path.
9229      tool_specified="$SH"
9230      tool_basename="${tool_specified##*/}"
9231      if test "x$tool_basename" = "x$tool_specified"; then
9232        # A command without a complete path is provided, search $PATH.
9233        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9234$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9235        # Extract the first word of "$tool_basename", so it can be a program name with args.
9236set dummy $tool_basename; ac_word=$2
9237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9238$as_echo_n "checking for $ac_word... " >&6; }
9239if ${ac_cv_path_SH+:} false; then :
9240  $as_echo_n "(cached) " >&6
9241else
9242  case $SH in
9243  [\\/]* | ?:[\\/]*)
9244  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9245  ;;
9246  *)
9247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9248for as_dir in $PATH
9249do
9250  IFS=$as_save_IFS
9251  test -z "$as_dir" && as_dir=.
9252    for ac_exec_ext in '' $ac_executable_extensions; do
9253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9254    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9256    break 2
9257  fi
9258done
9259  done
9260IFS=$as_save_IFS
9261
9262  ;;
9263esac
9264fi
9265SH=$ac_cv_path_SH
9266if test -n "$SH"; then
9267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9268$as_echo "$SH" >&6; }
9269else
9270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9271$as_echo "no" >&6; }
9272fi
9273
9274
9275        if test "x$SH" = x; then
9276          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9277        fi
9278      else
9279        # Otherwise we believe it is a complete path. Use it as it is.
9280        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9281$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9282        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9283$as_echo_n "checking for SH... " >&6; }
9284        if test ! -x "$tool_specified"; then
9285          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9286$as_echo "not found" >&6; }
9287          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9288        fi
9289        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9290$as_echo "$tool_specified" >&6; }
9291      fi
9292    fi
9293  fi
9294
9295
9296
9297  if test "x$SH" = x; then
9298    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9299  fi
9300
9301
9302
9303
9304
9305  # Publish this variable in the help.
9306
9307
9308  if test "x$SORT" = x; then
9309    # The variable is not set by user, try to locate tool using the code snippet
9310    for ac_prog in sort
9311do
9312  # Extract the first word of "$ac_prog", so it can be a program name with args.
9313set dummy $ac_prog; ac_word=$2
9314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9315$as_echo_n "checking for $ac_word... " >&6; }
9316if ${ac_cv_path_SORT+:} false; then :
9317  $as_echo_n "(cached) " >&6
9318else
9319  case $SORT in
9320  [\\/]* | ?:[\\/]*)
9321  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9322  ;;
9323  *)
9324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9325for as_dir in $PATH
9326do
9327  IFS=$as_save_IFS
9328  test -z "$as_dir" && as_dir=.
9329    for ac_exec_ext in '' $ac_executable_extensions; do
9330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9331    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9333    break 2
9334  fi
9335done
9336  done
9337IFS=$as_save_IFS
9338
9339  ;;
9340esac
9341fi
9342SORT=$ac_cv_path_SORT
9343if test -n "$SORT"; then
9344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9345$as_echo "$SORT" >&6; }
9346else
9347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9348$as_echo "no" >&6; }
9349fi
9350
9351
9352  test -n "$SORT" && break
9353done
9354
9355  else
9356    # The variable is set, but is it from the command line or the environment?
9357
9358    # Try to remove the string !SORT! from our list.
9359    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9360    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9361      # If it failed, the variable was not from the command line. Ignore it,
9362      # but warn the user (except for BASH, which is always set by the calling BASH).
9363      if test "xSORT" != xBASH; then
9364        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9365$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9366      fi
9367      # Try to locate tool using the code snippet
9368      for ac_prog in sort
9369do
9370  # Extract the first word of "$ac_prog", so it can be a program name with args.
9371set dummy $ac_prog; ac_word=$2
9372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9373$as_echo_n "checking for $ac_word... " >&6; }
9374if ${ac_cv_path_SORT+:} false; then :
9375  $as_echo_n "(cached) " >&6
9376else
9377  case $SORT in
9378  [\\/]* | ?:[\\/]*)
9379  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9380  ;;
9381  *)
9382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9383for as_dir in $PATH
9384do
9385  IFS=$as_save_IFS
9386  test -z "$as_dir" && as_dir=.
9387    for ac_exec_ext in '' $ac_executable_extensions; do
9388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9389    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9391    break 2
9392  fi
9393done
9394  done
9395IFS=$as_save_IFS
9396
9397  ;;
9398esac
9399fi
9400SORT=$ac_cv_path_SORT
9401if test -n "$SORT"; then
9402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9403$as_echo "$SORT" >&6; }
9404else
9405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9406$as_echo "no" >&6; }
9407fi
9408
9409
9410  test -n "$SORT" && break
9411done
9412
9413    else
9414      # If it succeeded, then it was overridden by the user. We will use it
9415      # for the tool.
9416
9417      # First remove it from the list of overridden variables, so we can test
9418      # for unknown variables in the end.
9419      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9420
9421      # Check if the provided tool contains a complete path.
9422      tool_specified="$SORT"
9423      tool_basename="${tool_specified##*/}"
9424      if test "x$tool_basename" = "x$tool_specified"; then
9425        # A command without a complete path is provided, search $PATH.
9426        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9427$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9428        # Extract the first word of "$tool_basename", so it can be a program name with args.
9429set dummy $tool_basename; ac_word=$2
9430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9431$as_echo_n "checking for $ac_word... " >&6; }
9432if ${ac_cv_path_SORT+:} false; then :
9433  $as_echo_n "(cached) " >&6
9434else
9435  case $SORT in
9436  [\\/]* | ?:[\\/]*)
9437  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9438  ;;
9439  *)
9440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9441for as_dir in $PATH
9442do
9443  IFS=$as_save_IFS
9444  test -z "$as_dir" && as_dir=.
9445    for ac_exec_ext in '' $ac_executable_extensions; do
9446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9447    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9449    break 2
9450  fi
9451done
9452  done
9453IFS=$as_save_IFS
9454
9455  ;;
9456esac
9457fi
9458SORT=$ac_cv_path_SORT
9459if test -n "$SORT"; then
9460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9461$as_echo "$SORT" >&6; }
9462else
9463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9464$as_echo "no" >&6; }
9465fi
9466
9467
9468        if test "x$SORT" = x; then
9469          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9470        fi
9471      else
9472        # Otherwise we believe it is a complete path. Use it as it is.
9473        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9474$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9475        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9476$as_echo_n "checking for SORT... " >&6; }
9477        if test ! -x "$tool_specified"; then
9478          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9479$as_echo "not found" >&6; }
9480          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9481        fi
9482        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9483$as_echo "$tool_specified" >&6; }
9484      fi
9485    fi
9486  fi
9487
9488
9489
9490  if test "x$SORT" = x; then
9491    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9492  fi
9493
9494
9495
9496
9497
9498  # Publish this variable in the help.
9499
9500
9501  if test "x$TAIL" = x; then
9502    # The variable is not set by user, try to locate tool using the code snippet
9503    for ac_prog in tail
9504do
9505  # Extract the first word of "$ac_prog", so it can be a program name with args.
9506set dummy $ac_prog; ac_word=$2
9507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9508$as_echo_n "checking for $ac_word... " >&6; }
9509if ${ac_cv_path_TAIL+:} false; then :
9510  $as_echo_n "(cached) " >&6
9511else
9512  case $TAIL in
9513  [\\/]* | ?:[\\/]*)
9514  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9515  ;;
9516  *)
9517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9518for as_dir in $PATH
9519do
9520  IFS=$as_save_IFS
9521  test -z "$as_dir" && as_dir=.
9522    for ac_exec_ext in '' $ac_executable_extensions; do
9523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9524    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9526    break 2
9527  fi
9528done
9529  done
9530IFS=$as_save_IFS
9531
9532  ;;
9533esac
9534fi
9535TAIL=$ac_cv_path_TAIL
9536if test -n "$TAIL"; then
9537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9538$as_echo "$TAIL" >&6; }
9539else
9540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9541$as_echo "no" >&6; }
9542fi
9543
9544
9545  test -n "$TAIL" && break
9546done
9547
9548  else
9549    # The variable is set, but is it from the command line or the environment?
9550
9551    # Try to remove the string !TAIL! from our list.
9552    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9553    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9554      # If it failed, the variable was not from the command line. Ignore it,
9555      # but warn the user (except for BASH, which is always set by the calling BASH).
9556      if test "xTAIL" != xBASH; then
9557        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9558$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9559      fi
9560      # Try to locate tool using the code snippet
9561      for ac_prog in tail
9562do
9563  # Extract the first word of "$ac_prog", so it can be a program name with args.
9564set dummy $ac_prog; ac_word=$2
9565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9566$as_echo_n "checking for $ac_word... " >&6; }
9567if ${ac_cv_path_TAIL+:} false; then :
9568  $as_echo_n "(cached) " >&6
9569else
9570  case $TAIL in
9571  [\\/]* | ?:[\\/]*)
9572  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9573  ;;
9574  *)
9575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9576for as_dir in $PATH
9577do
9578  IFS=$as_save_IFS
9579  test -z "$as_dir" && as_dir=.
9580    for ac_exec_ext in '' $ac_executable_extensions; do
9581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9582    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9584    break 2
9585  fi
9586done
9587  done
9588IFS=$as_save_IFS
9589
9590  ;;
9591esac
9592fi
9593TAIL=$ac_cv_path_TAIL
9594if test -n "$TAIL"; then
9595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9596$as_echo "$TAIL" >&6; }
9597else
9598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9599$as_echo "no" >&6; }
9600fi
9601
9602
9603  test -n "$TAIL" && break
9604done
9605
9606    else
9607      # If it succeeded, then it was overridden by the user. We will use it
9608      # for the tool.
9609
9610      # First remove it from the list of overridden variables, so we can test
9611      # for unknown variables in the end.
9612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9613
9614      # Check if the provided tool contains a complete path.
9615      tool_specified="$TAIL"
9616      tool_basename="${tool_specified##*/}"
9617      if test "x$tool_basename" = "x$tool_specified"; then
9618        # A command without a complete path is provided, search $PATH.
9619        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9620$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9621        # Extract the first word of "$tool_basename", so it can be a program name with args.
9622set dummy $tool_basename; ac_word=$2
9623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9624$as_echo_n "checking for $ac_word... " >&6; }
9625if ${ac_cv_path_TAIL+:} false; then :
9626  $as_echo_n "(cached) " >&6
9627else
9628  case $TAIL in
9629  [\\/]* | ?:[\\/]*)
9630  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9631  ;;
9632  *)
9633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9634for as_dir in $PATH
9635do
9636  IFS=$as_save_IFS
9637  test -z "$as_dir" && as_dir=.
9638    for ac_exec_ext in '' $ac_executable_extensions; do
9639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9640    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9642    break 2
9643  fi
9644done
9645  done
9646IFS=$as_save_IFS
9647
9648  ;;
9649esac
9650fi
9651TAIL=$ac_cv_path_TAIL
9652if test -n "$TAIL"; then
9653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9654$as_echo "$TAIL" >&6; }
9655else
9656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9657$as_echo "no" >&6; }
9658fi
9659
9660
9661        if test "x$TAIL" = x; then
9662          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9663        fi
9664      else
9665        # Otherwise we believe it is a complete path. Use it as it is.
9666        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9667$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9669$as_echo_n "checking for TAIL... " >&6; }
9670        if test ! -x "$tool_specified"; then
9671          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9672$as_echo "not found" >&6; }
9673          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9674        fi
9675        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9676$as_echo "$tool_specified" >&6; }
9677      fi
9678    fi
9679  fi
9680
9681
9682
9683  if test "x$TAIL" = x; then
9684    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9685  fi
9686
9687
9688
9689
9690
9691  # Publish this variable in the help.
9692
9693
9694  if test "x$TAR" = x; then
9695    # The variable is not set by user, try to locate tool using the code snippet
9696    for ac_prog in tar
9697do
9698  # Extract the first word of "$ac_prog", so it can be a program name with args.
9699set dummy $ac_prog; ac_word=$2
9700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9701$as_echo_n "checking for $ac_word... " >&6; }
9702if ${ac_cv_path_TAR+:} false; then :
9703  $as_echo_n "(cached) " >&6
9704else
9705  case $TAR in
9706  [\\/]* | ?:[\\/]*)
9707  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9708  ;;
9709  *)
9710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9711for as_dir in $PATH
9712do
9713  IFS=$as_save_IFS
9714  test -z "$as_dir" && as_dir=.
9715    for ac_exec_ext in '' $ac_executable_extensions; do
9716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9717    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9719    break 2
9720  fi
9721done
9722  done
9723IFS=$as_save_IFS
9724
9725  ;;
9726esac
9727fi
9728TAR=$ac_cv_path_TAR
9729if test -n "$TAR"; then
9730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9731$as_echo "$TAR" >&6; }
9732else
9733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9734$as_echo "no" >&6; }
9735fi
9736
9737
9738  test -n "$TAR" && break
9739done
9740
9741  else
9742    # The variable is set, but is it from the command line or the environment?
9743
9744    # Try to remove the string !TAR! from our list.
9745    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9746    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9747      # If it failed, the variable was not from the command line. Ignore it,
9748      # but warn the user (except for BASH, which is always set by the calling BASH).
9749      if test "xTAR" != xBASH; then
9750        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9751$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9752      fi
9753      # Try to locate tool using the code snippet
9754      for ac_prog in tar
9755do
9756  # Extract the first word of "$ac_prog", so it can be a program name with args.
9757set dummy $ac_prog; ac_word=$2
9758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9759$as_echo_n "checking for $ac_word... " >&6; }
9760if ${ac_cv_path_TAR+:} false; then :
9761  $as_echo_n "(cached) " >&6
9762else
9763  case $TAR in
9764  [\\/]* | ?:[\\/]*)
9765  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9766  ;;
9767  *)
9768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9769for as_dir in $PATH
9770do
9771  IFS=$as_save_IFS
9772  test -z "$as_dir" && as_dir=.
9773    for ac_exec_ext in '' $ac_executable_extensions; do
9774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9775    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9777    break 2
9778  fi
9779done
9780  done
9781IFS=$as_save_IFS
9782
9783  ;;
9784esac
9785fi
9786TAR=$ac_cv_path_TAR
9787if test -n "$TAR"; then
9788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9789$as_echo "$TAR" >&6; }
9790else
9791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9792$as_echo "no" >&6; }
9793fi
9794
9795
9796  test -n "$TAR" && break
9797done
9798
9799    else
9800      # If it succeeded, then it was overridden by the user. We will use it
9801      # for the tool.
9802
9803      # First remove it from the list of overridden variables, so we can test
9804      # for unknown variables in the end.
9805      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9806
9807      # Check if the provided tool contains a complete path.
9808      tool_specified="$TAR"
9809      tool_basename="${tool_specified##*/}"
9810      if test "x$tool_basename" = "x$tool_specified"; then
9811        # A command without a complete path is provided, search $PATH.
9812        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9813$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9814        # Extract the first word of "$tool_basename", so it can be a program name with args.
9815set dummy $tool_basename; ac_word=$2
9816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9817$as_echo_n "checking for $ac_word... " >&6; }
9818if ${ac_cv_path_TAR+:} false; then :
9819  $as_echo_n "(cached) " >&6
9820else
9821  case $TAR in
9822  [\\/]* | ?:[\\/]*)
9823  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9824  ;;
9825  *)
9826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9827for as_dir in $PATH
9828do
9829  IFS=$as_save_IFS
9830  test -z "$as_dir" && as_dir=.
9831    for ac_exec_ext in '' $ac_executable_extensions; do
9832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9833    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9835    break 2
9836  fi
9837done
9838  done
9839IFS=$as_save_IFS
9840
9841  ;;
9842esac
9843fi
9844TAR=$ac_cv_path_TAR
9845if test -n "$TAR"; then
9846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9847$as_echo "$TAR" >&6; }
9848else
9849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9850$as_echo "no" >&6; }
9851fi
9852
9853
9854        if test "x$TAR" = x; then
9855          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9856        fi
9857      else
9858        # Otherwise we believe it is a complete path. Use it as it is.
9859        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9860$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9861        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9862$as_echo_n "checking for TAR... " >&6; }
9863        if test ! -x "$tool_specified"; then
9864          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9865$as_echo "not found" >&6; }
9866          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9867        fi
9868        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9869$as_echo "$tool_specified" >&6; }
9870      fi
9871    fi
9872  fi
9873
9874
9875
9876  if test "x$TAR" = x; then
9877    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9878  fi
9879
9880
9881
9882
9883
9884  # Publish this variable in the help.
9885
9886
9887  if test "x$TEE" = x; then
9888    # The variable is not set by user, try to locate tool using the code snippet
9889    for ac_prog in tee
9890do
9891  # Extract the first word of "$ac_prog", so it can be a program name with args.
9892set dummy $ac_prog; ac_word=$2
9893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9894$as_echo_n "checking for $ac_word... " >&6; }
9895if ${ac_cv_path_TEE+:} false; then :
9896  $as_echo_n "(cached) " >&6
9897else
9898  case $TEE in
9899  [\\/]* | ?:[\\/]*)
9900  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9901  ;;
9902  *)
9903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9904for as_dir in $PATH
9905do
9906  IFS=$as_save_IFS
9907  test -z "$as_dir" && as_dir=.
9908    for ac_exec_ext in '' $ac_executable_extensions; do
9909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9910    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9912    break 2
9913  fi
9914done
9915  done
9916IFS=$as_save_IFS
9917
9918  ;;
9919esac
9920fi
9921TEE=$ac_cv_path_TEE
9922if test -n "$TEE"; then
9923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9924$as_echo "$TEE" >&6; }
9925else
9926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9927$as_echo "no" >&6; }
9928fi
9929
9930
9931  test -n "$TEE" && break
9932done
9933
9934  else
9935    # The variable is set, but is it from the command line or the environment?
9936
9937    # Try to remove the string !TEE! from our list.
9938    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9939    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9940      # If it failed, the variable was not from the command line. Ignore it,
9941      # but warn the user (except for BASH, which is always set by the calling BASH).
9942      if test "xTEE" != xBASH; then
9943        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9944$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9945      fi
9946      # Try to locate tool using the code snippet
9947      for ac_prog in tee
9948do
9949  # Extract the first word of "$ac_prog", so it can be a program name with args.
9950set dummy $ac_prog; ac_word=$2
9951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9952$as_echo_n "checking for $ac_word... " >&6; }
9953if ${ac_cv_path_TEE+:} false; then :
9954  $as_echo_n "(cached) " >&6
9955else
9956  case $TEE in
9957  [\\/]* | ?:[\\/]*)
9958  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9959  ;;
9960  *)
9961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9962for as_dir in $PATH
9963do
9964  IFS=$as_save_IFS
9965  test -z "$as_dir" && as_dir=.
9966    for ac_exec_ext in '' $ac_executable_extensions; do
9967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9968    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9970    break 2
9971  fi
9972done
9973  done
9974IFS=$as_save_IFS
9975
9976  ;;
9977esac
9978fi
9979TEE=$ac_cv_path_TEE
9980if test -n "$TEE"; then
9981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9982$as_echo "$TEE" >&6; }
9983else
9984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9985$as_echo "no" >&6; }
9986fi
9987
9988
9989  test -n "$TEE" && break
9990done
9991
9992    else
9993      # If it succeeded, then it was overridden by the user. We will use it
9994      # for the tool.
9995
9996      # First remove it from the list of overridden variables, so we can test
9997      # for unknown variables in the end.
9998      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9999
10000      # Check if the provided tool contains a complete path.
10001      tool_specified="$TEE"
10002      tool_basename="${tool_specified##*/}"
10003      if test "x$tool_basename" = "x$tool_specified"; then
10004        # A command without a complete path is provided, search $PATH.
10005        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10006$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10007        # Extract the first word of "$tool_basename", so it can be a program name with args.
10008set dummy $tool_basename; ac_word=$2
10009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10010$as_echo_n "checking for $ac_word... " >&6; }
10011if ${ac_cv_path_TEE+:} false; then :
10012  $as_echo_n "(cached) " >&6
10013else
10014  case $TEE in
10015  [\\/]* | ?:[\\/]*)
10016  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10017  ;;
10018  *)
10019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10020for as_dir in $PATH
10021do
10022  IFS=$as_save_IFS
10023  test -z "$as_dir" && as_dir=.
10024    for ac_exec_ext in '' $ac_executable_extensions; do
10025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10026    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10028    break 2
10029  fi
10030done
10031  done
10032IFS=$as_save_IFS
10033
10034  ;;
10035esac
10036fi
10037TEE=$ac_cv_path_TEE
10038if test -n "$TEE"; then
10039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10040$as_echo "$TEE" >&6; }
10041else
10042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10043$as_echo "no" >&6; }
10044fi
10045
10046
10047        if test "x$TEE" = x; then
10048          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10049        fi
10050      else
10051        # Otherwise we believe it is a complete path. Use it as it is.
10052        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10053$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10054        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10055$as_echo_n "checking for TEE... " >&6; }
10056        if test ! -x "$tool_specified"; then
10057          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10058$as_echo "not found" >&6; }
10059          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10060        fi
10061        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10062$as_echo "$tool_specified" >&6; }
10063      fi
10064    fi
10065  fi
10066
10067
10068
10069  if test "x$TEE" = x; then
10070    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10071  fi
10072
10073
10074
10075
10076
10077  # Publish this variable in the help.
10078
10079
10080  if test "x$TOUCH" = x; then
10081    # The variable is not set by user, try to locate tool using the code snippet
10082    for ac_prog in touch
10083do
10084  # Extract the first word of "$ac_prog", so it can be a program name with args.
10085set dummy $ac_prog; ac_word=$2
10086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10087$as_echo_n "checking for $ac_word... " >&6; }
10088if ${ac_cv_path_TOUCH+:} false; then :
10089  $as_echo_n "(cached) " >&6
10090else
10091  case $TOUCH in
10092  [\\/]* | ?:[\\/]*)
10093  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10094  ;;
10095  *)
10096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10097for as_dir in $PATH
10098do
10099  IFS=$as_save_IFS
10100  test -z "$as_dir" && as_dir=.
10101    for ac_exec_ext in '' $ac_executable_extensions; do
10102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10103    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10105    break 2
10106  fi
10107done
10108  done
10109IFS=$as_save_IFS
10110
10111  ;;
10112esac
10113fi
10114TOUCH=$ac_cv_path_TOUCH
10115if test -n "$TOUCH"; then
10116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10117$as_echo "$TOUCH" >&6; }
10118else
10119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10120$as_echo "no" >&6; }
10121fi
10122
10123
10124  test -n "$TOUCH" && break
10125done
10126
10127  else
10128    # The variable is set, but is it from the command line or the environment?
10129
10130    # Try to remove the string !TOUCH! from our list.
10131    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10132    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10133      # If it failed, the variable was not from the command line. Ignore it,
10134      # but warn the user (except for BASH, which is always set by the calling BASH).
10135      if test "xTOUCH" != xBASH; then
10136        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10137$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10138      fi
10139      # Try to locate tool using the code snippet
10140      for ac_prog in touch
10141do
10142  # Extract the first word of "$ac_prog", so it can be a program name with args.
10143set dummy $ac_prog; ac_word=$2
10144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10145$as_echo_n "checking for $ac_word... " >&6; }
10146if ${ac_cv_path_TOUCH+:} false; then :
10147  $as_echo_n "(cached) " >&6
10148else
10149  case $TOUCH in
10150  [\\/]* | ?:[\\/]*)
10151  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10152  ;;
10153  *)
10154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10155for as_dir in $PATH
10156do
10157  IFS=$as_save_IFS
10158  test -z "$as_dir" && as_dir=.
10159    for ac_exec_ext in '' $ac_executable_extensions; do
10160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10161    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10163    break 2
10164  fi
10165done
10166  done
10167IFS=$as_save_IFS
10168
10169  ;;
10170esac
10171fi
10172TOUCH=$ac_cv_path_TOUCH
10173if test -n "$TOUCH"; then
10174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10175$as_echo "$TOUCH" >&6; }
10176else
10177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10178$as_echo "no" >&6; }
10179fi
10180
10181
10182  test -n "$TOUCH" && break
10183done
10184
10185    else
10186      # If it succeeded, then it was overridden by the user. We will use it
10187      # for the tool.
10188
10189      # First remove it from the list of overridden variables, so we can test
10190      # for unknown variables in the end.
10191      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10192
10193      # Check if the provided tool contains a complete path.
10194      tool_specified="$TOUCH"
10195      tool_basename="${tool_specified##*/}"
10196      if test "x$tool_basename" = "x$tool_specified"; then
10197        # A command without a complete path is provided, search $PATH.
10198        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10199$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10200        # Extract the first word of "$tool_basename", so it can be a program name with args.
10201set dummy $tool_basename; ac_word=$2
10202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10203$as_echo_n "checking for $ac_word... " >&6; }
10204if ${ac_cv_path_TOUCH+:} false; then :
10205  $as_echo_n "(cached) " >&6
10206else
10207  case $TOUCH in
10208  [\\/]* | ?:[\\/]*)
10209  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10210  ;;
10211  *)
10212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10213for as_dir in $PATH
10214do
10215  IFS=$as_save_IFS
10216  test -z "$as_dir" && as_dir=.
10217    for ac_exec_ext in '' $ac_executable_extensions; do
10218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10219    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10221    break 2
10222  fi
10223done
10224  done
10225IFS=$as_save_IFS
10226
10227  ;;
10228esac
10229fi
10230TOUCH=$ac_cv_path_TOUCH
10231if test -n "$TOUCH"; then
10232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10233$as_echo "$TOUCH" >&6; }
10234else
10235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10236$as_echo "no" >&6; }
10237fi
10238
10239
10240        if test "x$TOUCH" = x; then
10241          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10242        fi
10243      else
10244        # Otherwise we believe it is a complete path. Use it as it is.
10245        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10246$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10247        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10248$as_echo_n "checking for TOUCH... " >&6; }
10249        if test ! -x "$tool_specified"; then
10250          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10251$as_echo "not found" >&6; }
10252          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10253        fi
10254        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10255$as_echo "$tool_specified" >&6; }
10256      fi
10257    fi
10258  fi
10259
10260
10261
10262  if test "x$TOUCH" = x; then
10263    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10264  fi
10265
10266
10267
10268
10269
10270  # Publish this variable in the help.
10271
10272
10273  if test "x$TR" = x; then
10274    # The variable is not set by user, try to locate tool using the code snippet
10275    for ac_prog in tr
10276do
10277  # Extract the first word of "$ac_prog", so it can be a program name with args.
10278set dummy $ac_prog; ac_word=$2
10279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10280$as_echo_n "checking for $ac_word... " >&6; }
10281if ${ac_cv_path_TR+:} false; then :
10282  $as_echo_n "(cached) " >&6
10283else
10284  case $TR in
10285  [\\/]* | ?:[\\/]*)
10286  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10287  ;;
10288  *)
10289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10290for as_dir in $PATH
10291do
10292  IFS=$as_save_IFS
10293  test -z "$as_dir" && as_dir=.
10294    for ac_exec_ext in '' $ac_executable_extensions; do
10295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10296    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10298    break 2
10299  fi
10300done
10301  done
10302IFS=$as_save_IFS
10303
10304  ;;
10305esac
10306fi
10307TR=$ac_cv_path_TR
10308if test -n "$TR"; then
10309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10310$as_echo "$TR" >&6; }
10311else
10312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10313$as_echo "no" >&6; }
10314fi
10315
10316
10317  test -n "$TR" && break
10318done
10319
10320  else
10321    # The variable is set, but is it from the command line or the environment?
10322
10323    # Try to remove the string !TR! from our list.
10324    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10325    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10326      # If it failed, the variable was not from the command line. Ignore it,
10327      # but warn the user (except for BASH, which is always set by the calling BASH).
10328      if test "xTR" != xBASH; then
10329        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10330$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10331      fi
10332      # Try to locate tool using the code snippet
10333      for ac_prog in tr
10334do
10335  # Extract the first word of "$ac_prog", so it can be a program name with args.
10336set dummy $ac_prog; ac_word=$2
10337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10338$as_echo_n "checking for $ac_word... " >&6; }
10339if ${ac_cv_path_TR+:} false; then :
10340  $as_echo_n "(cached) " >&6
10341else
10342  case $TR in
10343  [\\/]* | ?:[\\/]*)
10344  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10345  ;;
10346  *)
10347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10348for as_dir in $PATH
10349do
10350  IFS=$as_save_IFS
10351  test -z "$as_dir" && as_dir=.
10352    for ac_exec_ext in '' $ac_executable_extensions; do
10353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10354    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10356    break 2
10357  fi
10358done
10359  done
10360IFS=$as_save_IFS
10361
10362  ;;
10363esac
10364fi
10365TR=$ac_cv_path_TR
10366if test -n "$TR"; then
10367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10368$as_echo "$TR" >&6; }
10369else
10370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10371$as_echo "no" >&6; }
10372fi
10373
10374
10375  test -n "$TR" && break
10376done
10377
10378    else
10379      # If it succeeded, then it was overridden by the user. We will use it
10380      # for the tool.
10381
10382      # First remove it from the list of overridden variables, so we can test
10383      # for unknown variables in the end.
10384      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10385
10386      # Check if the provided tool contains a complete path.
10387      tool_specified="$TR"
10388      tool_basename="${tool_specified##*/}"
10389      if test "x$tool_basename" = "x$tool_specified"; then
10390        # A command without a complete path is provided, search $PATH.
10391        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10392$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10393        # Extract the first word of "$tool_basename", so it can be a program name with args.
10394set dummy $tool_basename; ac_word=$2
10395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10396$as_echo_n "checking for $ac_word... " >&6; }
10397if ${ac_cv_path_TR+:} false; then :
10398  $as_echo_n "(cached) " >&6
10399else
10400  case $TR in
10401  [\\/]* | ?:[\\/]*)
10402  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10403  ;;
10404  *)
10405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10406for as_dir in $PATH
10407do
10408  IFS=$as_save_IFS
10409  test -z "$as_dir" && as_dir=.
10410    for ac_exec_ext in '' $ac_executable_extensions; do
10411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10412    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10414    break 2
10415  fi
10416done
10417  done
10418IFS=$as_save_IFS
10419
10420  ;;
10421esac
10422fi
10423TR=$ac_cv_path_TR
10424if test -n "$TR"; then
10425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10426$as_echo "$TR" >&6; }
10427else
10428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10429$as_echo "no" >&6; }
10430fi
10431
10432
10433        if test "x$TR" = x; then
10434          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10435        fi
10436      else
10437        # Otherwise we believe it is a complete path. Use it as it is.
10438        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10439$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10440        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10441$as_echo_n "checking for TR... " >&6; }
10442        if test ! -x "$tool_specified"; then
10443          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10444$as_echo "not found" >&6; }
10445          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10446        fi
10447        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10448$as_echo "$tool_specified" >&6; }
10449      fi
10450    fi
10451  fi
10452
10453
10454
10455  if test "x$TR" = x; then
10456    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10457  fi
10458
10459
10460
10461
10462
10463  # Publish this variable in the help.
10464
10465
10466  if test "x$UNAME" = x; then
10467    # The variable is not set by user, try to locate tool using the code snippet
10468    for ac_prog in uname
10469do
10470  # Extract the first word of "$ac_prog", so it can be a program name with args.
10471set dummy $ac_prog; ac_word=$2
10472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10473$as_echo_n "checking for $ac_word... " >&6; }
10474if ${ac_cv_path_UNAME+:} false; then :
10475  $as_echo_n "(cached) " >&6
10476else
10477  case $UNAME in
10478  [\\/]* | ?:[\\/]*)
10479  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10480  ;;
10481  *)
10482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10483for as_dir in $PATH
10484do
10485  IFS=$as_save_IFS
10486  test -z "$as_dir" && as_dir=.
10487    for ac_exec_ext in '' $ac_executable_extensions; do
10488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10489    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10491    break 2
10492  fi
10493done
10494  done
10495IFS=$as_save_IFS
10496
10497  ;;
10498esac
10499fi
10500UNAME=$ac_cv_path_UNAME
10501if test -n "$UNAME"; then
10502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10503$as_echo "$UNAME" >&6; }
10504else
10505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10506$as_echo "no" >&6; }
10507fi
10508
10509
10510  test -n "$UNAME" && break
10511done
10512
10513  else
10514    # The variable is set, but is it from the command line or the environment?
10515
10516    # Try to remove the string !UNAME! from our list.
10517    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10518    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10519      # If it failed, the variable was not from the command line. Ignore it,
10520      # but warn the user (except for BASH, which is always set by the calling BASH).
10521      if test "xUNAME" != xBASH; then
10522        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10523$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10524      fi
10525      # Try to locate tool using the code snippet
10526      for ac_prog in uname
10527do
10528  # Extract the first word of "$ac_prog", so it can be a program name with args.
10529set dummy $ac_prog; ac_word=$2
10530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10531$as_echo_n "checking for $ac_word... " >&6; }
10532if ${ac_cv_path_UNAME+:} false; then :
10533  $as_echo_n "(cached) " >&6
10534else
10535  case $UNAME in
10536  [\\/]* | ?:[\\/]*)
10537  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10538  ;;
10539  *)
10540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10541for as_dir in $PATH
10542do
10543  IFS=$as_save_IFS
10544  test -z "$as_dir" && as_dir=.
10545    for ac_exec_ext in '' $ac_executable_extensions; do
10546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10547    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10549    break 2
10550  fi
10551done
10552  done
10553IFS=$as_save_IFS
10554
10555  ;;
10556esac
10557fi
10558UNAME=$ac_cv_path_UNAME
10559if test -n "$UNAME"; then
10560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10561$as_echo "$UNAME" >&6; }
10562else
10563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10564$as_echo "no" >&6; }
10565fi
10566
10567
10568  test -n "$UNAME" && break
10569done
10570
10571    else
10572      # If it succeeded, then it was overridden by the user. We will use it
10573      # for the tool.
10574
10575      # First remove it from the list of overridden variables, so we can test
10576      # for unknown variables in the end.
10577      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10578
10579      # Check if the provided tool contains a complete path.
10580      tool_specified="$UNAME"
10581      tool_basename="${tool_specified##*/}"
10582      if test "x$tool_basename" = "x$tool_specified"; then
10583        # A command without a complete path is provided, search $PATH.
10584        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10585$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10586        # Extract the first word of "$tool_basename", so it can be a program name with args.
10587set dummy $tool_basename; ac_word=$2
10588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10589$as_echo_n "checking for $ac_word... " >&6; }
10590if ${ac_cv_path_UNAME+:} false; then :
10591  $as_echo_n "(cached) " >&6
10592else
10593  case $UNAME in
10594  [\\/]* | ?:[\\/]*)
10595  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10596  ;;
10597  *)
10598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10599for as_dir in $PATH
10600do
10601  IFS=$as_save_IFS
10602  test -z "$as_dir" && as_dir=.
10603    for ac_exec_ext in '' $ac_executable_extensions; do
10604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10605    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10607    break 2
10608  fi
10609done
10610  done
10611IFS=$as_save_IFS
10612
10613  ;;
10614esac
10615fi
10616UNAME=$ac_cv_path_UNAME
10617if test -n "$UNAME"; then
10618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10619$as_echo "$UNAME" >&6; }
10620else
10621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10622$as_echo "no" >&6; }
10623fi
10624
10625
10626        if test "x$UNAME" = x; then
10627          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10628        fi
10629      else
10630        # Otherwise we believe it is a complete path. Use it as it is.
10631        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10632$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10633        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10634$as_echo_n "checking for UNAME... " >&6; }
10635        if test ! -x "$tool_specified"; then
10636          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10637$as_echo "not found" >&6; }
10638          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10639        fi
10640        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10641$as_echo "$tool_specified" >&6; }
10642      fi
10643    fi
10644  fi
10645
10646
10647
10648  if test "x$UNAME" = x; then
10649    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10650  fi
10651
10652
10653
10654
10655
10656  # Publish this variable in the help.
10657
10658
10659  if test "x$UNIQ" = x; then
10660    # The variable is not set by user, try to locate tool using the code snippet
10661    for ac_prog in uniq
10662do
10663  # Extract the first word of "$ac_prog", so it can be a program name with args.
10664set dummy $ac_prog; ac_word=$2
10665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10666$as_echo_n "checking for $ac_word... " >&6; }
10667if ${ac_cv_path_UNIQ+:} false; then :
10668  $as_echo_n "(cached) " >&6
10669else
10670  case $UNIQ in
10671  [\\/]* | ?:[\\/]*)
10672  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10673  ;;
10674  *)
10675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10676for as_dir in $PATH
10677do
10678  IFS=$as_save_IFS
10679  test -z "$as_dir" && as_dir=.
10680    for ac_exec_ext in '' $ac_executable_extensions; do
10681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10682    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10684    break 2
10685  fi
10686done
10687  done
10688IFS=$as_save_IFS
10689
10690  ;;
10691esac
10692fi
10693UNIQ=$ac_cv_path_UNIQ
10694if test -n "$UNIQ"; then
10695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10696$as_echo "$UNIQ" >&6; }
10697else
10698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10699$as_echo "no" >&6; }
10700fi
10701
10702
10703  test -n "$UNIQ" && break
10704done
10705
10706  else
10707    # The variable is set, but is it from the command line or the environment?
10708
10709    # Try to remove the string !UNIQ! from our list.
10710    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10711    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10712      # If it failed, the variable was not from the command line. Ignore it,
10713      # but warn the user (except for BASH, which is always set by the calling BASH).
10714      if test "xUNIQ" != xBASH; then
10715        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10716$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10717      fi
10718      # Try to locate tool using the code snippet
10719      for ac_prog in uniq
10720do
10721  # Extract the first word of "$ac_prog", so it can be a program name with args.
10722set dummy $ac_prog; ac_word=$2
10723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10724$as_echo_n "checking for $ac_word... " >&6; }
10725if ${ac_cv_path_UNIQ+:} false; then :
10726  $as_echo_n "(cached) " >&6
10727else
10728  case $UNIQ in
10729  [\\/]* | ?:[\\/]*)
10730  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10731  ;;
10732  *)
10733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10734for as_dir in $PATH
10735do
10736  IFS=$as_save_IFS
10737  test -z "$as_dir" && as_dir=.
10738    for ac_exec_ext in '' $ac_executable_extensions; do
10739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10740    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10742    break 2
10743  fi
10744done
10745  done
10746IFS=$as_save_IFS
10747
10748  ;;
10749esac
10750fi
10751UNIQ=$ac_cv_path_UNIQ
10752if test -n "$UNIQ"; then
10753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10754$as_echo "$UNIQ" >&6; }
10755else
10756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10757$as_echo "no" >&6; }
10758fi
10759
10760
10761  test -n "$UNIQ" && break
10762done
10763
10764    else
10765      # If it succeeded, then it was overridden by the user. We will use it
10766      # for the tool.
10767
10768      # First remove it from the list of overridden variables, so we can test
10769      # for unknown variables in the end.
10770      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10771
10772      # Check if the provided tool contains a complete path.
10773      tool_specified="$UNIQ"
10774      tool_basename="${tool_specified##*/}"
10775      if test "x$tool_basename" = "x$tool_specified"; then
10776        # A command without a complete path is provided, search $PATH.
10777        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10778$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10779        # Extract the first word of "$tool_basename", so it can be a program name with args.
10780set dummy $tool_basename; ac_word=$2
10781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10782$as_echo_n "checking for $ac_word... " >&6; }
10783if ${ac_cv_path_UNIQ+:} false; then :
10784  $as_echo_n "(cached) " >&6
10785else
10786  case $UNIQ in
10787  [\\/]* | ?:[\\/]*)
10788  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10789  ;;
10790  *)
10791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10792for as_dir in $PATH
10793do
10794  IFS=$as_save_IFS
10795  test -z "$as_dir" && as_dir=.
10796    for ac_exec_ext in '' $ac_executable_extensions; do
10797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10798    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10800    break 2
10801  fi
10802done
10803  done
10804IFS=$as_save_IFS
10805
10806  ;;
10807esac
10808fi
10809UNIQ=$ac_cv_path_UNIQ
10810if test -n "$UNIQ"; then
10811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10812$as_echo "$UNIQ" >&6; }
10813else
10814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10815$as_echo "no" >&6; }
10816fi
10817
10818
10819        if test "x$UNIQ" = x; then
10820          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10821        fi
10822      else
10823        # Otherwise we believe it is a complete path. Use it as it is.
10824        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10825$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10826        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10827$as_echo_n "checking for UNIQ... " >&6; }
10828        if test ! -x "$tool_specified"; then
10829          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10830$as_echo "not found" >&6; }
10831          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10832        fi
10833        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10834$as_echo "$tool_specified" >&6; }
10835      fi
10836    fi
10837  fi
10838
10839
10840
10841  if test "x$UNIQ" = x; then
10842    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10843  fi
10844
10845
10846
10847
10848
10849  # Publish this variable in the help.
10850
10851
10852  if test "x$WC" = x; then
10853    # The variable is not set by user, try to locate tool using the code snippet
10854    for ac_prog in wc
10855do
10856  # Extract the first word of "$ac_prog", so it can be a program name with args.
10857set dummy $ac_prog; ac_word=$2
10858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10859$as_echo_n "checking for $ac_word... " >&6; }
10860if ${ac_cv_path_WC+:} false; then :
10861  $as_echo_n "(cached) " >&6
10862else
10863  case $WC in
10864  [\\/]* | ?:[\\/]*)
10865  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10866  ;;
10867  *)
10868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10869for as_dir in $PATH
10870do
10871  IFS=$as_save_IFS
10872  test -z "$as_dir" && as_dir=.
10873    for ac_exec_ext in '' $ac_executable_extensions; do
10874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10875    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10877    break 2
10878  fi
10879done
10880  done
10881IFS=$as_save_IFS
10882
10883  ;;
10884esac
10885fi
10886WC=$ac_cv_path_WC
10887if test -n "$WC"; then
10888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10889$as_echo "$WC" >&6; }
10890else
10891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10892$as_echo "no" >&6; }
10893fi
10894
10895
10896  test -n "$WC" && break
10897done
10898
10899  else
10900    # The variable is set, but is it from the command line or the environment?
10901
10902    # Try to remove the string !WC! from our list.
10903    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10904    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10905      # If it failed, the variable was not from the command line. Ignore it,
10906      # but warn the user (except for BASH, which is always set by the calling BASH).
10907      if test "xWC" != xBASH; then
10908        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10909$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10910      fi
10911      # Try to locate tool using the code snippet
10912      for ac_prog in wc
10913do
10914  # Extract the first word of "$ac_prog", so it can be a program name with args.
10915set dummy $ac_prog; ac_word=$2
10916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10917$as_echo_n "checking for $ac_word... " >&6; }
10918if ${ac_cv_path_WC+:} false; then :
10919  $as_echo_n "(cached) " >&6
10920else
10921  case $WC in
10922  [\\/]* | ?:[\\/]*)
10923  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10924  ;;
10925  *)
10926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10927for as_dir in $PATH
10928do
10929  IFS=$as_save_IFS
10930  test -z "$as_dir" && as_dir=.
10931    for ac_exec_ext in '' $ac_executable_extensions; do
10932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10933    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10935    break 2
10936  fi
10937done
10938  done
10939IFS=$as_save_IFS
10940
10941  ;;
10942esac
10943fi
10944WC=$ac_cv_path_WC
10945if test -n "$WC"; then
10946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10947$as_echo "$WC" >&6; }
10948else
10949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10950$as_echo "no" >&6; }
10951fi
10952
10953
10954  test -n "$WC" && break
10955done
10956
10957    else
10958      # If it succeeded, then it was overridden by the user. We will use it
10959      # for the tool.
10960
10961      # First remove it from the list of overridden variables, so we can test
10962      # for unknown variables in the end.
10963      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10964
10965      # Check if the provided tool contains a complete path.
10966      tool_specified="$WC"
10967      tool_basename="${tool_specified##*/}"
10968      if test "x$tool_basename" = "x$tool_specified"; then
10969        # A command without a complete path is provided, search $PATH.
10970        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10971$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10972        # Extract the first word of "$tool_basename", so it can be a program name with args.
10973set dummy $tool_basename; ac_word=$2
10974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10975$as_echo_n "checking for $ac_word... " >&6; }
10976if ${ac_cv_path_WC+:} false; then :
10977  $as_echo_n "(cached) " >&6
10978else
10979  case $WC in
10980  [\\/]* | ?:[\\/]*)
10981  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10982  ;;
10983  *)
10984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10985for as_dir in $PATH
10986do
10987  IFS=$as_save_IFS
10988  test -z "$as_dir" && as_dir=.
10989    for ac_exec_ext in '' $ac_executable_extensions; do
10990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10991    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10993    break 2
10994  fi
10995done
10996  done
10997IFS=$as_save_IFS
10998
10999  ;;
11000esac
11001fi
11002WC=$ac_cv_path_WC
11003if test -n "$WC"; then
11004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11005$as_echo "$WC" >&6; }
11006else
11007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11008$as_echo "no" >&6; }
11009fi
11010
11011
11012        if test "x$WC" = x; then
11013          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11014        fi
11015      else
11016        # Otherwise we believe it is a complete path. Use it as it is.
11017        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11018$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11019        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11020$as_echo_n "checking for WC... " >&6; }
11021        if test ! -x "$tool_specified"; then
11022          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11023$as_echo "not found" >&6; }
11024          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11025        fi
11026        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11027$as_echo "$tool_specified" >&6; }
11028      fi
11029    fi
11030  fi
11031
11032
11033
11034  if test "x$WC" = x; then
11035    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11036  fi
11037
11038
11039
11040
11041
11042  # Publish this variable in the help.
11043
11044
11045  if test "x$WHICH" = x; then
11046    # The variable is not set by user, try to locate tool using the code snippet
11047    for ac_prog in which
11048do
11049  # Extract the first word of "$ac_prog", so it can be a program name with args.
11050set dummy $ac_prog; ac_word=$2
11051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11052$as_echo_n "checking for $ac_word... " >&6; }
11053if ${ac_cv_path_WHICH+:} false; then :
11054  $as_echo_n "(cached) " >&6
11055else
11056  case $WHICH in
11057  [\\/]* | ?:[\\/]*)
11058  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11059  ;;
11060  *)
11061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11062for as_dir in $PATH
11063do
11064  IFS=$as_save_IFS
11065  test -z "$as_dir" && as_dir=.
11066    for ac_exec_ext in '' $ac_executable_extensions; do
11067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11068    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11070    break 2
11071  fi
11072done
11073  done
11074IFS=$as_save_IFS
11075
11076  ;;
11077esac
11078fi
11079WHICH=$ac_cv_path_WHICH
11080if test -n "$WHICH"; then
11081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11082$as_echo "$WHICH" >&6; }
11083else
11084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11085$as_echo "no" >&6; }
11086fi
11087
11088
11089  test -n "$WHICH" && break
11090done
11091
11092  else
11093    # The variable is set, but is it from the command line or the environment?
11094
11095    # Try to remove the string !WHICH! from our list.
11096    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11097    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11098      # If it failed, the variable was not from the command line. Ignore it,
11099      # but warn the user (except for BASH, which is always set by the calling BASH).
11100      if test "xWHICH" != xBASH; then
11101        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11102$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11103      fi
11104      # Try to locate tool using the code snippet
11105      for ac_prog in which
11106do
11107  # Extract the first word of "$ac_prog", so it can be a program name with args.
11108set dummy $ac_prog; ac_word=$2
11109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11110$as_echo_n "checking for $ac_word... " >&6; }
11111if ${ac_cv_path_WHICH+:} false; then :
11112  $as_echo_n "(cached) " >&6
11113else
11114  case $WHICH in
11115  [\\/]* | ?:[\\/]*)
11116  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11117  ;;
11118  *)
11119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11120for as_dir in $PATH
11121do
11122  IFS=$as_save_IFS
11123  test -z "$as_dir" && as_dir=.
11124    for ac_exec_ext in '' $ac_executable_extensions; do
11125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11126    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11128    break 2
11129  fi
11130done
11131  done
11132IFS=$as_save_IFS
11133
11134  ;;
11135esac
11136fi
11137WHICH=$ac_cv_path_WHICH
11138if test -n "$WHICH"; then
11139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11140$as_echo "$WHICH" >&6; }
11141else
11142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11143$as_echo "no" >&6; }
11144fi
11145
11146
11147  test -n "$WHICH" && break
11148done
11149
11150    else
11151      # If it succeeded, then it was overridden by the user. We will use it
11152      # for the tool.
11153
11154      # First remove it from the list of overridden variables, so we can test
11155      # for unknown variables in the end.
11156      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11157
11158      # Check if the provided tool contains a complete path.
11159      tool_specified="$WHICH"
11160      tool_basename="${tool_specified##*/}"
11161      if test "x$tool_basename" = "x$tool_specified"; then
11162        # A command without a complete path is provided, search $PATH.
11163        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11164$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11165        # Extract the first word of "$tool_basename", so it can be a program name with args.
11166set dummy $tool_basename; ac_word=$2
11167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11168$as_echo_n "checking for $ac_word... " >&6; }
11169if ${ac_cv_path_WHICH+:} false; then :
11170  $as_echo_n "(cached) " >&6
11171else
11172  case $WHICH in
11173  [\\/]* | ?:[\\/]*)
11174  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11175  ;;
11176  *)
11177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11178for as_dir in $PATH
11179do
11180  IFS=$as_save_IFS
11181  test -z "$as_dir" && as_dir=.
11182    for ac_exec_ext in '' $ac_executable_extensions; do
11183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11184    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11186    break 2
11187  fi
11188done
11189  done
11190IFS=$as_save_IFS
11191
11192  ;;
11193esac
11194fi
11195WHICH=$ac_cv_path_WHICH
11196if test -n "$WHICH"; then
11197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11198$as_echo "$WHICH" >&6; }
11199else
11200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11201$as_echo "no" >&6; }
11202fi
11203
11204
11205        if test "x$WHICH" = x; then
11206          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11207        fi
11208      else
11209        # Otherwise we believe it is a complete path. Use it as it is.
11210        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11211$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11212        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11213$as_echo_n "checking for WHICH... " >&6; }
11214        if test ! -x "$tool_specified"; then
11215          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11216$as_echo "not found" >&6; }
11217          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11218        fi
11219        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11220$as_echo "$tool_specified" >&6; }
11221      fi
11222    fi
11223  fi
11224
11225
11226
11227  if test "x$WHICH" = x; then
11228    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11229  fi
11230
11231
11232
11233
11234
11235  # Publish this variable in the help.
11236
11237
11238  if test "x$XARGS" = x; then
11239    # The variable is not set by user, try to locate tool using the code snippet
11240    for ac_prog in xargs
11241do
11242  # Extract the first word of "$ac_prog", so it can be a program name with args.
11243set dummy $ac_prog; ac_word=$2
11244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11245$as_echo_n "checking for $ac_word... " >&6; }
11246if ${ac_cv_path_XARGS+:} false; then :
11247  $as_echo_n "(cached) " >&6
11248else
11249  case $XARGS in
11250  [\\/]* | ?:[\\/]*)
11251  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11252  ;;
11253  *)
11254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11255for as_dir in $PATH
11256do
11257  IFS=$as_save_IFS
11258  test -z "$as_dir" && as_dir=.
11259    for ac_exec_ext in '' $ac_executable_extensions; do
11260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11261    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11263    break 2
11264  fi
11265done
11266  done
11267IFS=$as_save_IFS
11268
11269  ;;
11270esac
11271fi
11272XARGS=$ac_cv_path_XARGS
11273if test -n "$XARGS"; then
11274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11275$as_echo "$XARGS" >&6; }
11276else
11277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11278$as_echo "no" >&6; }
11279fi
11280
11281
11282  test -n "$XARGS" && break
11283done
11284
11285  else
11286    # The variable is set, but is it from the command line or the environment?
11287
11288    # Try to remove the string !XARGS! from our list.
11289    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11290    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11291      # If it failed, the variable was not from the command line. Ignore it,
11292      # but warn the user (except for BASH, which is always set by the calling BASH).
11293      if test "xXARGS" != xBASH; then
11294        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11295$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11296      fi
11297      # Try to locate tool using the code snippet
11298      for ac_prog in xargs
11299do
11300  # Extract the first word of "$ac_prog", so it can be a program name with args.
11301set dummy $ac_prog; ac_word=$2
11302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11303$as_echo_n "checking for $ac_word... " >&6; }
11304if ${ac_cv_path_XARGS+:} false; then :
11305  $as_echo_n "(cached) " >&6
11306else
11307  case $XARGS in
11308  [\\/]* | ?:[\\/]*)
11309  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11310  ;;
11311  *)
11312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11313for as_dir in $PATH
11314do
11315  IFS=$as_save_IFS
11316  test -z "$as_dir" && as_dir=.
11317    for ac_exec_ext in '' $ac_executable_extensions; do
11318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11319    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11321    break 2
11322  fi
11323done
11324  done
11325IFS=$as_save_IFS
11326
11327  ;;
11328esac
11329fi
11330XARGS=$ac_cv_path_XARGS
11331if test -n "$XARGS"; then
11332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11333$as_echo "$XARGS" >&6; }
11334else
11335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11336$as_echo "no" >&6; }
11337fi
11338
11339
11340  test -n "$XARGS" && break
11341done
11342
11343    else
11344      # If it succeeded, then it was overridden by the user. We will use it
11345      # for the tool.
11346
11347      # First remove it from the list of overridden variables, so we can test
11348      # for unknown variables in the end.
11349      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11350
11351      # Check if the provided tool contains a complete path.
11352      tool_specified="$XARGS"
11353      tool_basename="${tool_specified##*/}"
11354      if test "x$tool_basename" = "x$tool_specified"; then
11355        # A command without a complete path is provided, search $PATH.
11356        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11357$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11358        # Extract the first word of "$tool_basename", so it can be a program name with args.
11359set dummy $tool_basename; ac_word=$2
11360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11361$as_echo_n "checking for $ac_word... " >&6; }
11362if ${ac_cv_path_XARGS+:} false; then :
11363  $as_echo_n "(cached) " >&6
11364else
11365  case $XARGS in
11366  [\\/]* | ?:[\\/]*)
11367  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11368  ;;
11369  *)
11370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11371for as_dir in $PATH
11372do
11373  IFS=$as_save_IFS
11374  test -z "$as_dir" && as_dir=.
11375    for ac_exec_ext in '' $ac_executable_extensions; do
11376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11377    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11379    break 2
11380  fi
11381done
11382  done
11383IFS=$as_save_IFS
11384
11385  ;;
11386esac
11387fi
11388XARGS=$ac_cv_path_XARGS
11389if test -n "$XARGS"; then
11390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11391$as_echo "$XARGS" >&6; }
11392else
11393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11394$as_echo "no" >&6; }
11395fi
11396
11397
11398        if test "x$XARGS" = x; then
11399          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11400        fi
11401      else
11402        # Otherwise we believe it is a complete path. Use it as it is.
11403        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11404$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11405        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11406$as_echo_n "checking for XARGS... " >&6; }
11407        if test ! -x "$tool_specified"; then
11408          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11409$as_echo "not found" >&6; }
11410          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11411        fi
11412        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11413$as_echo "$tool_specified" >&6; }
11414      fi
11415    fi
11416  fi
11417
11418
11419
11420  if test "x$XARGS" = x; then
11421    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11422  fi
11423
11424
11425
11426  # Then required tools that require some special treatment.
11427
11428
11429  # Publish this variable in the help.
11430
11431
11432  if test "x$AWK" = x; then
11433    # The variable is not set by user, try to locate tool using the code snippet
11434    for ac_prog in gawk mawk nawk awk
11435do
11436  # Extract the first word of "$ac_prog", so it can be a program name with args.
11437set dummy $ac_prog; ac_word=$2
11438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11439$as_echo_n "checking for $ac_word... " >&6; }
11440if ${ac_cv_prog_AWK+:} false; then :
11441  $as_echo_n "(cached) " >&6
11442else
11443  if test -n "$AWK"; then
11444  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11445else
11446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11447for as_dir in $PATH
11448do
11449  IFS=$as_save_IFS
11450  test -z "$as_dir" && as_dir=.
11451    for ac_exec_ext in '' $ac_executable_extensions; do
11452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11453    ac_cv_prog_AWK="$ac_prog"
11454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11455    break 2
11456  fi
11457done
11458  done
11459IFS=$as_save_IFS
11460
11461fi
11462fi
11463AWK=$ac_cv_prog_AWK
11464if test -n "$AWK"; then
11465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11466$as_echo "$AWK" >&6; }
11467else
11468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11469$as_echo "no" >&6; }
11470fi
11471
11472
11473  test -n "$AWK" && break
11474done
11475
11476  else
11477    # The variable is set, but is it from the command line or the environment?
11478
11479    # Try to remove the string !AWK! from our list.
11480    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11481    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11482      # If it failed, the variable was not from the command line. Ignore it,
11483      # but warn the user (except for BASH, which is always set by the calling BASH).
11484      if test "xAWK" != xBASH; then
11485        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11486$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11487      fi
11488      # Try to locate tool using the code snippet
11489      for ac_prog in gawk mawk nawk awk
11490do
11491  # Extract the first word of "$ac_prog", so it can be a program name with args.
11492set dummy $ac_prog; ac_word=$2
11493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11494$as_echo_n "checking for $ac_word... " >&6; }
11495if ${ac_cv_prog_AWK+:} false; then :
11496  $as_echo_n "(cached) " >&6
11497else
11498  if test -n "$AWK"; then
11499  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11500else
11501as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11502for as_dir in $PATH
11503do
11504  IFS=$as_save_IFS
11505  test -z "$as_dir" && as_dir=.
11506    for ac_exec_ext in '' $ac_executable_extensions; do
11507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11508    ac_cv_prog_AWK="$ac_prog"
11509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11510    break 2
11511  fi
11512done
11513  done
11514IFS=$as_save_IFS
11515
11516fi
11517fi
11518AWK=$ac_cv_prog_AWK
11519if test -n "$AWK"; then
11520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11521$as_echo "$AWK" >&6; }
11522else
11523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11524$as_echo "no" >&6; }
11525fi
11526
11527
11528  test -n "$AWK" && break
11529done
11530
11531    else
11532      # If it succeeded, then it was overridden by the user. We will use it
11533      # for the tool.
11534
11535      # First remove it from the list of overridden variables, so we can test
11536      # for unknown variables in the end.
11537      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11538
11539      # Check if the provided tool contains a complete path.
11540      tool_specified="$AWK"
11541      tool_basename="${tool_specified##*/}"
11542      if test "x$tool_basename" = "x$tool_specified"; then
11543        # A command without a complete path is provided, search $PATH.
11544        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11545$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11546        # Extract the first word of "$tool_basename", so it can be a program name with args.
11547set dummy $tool_basename; ac_word=$2
11548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11549$as_echo_n "checking for $ac_word... " >&6; }
11550if ${ac_cv_path_AWK+:} false; then :
11551  $as_echo_n "(cached) " >&6
11552else
11553  case $AWK in
11554  [\\/]* | ?:[\\/]*)
11555  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11556  ;;
11557  *)
11558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11559for as_dir in $PATH
11560do
11561  IFS=$as_save_IFS
11562  test -z "$as_dir" && as_dir=.
11563    for ac_exec_ext in '' $ac_executable_extensions; do
11564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11565    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11567    break 2
11568  fi
11569done
11570  done
11571IFS=$as_save_IFS
11572
11573  ;;
11574esac
11575fi
11576AWK=$ac_cv_path_AWK
11577if test -n "$AWK"; then
11578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11579$as_echo "$AWK" >&6; }
11580else
11581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11582$as_echo "no" >&6; }
11583fi
11584
11585
11586        if test "x$AWK" = x; then
11587          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11588        fi
11589      else
11590        # Otherwise we believe it is a complete path. Use it as it is.
11591        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11592$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11593        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11594$as_echo_n "checking for AWK... " >&6; }
11595        if test ! -x "$tool_specified"; then
11596          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11597$as_echo "not found" >&6; }
11598          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11599        fi
11600        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11601$as_echo "$tool_specified" >&6; }
11602      fi
11603    fi
11604  fi
11605
11606
11607  if test "x$AWK" = x; then
11608    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11609  fi
11610
11611
11612
11613
11614  # Publish this variable in the help.
11615
11616
11617  if test "x$GREP" = x; then
11618    # The variable is not set by user, try to locate tool using the code snippet
11619    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11620$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11621if ${ac_cv_path_GREP+:} false; then :
11622  $as_echo_n "(cached) " >&6
11623else
11624  if test -z "$GREP"; then
11625  ac_path_GREP_found=false
11626  # Loop through the user's path and test for each of PROGNAME-LIST
11627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11628for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11629do
11630  IFS=$as_save_IFS
11631  test -z "$as_dir" && as_dir=.
11632    for ac_prog in grep ggrep; do
11633    for ac_exec_ext in '' $ac_executable_extensions; do
11634      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11635      as_fn_executable_p "$ac_path_GREP" || continue
11636# Check for GNU ac_path_GREP and select it if it is found.
11637  # Check for GNU $ac_path_GREP
11638case `"$ac_path_GREP" --version 2>&1` in
11639*GNU*)
11640  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11641*)
11642  ac_count=0
11643  $as_echo_n 0123456789 >"conftest.in"
11644  while :
11645  do
11646    cat "conftest.in" "conftest.in" >"conftest.tmp"
11647    mv "conftest.tmp" "conftest.in"
11648    cp "conftest.in" "conftest.nl"
11649    $as_echo 'GREP' >> "conftest.nl"
11650    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11651    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11652    as_fn_arith $ac_count + 1 && ac_count=$as_val
11653    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11654      # Best one so far, save it but keep looking for a better one
11655      ac_cv_path_GREP="$ac_path_GREP"
11656      ac_path_GREP_max=$ac_count
11657    fi
11658    # 10*(2^10) chars as input seems more than enough
11659    test $ac_count -gt 10 && break
11660  done
11661  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11662esac
11663
11664      $ac_path_GREP_found && break 3
11665    done
11666  done
11667  done
11668IFS=$as_save_IFS
11669  if test -z "$ac_cv_path_GREP"; then
11670    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11671  fi
11672else
11673  ac_cv_path_GREP=$GREP
11674fi
11675
11676fi
11677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11678$as_echo "$ac_cv_path_GREP" >&6; }
11679 GREP="$ac_cv_path_GREP"
11680
11681
11682  else
11683    # The variable is set, but is it from the command line or the environment?
11684
11685    # Try to remove the string !GREP! from our list.
11686    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11687    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11688      # If it failed, the variable was not from the command line. Ignore it,
11689      # but warn the user (except for BASH, which is always set by the calling BASH).
11690      if test "xGREP" != xBASH; then
11691        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11692$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11693      fi
11694      # Try to locate tool using the code snippet
11695      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11696$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11697if ${ac_cv_path_GREP+:} false; then :
11698  $as_echo_n "(cached) " >&6
11699else
11700  if test -z "$GREP"; then
11701  ac_path_GREP_found=false
11702  # Loop through the user's path and test for each of PROGNAME-LIST
11703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11704for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11705do
11706  IFS=$as_save_IFS
11707  test -z "$as_dir" && as_dir=.
11708    for ac_prog in grep ggrep; do
11709    for ac_exec_ext in '' $ac_executable_extensions; do
11710      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11711      as_fn_executable_p "$ac_path_GREP" || continue
11712# Check for GNU ac_path_GREP and select it if it is found.
11713  # Check for GNU $ac_path_GREP
11714case `"$ac_path_GREP" --version 2>&1` in
11715*GNU*)
11716  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11717*)
11718  ac_count=0
11719  $as_echo_n 0123456789 >"conftest.in"
11720  while :
11721  do
11722    cat "conftest.in" "conftest.in" >"conftest.tmp"
11723    mv "conftest.tmp" "conftest.in"
11724    cp "conftest.in" "conftest.nl"
11725    $as_echo 'GREP' >> "conftest.nl"
11726    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11727    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11728    as_fn_arith $ac_count + 1 && ac_count=$as_val
11729    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11730      # Best one so far, save it but keep looking for a better one
11731      ac_cv_path_GREP="$ac_path_GREP"
11732      ac_path_GREP_max=$ac_count
11733    fi
11734    # 10*(2^10) chars as input seems more than enough
11735    test $ac_count -gt 10 && break
11736  done
11737  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11738esac
11739
11740      $ac_path_GREP_found && break 3
11741    done
11742  done
11743  done
11744IFS=$as_save_IFS
11745  if test -z "$ac_cv_path_GREP"; then
11746    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11747  fi
11748else
11749  ac_cv_path_GREP=$GREP
11750fi
11751
11752fi
11753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11754$as_echo "$ac_cv_path_GREP" >&6; }
11755 GREP="$ac_cv_path_GREP"
11756
11757
11758    else
11759      # If it succeeded, then it was overridden by the user. We will use it
11760      # for the tool.
11761
11762      # First remove it from the list of overridden variables, so we can test
11763      # for unknown variables in the end.
11764      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11765
11766      # Check if the provided tool contains a complete path.
11767      tool_specified="$GREP"
11768      tool_basename="${tool_specified##*/}"
11769      if test "x$tool_basename" = "x$tool_specified"; then
11770        # A command without a complete path is provided, search $PATH.
11771        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11772$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11773        # Extract the first word of "$tool_basename", so it can be a program name with args.
11774set dummy $tool_basename; ac_word=$2
11775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11776$as_echo_n "checking for $ac_word... " >&6; }
11777if ${ac_cv_path_GREP+:} false; then :
11778  $as_echo_n "(cached) " >&6
11779else
11780  case $GREP in
11781  [\\/]* | ?:[\\/]*)
11782  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11783  ;;
11784  *)
11785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11786for as_dir in $PATH
11787do
11788  IFS=$as_save_IFS
11789  test -z "$as_dir" && as_dir=.
11790    for ac_exec_ext in '' $ac_executable_extensions; do
11791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11792    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11794    break 2
11795  fi
11796done
11797  done
11798IFS=$as_save_IFS
11799
11800  ;;
11801esac
11802fi
11803GREP=$ac_cv_path_GREP
11804if test -n "$GREP"; then
11805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11806$as_echo "$GREP" >&6; }
11807else
11808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11809$as_echo "no" >&6; }
11810fi
11811
11812
11813        if test "x$GREP" = x; then
11814          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11815        fi
11816      else
11817        # Otherwise we believe it is a complete path. Use it as it is.
11818        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11819$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11820        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11821$as_echo_n "checking for GREP... " >&6; }
11822        if test ! -x "$tool_specified"; then
11823          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11824$as_echo "not found" >&6; }
11825          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11826        fi
11827        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11828$as_echo "$tool_specified" >&6; }
11829      fi
11830    fi
11831  fi
11832
11833
11834  if test "x$GREP" = x; then
11835    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11836  fi
11837
11838
11839
11840
11841  # Publish this variable in the help.
11842
11843
11844  if test "x$EGREP" = x; then
11845    # The variable is not set by user, try to locate tool using the code snippet
11846    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11847$as_echo_n "checking for egrep... " >&6; }
11848if ${ac_cv_path_EGREP+:} false; then :
11849  $as_echo_n "(cached) " >&6
11850else
11851  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11852   then ac_cv_path_EGREP="$GREP -E"
11853   else
11854     if test -z "$EGREP"; then
11855  ac_path_EGREP_found=false
11856  # Loop through the user's path and test for each of PROGNAME-LIST
11857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11858for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11859do
11860  IFS=$as_save_IFS
11861  test -z "$as_dir" && as_dir=.
11862    for ac_prog in egrep; do
11863    for ac_exec_ext in '' $ac_executable_extensions; do
11864      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11865      as_fn_executable_p "$ac_path_EGREP" || continue
11866# Check for GNU ac_path_EGREP and select it if it is found.
11867  # Check for GNU $ac_path_EGREP
11868case `"$ac_path_EGREP" --version 2>&1` in
11869*GNU*)
11870  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11871*)
11872  ac_count=0
11873  $as_echo_n 0123456789 >"conftest.in"
11874  while :
11875  do
11876    cat "conftest.in" "conftest.in" >"conftest.tmp"
11877    mv "conftest.tmp" "conftest.in"
11878    cp "conftest.in" "conftest.nl"
11879    $as_echo 'EGREP' >> "conftest.nl"
11880    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11881    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11882    as_fn_arith $ac_count + 1 && ac_count=$as_val
11883    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11884      # Best one so far, save it but keep looking for a better one
11885      ac_cv_path_EGREP="$ac_path_EGREP"
11886      ac_path_EGREP_max=$ac_count
11887    fi
11888    # 10*(2^10) chars as input seems more than enough
11889    test $ac_count -gt 10 && break
11890  done
11891  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11892esac
11893
11894      $ac_path_EGREP_found && break 3
11895    done
11896  done
11897  done
11898IFS=$as_save_IFS
11899  if test -z "$ac_cv_path_EGREP"; then
11900    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11901  fi
11902else
11903  ac_cv_path_EGREP=$EGREP
11904fi
11905
11906   fi
11907fi
11908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11909$as_echo "$ac_cv_path_EGREP" >&6; }
11910 EGREP="$ac_cv_path_EGREP"
11911
11912
11913  else
11914    # The variable is set, but is it from the command line or the environment?
11915
11916    # Try to remove the string !EGREP! from our list.
11917    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11918    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11919      # If it failed, the variable was not from the command line. Ignore it,
11920      # but warn the user (except for BASH, which is always set by the calling BASH).
11921      if test "xEGREP" != xBASH; then
11922        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11923$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11924      fi
11925      # Try to locate tool using the code snippet
11926      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11927$as_echo_n "checking for egrep... " >&6; }
11928if ${ac_cv_path_EGREP+:} false; then :
11929  $as_echo_n "(cached) " >&6
11930else
11931  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11932   then ac_cv_path_EGREP="$GREP -E"
11933   else
11934     if test -z "$EGREP"; then
11935  ac_path_EGREP_found=false
11936  # Loop through the user's path and test for each of PROGNAME-LIST
11937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11938for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11939do
11940  IFS=$as_save_IFS
11941  test -z "$as_dir" && as_dir=.
11942    for ac_prog in egrep; do
11943    for ac_exec_ext in '' $ac_executable_extensions; do
11944      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11945      as_fn_executable_p "$ac_path_EGREP" || continue
11946# Check for GNU ac_path_EGREP and select it if it is found.
11947  # Check for GNU $ac_path_EGREP
11948case `"$ac_path_EGREP" --version 2>&1` in
11949*GNU*)
11950  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11951*)
11952  ac_count=0
11953  $as_echo_n 0123456789 >"conftest.in"
11954  while :
11955  do
11956    cat "conftest.in" "conftest.in" >"conftest.tmp"
11957    mv "conftest.tmp" "conftest.in"
11958    cp "conftest.in" "conftest.nl"
11959    $as_echo 'EGREP' >> "conftest.nl"
11960    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11961    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11962    as_fn_arith $ac_count + 1 && ac_count=$as_val
11963    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11964      # Best one so far, save it but keep looking for a better one
11965      ac_cv_path_EGREP="$ac_path_EGREP"
11966      ac_path_EGREP_max=$ac_count
11967    fi
11968    # 10*(2^10) chars as input seems more than enough
11969    test $ac_count -gt 10 && break
11970  done
11971  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11972esac
11973
11974      $ac_path_EGREP_found && break 3
11975    done
11976  done
11977  done
11978IFS=$as_save_IFS
11979  if test -z "$ac_cv_path_EGREP"; then
11980    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11981  fi
11982else
11983  ac_cv_path_EGREP=$EGREP
11984fi
11985
11986   fi
11987fi
11988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11989$as_echo "$ac_cv_path_EGREP" >&6; }
11990 EGREP="$ac_cv_path_EGREP"
11991
11992
11993    else
11994      # If it succeeded, then it was overridden by the user. We will use it
11995      # for the tool.
11996
11997      # First remove it from the list of overridden variables, so we can test
11998      # for unknown variables in the end.
11999      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12000
12001      # Check if the provided tool contains a complete path.
12002      tool_specified="$EGREP"
12003      tool_basename="${tool_specified##*/}"
12004      if test "x$tool_basename" = "x$tool_specified"; then
12005        # A command without a complete path is provided, search $PATH.
12006        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12007$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12008        # Extract the first word of "$tool_basename", so it can be a program name with args.
12009set dummy $tool_basename; ac_word=$2
12010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12011$as_echo_n "checking for $ac_word... " >&6; }
12012if ${ac_cv_path_EGREP+:} false; then :
12013  $as_echo_n "(cached) " >&6
12014else
12015  case $EGREP in
12016  [\\/]* | ?:[\\/]*)
12017  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12018  ;;
12019  *)
12020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12021for as_dir in $PATH
12022do
12023  IFS=$as_save_IFS
12024  test -z "$as_dir" && as_dir=.
12025    for ac_exec_ext in '' $ac_executable_extensions; do
12026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12027    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12029    break 2
12030  fi
12031done
12032  done
12033IFS=$as_save_IFS
12034
12035  ;;
12036esac
12037fi
12038EGREP=$ac_cv_path_EGREP
12039if test -n "$EGREP"; then
12040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12041$as_echo "$EGREP" >&6; }
12042else
12043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12044$as_echo "no" >&6; }
12045fi
12046
12047
12048        if test "x$EGREP" = x; then
12049          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12050        fi
12051      else
12052        # Otherwise we believe it is a complete path. Use it as it is.
12053        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12054$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12055        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12056$as_echo_n "checking for EGREP... " >&6; }
12057        if test ! -x "$tool_specified"; then
12058          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12059$as_echo "not found" >&6; }
12060          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12061        fi
12062        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12063$as_echo "$tool_specified" >&6; }
12064      fi
12065    fi
12066  fi
12067
12068
12069  if test "x$EGREP" = x; then
12070    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12071  fi
12072
12073
12074
12075
12076  # Publish this variable in the help.
12077
12078
12079  if test "x$FGREP" = x; then
12080    # The variable is not set by user, try to locate tool using the code snippet
12081    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12082$as_echo_n "checking for fgrep... " >&6; }
12083if ${ac_cv_path_FGREP+:} false; then :
12084  $as_echo_n "(cached) " >&6
12085else
12086  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12087   then ac_cv_path_FGREP="$GREP -F"
12088   else
12089     if test -z "$FGREP"; then
12090  ac_path_FGREP_found=false
12091  # Loop through the user's path and test for each of PROGNAME-LIST
12092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12093for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12094do
12095  IFS=$as_save_IFS
12096  test -z "$as_dir" && as_dir=.
12097    for ac_prog in fgrep; do
12098    for ac_exec_ext in '' $ac_executable_extensions; do
12099      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12100      as_fn_executable_p "$ac_path_FGREP" || continue
12101# Check for GNU ac_path_FGREP and select it if it is found.
12102  # Check for GNU $ac_path_FGREP
12103case `"$ac_path_FGREP" --version 2>&1` in
12104*GNU*)
12105  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12106*)
12107  ac_count=0
12108  $as_echo_n 0123456789 >"conftest.in"
12109  while :
12110  do
12111    cat "conftest.in" "conftest.in" >"conftest.tmp"
12112    mv "conftest.tmp" "conftest.in"
12113    cp "conftest.in" "conftest.nl"
12114    $as_echo 'FGREP' >> "conftest.nl"
12115    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12116    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12117    as_fn_arith $ac_count + 1 && ac_count=$as_val
12118    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12119      # Best one so far, save it but keep looking for a better one
12120      ac_cv_path_FGREP="$ac_path_FGREP"
12121      ac_path_FGREP_max=$ac_count
12122    fi
12123    # 10*(2^10) chars as input seems more than enough
12124    test $ac_count -gt 10 && break
12125  done
12126  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12127esac
12128
12129      $ac_path_FGREP_found && break 3
12130    done
12131  done
12132  done
12133IFS=$as_save_IFS
12134  if test -z "$ac_cv_path_FGREP"; then
12135    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12136  fi
12137else
12138  ac_cv_path_FGREP=$FGREP
12139fi
12140
12141   fi
12142fi
12143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12144$as_echo "$ac_cv_path_FGREP" >&6; }
12145 FGREP="$ac_cv_path_FGREP"
12146
12147
12148  else
12149    # The variable is set, but is it from the command line or the environment?
12150
12151    # Try to remove the string !FGREP! from our list.
12152    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12153    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12154      # If it failed, the variable was not from the command line. Ignore it,
12155      # but warn the user (except for BASH, which is always set by the calling BASH).
12156      if test "xFGREP" != xBASH; then
12157        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12158$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12159      fi
12160      # Try to locate tool using the code snippet
12161      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12162$as_echo_n "checking for fgrep... " >&6; }
12163if ${ac_cv_path_FGREP+:} false; then :
12164  $as_echo_n "(cached) " >&6
12165else
12166  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12167   then ac_cv_path_FGREP="$GREP -F"
12168   else
12169     if test -z "$FGREP"; then
12170  ac_path_FGREP_found=false
12171  # Loop through the user's path and test for each of PROGNAME-LIST
12172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12173for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12174do
12175  IFS=$as_save_IFS
12176  test -z "$as_dir" && as_dir=.
12177    for ac_prog in fgrep; do
12178    for ac_exec_ext in '' $ac_executable_extensions; do
12179      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12180      as_fn_executable_p "$ac_path_FGREP" || continue
12181# Check for GNU ac_path_FGREP and select it if it is found.
12182  # Check for GNU $ac_path_FGREP
12183case `"$ac_path_FGREP" --version 2>&1` in
12184*GNU*)
12185  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12186*)
12187  ac_count=0
12188  $as_echo_n 0123456789 >"conftest.in"
12189  while :
12190  do
12191    cat "conftest.in" "conftest.in" >"conftest.tmp"
12192    mv "conftest.tmp" "conftest.in"
12193    cp "conftest.in" "conftest.nl"
12194    $as_echo 'FGREP' >> "conftest.nl"
12195    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12196    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12197    as_fn_arith $ac_count + 1 && ac_count=$as_val
12198    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12199      # Best one so far, save it but keep looking for a better one
12200      ac_cv_path_FGREP="$ac_path_FGREP"
12201      ac_path_FGREP_max=$ac_count
12202    fi
12203    # 10*(2^10) chars as input seems more than enough
12204    test $ac_count -gt 10 && break
12205  done
12206  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12207esac
12208
12209      $ac_path_FGREP_found && break 3
12210    done
12211  done
12212  done
12213IFS=$as_save_IFS
12214  if test -z "$ac_cv_path_FGREP"; then
12215    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12216  fi
12217else
12218  ac_cv_path_FGREP=$FGREP
12219fi
12220
12221   fi
12222fi
12223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12224$as_echo "$ac_cv_path_FGREP" >&6; }
12225 FGREP="$ac_cv_path_FGREP"
12226
12227
12228    else
12229      # If it succeeded, then it was overridden by the user. We will use it
12230      # for the tool.
12231
12232      # First remove it from the list of overridden variables, so we can test
12233      # for unknown variables in the end.
12234      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12235
12236      # Check if the provided tool contains a complete path.
12237      tool_specified="$FGREP"
12238      tool_basename="${tool_specified##*/}"
12239      if test "x$tool_basename" = "x$tool_specified"; then
12240        # A command without a complete path is provided, search $PATH.
12241        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12242$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12243        # Extract the first word of "$tool_basename", so it can be a program name with args.
12244set dummy $tool_basename; ac_word=$2
12245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12246$as_echo_n "checking for $ac_word... " >&6; }
12247if ${ac_cv_path_FGREP+:} false; then :
12248  $as_echo_n "(cached) " >&6
12249else
12250  case $FGREP in
12251  [\\/]* | ?:[\\/]*)
12252  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12253  ;;
12254  *)
12255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12256for as_dir in $PATH
12257do
12258  IFS=$as_save_IFS
12259  test -z "$as_dir" && as_dir=.
12260    for ac_exec_ext in '' $ac_executable_extensions; do
12261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12262    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12264    break 2
12265  fi
12266done
12267  done
12268IFS=$as_save_IFS
12269
12270  ;;
12271esac
12272fi
12273FGREP=$ac_cv_path_FGREP
12274if test -n "$FGREP"; then
12275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12276$as_echo "$FGREP" >&6; }
12277else
12278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12279$as_echo "no" >&6; }
12280fi
12281
12282
12283        if test "x$FGREP" = x; then
12284          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12285        fi
12286      else
12287        # Otherwise we believe it is a complete path. Use it as it is.
12288        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12289$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12290        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12291$as_echo_n "checking for FGREP... " >&6; }
12292        if test ! -x "$tool_specified"; then
12293          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12294$as_echo "not found" >&6; }
12295          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12296        fi
12297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12298$as_echo "$tool_specified" >&6; }
12299      fi
12300    fi
12301  fi
12302
12303
12304  if test "x$FGREP" = x; then
12305    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12306  fi
12307
12308
12309
12310
12311  # Publish this variable in the help.
12312
12313
12314  if test "x$SED" = x; then
12315    # The variable is not set by user, try to locate tool using the code snippet
12316    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12317$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12318if ${ac_cv_path_SED+:} false; then :
12319  $as_echo_n "(cached) " >&6
12320else
12321            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12322     for ac_i in 1 2 3 4 5 6 7; do
12323       ac_script="$ac_script$as_nl$ac_script"
12324     done
12325     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12326     { ac_script=; unset ac_script;}
12327     if test -z "$SED"; then
12328  ac_path_SED_found=false
12329  # Loop through the user's path and test for each of PROGNAME-LIST
12330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12331for as_dir in $PATH
12332do
12333  IFS=$as_save_IFS
12334  test -z "$as_dir" && as_dir=.
12335    for ac_prog in sed gsed; do
12336    for ac_exec_ext in '' $ac_executable_extensions; do
12337      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12338      as_fn_executable_p "$ac_path_SED" || continue
12339# Check for GNU ac_path_SED and select it if it is found.
12340  # Check for GNU $ac_path_SED
12341case `"$ac_path_SED" --version 2>&1` in
12342*GNU*)
12343  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12344*)
12345  ac_count=0
12346  $as_echo_n 0123456789 >"conftest.in"
12347  while :
12348  do
12349    cat "conftest.in" "conftest.in" >"conftest.tmp"
12350    mv "conftest.tmp" "conftest.in"
12351    cp "conftest.in" "conftest.nl"
12352    $as_echo '' >> "conftest.nl"
12353    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12354    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12355    as_fn_arith $ac_count + 1 && ac_count=$as_val
12356    if test $ac_count -gt ${ac_path_SED_max-0}; then
12357      # Best one so far, save it but keep looking for a better one
12358      ac_cv_path_SED="$ac_path_SED"
12359      ac_path_SED_max=$ac_count
12360    fi
12361    # 10*(2^10) chars as input seems more than enough
12362    test $ac_count -gt 10 && break
12363  done
12364  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12365esac
12366
12367      $ac_path_SED_found && break 3
12368    done
12369  done
12370  done
12371IFS=$as_save_IFS
12372  if test -z "$ac_cv_path_SED"; then
12373    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12374  fi
12375else
12376  ac_cv_path_SED=$SED
12377fi
12378
12379fi
12380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12381$as_echo "$ac_cv_path_SED" >&6; }
12382 SED="$ac_cv_path_SED"
12383  rm -f conftest.sed
12384
12385  else
12386    # The variable is set, but is it from the command line or the environment?
12387
12388    # Try to remove the string !SED! from our list.
12389    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12390    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12391      # If it failed, the variable was not from the command line. Ignore it,
12392      # but warn the user (except for BASH, which is always set by the calling BASH).
12393      if test "xSED" != xBASH; then
12394        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12395$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12396      fi
12397      # Try to locate tool using the code snippet
12398      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12399$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12400if ${ac_cv_path_SED+:} false; then :
12401  $as_echo_n "(cached) " >&6
12402else
12403            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12404     for ac_i in 1 2 3 4 5 6 7; do
12405       ac_script="$ac_script$as_nl$ac_script"
12406     done
12407     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12408     { ac_script=; unset ac_script;}
12409     if test -z "$SED"; then
12410  ac_path_SED_found=false
12411  # Loop through the user's path and test for each of PROGNAME-LIST
12412  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12413for as_dir in $PATH
12414do
12415  IFS=$as_save_IFS
12416  test -z "$as_dir" && as_dir=.
12417    for ac_prog in sed gsed; do
12418    for ac_exec_ext in '' $ac_executable_extensions; do
12419      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12420      as_fn_executable_p "$ac_path_SED" || continue
12421# Check for GNU ac_path_SED and select it if it is found.
12422  # Check for GNU $ac_path_SED
12423case `"$ac_path_SED" --version 2>&1` in
12424*GNU*)
12425  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12426*)
12427  ac_count=0
12428  $as_echo_n 0123456789 >"conftest.in"
12429  while :
12430  do
12431    cat "conftest.in" "conftest.in" >"conftest.tmp"
12432    mv "conftest.tmp" "conftest.in"
12433    cp "conftest.in" "conftest.nl"
12434    $as_echo '' >> "conftest.nl"
12435    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12436    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12437    as_fn_arith $ac_count + 1 && ac_count=$as_val
12438    if test $ac_count -gt ${ac_path_SED_max-0}; then
12439      # Best one so far, save it but keep looking for a better one
12440      ac_cv_path_SED="$ac_path_SED"
12441      ac_path_SED_max=$ac_count
12442    fi
12443    # 10*(2^10) chars as input seems more than enough
12444    test $ac_count -gt 10 && break
12445  done
12446  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12447esac
12448
12449      $ac_path_SED_found && break 3
12450    done
12451  done
12452  done
12453IFS=$as_save_IFS
12454  if test -z "$ac_cv_path_SED"; then
12455    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12456  fi
12457else
12458  ac_cv_path_SED=$SED
12459fi
12460
12461fi
12462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12463$as_echo "$ac_cv_path_SED" >&6; }
12464 SED="$ac_cv_path_SED"
12465  rm -f conftest.sed
12466
12467    else
12468      # If it succeeded, then it was overridden by the user. We will use it
12469      # for the tool.
12470
12471      # First remove it from the list of overridden variables, so we can test
12472      # for unknown variables in the end.
12473      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12474
12475      # Check if the provided tool contains a complete path.
12476      tool_specified="$SED"
12477      tool_basename="${tool_specified##*/}"
12478      if test "x$tool_basename" = "x$tool_specified"; then
12479        # A command without a complete path is provided, search $PATH.
12480        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12481$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12482        # Extract the first word of "$tool_basename", so it can be a program name with args.
12483set dummy $tool_basename; ac_word=$2
12484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12485$as_echo_n "checking for $ac_word... " >&6; }
12486if ${ac_cv_path_SED+:} false; then :
12487  $as_echo_n "(cached) " >&6
12488else
12489  case $SED in
12490  [\\/]* | ?:[\\/]*)
12491  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12492  ;;
12493  *)
12494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12495for as_dir in $PATH
12496do
12497  IFS=$as_save_IFS
12498  test -z "$as_dir" && as_dir=.
12499    for ac_exec_ext in '' $ac_executable_extensions; do
12500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12501    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12503    break 2
12504  fi
12505done
12506  done
12507IFS=$as_save_IFS
12508
12509  ;;
12510esac
12511fi
12512SED=$ac_cv_path_SED
12513if test -n "$SED"; then
12514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12515$as_echo "$SED" >&6; }
12516else
12517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12518$as_echo "no" >&6; }
12519fi
12520
12521
12522        if test "x$SED" = x; then
12523          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12524        fi
12525      else
12526        # Otherwise we believe it is a complete path. Use it as it is.
12527        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12528$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12529        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12530$as_echo_n "checking for SED... " >&6; }
12531        if test ! -x "$tool_specified"; then
12532          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12533$as_echo "not found" >&6; }
12534          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12535        fi
12536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12537$as_echo "$tool_specified" >&6; }
12538      fi
12539    fi
12540  fi
12541
12542
12543  if test "x$SED" = x; then
12544    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12545  fi
12546
12547
12548
12549  # Always force rm.
12550  RM="$RM -f"
12551
12552  # pwd behaves differently on various platforms and some don't support the -L flag.
12553  # Always use the bash builtin pwd to get uniform behavior.
12554  THEPWDCMD=pwd
12555
12556  # These are not required on all platforms
12557
12558
12559  # Publish this variable in the help.
12560
12561
12562  if test "x$CYGPATH" = x; then
12563    # The variable is not set by user, try to locate tool using the code snippet
12564    for ac_prog in cygpath
12565do
12566  # Extract the first word of "$ac_prog", so it can be a program name with args.
12567set dummy $ac_prog; ac_word=$2
12568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12569$as_echo_n "checking for $ac_word... " >&6; }
12570if ${ac_cv_path_CYGPATH+:} false; then :
12571  $as_echo_n "(cached) " >&6
12572else
12573  case $CYGPATH in
12574  [\\/]* | ?:[\\/]*)
12575  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12576  ;;
12577  *)
12578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12579for as_dir in $PATH
12580do
12581  IFS=$as_save_IFS
12582  test -z "$as_dir" && as_dir=.
12583    for ac_exec_ext in '' $ac_executable_extensions; do
12584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12585    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12587    break 2
12588  fi
12589done
12590  done
12591IFS=$as_save_IFS
12592
12593  ;;
12594esac
12595fi
12596CYGPATH=$ac_cv_path_CYGPATH
12597if test -n "$CYGPATH"; then
12598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12599$as_echo "$CYGPATH" >&6; }
12600else
12601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12602$as_echo "no" >&6; }
12603fi
12604
12605
12606  test -n "$CYGPATH" && break
12607done
12608
12609  else
12610    # The variable is set, but is it from the command line or the environment?
12611
12612    # Try to remove the string !CYGPATH! from our list.
12613    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12614    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12615      # If it failed, the variable was not from the command line. Ignore it,
12616      # but warn the user (except for BASH, which is always set by the calling BASH).
12617      if test "xCYGPATH" != xBASH; then
12618        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12619$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12620      fi
12621      # Try to locate tool using the code snippet
12622      for ac_prog in cygpath
12623do
12624  # Extract the first word of "$ac_prog", so it can be a program name with args.
12625set dummy $ac_prog; ac_word=$2
12626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12627$as_echo_n "checking for $ac_word... " >&6; }
12628if ${ac_cv_path_CYGPATH+:} false; then :
12629  $as_echo_n "(cached) " >&6
12630else
12631  case $CYGPATH in
12632  [\\/]* | ?:[\\/]*)
12633  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12634  ;;
12635  *)
12636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12637for as_dir in $PATH
12638do
12639  IFS=$as_save_IFS
12640  test -z "$as_dir" && as_dir=.
12641    for ac_exec_ext in '' $ac_executable_extensions; do
12642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12643    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12645    break 2
12646  fi
12647done
12648  done
12649IFS=$as_save_IFS
12650
12651  ;;
12652esac
12653fi
12654CYGPATH=$ac_cv_path_CYGPATH
12655if test -n "$CYGPATH"; then
12656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12657$as_echo "$CYGPATH" >&6; }
12658else
12659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12660$as_echo "no" >&6; }
12661fi
12662
12663
12664  test -n "$CYGPATH" && break
12665done
12666
12667    else
12668      # If it succeeded, then it was overridden by the user. We will use it
12669      # for the tool.
12670
12671      # First remove it from the list of overridden variables, so we can test
12672      # for unknown variables in the end.
12673      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12674
12675      # Check if the provided tool contains a complete path.
12676      tool_specified="$CYGPATH"
12677      tool_basename="${tool_specified##*/}"
12678      if test "x$tool_basename" = "x$tool_specified"; then
12679        # A command without a complete path is provided, search $PATH.
12680        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12681$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12682        # Extract the first word of "$tool_basename", so it can be a program name with args.
12683set dummy $tool_basename; ac_word=$2
12684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12685$as_echo_n "checking for $ac_word... " >&6; }
12686if ${ac_cv_path_CYGPATH+:} false; then :
12687  $as_echo_n "(cached) " >&6
12688else
12689  case $CYGPATH in
12690  [\\/]* | ?:[\\/]*)
12691  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12692  ;;
12693  *)
12694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12695for as_dir in $PATH
12696do
12697  IFS=$as_save_IFS
12698  test -z "$as_dir" && as_dir=.
12699    for ac_exec_ext in '' $ac_executable_extensions; do
12700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12701    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12703    break 2
12704  fi
12705done
12706  done
12707IFS=$as_save_IFS
12708
12709  ;;
12710esac
12711fi
12712CYGPATH=$ac_cv_path_CYGPATH
12713if test -n "$CYGPATH"; then
12714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12715$as_echo "$CYGPATH" >&6; }
12716else
12717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12718$as_echo "no" >&6; }
12719fi
12720
12721
12722        if test "x$CYGPATH" = x; then
12723          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12724        fi
12725      else
12726        # Otherwise we believe it is a complete path. Use it as it is.
12727        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12728$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12729        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12730$as_echo_n "checking for CYGPATH... " >&6; }
12731        if test ! -x "$tool_specified"; then
12732          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12733$as_echo "not found" >&6; }
12734          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12735        fi
12736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12737$as_echo "$tool_specified" >&6; }
12738      fi
12739    fi
12740  fi
12741
12742
12743
12744
12745  # Publish this variable in the help.
12746
12747
12748  if test "x$READLINK" = x; then
12749    # The variable is not set by user, try to locate tool using the code snippet
12750    for ac_prog in greadlink readlink
12751do
12752  # Extract the first word of "$ac_prog", so it can be a program name with args.
12753set dummy $ac_prog; ac_word=$2
12754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12755$as_echo_n "checking for $ac_word... " >&6; }
12756if ${ac_cv_path_READLINK+:} false; then :
12757  $as_echo_n "(cached) " >&6
12758else
12759  case $READLINK in
12760  [\\/]* | ?:[\\/]*)
12761  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12762  ;;
12763  *)
12764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12765for as_dir in $PATH
12766do
12767  IFS=$as_save_IFS
12768  test -z "$as_dir" && as_dir=.
12769    for ac_exec_ext in '' $ac_executable_extensions; do
12770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12771    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12773    break 2
12774  fi
12775done
12776  done
12777IFS=$as_save_IFS
12778
12779  ;;
12780esac
12781fi
12782READLINK=$ac_cv_path_READLINK
12783if test -n "$READLINK"; then
12784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12785$as_echo "$READLINK" >&6; }
12786else
12787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12788$as_echo "no" >&6; }
12789fi
12790
12791
12792  test -n "$READLINK" && break
12793done
12794
12795  else
12796    # The variable is set, but is it from the command line or the environment?
12797
12798    # Try to remove the string !READLINK! from our list.
12799    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12800    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12801      # If it failed, the variable was not from the command line. Ignore it,
12802      # but warn the user (except for BASH, which is always set by the calling BASH).
12803      if test "xREADLINK" != xBASH; then
12804        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12805$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12806      fi
12807      # Try to locate tool using the code snippet
12808      for ac_prog in greadlink readlink
12809do
12810  # Extract the first word of "$ac_prog", so it can be a program name with args.
12811set dummy $ac_prog; ac_word=$2
12812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12813$as_echo_n "checking for $ac_word... " >&6; }
12814if ${ac_cv_path_READLINK+:} false; then :
12815  $as_echo_n "(cached) " >&6
12816else
12817  case $READLINK in
12818  [\\/]* | ?:[\\/]*)
12819  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12820  ;;
12821  *)
12822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12823for as_dir in $PATH
12824do
12825  IFS=$as_save_IFS
12826  test -z "$as_dir" && as_dir=.
12827    for ac_exec_ext in '' $ac_executable_extensions; do
12828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12829    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12831    break 2
12832  fi
12833done
12834  done
12835IFS=$as_save_IFS
12836
12837  ;;
12838esac
12839fi
12840READLINK=$ac_cv_path_READLINK
12841if test -n "$READLINK"; then
12842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12843$as_echo "$READLINK" >&6; }
12844else
12845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12846$as_echo "no" >&6; }
12847fi
12848
12849
12850  test -n "$READLINK" && break
12851done
12852
12853    else
12854      # If it succeeded, then it was overridden by the user. We will use it
12855      # for the tool.
12856
12857      # First remove it from the list of overridden variables, so we can test
12858      # for unknown variables in the end.
12859      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12860
12861      # Check if the provided tool contains a complete path.
12862      tool_specified="$READLINK"
12863      tool_basename="${tool_specified##*/}"
12864      if test "x$tool_basename" = "x$tool_specified"; then
12865        # A command without a complete path is provided, search $PATH.
12866        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12867$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12868        # Extract the first word of "$tool_basename", so it can be a program name with args.
12869set dummy $tool_basename; ac_word=$2
12870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12871$as_echo_n "checking for $ac_word... " >&6; }
12872if ${ac_cv_path_READLINK+:} false; then :
12873  $as_echo_n "(cached) " >&6
12874else
12875  case $READLINK in
12876  [\\/]* | ?:[\\/]*)
12877  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12878  ;;
12879  *)
12880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12881for as_dir in $PATH
12882do
12883  IFS=$as_save_IFS
12884  test -z "$as_dir" && as_dir=.
12885    for ac_exec_ext in '' $ac_executable_extensions; do
12886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12887    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12889    break 2
12890  fi
12891done
12892  done
12893IFS=$as_save_IFS
12894
12895  ;;
12896esac
12897fi
12898READLINK=$ac_cv_path_READLINK
12899if test -n "$READLINK"; then
12900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12901$as_echo "$READLINK" >&6; }
12902else
12903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12904$as_echo "no" >&6; }
12905fi
12906
12907
12908        if test "x$READLINK" = x; then
12909          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12910        fi
12911      else
12912        # Otherwise we believe it is a complete path. Use it as it is.
12913        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12914$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12915        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12916$as_echo_n "checking for READLINK... " >&6; }
12917        if test ! -x "$tool_specified"; then
12918          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12919$as_echo "not found" >&6; }
12920          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12921        fi
12922        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12923$as_echo "$tool_specified" >&6; }
12924      fi
12925    fi
12926  fi
12927
12928
12929
12930
12931  # Publish this variable in the help.
12932
12933
12934  if test "x$DF" = x; then
12935    # The variable is not set by user, try to locate tool using the code snippet
12936    for ac_prog in df
12937do
12938  # Extract the first word of "$ac_prog", so it can be a program name with args.
12939set dummy $ac_prog; ac_word=$2
12940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12941$as_echo_n "checking for $ac_word... " >&6; }
12942if ${ac_cv_path_DF+:} false; then :
12943  $as_echo_n "(cached) " >&6
12944else
12945  case $DF in
12946  [\\/]* | ?:[\\/]*)
12947  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12948  ;;
12949  *)
12950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12951for as_dir in $PATH
12952do
12953  IFS=$as_save_IFS
12954  test -z "$as_dir" && as_dir=.
12955    for ac_exec_ext in '' $ac_executable_extensions; do
12956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12957    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12959    break 2
12960  fi
12961done
12962  done
12963IFS=$as_save_IFS
12964
12965  ;;
12966esac
12967fi
12968DF=$ac_cv_path_DF
12969if test -n "$DF"; then
12970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12971$as_echo "$DF" >&6; }
12972else
12973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12974$as_echo "no" >&6; }
12975fi
12976
12977
12978  test -n "$DF" && break
12979done
12980
12981  else
12982    # The variable is set, but is it from the command line or the environment?
12983
12984    # Try to remove the string !DF! from our list.
12985    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12986    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12987      # If it failed, the variable was not from the command line. Ignore it,
12988      # but warn the user (except for BASH, which is always set by the calling BASH).
12989      if test "xDF" != xBASH; then
12990        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12991$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12992      fi
12993      # Try to locate tool using the code snippet
12994      for ac_prog in df
12995do
12996  # Extract the first word of "$ac_prog", so it can be a program name with args.
12997set dummy $ac_prog; ac_word=$2
12998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12999$as_echo_n "checking for $ac_word... " >&6; }
13000if ${ac_cv_path_DF+:} false; then :
13001  $as_echo_n "(cached) " >&6
13002else
13003  case $DF in
13004  [\\/]* | ?:[\\/]*)
13005  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13006  ;;
13007  *)
13008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13009for as_dir in $PATH
13010do
13011  IFS=$as_save_IFS
13012  test -z "$as_dir" && as_dir=.
13013    for ac_exec_ext in '' $ac_executable_extensions; do
13014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13015    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13017    break 2
13018  fi
13019done
13020  done
13021IFS=$as_save_IFS
13022
13023  ;;
13024esac
13025fi
13026DF=$ac_cv_path_DF
13027if test -n "$DF"; then
13028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13029$as_echo "$DF" >&6; }
13030else
13031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13032$as_echo "no" >&6; }
13033fi
13034
13035
13036  test -n "$DF" && break
13037done
13038
13039    else
13040      # If it succeeded, then it was overridden by the user. We will use it
13041      # for the tool.
13042
13043      # First remove it from the list of overridden variables, so we can test
13044      # for unknown variables in the end.
13045      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13046
13047      # Check if the provided tool contains a complete path.
13048      tool_specified="$DF"
13049      tool_basename="${tool_specified##*/}"
13050      if test "x$tool_basename" = "x$tool_specified"; then
13051        # A command without a complete path is provided, search $PATH.
13052        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13053$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13054        # Extract the first word of "$tool_basename", so it can be a program name with args.
13055set dummy $tool_basename; ac_word=$2
13056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13057$as_echo_n "checking for $ac_word... " >&6; }
13058if ${ac_cv_path_DF+:} false; then :
13059  $as_echo_n "(cached) " >&6
13060else
13061  case $DF in
13062  [\\/]* | ?:[\\/]*)
13063  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13064  ;;
13065  *)
13066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13067for as_dir in $PATH
13068do
13069  IFS=$as_save_IFS
13070  test -z "$as_dir" && as_dir=.
13071    for ac_exec_ext in '' $ac_executable_extensions; do
13072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13073    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13075    break 2
13076  fi
13077done
13078  done
13079IFS=$as_save_IFS
13080
13081  ;;
13082esac
13083fi
13084DF=$ac_cv_path_DF
13085if test -n "$DF"; then
13086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13087$as_echo "$DF" >&6; }
13088else
13089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13090$as_echo "no" >&6; }
13091fi
13092
13093
13094        if test "x$DF" = x; then
13095          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13096        fi
13097      else
13098        # Otherwise we believe it is a complete path. Use it as it is.
13099        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13100$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13101        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13102$as_echo_n "checking for DF... " >&6; }
13103        if test ! -x "$tool_specified"; then
13104          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13105$as_echo "not found" >&6; }
13106          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13107        fi
13108        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13109$as_echo "$tool_specified" >&6; }
13110      fi
13111    fi
13112  fi
13113
13114
13115
13116
13117  # Publish this variable in the help.
13118
13119
13120  if test "x$SETFILE" = x; then
13121    # The variable is not set by user, try to locate tool using the code snippet
13122    for ac_prog in SetFile
13123do
13124  # Extract the first word of "$ac_prog", so it can be a program name with args.
13125set dummy $ac_prog; ac_word=$2
13126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13127$as_echo_n "checking for $ac_word... " >&6; }
13128if ${ac_cv_path_SETFILE+:} false; then :
13129  $as_echo_n "(cached) " >&6
13130else
13131  case $SETFILE in
13132  [\\/]* | ?:[\\/]*)
13133  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13134  ;;
13135  *)
13136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13137for as_dir in $PATH
13138do
13139  IFS=$as_save_IFS
13140  test -z "$as_dir" && as_dir=.
13141    for ac_exec_ext in '' $ac_executable_extensions; do
13142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13143    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13145    break 2
13146  fi
13147done
13148  done
13149IFS=$as_save_IFS
13150
13151  ;;
13152esac
13153fi
13154SETFILE=$ac_cv_path_SETFILE
13155if test -n "$SETFILE"; then
13156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13157$as_echo "$SETFILE" >&6; }
13158else
13159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13160$as_echo "no" >&6; }
13161fi
13162
13163
13164  test -n "$SETFILE" && break
13165done
13166
13167  else
13168    # The variable is set, but is it from the command line or the environment?
13169
13170    # Try to remove the string !SETFILE! from our list.
13171    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13172    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13173      # If it failed, the variable was not from the command line. Ignore it,
13174      # but warn the user (except for BASH, which is always set by the calling BASH).
13175      if test "xSETFILE" != xBASH; then
13176        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13177$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13178      fi
13179      # Try to locate tool using the code snippet
13180      for ac_prog in SetFile
13181do
13182  # Extract the first word of "$ac_prog", so it can be a program name with args.
13183set dummy $ac_prog; ac_word=$2
13184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13185$as_echo_n "checking for $ac_word... " >&6; }
13186if ${ac_cv_path_SETFILE+:} false; then :
13187  $as_echo_n "(cached) " >&6
13188else
13189  case $SETFILE in
13190  [\\/]* | ?:[\\/]*)
13191  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13192  ;;
13193  *)
13194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13195for as_dir in $PATH
13196do
13197  IFS=$as_save_IFS
13198  test -z "$as_dir" && as_dir=.
13199    for ac_exec_ext in '' $ac_executable_extensions; do
13200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13201    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13203    break 2
13204  fi
13205done
13206  done
13207IFS=$as_save_IFS
13208
13209  ;;
13210esac
13211fi
13212SETFILE=$ac_cv_path_SETFILE
13213if test -n "$SETFILE"; then
13214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13215$as_echo "$SETFILE" >&6; }
13216else
13217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13218$as_echo "no" >&6; }
13219fi
13220
13221
13222  test -n "$SETFILE" && break
13223done
13224
13225    else
13226      # If it succeeded, then it was overridden by the user. We will use it
13227      # for the tool.
13228
13229      # First remove it from the list of overridden variables, so we can test
13230      # for unknown variables in the end.
13231      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13232
13233      # Check if the provided tool contains a complete path.
13234      tool_specified="$SETFILE"
13235      tool_basename="${tool_specified##*/}"
13236      if test "x$tool_basename" = "x$tool_specified"; then
13237        # A command without a complete path is provided, search $PATH.
13238        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13239$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13240        # Extract the first word of "$tool_basename", so it can be a program name with args.
13241set dummy $tool_basename; ac_word=$2
13242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13243$as_echo_n "checking for $ac_word... " >&6; }
13244if ${ac_cv_path_SETFILE+:} false; then :
13245  $as_echo_n "(cached) " >&6
13246else
13247  case $SETFILE in
13248  [\\/]* | ?:[\\/]*)
13249  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13250  ;;
13251  *)
13252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13253for as_dir in $PATH
13254do
13255  IFS=$as_save_IFS
13256  test -z "$as_dir" && as_dir=.
13257    for ac_exec_ext in '' $ac_executable_extensions; do
13258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13259    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13261    break 2
13262  fi
13263done
13264  done
13265IFS=$as_save_IFS
13266
13267  ;;
13268esac
13269fi
13270SETFILE=$ac_cv_path_SETFILE
13271if test -n "$SETFILE"; then
13272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13273$as_echo "$SETFILE" >&6; }
13274else
13275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13276$as_echo "no" >&6; }
13277fi
13278
13279
13280        if test "x$SETFILE" = x; then
13281          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13282        fi
13283      else
13284        # Otherwise we believe it is a complete path. Use it as it is.
13285        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13286$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13287        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13288$as_echo_n "checking for SETFILE... " >&6; }
13289        if test ! -x "$tool_specified"; then
13290          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13291$as_echo "not found" >&6; }
13292          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13293        fi
13294        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13295$as_echo "$tool_specified" >&6; }
13296      fi
13297    fi
13298  fi
13299
13300
13301
13302
13303# Now we can determine OpenJDK build and target platforms. This is required to
13304# have early on.
13305# Make sure we can run config.sub.
13306$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13307  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13308
13309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13310$as_echo_n "checking build system type... " >&6; }
13311if ${ac_cv_build+:} false; then :
13312  $as_echo_n "(cached) " >&6
13313else
13314  ac_build_alias=$build_alias
13315test "x$ac_build_alias" = x &&
13316  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13317test "x$ac_build_alias" = x &&
13318  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13319ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13320  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13321
13322fi
13323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13324$as_echo "$ac_cv_build" >&6; }
13325case $ac_cv_build in
13326*-*-*) ;;
13327*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13328esac
13329build=$ac_cv_build
13330ac_save_IFS=$IFS; IFS='-'
13331set x $ac_cv_build
13332shift
13333build_cpu=$1
13334build_vendor=$2
13335shift; shift
13336# Remember, the first character of IFS is used to create $*,
13337# except with old shells:
13338build_os=$*
13339IFS=$ac_save_IFS
13340case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13341
13342
13343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13344$as_echo_n "checking host system type... " >&6; }
13345if ${ac_cv_host+:} false; then :
13346  $as_echo_n "(cached) " >&6
13347else
13348  if test "x$host_alias" = x; then
13349  ac_cv_host=$ac_cv_build
13350else
13351  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13352    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13353fi
13354
13355fi
13356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13357$as_echo "$ac_cv_host" >&6; }
13358case $ac_cv_host in
13359*-*-*) ;;
13360*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13361esac
13362host=$ac_cv_host
13363ac_save_IFS=$IFS; IFS='-'
13364set x $ac_cv_host
13365shift
13366host_cpu=$1
13367host_vendor=$2
13368shift; shift
13369# Remember, the first character of IFS is used to create $*,
13370# except with old shells:
13371host_os=$*
13372IFS=$ac_save_IFS
13373case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13374
13375
13376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13377$as_echo_n "checking target system type... " >&6; }
13378if ${ac_cv_target+:} false; then :
13379  $as_echo_n "(cached) " >&6
13380else
13381  if test "x$target_alias" = x; then
13382  ac_cv_target=$ac_cv_host
13383else
13384  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13385    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13386fi
13387
13388fi
13389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13390$as_echo "$ac_cv_target" >&6; }
13391case $ac_cv_target in
13392*-*-*) ;;
13393*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13394esac
13395target=$ac_cv_target
13396ac_save_IFS=$IFS; IFS='-'
13397set x $ac_cv_target
13398shift
13399target_cpu=$1
13400target_vendor=$2
13401shift; shift
13402# Remember, the first character of IFS is used to create $*,
13403# except with old shells:
13404target_os=$*
13405IFS=$ac_save_IFS
13406case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13407
13408
13409# The aliases save the names the user supplied, while $host etc.
13410# will get canonicalized.
13411test -n "$target_alias" &&
13412  test "$program_prefix$program_suffix$program_transform_name" = \
13413    NONENONEs,x,x, &&
13414  program_prefix=${target_alias}-
13415
13416  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13417  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13418  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13419  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13420  # to use the configure naming style.
13421
13422
13423
13424
13425
13426  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13427  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13428  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13429  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13430  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13431  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13432
13433
13434
13435  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13436
13437  case "$build_os" in
13438    *linux*)
13439      VAR_OS=linux
13440      VAR_OS_API=posix
13441      VAR_OS_ENV=linux
13442      ;;
13443    *solaris*)
13444      VAR_OS=solaris
13445      VAR_OS_API=posix
13446      VAR_OS_ENV=solaris
13447      ;;
13448    *darwin*)
13449      VAR_OS=macosx
13450      VAR_OS_API=posix
13451      VAR_OS_ENV=macosx
13452      ;;
13453    *bsd*)
13454      VAR_OS=bsd
13455      VAR_OS_API=posix
13456      VAR_OS_ENV=bsd
13457      ;;
13458    *cygwin*)
13459      VAR_OS=windows
13460      VAR_OS_API=winapi
13461      VAR_OS_ENV=windows.cygwin
13462      ;;
13463    *mingw*)
13464      VAR_OS=windows
13465      VAR_OS_API=winapi
13466      VAR_OS_ENV=windows.msys
13467      ;;
13468    *aix*)
13469      VAR_OS=aix
13470      VAR_OS_API=posix
13471      VAR_OS_ENV=aix
13472      ;;
13473    *)
13474      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13475      ;;
13476  esac
13477
13478
13479  # First argument is the cpu name from the trip/quad
13480  case "$build_cpu" in
13481    x86_64)
13482      VAR_CPU=x86_64
13483      VAR_CPU_ARCH=x86
13484      VAR_CPU_BITS=64
13485      VAR_CPU_ENDIAN=little
13486      ;;
13487    i?86)
13488      VAR_CPU=x86
13489      VAR_CPU_ARCH=x86
13490      VAR_CPU_BITS=32
13491      VAR_CPU_ENDIAN=little
13492      ;;
13493    arm*)
13494      VAR_CPU=arm
13495      VAR_CPU_ARCH=arm
13496      VAR_CPU_BITS=32
13497      VAR_CPU_ENDIAN=little
13498      ;;
13499    powerpc)
13500      VAR_CPU=ppc
13501      VAR_CPU_ARCH=ppc
13502      VAR_CPU_BITS=32
13503      VAR_CPU_ENDIAN=big
13504      ;;
13505    powerpc64)
13506      VAR_CPU=ppc64
13507      VAR_CPU_ARCH=ppc
13508      VAR_CPU_BITS=64
13509      VAR_CPU_ENDIAN=big
13510      ;;
13511    s390)
13512      VAR_CPU=s390
13513      VAR_CPU_ARCH=s390
13514      VAR_CPU_BITS=32
13515      VAR_CPU_ENDIAN=big
13516      ;;
13517    s390x)
13518      VAR_CPU=s390x
13519      VAR_CPU_ARCH=s390
13520      VAR_CPU_BITS=64
13521      VAR_CPU_ENDIAN=big
13522      ;;
13523    sparc)
13524      VAR_CPU=sparc
13525      VAR_CPU_ARCH=sparc
13526      VAR_CPU_BITS=32
13527      VAR_CPU_ENDIAN=big
13528      ;;
13529    sparcv9)
13530      VAR_CPU=sparcv9
13531      VAR_CPU_ARCH=sparc
13532      VAR_CPU_BITS=64
13533      VAR_CPU_ENDIAN=big
13534      ;;
13535    *)
13536      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13537      ;;
13538  esac
13539
13540  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13541  OPENJDK_BUILD_OS="$VAR_OS"
13542  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13543  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13544  OPENJDK_BUILD_CPU="$VAR_CPU"
13545  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13546  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13547  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13548
13549
13550
13551
13552
13553
13554
13555  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13556$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13558$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13559
13560  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13561
13562  case "$host_os" in
13563    *linux*)
13564      VAR_OS=linux
13565      VAR_OS_API=posix
13566      VAR_OS_ENV=linux
13567      ;;
13568    *solaris*)
13569      VAR_OS=solaris
13570      VAR_OS_API=posix
13571      VAR_OS_ENV=solaris
13572      ;;
13573    *darwin*)
13574      VAR_OS=macosx
13575      VAR_OS_API=posix
13576      VAR_OS_ENV=macosx
13577      ;;
13578    *bsd*)
13579      VAR_OS=bsd
13580      VAR_OS_API=posix
13581      VAR_OS_ENV=bsd
13582      ;;
13583    *cygwin*)
13584      VAR_OS=windows
13585      VAR_OS_API=winapi
13586      VAR_OS_ENV=windows.cygwin
13587      ;;
13588    *mingw*)
13589      VAR_OS=windows
13590      VAR_OS_API=winapi
13591      VAR_OS_ENV=windows.msys
13592      ;;
13593    *aix*)
13594      VAR_OS=aix
13595      VAR_OS_API=posix
13596      VAR_OS_ENV=aix
13597      ;;
13598    *)
13599      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13600      ;;
13601  esac
13602
13603
13604  # First argument is the cpu name from the trip/quad
13605  case "$host_cpu" in
13606    x86_64)
13607      VAR_CPU=x86_64
13608      VAR_CPU_ARCH=x86
13609      VAR_CPU_BITS=64
13610      VAR_CPU_ENDIAN=little
13611      ;;
13612    i?86)
13613      VAR_CPU=x86
13614      VAR_CPU_ARCH=x86
13615      VAR_CPU_BITS=32
13616      VAR_CPU_ENDIAN=little
13617      ;;
13618    arm*)
13619      VAR_CPU=arm
13620      VAR_CPU_ARCH=arm
13621      VAR_CPU_BITS=32
13622      VAR_CPU_ENDIAN=little
13623      ;;
13624    powerpc)
13625      VAR_CPU=ppc
13626      VAR_CPU_ARCH=ppc
13627      VAR_CPU_BITS=32
13628      VAR_CPU_ENDIAN=big
13629      ;;
13630    powerpc64)
13631      VAR_CPU=ppc64
13632      VAR_CPU_ARCH=ppc
13633      VAR_CPU_BITS=64
13634      VAR_CPU_ENDIAN=big
13635      ;;
13636    s390)
13637      VAR_CPU=s390
13638      VAR_CPU_ARCH=s390
13639      VAR_CPU_BITS=32
13640      VAR_CPU_ENDIAN=big
13641      ;;
13642    s390x)
13643      VAR_CPU=s390x
13644      VAR_CPU_ARCH=s390
13645      VAR_CPU_BITS=64
13646      VAR_CPU_ENDIAN=big
13647      ;;
13648    sparc)
13649      VAR_CPU=sparc
13650      VAR_CPU_ARCH=sparc
13651      VAR_CPU_BITS=32
13652      VAR_CPU_ENDIAN=big
13653      ;;
13654    sparcv9)
13655      VAR_CPU=sparcv9
13656      VAR_CPU_ARCH=sparc
13657      VAR_CPU_BITS=64
13658      VAR_CPU_ENDIAN=big
13659      ;;
13660    *)
13661      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13662      ;;
13663  esac
13664
13665  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13666  OPENJDK_TARGET_OS="$VAR_OS"
13667  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13668  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13669  OPENJDK_TARGET_CPU="$VAR_CPU"
13670  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13671  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13672  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13673
13674
13675
13676
13677
13678
13679
13680  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13681$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13683$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13684
13685
13686
13687# Check whether --with-target-bits was given.
13688if test "${with_target_bits+set}" = set; then :
13689  withval=$with_target_bits;
13690fi
13691
13692
13693  # We have three types of compiles:
13694  # native  == normal compilation, target system == build system
13695  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13696  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13697  #
13698  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13699    # We're doing a proper cross-compilation
13700    COMPILE_TYPE="cross"
13701  else
13702    COMPILE_TYPE="native"
13703  fi
13704
13705  if test "x$with_target_bits" != x; then
13706    if test "x$COMPILE_TYPE" = "xcross"; then
13707      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13708    fi
13709
13710    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13711      # A reduced build is requested
13712      COMPILE_TYPE="reduced"
13713      OPENJDK_TARGET_CPU_BITS=32
13714      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13715        OPENJDK_TARGET_CPU=x86
13716      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13717        OPENJDK_TARGET_CPU=sparc
13718      else
13719        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13720      fi
13721    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13722      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
13723    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13724      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13725$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13726    else
13727      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13728    fi
13729  fi
13730
13731
13732  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13733$as_echo_n "checking compilation type... " >&6; }
13734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13735$as_echo "$COMPILE_TYPE" >&6; }
13736
13737
13738  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13739    REQUIRED_OS_NAME=SunOS
13740    REQUIRED_OS_VERSION=5.10
13741  fi
13742  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13743    REQUIRED_OS_NAME=Linux
13744    REQUIRED_OS_VERSION=2.6
13745  fi
13746  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13747    REQUIRED_OS_NAME=Windows
13748    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13749      REQUIRED_OS_VERSION=5.2
13750    else
13751      REQUIRED_OS_VERSION=5.1
13752    fi
13753  fi
13754  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13755    REQUIRED_OS_NAME=Darwin
13756    REQUIRED_OS_VERSION=11.2
13757  fi
13758
13759
13760
13761
13762
13763  # Also store the legacy naming of the cpu.
13764  # Ie i586 and amd64 instead of x86 and x86_64
13765  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13766  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13767    OPENJDK_TARGET_CPU_LEGACY="i586"
13768  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13769    # On all platforms except MacOSX replace x86_64 with amd64.
13770    OPENJDK_TARGET_CPU_LEGACY="amd64"
13771  fi
13772
13773
13774  # And the second legacy naming of the cpu.
13775  # Ie i386 and amd64 instead of x86 and x86_64.
13776  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13777  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13778    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13779  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13780    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13781  fi
13782
13783
13784  # This is the name of the cpu (but using i386 and amd64 instead of
13785  # x86 and x86_64, respectively), preceeded by a /, to be used when
13786  # locating libraries. On macosx, it's empty, though.
13787  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13788  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13789    OPENJDK_TARGET_CPU_LIBDIR=""
13790  fi
13791
13792
13793  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13794  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13795  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13796  OPENJDK_TARGET_CPU_ISADIR=""
13797  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13798    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13799      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13800    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13801      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13802    fi
13803  fi
13804
13805
13806  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13807  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13808  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13809    # On linux only, we replace x86 with i386.
13810    OPENJDK_TARGET_CPU_OSARCH="i386"
13811  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13812    # On all platforms except macosx, we replace x86_64 with amd64.
13813    OPENJDK_TARGET_CPU_OSARCH="amd64"
13814  fi
13815
13816
13817  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13818  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13819    OPENJDK_TARGET_CPU_JLI="i386"
13820  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13821    # On all platforms except macosx, we replace x86_64 with amd64.
13822    OPENJDK_TARGET_CPU_JLI="amd64"
13823  fi
13824  # Now setup the -D flags for building libjli.
13825  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13826  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13827    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13828      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13829    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13830      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13831    fi
13832  fi
13833
13834
13835  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13836  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13837    OPENJDK_TARGET_OS_API_DIR="solaris"
13838  fi
13839  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13840    OPENJDK_TARGET_OS_API_DIR="windows"
13841  fi
13842
13843
13844  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13845      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13846  else
13847      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13848  fi
13849
13850
13851  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13852    A_LP64="LP64:="
13853    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13854    # unpack200.exe
13855    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13856      ADD_LP64="-D_LP64=1"
13857    fi
13858  fi
13859  LP64=$A_LP64
13860
13861
13862  if test "x$COMPILE_TYPE" = "xcross"; then
13863    # FIXME: ... or should this include reduced builds..?
13864    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13865  else
13866    DEFINE_CROSS_COMPILE_ARCH=""
13867  fi
13868
13869
13870  # ZERO_ARCHDEF is used to enable architecture-specific code
13871  case "${OPENJDK_TARGET_CPU}" in
13872    ppc*)    ZERO_ARCHDEF=PPC   ;;
13873    s390*)   ZERO_ARCHDEF=S390  ;;
13874    sparc*)  ZERO_ARCHDEF=SPARC ;;
13875    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13876    x86)     ZERO_ARCHDEF=IA32  ;;
13877    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13878  esac
13879
13880
13881
13882
13883# Continue setting up basic stuff. Most remaining code require fundamental tools.
13884
13885  # Save the current directory this script was started from
13886  CURDIR="$PWD"
13887
13888  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13889    PATH_SEP=";"
13890
13891  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13892  if test $SRC_ROOT_LENGTH -gt 100; then
13893    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13894  fi
13895
13896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13897    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13898$as_echo_n "checking cygwin release... " >&6; }
13899    CYGWIN_VERSION=`$UNAME -r`
13900    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13901$as_echo "$CYGWIN_VERSION" >&6; }
13902    WINDOWS_ENV_VENDOR='cygwin'
13903    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13904
13905    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
13906    if test "x$CYGWIN_VERSION_OK" = x; then
13907      { $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
13908$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;}
13909      as_fn_error $? "Cannot continue" "$LINENO" 5
13910    fi
13911    if test "x$CYGPATH" = x; then
13912      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13913    fi
13914    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13915$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13916    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13917    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13918    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13919    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13920    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13921$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13922    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13923    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13924    if test "x$test_cygdrive_prefix" = x; then
13925      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13926    fi
13927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13928    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13929$as_echo_n "checking msys release... " >&6; }
13930    MSYS_VERSION=`$UNAME -r`
13931    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13932$as_echo "$MSYS_VERSION" >&6; }
13933
13934    WINDOWS_ENV_VENDOR='msys'
13935    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13936
13937    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13938$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13939    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13940    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13941
13942  windows_path="$MSYS_ROOT_PATH"
13943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13944    unix_path=`$CYGPATH -u "$windows_path"`
13945    MSYS_ROOT_PATH="$unix_path"
13946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13948    MSYS_ROOT_PATH="$unix_path"
13949  fi
13950
13951    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13952$as_echo "$MSYS_ROOT_PATH" >&6; }
13953    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13954  else
13955    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13956  fi
13957
13958  # Test if windows or unix (cygwin/msys) find is first in path.
13959  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13960$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13961  FIND_BINARY_OUTPUT=`find --version 2>&1`
13962  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13963    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13964$as_echo "unix style" >&6; }
13965  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
13966    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
13967$as_echo "Windows" >&6; }
13968    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
13969$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
13970    { $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
13971$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
13972    as_fn_error $? "Cannot continue" "$LINENO" 5
13973  else
13974    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
13975$as_echo "unknown" >&6; }
13976    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
13977$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
13978  fi
13979
13980  else
13981    PATH_SEP=":"
13982  fi
13983
13984
13985  # We get the top-level directory from the supporting wrappers.
13986  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
13987$as_echo_n "checking for top-level directory... " >&6; }
13988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
13989$as_echo "$TOPDIR" >&6; }
13990
13991
13992  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
13993
13994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13995
13996  # Input might be given as Windows format, start by converting to
13997  # unix format.
13998  path="$CURDIR"
13999  new_path=`$CYGPATH -u "$path"`
14000
14001  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14002  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14003  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14004  # "foo.exe" is OK but "foo" is an error.
14005  #
14006  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14007  # It is also a way to make sure we got the proper file name for the real test later on.
14008  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14009  if test "x$test_shortpath" = x; then
14010    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14011$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14012    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14013  fi
14014
14015  # Call helper function which possibly converts this using DOS-style short mode.
14016  # If so, the updated path is stored in $new_path.
14017
14018  input_path="$new_path"
14019  # Check if we need to convert this using DOS-style short mode. If the path
14020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14021  # take no chances and rewrite it.
14022  # Note: m4 eats our [], so we need to use [ and ] instead.
14023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14024  if test "x$has_forbidden_chars" != x; then
14025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14026    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14027    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14028    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14029      # Going to short mode and back again did indeed matter. Since short mode is
14030      # case insensitive, let's make it lowercase to improve readability.
14031      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14032      # Now convert it back to Unix-stile (cygpath)
14033      input_path=`$CYGPATH -u "$shortmode_path"`
14034      new_path="$input_path"
14035    fi
14036  fi
14037
14038  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14039  if test "x$test_cygdrive_prefix" = x; then
14040    # As a simple fix, exclude /usr/bin since it's not a real path.
14041    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14042      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14043      # a path prefixed by /cygdrive for fixpath to work.
14044      new_path="$CYGWIN_ROOT_PATH$input_path"
14045    fi
14046  fi
14047
14048
14049  if test "x$path" != "x$new_path"; then
14050    CURDIR="$new_path"
14051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14052$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14053  fi
14054
14055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14056
14057  path="$CURDIR"
14058  has_colon=`$ECHO $path | $GREP ^.:`
14059  new_path="$path"
14060  if test "x$has_colon" = x; then
14061    # Not in mixed or Windows style, start by that.
14062    new_path=`cmd //c echo $path`
14063  fi
14064
14065
14066  input_path="$new_path"
14067  # Check if we need to convert this using DOS-style short mode. If the path
14068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14069  # take no chances and rewrite it.
14070  # Note: m4 eats our [], so we need to use [ and ] instead.
14071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14072  if test "x$has_forbidden_chars" != x; then
14073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14074    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14075  fi
14076
14077
14078  windows_path="$new_path"
14079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14080    unix_path=`$CYGPATH -u "$windows_path"`
14081    new_path="$unix_path"
14082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14084    new_path="$unix_path"
14085  fi
14086
14087  if test "x$path" != "x$new_path"; then
14088    CURDIR="$new_path"
14089    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14090$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14091  fi
14092
14093  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14094  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14095
14096  else
14097    # We're on a posix platform. Hooray! :)
14098    path="$CURDIR"
14099    has_space=`$ECHO "$path" | $GREP " "`
14100    if test "x$has_space" != x; then
14101      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14102$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14103      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14104    fi
14105
14106    # Use eval to expand a potential ~
14107    eval path="$path"
14108    if test ! -f "$path" && test ! -d "$path"; then
14109      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14110    fi
14111
14112    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14113  fi
14114
14115
14116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14117
14118  # Input might be given as Windows format, start by converting to
14119  # unix format.
14120  path="$TOPDIR"
14121  new_path=`$CYGPATH -u "$path"`
14122
14123  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14124  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14125  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14126  # "foo.exe" is OK but "foo" is an error.
14127  #
14128  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14129  # It is also a way to make sure we got the proper file name for the real test later on.
14130  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14131  if test "x$test_shortpath" = x; then
14132    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14133$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14134    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14135  fi
14136
14137  # Call helper function which possibly converts this using DOS-style short mode.
14138  # If so, the updated path is stored in $new_path.
14139
14140  input_path="$new_path"
14141  # Check if we need to convert this using DOS-style short mode. If the path
14142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14143  # take no chances and rewrite it.
14144  # Note: m4 eats our [], so we need to use [ and ] instead.
14145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14146  if test "x$has_forbidden_chars" != x; then
14147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14148    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14149    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14150    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14151      # Going to short mode and back again did indeed matter. Since short mode is
14152      # case insensitive, let's make it lowercase to improve readability.
14153      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14154      # Now convert it back to Unix-stile (cygpath)
14155      input_path=`$CYGPATH -u "$shortmode_path"`
14156      new_path="$input_path"
14157    fi
14158  fi
14159
14160  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14161  if test "x$test_cygdrive_prefix" = x; then
14162    # As a simple fix, exclude /usr/bin since it's not a real path.
14163    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14164      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14165      # a path prefixed by /cygdrive for fixpath to work.
14166      new_path="$CYGWIN_ROOT_PATH$input_path"
14167    fi
14168  fi
14169
14170
14171  if test "x$path" != "x$new_path"; then
14172    TOPDIR="$new_path"
14173    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14174$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14175  fi
14176
14177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14178
14179  path="$TOPDIR"
14180  has_colon=`$ECHO $path | $GREP ^.:`
14181  new_path="$path"
14182  if test "x$has_colon" = x; then
14183    # Not in mixed or Windows style, start by that.
14184    new_path=`cmd //c echo $path`
14185  fi
14186
14187
14188  input_path="$new_path"
14189  # Check if we need to convert this using DOS-style short mode. If the path
14190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14191  # take no chances and rewrite it.
14192  # Note: m4 eats our [], so we need to use [ and ] instead.
14193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14194  if test "x$has_forbidden_chars" != x; then
14195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14196    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14197  fi
14198
14199
14200  windows_path="$new_path"
14201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14202    unix_path=`$CYGPATH -u "$windows_path"`
14203    new_path="$unix_path"
14204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14205    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14206    new_path="$unix_path"
14207  fi
14208
14209  if test "x$path" != "x$new_path"; then
14210    TOPDIR="$new_path"
14211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14212$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14213  fi
14214
14215  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14216  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14217
14218  else
14219    # We're on a posix platform. Hooray! :)
14220    path="$TOPDIR"
14221    has_space=`$ECHO "$path" | $GREP " "`
14222    if test "x$has_space" != x; then
14223      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14224$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14225      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14226    fi
14227
14228    # Use eval to expand a potential ~
14229    eval path="$path"
14230    if test ! -f "$path" && test ! -d "$path"; then
14231      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14232    fi
14233
14234    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14235  fi
14236
14237  # SRC_ROOT is a traditional alias for TOPDIR.
14238  SRC_ROOT=$TOPDIR
14239
14240  # Locate the directory of this script.
14241  AUTOCONF_DIR=$TOPDIR/common/autoconf
14242
14243  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
14244    # Add extra search paths on solaris for utilities like ar and as etc...
14245    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
14246  fi
14247
14248  # You can force the sys-root if the sys-root encoded into the cross compiler tools
14249  # is not correct.
14250
14251# Check whether --with-sys-root was given.
14252if test "${with_sys_root+set}" = set; then :
14253  withval=$with_sys_root;
14254fi
14255
14256
14257  if test "x$with_sys_root" != x; then
14258    SYS_ROOT=$with_sys_root
14259  else
14260    SYS_ROOT=/
14261  fi
14262
14263
14264
14265# Check whether --with-tools-dir was given.
14266if test "${with_tools_dir+set}" = set; then :
14267  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
14268
14269fi
14270
14271
14272
14273# Check whether --with-devkit was given.
14274if test "${with_devkit+set}" = set; then :
14275  withval=$with_devkit;
14276        if test "x$with_sys_root" != x; then
14277          as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
14278        fi
14279
14280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14281
14282  # Input might be given as Windows format, start by converting to
14283  # unix format.
14284  path="$with_devkit"
14285  new_path=`$CYGPATH -u "$path"`
14286
14287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14290  # "foo.exe" is OK but "foo" is an error.
14291  #
14292  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14293  # It is also a way to make sure we got the proper file name for the real test later on.
14294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14295  if test "x$test_shortpath" = x; then
14296    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14297$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14298    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14299  fi
14300
14301  # Call helper function which possibly converts this using DOS-style short mode.
14302  # If so, the updated path is stored in $new_path.
14303
14304  input_path="$new_path"
14305  # Check if we need to convert this using DOS-style short mode. If the path
14306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14307  # take no chances and rewrite it.
14308  # Note: m4 eats our [], so we need to use [ and ] instead.
14309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14310  if test "x$has_forbidden_chars" != x; then
14311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14315      # Going to short mode and back again did indeed matter. Since short mode is
14316      # case insensitive, let's make it lowercase to improve readability.
14317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14318      # Now convert it back to Unix-stile (cygpath)
14319      input_path=`$CYGPATH -u "$shortmode_path"`
14320      new_path="$input_path"
14321    fi
14322  fi
14323
14324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14325  if test "x$test_cygdrive_prefix" = x; then
14326    # As a simple fix, exclude /usr/bin since it's not a real path.
14327    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14329      # a path prefixed by /cygdrive for fixpath to work.
14330      new_path="$CYGWIN_ROOT_PATH$input_path"
14331    fi
14332  fi
14333
14334
14335  if test "x$path" != "x$new_path"; then
14336    with_devkit="$new_path"
14337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14338$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14339  fi
14340
14341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14342
14343  path="$with_devkit"
14344  has_colon=`$ECHO $path | $GREP ^.:`
14345  new_path="$path"
14346  if test "x$has_colon" = x; then
14347    # Not in mixed or Windows style, start by that.
14348    new_path=`cmd //c echo $path`
14349  fi
14350
14351
14352  input_path="$new_path"
14353  # Check if we need to convert this using DOS-style short mode. If the path
14354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14355  # take no chances and rewrite it.
14356  # Note: m4 eats our [], so we need to use [ and ] instead.
14357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14358  if test "x$has_forbidden_chars" != x; then
14359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14361  fi
14362
14363
14364  windows_path="$new_path"
14365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14366    unix_path=`$CYGPATH -u "$windows_path"`
14367    new_path="$unix_path"
14368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14370    new_path="$unix_path"
14371  fi
14372
14373  if test "x$path" != "x$new_path"; then
14374    with_devkit="$new_path"
14375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14376$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14377  fi
14378
14379  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14380  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14381
14382  else
14383    # We're on a posix platform. Hooray! :)
14384    path="$with_devkit"
14385    has_space=`$ECHO "$path" | $GREP " "`
14386    if test "x$has_space" != x; then
14387      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14388$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14389      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14390    fi
14391
14392    # Use eval to expand a potential ~
14393    eval path="$path"
14394    if test ! -f "$path" && test ! -d "$path"; then
14395      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14396    fi
14397
14398    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14399  fi
14400
14401
14402  if test "x$TOOLS_DIR" = x; then
14403    TOOLS_DIR="$with_devkit/bin"
14404  else
14405    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
14406  fi
14407
14408        if test -d "$with_devkit/$host_alias/libc"; then
14409          SYS_ROOT=$with_devkit/$host_alias/libc
14410        elif test -d "$with_devkit/$host/sys-root"; then
14411          SYS_ROOT=$with_devkit/$host/sys-root
14412        fi
14413
14414fi
14415
14416
14417
14418  # Setup default logging of stdout and stderr to build.log in the output root.
14419  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14420  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14421  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14422
14423
14424
14425
14426
14427# Check if it's a pure open build or if custom sources are to be used.
14428
14429  # Check whether --enable-openjdk-only was given.
14430if test "${enable_openjdk_only+set}" = set; then :
14431  enableval=$enable_openjdk_only;
14432else
14433  enable_openjdk_only="no"
14434fi
14435
14436
14437  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14438$as_echo_n "checking for presence of closed sources... " >&6; }
14439  if test -d "$SRC_ROOT/jdk/src/closed"; then
14440    CLOSED_SOURCE_PRESENT=yes
14441  else
14442    CLOSED_SOURCE_PRESENT=no
14443  fi
14444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14445$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14446
14447  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14448$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14449  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14451$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14452
14453  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14454    OPENJDK=true
14455    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14456      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14457$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14458    fi
14459  else
14460    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14461      OPENJDK=true
14462    else
14463      OPENJDK=false
14464    fi
14465  fi
14466
14467  if test "x$OPENJDK" = "xtrue"; then
14468    SET_OPENJDK="OPENJDK=true"
14469  fi
14470
14471
14472
14473  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14474  # the IncludeCustomExtension macro.
14475
14476
14477# Check whether --with-custom-make-dir was given.
14478if test "${with_custom_make_dir+set}" = set; then :
14479  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
14480$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14481fi
14482
14483
14484
14485
14486# These are needed to be able to create a configuration name (and thus the output directory)
14487
14488  ###############################################################################
14489  #
14490  # Check which variant of the JDK that we want to build.
14491  # Currently we have:
14492  #    normal:   standard edition
14493  # but the custom make system may add other variants
14494  #
14495  # Effectively the JDK variant gives a name to a specific set of
14496  # modules to compile into the JDK. In the future, these modules
14497  # might even be Jigsaw modules.
14498  #
14499  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14500$as_echo_n "checking which variant of the JDK to build... " >&6; }
14501
14502# Check whether --with-jdk-variant was given.
14503if test "${with_jdk_variant+set}" = set; then :
14504  withval=$with_jdk_variant;
14505fi
14506
14507
14508  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14509    JDK_VARIANT="normal"
14510  else
14511    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14512  fi
14513
14514
14515
14516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14517$as_echo "$JDK_VARIANT" >&6; }
14518
14519
14520###############################################################################
14521#
14522# Check which interpreter of the JVM we want to build.
14523# Currently we have:
14524#    template: Template interpreter (the default)
14525#    cpp     : C++ interpreter
14526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14527$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14528
14529# Check whether --with-jvm-interpreter was given.
14530if test "${with_jvm_interpreter+set}" = set; then :
14531  withval=$with_jvm_interpreter;
14532fi
14533
14534
14535if test "x$with_jvm_interpreter" = x; then
14536     with_jvm_interpreter="template"
14537fi
14538
14539JVM_INTERPRETER="$with_jvm_interpreter"
14540
14541if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14542   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14543fi
14544
14545
14546
14547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14548$as_echo "$with_jvm_interpreter" >&6; }
14549
14550
14551
14552  ###############################################################################
14553  #
14554  # Check which variants of the JVM that we want to build.
14555  # Currently we have:
14556  #    server: normal interpreter and a tiered C1/C2 compiler
14557  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14558  #    minimal1: reduced form of client with optional VM services and features stripped out
14559  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14560  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14561  #    zero: no machine code interpreter, no compiler
14562  #    zeroshark: zero interpreter and shark/llvm compiler backend
14563#    core: interpreter only, no compiler (only works on some platforms)
14564  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14565$as_echo_n "checking which variants of the JVM to build... " >&6; }
14566
14567# Check whether --with-jvm-variants was given.
14568if test "${with_jvm_variants+set}" = set; then :
14569  withval=$with_jvm_variants;
14570fi
14571
14572
14573  if test "x$with_jvm_variants" = x; then
14574    with_jvm_variants="server"
14575  fi
14576
14577  JVM_VARIANTS=",$with_jvm_variants,"
14578  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,//'`
14579
14580  if test "x$TEST_VARIANTS" != "x,"; then
14581     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14582  fi
14583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14584$as_echo "$with_jvm_variants" >&6; }
14585
14586  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14587  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14588  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14589  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14590  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14591  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14592  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14593
14594  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14595    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14596      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14597    fi
14598  fi
14599  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14600    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14601      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14602    fi
14603  fi
14604  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14605    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14606      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14607    fi
14608  fi
14609
14610  # Replace the commas with AND for use in the build directory name.
14611  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14612  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/'`
14613  if test "x$COUNT_VARIANTS" != "x,1"; then
14614    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14615  else
14616    BUILDING_MULTIPLE_JVM_VARIANTS=no
14617  fi
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628  INCLUDE_SA=true
14629  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14630    INCLUDE_SA=false
14631  fi
14632  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14633    INCLUDE_SA=false
14634  fi
14635  if test "x$VAR_CPU" = xppc64 ; then
14636    INCLUDE_SA=false
14637  fi
14638
14639
14640  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14641    MACOSX_UNIVERSAL="true"
14642  fi
14643
14644
14645
14646
14647  ###############################################################################
14648  #
14649  # Set the debug level
14650  #    release: no debug information, all optimizations, no asserts.
14651  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14652  #    fastdebug: debug information (-g), all optimizations, all asserts
14653  #    slowdebug: debug information (-g), no optimizations, all asserts
14654  #
14655  DEBUG_LEVEL="release"
14656  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14657$as_echo_n "checking which debug level to use... " >&6; }
14658  # Check whether --enable-debug was given.
14659if test "${enable_debug+set}" = set; then :
14660  enableval=$enable_debug;
14661        ENABLE_DEBUG="${enableval}"
14662        DEBUG_LEVEL="fastdebug"
14663
14664else
14665  ENABLE_DEBUG="no"
14666fi
14667
14668
14669
14670# Check whether --with-debug-level was given.
14671if test "${with_debug_level+set}" = set; then :
14672  withval=$with_debug_level;
14673        DEBUG_LEVEL="${withval}"
14674        if test "x$ENABLE_DEBUG" = xyes; then
14675          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14676        fi
14677
14678fi
14679
14680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14681$as_echo "$DEBUG_LEVEL" >&6; }
14682
14683  if test "x$DEBUG_LEVEL" != xrelease && \
14684      test "x$DEBUG_LEVEL" != xoptimized && \
14685      test "x$DEBUG_LEVEL" != xfastdebug && \
14686      test "x$DEBUG_LEVEL" != xslowdebug; then
14687    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14688  fi
14689
14690
14691  ###############################################################################
14692  #
14693  # Setup legacy vars/targets and new vars to deal with different debug levels.
14694  #
14695
14696  case $DEBUG_LEVEL in
14697    release )
14698      VARIANT="OPT"
14699      FASTDEBUG="false"
14700      DEBUG_CLASSFILES="false"
14701      BUILD_VARIANT_RELEASE=""
14702      HOTSPOT_DEBUG_LEVEL="product"
14703      HOTSPOT_EXPORT="product"
14704      ;;
14705    fastdebug )
14706      VARIANT="DBG"
14707      FASTDEBUG="true"
14708      DEBUG_CLASSFILES="true"
14709      BUILD_VARIANT_RELEASE="-fastdebug"
14710      HOTSPOT_DEBUG_LEVEL="fastdebug"
14711      HOTSPOT_EXPORT="fastdebug"
14712      ;;
14713    slowdebug )
14714      VARIANT="DBG"
14715      FASTDEBUG="false"
14716      DEBUG_CLASSFILES="true"
14717      BUILD_VARIANT_RELEASE="-debug"
14718      HOTSPOT_DEBUG_LEVEL="jvmg"
14719      HOTSPOT_EXPORT="debug"
14720      ;;
14721    optimized )
14722      VARIANT="OPT"
14723      FASTDEBUG="false"
14724      DEBUG_CLASSFILES="false"
14725      BUILD_VARIANT_RELEASE="-optimized"
14726      HOTSPOT_DEBUG_LEVEL="optimized"
14727      HOTSPOT_EXPORT="optimized"
14728      ;;
14729  esac
14730
14731  # The debug level 'optimized' is a little special because it is currently only
14732  # applicable to the HotSpot build where it means to build a completely
14733  # optimized version of the VM without any debugging code (like for the
14734  # 'release' debug level which is called 'product' in the HotSpot build) but
14735  # with the exception that it can contain additional code which is otherwise
14736  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14737  # test new and/or experimental features which are not intended for customer
14738  # shipment. Because these new features need to be tested and benchmarked in
14739  # real world scenarios, we want to build the containing JDK at the 'release'
14740  # debug level.
14741  if test "x$DEBUG_LEVEL" = xoptimized; then
14742    DEBUG_LEVEL="release"
14743  fi
14744
14745  #####
14746  # Generate the legacy makefile targets for hotspot.
14747  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14748  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14749  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14750  # But until then ...
14751  HOTSPOT_TARGET=""
14752
14753  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14754    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14755  fi
14756
14757  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14758    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14759  fi
14760
14761  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14762    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14763  fi
14764
14765  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14766    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14767  fi
14768
14769  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14770    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14771  fi
14772
14773  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14774    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14775  fi
14776
14777  if test "x$JVM_VARIANT_CORE" = xtrue; then
14778    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14779  fi
14780
14781  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14782
14783  # On Macosx universal binaries are produced, but they only contain
14784  # 64 bit intel. This invalidates control of which jvms are built
14785  # from configure, but only server is valid anyway. Fix this
14786  # when hotspot makefiles are rewritten.
14787  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14788    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14789  fi
14790
14791  #####
14792
14793
14794
14795
14796
14797
14798
14799
14800# With basic setup done, call the custom early hook.
14801
14802
14803# To properly create a configuration name, we need to have the OpenJDK target
14804# and options (variants and debug level) parsed.
14805
14806
14807
14808# Check whether --with-conf-name was given.
14809if test "${with_conf_name+set}" = set; then :
14810  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
14811fi
14812
14813
14814  # Test from where we are running configure, in or outside of src root.
14815  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
14816$as_echo_n "checking where to store configuration... " >&6; }
14817  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
14818      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
14819      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
14820    # We are running configure from the src root.
14821    # Create a default ./build/target-variant-debuglevel output root.
14822    if test "x${CONF_NAME}" = x; then
14823      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
14824$as_echo "in default location" >&6; }
14825      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
14826    else
14827      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
14828$as_echo "in build directory with custom name" >&6; }
14829    fi
14830    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
14831    $MKDIR -p "$OUTPUT_ROOT"
14832    if test ! -d "$OUTPUT_ROOT"; then
14833      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
14834    fi
14835  else
14836    # We are running configure from outside of the src dir.
14837    # Then use the current directory as output dir!
14838    # If configuration is situated in normal build directory, just use the build
14839    # directory name as configuration name, otherwise use the complete path.
14840    if test "x${CONF_NAME}" = x; then
14841      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
14842    fi
14843    OUTPUT_ROOT="$CURDIR"
14844    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
14845$as_echo "in current directory" >&6; }
14846
14847    # WARNING: This might be a bad thing to do. You need to be sure you want to
14848    # have a configuration in this directory. Do some sanity checks!
14849
14850    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
14851      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
14852      # other files
14853      files_present=`$LS $OUTPUT_ROOT`
14854      # Configure has already touched config.log and confdefs.h in the current dir when this check
14855      # is performed.
14856      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
14857      | $TR -d '\n'`
14858      if test "x$filtered_files" != x; then
14859        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
14860$as_echo "$as_me: Current directory is $CURDIR." >&6;}
14861        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
14862$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
14863        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
14864$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
14865        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
14866$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
14867        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
14868$as_echo "$as_me: seriously mess up just about everything." >&6;}
14869        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
14870$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
14871        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
14872$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
14873        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
14874      fi
14875    fi
14876  fi
14877  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
14878$as_echo_n "checking what configuration name to use... " >&6; }
14879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
14880$as_echo "$CONF_NAME" >&6; }
14881
14882
14883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14884
14885  # Input might be given as Windows format, start by converting to
14886  # unix format.
14887  path="$OUTPUT_ROOT"
14888  new_path=`$CYGPATH -u "$path"`
14889
14890  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14891  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14892  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14893  # "foo.exe" is OK but "foo" is an error.
14894  #
14895  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14896  # It is also a way to make sure we got the proper file name for the real test later on.
14897  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14898  if test "x$test_shortpath" = x; then
14899    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14900$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14901    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
14902  fi
14903
14904  # Call helper function which possibly converts this using DOS-style short mode.
14905  # If so, the updated path is stored in $new_path.
14906
14907  input_path="$new_path"
14908  # Check if we need to convert this using DOS-style short mode. If the path
14909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14910  # take no chances and rewrite it.
14911  # Note: m4 eats our [], so we need to use [ and ] instead.
14912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14913  if test "x$has_forbidden_chars" != x; then
14914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14915    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14916    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14917    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14918      # Going to short mode and back again did indeed matter. Since short mode is
14919      # case insensitive, let's make it lowercase to improve readability.
14920      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14921      # Now convert it back to Unix-stile (cygpath)
14922      input_path=`$CYGPATH -u "$shortmode_path"`
14923      new_path="$input_path"
14924    fi
14925  fi
14926
14927  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14928  if test "x$test_cygdrive_prefix" = x; then
14929    # As a simple fix, exclude /usr/bin since it's not a real path.
14930    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14931      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14932      # a path prefixed by /cygdrive for fixpath to work.
14933      new_path="$CYGWIN_ROOT_PATH$input_path"
14934    fi
14935  fi
14936
14937
14938  if test "x$path" != "x$new_path"; then
14939    OUTPUT_ROOT="$new_path"
14940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14941$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14942  fi
14943
14944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14945
14946  path="$OUTPUT_ROOT"
14947  has_colon=`$ECHO $path | $GREP ^.:`
14948  new_path="$path"
14949  if test "x$has_colon" = x; then
14950    # Not in mixed or Windows style, start by that.
14951    new_path=`cmd //c echo $path`
14952  fi
14953
14954
14955  input_path="$new_path"
14956  # Check if we need to convert this using DOS-style short mode. If the path
14957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14958  # take no chances and rewrite it.
14959  # Note: m4 eats our [], so we need to use [ and ] instead.
14960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14961  if test "x$has_forbidden_chars" != x; then
14962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14963    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14964  fi
14965
14966
14967  windows_path="$new_path"
14968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14969    unix_path=`$CYGPATH -u "$windows_path"`
14970    new_path="$unix_path"
14971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14973    new_path="$unix_path"
14974  fi
14975
14976  if test "x$path" != "x$new_path"; then
14977    OUTPUT_ROOT="$new_path"
14978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14979$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14980  fi
14981
14982  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14983  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14984
14985  else
14986    # We're on a posix platform. Hooray! :)
14987    path="$OUTPUT_ROOT"
14988    has_space=`$ECHO "$path" | $GREP " "`
14989    if test "x$has_space" != x; then
14990      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14991$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14992      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14993    fi
14994
14995    # Use eval to expand a potential ~
14996    eval path="$path"
14997    if test ! -f "$path" && test ! -d "$path"; then
14998      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
14999    fi
15000
15001    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15002  fi
15003
15004
15005  SPEC=$OUTPUT_ROOT/spec.gmk
15006
15007  CONF_NAME=$CONF_NAME
15008
15009  OUTPUT_ROOT=$OUTPUT_ROOT
15010
15011
15012  # Most of the probed defines are put into config.h
15013  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
15014
15015  # The spec.gmk file contains all variables for the make system.
15016  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15017
15018  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15019  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15020
15021  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15022  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15023
15024  # The compare.sh is used to compare the build output to other builds.
15025  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15026
15027  # Spec.sh is currently used by compare-objects.sh
15028  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
15029
15030  # The generated Makefile knows where the spec.gmk is and where the source is.
15031  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15032  # which will look for generated configurations
15033  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15034
15035
15036
15037# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15038
15039  for ac_prog in apt-get yum port pkgutil pkgadd
15040do
15041  # Extract the first word of "$ac_prog", so it can be a program name with args.
15042set dummy $ac_prog; ac_word=$2
15043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15044$as_echo_n "checking for $ac_word... " >&6; }
15045if ${ac_cv_prog_PKGHANDLER+:} false; then :
15046  $as_echo_n "(cached) " >&6
15047else
15048  if test -n "$PKGHANDLER"; then
15049  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15050else
15051as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15052for as_dir in $PATH
15053do
15054  IFS=$as_save_IFS
15055  test -z "$as_dir" && as_dir=.
15056    for ac_exec_ext in '' $ac_executable_extensions; do
15057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15058    ac_cv_prog_PKGHANDLER="$ac_prog"
15059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15060    break 2
15061  fi
15062done
15063  done
15064IFS=$as_save_IFS
15065
15066fi
15067fi
15068PKGHANDLER=$ac_cv_prog_PKGHANDLER
15069if test -n "$PKGHANDLER"; then
15070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15071$as_echo "$PKGHANDLER" >&6; }
15072else
15073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15074$as_echo "no" >&6; }
15075fi
15076
15077
15078  test -n "$PKGHANDLER" && break
15079done
15080
15081
15082
15083# Setup tools that requires more complex handling, or that is not needed by the configure script.
15084
15085
15086  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15087  if test "x$MAKE" != x; then
15088    # User has supplied a make, test it.
15089    if test ! -f "$MAKE"; then
15090      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15091    fi
15092
15093  MAKE_CANDIDATE=""$MAKE""
15094  DESCRIPTION="user supplied MAKE=$MAKE"
15095  if test "x$MAKE_CANDIDATE" != x; then
15096    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15097$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15098    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15099    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15100    if test "x$IS_GNU_MAKE" = x; then
15101      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15102$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15103    else
15104      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15105      if test "x$IS_MODERN_MAKE" = x; then
15106        { $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
15107$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;}
15108      else
15109        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15110          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15111            MAKE_EXPECTED_ENV='cygwin'
15112          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15113            MAKE_EXPECTED_ENV='msys'
15114          else
15115            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15116          fi
15117          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15118          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15119        else
15120          # Not relevant for non-Windows
15121          IS_MAKE_CORRECT_ENV=true
15122        fi
15123        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15124          { $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
15125$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;}
15126        else
15127          FOUND_MAKE=$MAKE_CANDIDATE
15128
15129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15130
15131  # First separate the path from the arguments. This will split at the first
15132  # space.
15133  complete="$FOUND_MAKE"
15134  path="${complete%% *}"
15135  tmp="$complete EOL"
15136  arguments="${tmp#* }"
15137
15138  # Input might be given as Windows format, start by converting to
15139  # unix format.
15140  new_path=`$CYGPATH -u "$path"`
15141
15142  # Now try to locate executable using which
15143  new_path=`$WHICH "$new_path" 2> /dev/null`
15144  # bat and cmd files are not always considered executable in cygwin causing which
15145  # to not find them
15146  if test "x$new_path" = x \
15147      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15148      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15149    new_path=`$CYGPATH -u "$path"`
15150  fi
15151  if test "x$new_path" = x; then
15152    # Oops. Which didn't find the executable.
15153    # The splitting of arguments from the executable at a space might have been incorrect,
15154    # since paths with space are more likely in Windows. Give it another try with the whole
15155    # argument.
15156    path="$complete"
15157    arguments="EOL"
15158    new_path=`$CYGPATH -u "$path"`
15159    new_path=`$WHICH "$new_path" 2> /dev/null`
15160    # bat and cmd files are not always considered executable in cygwin causing which
15161    # to not find them
15162    if test "x$new_path" = x \
15163        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15164        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15165      new_path=`$CYGPATH -u "$path"`
15166    fi
15167    if test "x$new_path" = x; then
15168      # It's still not found. Now this is an unrecoverable error.
15169      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15170$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15171      has_space=`$ECHO "$complete" | $GREP " "`
15172      if test "x$has_space" != x; then
15173        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15174$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15175      fi
15176      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15177    fi
15178  fi
15179
15180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15183  # "foo.exe" is OK but "foo" is an error.
15184  #
15185  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15186  # It is also a way to make sure we got the proper file name for the real test later on.
15187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15188  if test "x$test_shortpath" = x; then
15189    # Short path failed, file does not exist as specified.
15190    # Try adding .exe or .cmd
15191    if test -f "${new_path}.exe"; then
15192      input_to_shortpath="${new_path}.exe"
15193    elif test -f "${new_path}.cmd"; then
15194      input_to_shortpath="${new_path}.cmd"
15195    else
15196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15197$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15198      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15199$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15200      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15201    fi
15202  else
15203    input_to_shortpath="$new_path"
15204  fi
15205
15206  # Call helper function which possibly converts this using DOS-style short mode.
15207  # If so, the updated path is stored in $new_path.
15208  new_path="$input_to_shortpath"
15209
15210  input_path="$input_to_shortpath"
15211  # Check if we need to convert this using DOS-style short mode. If the path
15212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15213  # take no chances and rewrite it.
15214  # Note: m4 eats our [], so we need to use [ and ] instead.
15215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15216  if test "x$has_forbidden_chars" != x; then
15217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15218    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15219    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15220    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15221      # Going to short mode and back again did indeed matter. Since short mode is
15222      # case insensitive, let's make it lowercase to improve readability.
15223      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15224      # Now convert it back to Unix-stile (cygpath)
15225      input_path=`$CYGPATH -u "$shortmode_path"`
15226      new_path="$input_path"
15227    fi
15228  fi
15229
15230  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15231  if test "x$test_cygdrive_prefix" = x; then
15232    # As a simple fix, exclude /usr/bin since it's not a real path.
15233    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15234      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15235      # a path prefixed by /cygdrive for fixpath to work.
15236      new_path="$CYGWIN_ROOT_PATH$input_path"
15237    fi
15238  fi
15239
15240  # remove trailing .exe if any
15241  new_path="${new_path/%.exe/}"
15242
15243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15244
15245  # First separate the path from the arguments. This will split at the first
15246  # space.
15247  complete="$FOUND_MAKE"
15248  path="${complete%% *}"
15249  tmp="$complete EOL"
15250  arguments="${tmp#* }"
15251
15252  # Input might be given as Windows format, start by converting to
15253  # unix format.
15254  new_path="$path"
15255
15256  windows_path="$new_path"
15257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15258    unix_path=`$CYGPATH -u "$windows_path"`
15259    new_path="$unix_path"
15260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15262    new_path="$unix_path"
15263  fi
15264
15265
15266  # Now try to locate executable using which
15267  new_path=`$WHICH "$new_path" 2> /dev/null`
15268
15269  if test "x$new_path" = x; then
15270    # Oops. Which didn't find the executable.
15271    # The splitting of arguments from the executable at a space might have been incorrect,
15272    # since paths with space are more likely in Windows. Give it another try with the whole
15273    # argument.
15274    path="$complete"
15275    arguments="EOL"
15276    new_path="$path"
15277
15278  windows_path="$new_path"
15279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15280    unix_path=`$CYGPATH -u "$windows_path"`
15281    new_path="$unix_path"
15282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15284    new_path="$unix_path"
15285  fi
15286
15287
15288    new_path=`$WHICH "$new_path" 2> /dev/null`
15289
15290    if test "x$new_path" = x; then
15291      # It's still not found. Now this is an unrecoverable error.
15292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15293$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15294      has_space=`$ECHO "$complete" | $GREP " "`
15295      if test "x$has_space" != x; then
15296        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15297$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15298      fi
15299      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15300    fi
15301  fi
15302
15303  # Now new_path has a complete unix path to the binary
15304  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15305    # Keep paths in /bin as-is, but remove trailing .exe if any
15306    new_path="${new_path/%.exe/}"
15307    # Do not save /bin paths to all_fixpath_prefixes!
15308  else
15309    # Not in mixed or Windows style, start by that.
15310    new_path=`cmd //c echo $new_path`
15311
15312  input_path="$new_path"
15313  # Check if we need to convert this using DOS-style short mode. If the path
15314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15315  # take no chances and rewrite it.
15316  # Note: m4 eats our [], so we need to use [ and ] instead.
15317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15318  if test "x$has_forbidden_chars" != x; then
15319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15320    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15321  fi
15322
15323    # Output is in $new_path
15324
15325  windows_path="$new_path"
15326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15327    unix_path=`$CYGPATH -u "$windows_path"`
15328    new_path="$unix_path"
15329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15331    new_path="$unix_path"
15332  fi
15333
15334    # remove trailing .exe if any
15335    new_path="${new_path/%.exe/}"
15336
15337    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15338    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15339  fi
15340
15341  else
15342    # We're on a posix platform. Hooray! :)
15343    # First separate the path from the arguments. This will split at the first
15344    # space.
15345    complete="$FOUND_MAKE"
15346    path="${complete%% *}"
15347    tmp="$complete EOL"
15348    arguments="${tmp#* }"
15349
15350    # Cannot rely on the command "which" here since it doesn't always work.
15351    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15352    if test -z "$is_absolute_path"; then
15353      # Path to executable is not absolute. Find it.
15354      IFS_save="$IFS"
15355      IFS=:
15356      for p in $PATH; do
15357        if test -f "$p/$path" && test -x "$p/$path"; then
15358          new_path="$p/$path"
15359          break
15360        fi
15361      done
15362      IFS="$IFS_save"
15363    else
15364      # This is an absolute path, we can use it without further modifications.
15365      new_path="$path"
15366    fi
15367
15368    if test "x$new_path" = x; then
15369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15370$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15371      has_space=`$ECHO "$complete" | $GREP " "`
15372      if test "x$has_space" != x; then
15373        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15374$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15375      fi
15376      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15377    fi
15378  fi
15379
15380  # Now join together the path and the arguments once again
15381  if test "x$arguments" != xEOL; then
15382    new_complete="$new_path ${arguments% *}"
15383  else
15384    new_complete="$new_path"
15385  fi
15386
15387  if test "x$complete" != "x$new_complete"; then
15388    FOUND_MAKE="$new_complete"
15389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15390$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15391  fi
15392
15393        fi
15394      fi
15395    fi
15396  fi
15397
15398    if test "x$FOUND_MAKE" = x; then
15399      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15400    fi
15401  else
15402    # Try our hardest to locate a correct version of GNU make
15403    for ac_prog in gmake
15404do
15405  # Extract the first word of "$ac_prog", so it can be a program name with args.
15406set dummy $ac_prog; ac_word=$2
15407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15408$as_echo_n "checking for $ac_word... " >&6; }
15409if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15410  $as_echo_n "(cached) " >&6
15411else
15412  case $CHECK_GMAKE in
15413  [\\/]* | ?:[\\/]*)
15414  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15415  ;;
15416  *)
15417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15418for as_dir in $PATH
15419do
15420  IFS=$as_save_IFS
15421  test -z "$as_dir" && as_dir=.
15422    for ac_exec_ext in '' $ac_executable_extensions; do
15423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15424    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15426    break 2
15427  fi
15428done
15429  done
15430IFS=$as_save_IFS
15431
15432  ;;
15433esac
15434fi
15435CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15436if test -n "$CHECK_GMAKE"; then
15437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15438$as_echo "$CHECK_GMAKE" >&6; }
15439else
15440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15441$as_echo "no" >&6; }
15442fi
15443
15444
15445  test -n "$CHECK_GMAKE" && break
15446done
15447
15448
15449  MAKE_CANDIDATE=""$CHECK_GMAKE""
15450  DESCRIPTION="gmake in PATH"
15451  if test "x$MAKE_CANDIDATE" != x; then
15452    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15453$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15454    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15455    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15456    if test "x$IS_GNU_MAKE" = x; then
15457      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15458$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15459    else
15460      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15461      if test "x$IS_MODERN_MAKE" = x; then
15462        { $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
15463$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;}
15464      else
15465        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15466          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15467            MAKE_EXPECTED_ENV='cygwin'
15468          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15469            MAKE_EXPECTED_ENV='msys'
15470          else
15471            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15472          fi
15473          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15474          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15475        else
15476          # Not relevant for non-Windows
15477          IS_MAKE_CORRECT_ENV=true
15478        fi
15479        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15480          { $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
15481$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;}
15482        else
15483          FOUND_MAKE=$MAKE_CANDIDATE
15484
15485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15486
15487  # First separate the path from the arguments. This will split at the first
15488  # space.
15489  complete="$FOUND_MAKE"
15490  path="${complete%% *}"
15491  tmp="$complete EOL"
15492  arguments="${tmp#* }"
15493
15494  # Input might be given as Windows format, start by converting to
15495  # unix format.
15496  new_path=`$CYGPATH -u "$path"`
15497
15498  # Now try to locate executable using which
15499  new_path=`$WHICH "$new_path" 2> /dev/null`
15500  # bat and cmd files are not always considered executable in cygwin causing which
15501  # to not find them
15502  if test "x$new_path" = x \
15503      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15504      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15505    new_path=`$CYGPATH -u "$path"`
15506  fi
15507  if test "x$new_path" = x; then
15508    # Oops. Which didn't find the executable.
15509    # The splitting of arguments from the executable at a space might have been incorrect,
15510    # since paths with space are more likely in Windows. Give it another try with the whole
15511    # argument.
15512    path="$complete"
15513    arguments="EOL"
15514    new_path=`$CYGPATH -u "$path"`
15515    new_path=`$WHICH "$new_path" 2> /dev/null`
15516    # bat and cmd files are not always considered executable in cygwin causing which
15517    # to not find them
15518    if test "x$new_path" = x \
15519        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15520        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15521      new_path=`$CYGPATH -u "$path"`
15522    fi
15523    if test "x$new_path" = x; then
15524      # It's still not found. Now this is an unrecoverable error.
15525      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15526$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15527      has_space=`$ECHO "$complete" | $GREP " "`
15528      if test "x$has_space" != x; then
15529        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15530$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15531      fi
15532      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15533    fi
15534  fi
15535
15536  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15537  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15538  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15539  # "foo.exe" is OK but "foo" is an error.
15540  #
15541  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15542  # It is also a way to make sure we got the proper file name for the real test later on.
15543  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15544  if test "x$test_shortpath" = x; then
15545    # Short path failed, file does not exist as specified.
15546    # Try adding .exe or .cmd
15547    if test -f "${new_path}.exe"; then
15548      input_to_shortpath="${new_path}.exe"
15549    elif test -f "${new_path}.cmd"; then
15550      input_to_shortpath="${new_path}.cmd"
15551    else
15552      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15553$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15554      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15555$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15556      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15557    fi
15558  else
15559    input_to_shortpath="$new_path"
15560  fi
15561
15562  # Call helper function which possibly converts this using DOS-style short mode.
15563  # If so, the updated path is stored in $new_path.
15564  new_path="$input_to_shortpath"
15565
15566  input_path="$input_to_shortpath"
15567  # Check if we need to convert this using DOS-style short mode. If the path
15568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15569  # take no chances and rewrite it.
15570  # Note: m4 eats our [], so we need to use [ and ] instead.
15571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15572  if test "x$has_forbidden_chars" != x; then
15573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15574    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15575    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15576    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15577      # Going to short mode and back again did indeed matter. Since short mode is
15578      # case insensitive, let's make it lowercase to improve readability.
15579      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15580      # Now convert it back to Unix-stile (cygpath)
15581      input_path=`$CYGPATH -u "$shortmode_path"`
15582      new_path="$input_path"
15583    fi
15584  fi
15585
15586  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15587  if test "x$test_cygdrive_prefix" = x; then
15588    # As a simple fix, exclude /usr/bin since it's not a real path.
15589    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15590      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15591      # a path prefixed by /cygdrive for fixpath to work.
15592      new_path="$CYGWIN_ROOT_PATH$input_path"
15593    fi
15594  fi
15595
15596  # remove trailing .exe if any
15597  new_path="${new_path/%.exe/}"
15598
15599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15600
15601  # First separate the path from the arguments. This will split at the first
15602  # space.
15603  complete="$FOUND_MAKE"
15604  path="${complete%% *}"
15605  tmp="$complete EOL"
15606  arguments="${tmp#* }"
15607
15608  # Input might be given as Windows format, start by converting to
15609  # unix format.
15610  new_path="$path"
15611
15612  windows_path="$new_path"
15613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15614    unix_path=`$CYGPATH -u "$windows_path"`
15615    new_path="$unix_path"
15616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15618    new_path="$unix_path"
15619  fi
15620
15621
15622  # Now try to locate executable using which
15623  new_path=`$WHICH "$new_path" 2> /dev/null`
15624
15625  if test "x$new_path" = x; then
15626    # Oops. Which didn't find the executable.
15627    # The splitting of arguments from the executable at a space might have been incorrect,
15628    # since paths with space are more likely in Windows. Give it another try with the whole
15629    # argument.
15630    path="$complete"
15631    arguments="EOL"
15632    new_path="$path"
15633
15634  windows_path="$new_path"
15635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15636    unix_path=`$CYGPATH -u "$windows_path"`
15637    new_path="$unix_path"
15638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15640    new_path="$unix_path"
15641  fi
15642
15643
15644    new_path=`$WHICH "$new_path" 2> /dev/null`
15645
15646    if test "x$new_path" = x; then
15647      # It's still not found. Now this is an unrecoverable error.
15648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15649$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15650      has_space=`$ECHO "$complete" | $GREP " "`
15651      if test "x$has_space" != x; then
15652        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15653$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15654      fi
15655      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15656    fi
15657  fi
15658
15659  # Now new_path has a complete unix path to the binary
15660  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15661    # Keep paths in /bin as-is, but remove trailing .exe if any
15662    new_path="${new_path/%.exe/}"
15663    # Do not save /bin paths to all_fixpath_prefixes!
15664  else
15665    # Not in mixed or Windows style, start by that.
15666    new_path=`cmd //c echo $new_path`
15667
15668  input_path="$new_path"
15669  # Check if we need to convert this using DOS-style short mode. If the path
15670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15671  # take no chances and rewrite it.
15672  # Note: m4 eats our [], so we need to use [ and ] instead.
15673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15674  if test "x$has_forbidden_chars" != x; then
15675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15676    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15677  fi
15678
15679    # Output is in $new_path
15680
15681  windows_path="$new_path"
15682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15683    unix_path=`$CYGPATH -u "$windows_path"`
15684    new_path="$unix_path"
15685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15687    new_path="$unix_path"
15688  fi
15689
15690    # remove trailing .exe if any
15691    new_path="${new_path/%.exe/}"
15692
15693    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15694    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15695  fi
15696
15697  else
15698    # We're on a posix platform. Hooray! :)
15699    # First separate the path from the arguments. This will split at the first
15700    # space.
15701    complete="$FOUND_MAKE"
15702    path="${complete%% *}"
15703    tmp="$complete EOL"
15704    arguments="${tmp#* }"
15705
15706    # Cannot rely on the command "which" here since it doesn't always work.
15707    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15708    if test -z "$is_absolute_path"; then
15709      # Path to executable is not absolute. Find it.
15710      IFS_save="$IFS"
15711      IFS=:
15712      for p in $PATH; do
15713        if test -f "$p/$path" && test -x "$p/$path"; then
15714          new_path="$p/$path"
15715          break
15716        fi
15717      done
15718      IFS="$IFS_save"
15719    else
15720      # This is an absolute path, we can use it without further modifications.
15721      new_path="$path"
15722    fi
15723
15724    if test "x$new_path" = x; then
15725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15726$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15727      has_space=`$ECHO "$complete" | $GREP " "`
15728      if test "x$has_space" != x; then
15729        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15730$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15731      fi
15732      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15733    fi
15734  fi
15735
15736  # Now join together the path and the arguments once again
15737  if test "x$arguments" != xEOL; then
15738    new_complete="$new_path ${arguments% *}"
15739  else
15740    new_complete="$new_path"
15741  fi
15742
15743  if test "x$complete" != "x$new_complete"; then
15744    FOUND_MAKE="$new_complete"
15745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15746$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15747  fi
15748
15749        fi
15750      fi
15751    fi
15752  fi
15753
15754
15755    if test "x$FOUND_MAKE" = x; then
15756      for ac_prog in make
15757do
15758  # Extract the first word of "$ac_prog", so it can be a program name with args.
15759set dummy $ac_prog; ac_word=$2
15760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15761$as_echo_n "checking for $ac_word... " >&6; }
15762if ${ac_cv_path_CHECK_MAKE+:} false; then :
15763  $as_echo_n "(cached) " >&6
15764else
15765  case $CHECK_MAKE in
15766  [\\/]* | ?:[\\/]*)
15767  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
15768  ;;
15769  *)
15770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15771for as_dir in $PATH
15772do
15773  IFS=$as_save_IFS
15774  test -z "$as_dir" && as_dir=.
15775    for ac_exec_ext in '' $ac_executable_extensions; do
15776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15777    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
15778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15779    break 2
15780  fi
15781done
15782  done
15783IFS=$as_save_IFS
15784
15785  ;;
15786esac
15787fi
15788CHECK_MAKE=$ac_cv_path_CHECK_MAKE
15789if test -n "$CHECK_MAKE"; then
15790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
15791$as_echo "$CHECK_MAKE" >&6; }
15792else
15793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15794$as_echo "no" >&6; }
15795fi
15796
15797
15798  test -n "$CHECK_MAKE" && break
15799done
15800
15801
15802  MAKE_CANDIDATE=""$CHECK_MAKE""
15803  DESCRIPTION="make in PATH"
15804  if test "x$MAKE_CANDIDATE" != x; then
15805    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15806$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15807    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15808    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15809    if test "x$IS_GNU_MAKE" = x; then
15810      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15811$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15812    else
15813      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15814      if test "x$IS_MODERN_MAKE" = x; then
15815        { $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
15816$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;}
15817      else
15818        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15819          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15820            MAKE_EXPECTED_ENV='cygwin'
15821          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15822            MAKE_EXPECTED_ENV='msys'
15823          else
15824            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15825          fi
15826          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15827          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15828        else
15829          # Not relevant for non-Windows
15830          IS_MAKE_CORRECT_ENV=true
15831        fi
15832        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15833          { $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
15834$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;}
15835        else
15836          FOUND_MAKE=$MAKE_CANDIDATE
15837
15838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15839
15840  # First separate the path from the arguments. This will split at the first
15841  # space.
15842  complete="$FOUND_MAKE"
15843  path="${complete%% *}"
15844  tmp="$complete EOL"
15845  arguments="${tmp#* }"
15846
15847  # Input might be given as Windows format, start by converting to
15848  # unix format.
15849  new_path=`$CYGPATH -u "$path"`
15850
15851  # Now try to locate executable using which
15852  new_path=`$WHICH "$new_path" 2> /dev/null`
15853  # bat and cmd files are not always considered executable in cygwin causing which
15854  # to not find them
15855  if test "x$new_path" = x \
15856      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15857      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15858    new_path=`$CYGPATH -u "$path"`
15859  fi
15860  if test "x$new_path" = x; then
15861    # Oops. Which didn't find the executable.
15862    # The splitting of arguments from the executable at a space might have been incorrect,
15863    # since paths with space are more likely in Windows. Give it another try with the whole
15864    # argument.
15865    path="$complete"
15866    arguments="EOL"
15867    new_path=`$CYGPATH -u "$path"`
15868    new_path=`$WHICH "$new_path" 2> /dev/null`
15869    # bat and cmd files are not always considered executable in cygwin causing which
15870    # to not find them
15871    if test "x$new_path" = x \
15872        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15873        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15874      new_path=`$CYGPATH -u "$path"`
15875    fi
15876    if test "x$new_path" = x; then
15877      # It's still not found. Now this is an unrecoverable error.
15878      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15879$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15880      has_space=`$ECHO "$complete" | $GREP " "`
15881      if test "x$has_space" != x; then
15882        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15883$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15884      fi
15885      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15886    fi
15887  fi
15888
15889  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15890  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15891  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15892  # "foo.exe" is OK but "foo" is an error.
15893  #
15894  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15895  # It is also a way to make sure we got the proper file name for the real test later on.
15896  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15897  if test "x$test_shortpath" = x; then
15898    # Short path failed, file does not exist as specified.
15899    # Try adding .exe or .cmd
15900    if test -f "${new_path}.exe"; then
15901      input_to_shortpath="${new_path}.exe"
15902    elif test -f "${new_path}.cmd"; then
15903      input_to_shortpath="${new_path}.cmd"
15904    else
15905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15906$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15907      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15908$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15909      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15910    fi
15911  else
15912    input_to_shortpath="$new_path"
15913  fi
15914
15915  # Call helper function which possibly converts this using DOS-style short mode.
15916  # If so, the updated path is stored in $new_path.
15917  new_path="$input_to_shortpath"
15918
15919  input_path="$input_to_shortpath"
15920  # Check if we need to convert this using DOS-style short mode. If the path
15921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15922  # take no chances and rewrite it.
15923  # Note: m4 eats our [], so we need to use [ and ] instead.
15924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15925  if test "x$has_forbidden_chars" != x; then
15926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15927    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15928    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15929    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15930      # Going to short mode and back again did indeed matter. Since short mode is
15931      # case insensitive, let's make it lowercase to improve readability.
15932      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15933      # Now convert it back to Unix-stile (cygpath)
15934      input_path=`$CYGPATH -u "$shortmode_path"`
15935      new_path="$input_path"
15936    fi
15937  fi
15938
15939  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15940  if test "x$test_cygdrive_prefix" = x; then
15941    # As a simple fix, exclude /usr/bin since it's not a real path.
15942    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15943      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15944      # a path prefixed by /cygdrive for fixpath to work.
15945      new_path="$CYGWIN_ROOT_PATH$input_path"
15946    fi
15947  fi
15948
15949  # remove trailing .exe if any
15950  new_path="${new_path/%.exe/}"
15951
15952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15953
15954  # First separate the path from the arguments. This will split at the first
15955  # space.
15956  complete="$FOUND_MAKE"
15957  path="${complete%% *}"
15958  tmp="$complete EOL"
15959  arguments="${tmp#* }"
15960
15961  # Input might be given as Windows format, start by converting to
15962  # unix format.
15963  new_path="$path"
15964
15965  windows_path="$new_path"
15966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15967    unix_path=`$CYGPATH -u "$windows_path"`
15968    new_path="$unix_path"
15969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15971    new_path="$unix_path"
15972  fi
15973
15974
15975  # Now try to locate executable using which
15976  new_path=`$WHICH "$new_path" 2> /dev/null`
15977
15978  if test "x$new_path" = x; then
15979    # Oops. Which didn't find the executable.
15980    # The splitting of arguments from the executable at a space might have been incorrect,
15981    # since paths with space are more likely in Windows. Give it another try with the whole
15982    # argument.
15983    path="$complete"
15984    arguments="EOL"
15985    new_path="$path"
15986
15987  windows_path="$new_path"
15988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15989    unix_path=`$CYGPATH -u "$windows_path"`
15990    new_path="$unix_path"
15991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15993    new_path="$unix_path"
15994  fi
15995
15996
15997    new_path=`$WHICH "$new_path" 2> /dev/null`
15998
15999    if test "x$new_path" = x; then
16000      # It's still not found. Now this is an unrecoverable error.
16001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16002$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16003      has_space=`$ECHO "$complete" | $GREP " "`
16004      if test "x$has_space" != x; then
16005        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16006$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16007      fi
16008      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16009    fi
16010  fi
16011
16012  # Now new_path has a complete unix path to the binary
16013  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16014    # Keep paths in /bin as-is, but remove trailing .exe if any
16015    new_path="${new_path/%.exe/}"
16016    # Do not save /bin paths to all_fixpath_prefixes!
16017  else
16018    # Not in mixed or Windows style, start by that.
16019    new_path=`cmd //c echo $new_path`
16020
16021  input_path="$new_path"
16022  # Check if we need to convert this using DOS-style short mode. If the path
16023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16024  # take no chances and rewrite it.
16025  # Note: m4 eats our [], so we need to use [ and ] instead.
16026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16027  if test "x$has_forbidden_chars" != x; then
16028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16029    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16030  fi
16031
16032    # Output is in $new_path
16033
16034  windows_path="$new_path"
16035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16036    unix_path=`$CYGPATH -u "$windows_path"`
16037    new_path="$unix_path"
16038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16040    new_path="$unix_path"
16041  fi
16042
16043    # remove trailing .exe if any
16044    new_path="${new_path/%.exe/}"
16045
16046    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16047    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16048  fi
16049
16050  else
16051    # We're on a posix platform. Hooray! :)
16052    # First separate the path from the arguments. This will split at the first
16053    # space.
16054    complete="$FOUND_MAKE"
16055    path="${complete%% *}"
16056    tmp="$complete EOL"
16057    arguments="${tmp#* }"
16058
16059    # Cannot rely on the command "which" here since it doesn't always work.
16060    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16061    if test -z "$is_absolute_path"; then
16062      # Path to executable is not absolute. Find it.
16063      IFS_save="$IFS"
16064      IFS=:
16065      for p in $PATH; do
16066        if test -f "$p/$path" && test -x "$p/$path"; then
16067          new_path="$p/$path"
16068          break
16069        fi
16070      done
16071      IFS="$IFS_save"
16072    else
16073      # This is an absolute path, we can use it without further modifications.
16074      new_path="$path"
16075    fi
16076
16077    if test "x$new_path" = x; then
16078      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16079$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16080      has_space=`$ECHO "$complete" | $GREP " "`
16081      if test "x$has_space" != x; then
16082        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16083$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16084      fi
16085      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16086    fi
16087  fi
16088
16089  # Now join together the path and the arguments once again
16090  if test "x$arguments" != xEOL; then
16091    new_complete="$new_path ${arguments% *}"
16092  else
16093    new_complete="$new_path"
16094  fi
16095
16096  if test "x$complete" != "x$new_complete"; then
16097    FOUND_MAKE="$new_complete"
16098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16099$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16100  fi
16101
16102        fi
16103      fi
16104    fi
16105  fi
16106
16107    fi
16108
16109    if test "x$FOUND_MAKE" = x; then
16110      if test "x$TOOLS_DIR" != x; then
16111        # We have a tools-dir, check that as well before giving up.
16112        OLD_PATH=$PATH
16113        PATH=$TOOLS_DIR:$PATH
16114        for ac_prog in gmake
16115do
16116  # Extract the first word of "$ac_prog", so it can be a program name with args.
16117set dummy $ac_prog; ac_word=$2
16118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16119$as_echo_n "checking for $ac_word... " >&6; }
16120if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16121  $as_echo_n "(cached) " >&6
16122else
16123  case $CHECK_TOOLSDIR_GMAKE in
16124  [\\/]* | ?:[\\/]*)
16125  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16126  ;;
16127  *)
16128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16129for as_dir in $PATH
16130do
16131  IFS=$as_save_IFS
16132  test -z "$as_dir" && as_dir=.
16133    for ac_exec_ext in '' $ac_executable_extensions; do
16134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16135    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16137    break 2
16138  fi
16139done
16140  done
16141IFS=$as_save_IFS
16142
16143  ;;
16144esac
16145fi
16146CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16147if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16149$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16150else
16151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16152$as_echo "no" >&6; }
16153fi
16154
16155
16156  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16157done
16158
16159
16160  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16161  DESCRIPTION="gmake in tools-dir"
16162  if test "x$MAKE_CANDIDATE" != x; then
16163    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16164$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16165    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16166    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16167    if test "x$IS_GNU_MAKE" = x; then
16168      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16169$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16170    else
16171      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16172      if test "x$IS_MODERN_MAKE" = x; then
16173        { $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
16174$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;}
16175      else
16176        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16177          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16178            MAKE_EXPECTED_ENV='cygwin'
16179          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16180            MAKE_EXPECTED_ENV='msys'
16181          else
16182            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16183          fi
16184          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16185          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16186        else
16187          # Not relevant for non-Windows
16188          IS_MAKE_CORRECT_ENV=true
16189        fi
16190        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16191          { $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
16192$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;}
16193        else
16194          FOUND_MAKE=$MAKE_CANDIDATE
16195
16196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16197
16198  # First separate the path from the arguments. This will split at the first
16199  # space.
16200  complete="$FOUND_MAKE"
16201  path="${complete%% *}"
16202  tmp="$complete EOL"
16203  arguments="${tmp#* }"
16204
16205  # Input might be given as Windows format, start by converting to
16206  # unix format.
16207  new_path=`$CYGPATH -u "$path"`
16208
16209  # Now try to locate executable using which
16210  new_path=`$WHICH "$new_path" 2> /dev/null`
16211  # bat and cmd files are not always considered executable in cygwin causing which
16212  # to not find them
16213  if test "x$new_path" = x \
16214      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16215      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16216    new_path=`$CYGPATH -u "$path"`
16217  fi
16218  if test "x$new_path" = x; then
16219    # Oops. Which didn't find the executable.
16220    # The splitting of arguments from the executable at a space might have been incorrect,
16221    # since paths with space are more likely in Windows. Give it another try with the whole
16222    # argument.
16223    path="$complete"
16224    arguments="EOL"
16225    new_path=`$CYGPATH -u "$path"`
16226    new_path=`$WHICH "$new_path" 2> /dev/null`
16227    # bat and cmd files are not always considered executable in cygwin causing which
16228    # to not find them
16229    if test "x$new_path" = x \
16230        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16231        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16232      new_path=`$CYGPATH -u "$path"`
16233    fi
16234    if test "x$new_path" = x; then
16235      # It's still not found. Now this is an unrecoverable error.
16236      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16237$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16238      has_space=`$ECHO "$complete" | $GREP " "`
16239      if test "x$has_space" != x; then
16240        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16241$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16242      fi
16243      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16244    fi
16245  fi
16246
16247  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16248  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16249  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16250  # "foo.exe" is OK but "foo" is an error.
16251  #
16252  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16253  # It is also a way to make sure we got the proper file name for the real test later on.
16254  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16255  if test "x$test_shortpath" = x; then
16256    # Short path failed, file does not exist as specified.
16257    # Try adding .exe or .cmd
16258    if test -f "${new_path}.exe"; then
16259      input_to_shortpath="${new_path}.exe"
16260    elif test -f "${new_path}.cmd"; then
16261      input_to_shortpath="${new_path}.cmd"
16262    else
16263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16264$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16265      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16266$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16267      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16268    fi
16269  else
16270    input_to_shortpath="$new_path"
16271  fi
16272
16273  # Call helper function which possibly converts this using DOS-style short mode.
16274  # If so, the updated path is stored in $new_path.
16275  new_path="$input_to_shortpath"
16276
16277  input_path="$input_to_shortpath"
16278  # Check if we need to convert this using DOS-style short mode. If the path
16279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16280  # take no chances and rewrite it.
16281  # Note: m4 eats our [], so we need to use [ and ] instead.
16282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16283  if test "x$has_forbidden_chars" != x; then
16284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16285    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16286    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16287    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16288      # Going to short mode and back again did indeed matter. Since short mode is
16289      # case insensitive, let's make it lowercase to improve readability.
16290      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16291      # Now convert it back to Unix-stile (cygpath)
16292      input_path=`$CYGPATH -u "$shortmode_path"`
16293      new_path="$input_path"
16294    fi
16295  fi
16296
16297  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16298  if test "x$test_cygdrive_prefix" = x; then
16299    # As a simple fix, exclude /usr/bin since it's not a real path.
16300    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16301      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16302      # a path prefixed by /cygdrive for fixpath to work.
16303      new_path="$CYGWIN_ROOT_PATH$input_path"
16304    fi
16305  fi
16306
16307  # remove trailing .exe if any
16308  new_path="${new_path/%.exe/}"
16309
16310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16311
16312  # First separate the path from the arguments. This will split at the first
16313  # space.
16314  complete="$FOUND_MAKE"
16315  path="${complete%% *}"
16316  tmp="$complete EOL"
16317  arguments="${tmp#* }"
16318
16319  # Input might be given as Windows format, start by converting to
16320  # unix format.
16321  new_path="$path"
16322
16323  windows_path="$new_path"
16324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16325    unix_path=`$CYGPATH -u "$windows_path"`
16326    new_path="$unix_path"
16327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16329    new_path="$unix_path"
16330  fi
16331
16332
16333  # Now try to locate executable using which
16334  new_path=`$WHICH "$new_path" 2> /dev/null`
16335
16336  if test "x$new_path" = x; then
16337    # Oops. Which didn't find the executable.
16338    # The splitting of arguments from the executable at a space might have been incorrect,
16339    # since paths with space are more likely in Windows. Give it another try with the whole
16340    # argument.
16341    path="$complete"
16342    arguments="EOL"
16343    new_path="$path"
16344
16345  windows_path="$new_path"
16346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16347    unix_path=`$CYGPATH -u "$windows_path"`
16348    new_path="$unix_path"
16349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16351    new_path="$unix_path"
16352  fi
16353
16354
16355    new_path=`$WHICH "$new_path" 2> /dev/null`
16356
16357    if test "x$new_path" = x; then
16358      # It's still not found. Now this is an unrecoverable error.
16359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16360$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16361      has_space=`$ECHO "$complete" | $GREP " "`
16362      if test "x$has_space" != x; then
16363        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16364$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16365      fi
16366      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16367    fi
16368  fi
16369
16370  # Now new_path has a complete unix path to the binary
16371  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16372    # Keep paths in /bin as-is, but remove trailing .exe if any
16373    new_path="${new_path/%.exe/}"
16374    # Do not save /bin paths to all_fixpath_prefixes!
16375  else
16376    # Not in mixed or Windows style, start by that.
16377    new_path=`cmd //c echo $new_path`
16378
16379  input_path="$new_path"
16380  # Check if we need to convert this using DOS-style short mode. If the path
16381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16382  # take no chances and rewrite it.
16383  # Note: m4 eats our [], so we need to use [ and ] instead.
16384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16385  if test "x$has_forbidden_chars" != x; then
16386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16387    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16388  fi
16389
16390    # Output is in $new_path
16391
16392  windows_path="$new_path"
16393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16394    unix_path=`$CYGPATH -u "$windows_path"`
16395    new_path="$unix_path"
16396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16398    new_path="$unix_path"
16399  fi
16400
16401    # remove trailing .exe if any
16402    new_path="${new_path/%.exe/}"
16403
16404    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16405    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16406  fi
16407
16408  else
16409    # We're on a posix platform. Hooray! :)
16410    # First separate the path from the arguments. This will split at the first
16411    # space.
16412    complete="$FOUND_MAKE"
16413    path="${complete%% *}"
16414    tmp="$complete EOL"
16415    arguments="${tmp#* }"
16416
16417    # Cannot rely on the command "which" here since it doesn't always work.
16418    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16419    if test -z "$is_absolute_path"; then
16420      # Path to executable is not absolute. Find it.
16421      IFS_save="$IFS"
16422      IFS=:
16423      for p in $PATH; do
16424        if test -f "$p/$path" && test -x "$p/$path"; then
16425          new_path="$p/$path"
16426          break
16427        fi
16428      done
16429      IFS="$IFS_save"
16430    else
16431      # This is an absolute path, we can use it without further modifications.
16432      new_path="$path"
16433    fi
16434
16435    if test "x$new_path" = x; then
16436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16437$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16438      has_space=`$ECHO "$complete" | $GREP " "`
16439      if test "x$has_space" != x; then
16440        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16441$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16442      fi
16443      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16444    fi
16445  fi
16446
16447  # Now join together the path and the arguments once again
16448  if test "x$arguments" != xEOL; then
16449    new_complete="$new_path ${arguments% *}"
16450  else
16451    new_complete="$new_path"
16452  fi
16453
16454  if test "x$complete" != "x$new_complete"; then
16455    FOUND_MAKE="$new_complete"
16456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16457$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16458  fi
16459
16460        fi
16461      fi
16462    fi
16463  fi
16464
16465        if test "x$FOUND_MAKE" = x; then
16466          for ac_prog in make
16467do
16468  # Extract the first word of "$ac_prog", so it can be a program name with args.
16469set dummy $ac_prog; ac_word=$2
16470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16471$as_echo_n "checking for $ac_word... " >&6; }
16472if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16473  $as_echo_n "(cached) " >&6
16474else
16475  case $CHECK_TOOLSDIR_MAKE in
16476  [\\/]* | ?:[\\/]*)
16477  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16478  ;;
16479  *)
16480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16481for as_dir in $PATH
16482do
16483  IFS=$as_save_IFS
16484  test -z "$as_dir" && as_dir=.
16485    for ac_exec_ext in '' $ac_executable_extensions; do
16486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16487    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16489    break 2
16490  fi
16491done
16492  done
16493IFS=$as_save_IFS
16494
16495  ;;
16496esac
16497fi
16498CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16499if test -n "$CHECK_TOOLSDIR_MAKE"; then
16500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16501$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16502else
16503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16504$as_echo "no" >&6; }
16505fi
16506
16507
16508  test -n "$CHECK_TOOLSDIR_MAKE" && break
16509done
16510
16511
16512  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16513  DESCRIPTION="make in tools-dir"
16514  if test "x$MAKE_CANDIDATE" != x; then
16515    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16516$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16517    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16518    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16519    if test "x$IS_GNU_MAKE" = x; then
16520      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16521$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16522    else
16523      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16524      if test "x$IS_MODERN_MAKE" = x; then
16525        { $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
16526$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;}
16527      else
16528        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16529          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16530            MAKE_EXPECTED_ENV='cygwin'
16531          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16532            MAKE_EXPECTED_ENV='msys'
16533          else
16534            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16535          fi
16536          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16537          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16538        else
16539          # Not relevant for non-Windows
16540          IS_MAKE_CORRECT_ENV=true
16541        fi
16542        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16543          { $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
16544$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;}
16545        else
16546          FOUND_MAKE=$MAKE_CANDIDATE
16547
16548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16549
16550  # First separate the path from the arguments. This will split at the first
16551  # space.
16552  complete="$FOUND_MAKE"
16553  path="${complete%% *}"
16554  tmp="$complete EOL"
16555  arguments="${tmp#* }"
16556
16557  # Input might be given as Windows format, start by converting to
16558  # unix format.
16559  new_path=`$CYGPATH -u "$path"`
16560
16561  # Now try to locate executable using which
16562  new_path=`$WHICH "$new_path" 2> /dev/null`
16563  # bat and cmd files are not always considered executable in cygwin causing which
16564  # to not find them
16565  if test "x$new_path" = x \
16566      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16567      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16568    new_path=`$CYGPATH -u "$path"`
16569  fi
16570  if test "x$new_path" = x; then
16571    # Oops. Which didn't find the executable.
16572    # The splitting of arguments from the executable at a space might have been incorrect,
16573    # since paths with space are more likely in Windows. Give it another try with the whole
16574    # argument.
16575    path="$complete"
16576    arguments="EOL"
16577    new_path=`$CYGPATH -u "$path"`
16578    new_path=`$WHICH "$new_path" 2> /dev/null`
16579    # bat and cmd files are not always considered executable in cygwin causing which
16580    # to not find them
16581    if test "x$new_path" = x \
16582        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16583        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16584      new_path=`$CYGPATH -u "$path"`
16585    fi
16586    if test "x$new_path" = x; then
16587      # It's still not found. Now this is an unrecoverable error.
16588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16589$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16590      has_space=`$ECHO "$complete" | $GREP " "`
16591      if test "x$has_space" != x; then
16592        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16593$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16594      fi
16595      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16596    fi
16597  fi
16598
16599  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16600  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16601  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16602  # "foo.exe" is OK but "foo" is an error.
16603  #
16604  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16605  # It is also a way to make sure we got the proper file name for the real test later on.
16606  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16607  if test "x$test_shortpath" = x; then
16608    # Short path failed, file does not exist as specified.
16609    # Try adding .exe or .cmd
16610    if test -f "${new_path}.exe"; then
16611      input_to_shortpath="${new_path}.exe"
16612    elif test -f "${new_path}.cmd"; then
16613      input_to_shortpath="${new_path}.cmd"
16614    else
16615      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16616$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16617      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16618$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16619      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16620    fi
16621  else
16622    input_to_shortpath="$new_path"
16623  fi
16624
16625  # Call helper function which possibly converts this using DOS-style short mode.
16626  # If so, the updated path is stored in $new_path.
16627  new_path="$input_to_shortpath"
16628
16629  input_path="$input_to_shortpath"
16630  # Check if we need to convert this using DOS-style short mode. If the path
16631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16632  # take no chances and rewrite it.
16633  # Note: m4 eats our [], so we need to use [ and ] instead.
16634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16635  if test "x$has_forbidden_chars" != x; then
16636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16640      # Going to short mode and back again did indeed matter. Since short mode is
16641      # case insensitive, let's make it lowercase to improve readability.
16642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16643      # Now convert it back to Unix-stile (cygpath)
16644      input_path=`$CYGPATH -u "$shortmode_path"`
16645      new_path="$input_path"
16646    fi
16647  fi
16648
16649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16650  if test "x$test_cygdrive_prefix" = x; then
16651    # As a simple fix, exclude /usr/bin since it's not a real path.
16652    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16654      # a path prefixed by /cygdrive for fixpath to work.
16655      new_path="$CYGWIN_ROOT_PATH$input_path"
16656    fi
16657  fi
16658
16659  # remove trailing .exe if any
16660  new_path="${new_path/%.exe/}"
16661
16662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16663
16664  # First separate the path from the arguments. This will split at the first
16665  # space.
16666  complete="$FOUND_MAKE"
16667  path="${complete%% *}"
16668  tmp="$complete EOL"
16669  arguments="${tmp#* }"
16670
16671  # Input might be given as Windows format, start by converting to
16672  # unix format.
16673  new_path="$path"
16674
16675  windows_path="$new_path"
16676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16677    unix_path=`$CYGPATH -u "$windows_path"`
16678    new_path="$unix_path"
16679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16681    new_path="$unix_path"
16682  fi
16683
16684
16685  # Now try to locate executable using which
16686  new_path=`$WHICH "$new_path" 2> /dev/null`
16687
16688  if test "x$new_path" = x; then
16689    # Oops. Which didn't find the executable.
16690    # The splitting of arguments from the executable at a space might have been incorrect,
16691    # since paths with space are more likely in Windows. Give it another try with the whole
16692    # argument.
16693    path="$complete"
16694    arguments="EOL"
16695    new_path="$path"
16696
16697  windows_path="$new_path"
16698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16699    unix_path=`$CYGPATH -u "$windows_path"`
16700    new_path="$unix_path"
16701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16703    new_path="$unix_path"
16704  fi
16705
16706
16707    new_path=`$WHICH "$new_path" 2> /dev/null`
16708
16709    if test "x$new_path" = x; then
16710      # It's still not found. Now this is an unrecoverable error.
16711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16712$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16713      has_space=`$ECHO "$complete" | $GREP " "`
16714      if test "x$has_space" != x; then
16715        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16716$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16717      fi
16718      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16719    fi
16720  fi
16721
16722  # Now new_path has a complete unix path to the binary
16723  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16724    # Keep paths in /bin as-is, but remove trailing .exe if any
16725    new_path="${new_path/%.exe/}"
16726    # Do not save /bin paths to all_fixpath_prefixes!
16727  else
16728    # Not in mixed or Windows style, start by that.
16729    new_path=`cmd //c echo $new_path`
16730
16731  input_path="$new_path"
16732  # Check if we need to convert this using DOS-style short mode. If the path
16733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16734  # take no chances and rewrite it.
16735  # Note: m4 eats our [], so we need to use [ and ] instead.
16736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16737  if test "x$has_forbidden_chars" != x; then
16738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16739    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16740  fi
16741
16742    # Output is in $new_path
16743
16744  windows_path="$new_path"
16745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16746    unix_path=`$CYGPATH -u "$windows_path"`
16747    new_path="$unix_path"
16748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16750    new_path="$unix_path"
16751  fi
16752
16753    # remove trailing .exe if any
16754    new_path="${new_path/%.exe/}"
16755
16756    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16757    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16758  fi
16759
16760  else
16761    # We're on a posix platform. Hooray! :)
16762    # First separate the path from the arguments. This will split at the first
16763    # space.
16764    complete="$FOUND_MAKE"
16765    path="${complete%% *}"
16766    tmp="$complete EOL"
16767    arguments="${tmp#* }"
16768
16769    # Cannot rely on the command "which" here since it doesn't always work.
16770    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16771    if test -z "$is_absolute_path"; then
16772      # Path to executable is not absolute. Find it.
16773      IFS_save="$IFS"
16774      IFS=:
16775      for p in $PATH; do
16776        if test -f "$p/$path" && test -x "$p/$path"; then
16777          new_path="$p/$path"
16778          break
16779        fi
16780      done
16781      IFS="$IFS_save"
16782    else
16783      # This is an absolute path, we can use it without further modifications.
16784      new_path="$path"
16785    fi
16786
16787    if test "x$new_path" = x; then
16788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16789$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16790      has_space=`$ECHO "$complete" | $GREP " "`
16791      if test "x$has_space" != x; then
16792        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16793$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16794      fi
16795      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16796    fi
16797  fi
16798
16799  # Now join together the path and the arguments once again
16800  if test "x$arguments" != xEOL; then
16801    new_complete="$new_path ${arguments% *}"
16802  else
16803    new_complete="$new_path"
16804  fi
16805
16806  if test "x$complete" != "x$new_complete"; then
16807    FOUND_MAKE="$new_complete"
16808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16809$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16810  fi
16811
16812        fi
16813      fi
16814    fi
16815  fi
16816
16817        fi
16818        PATH=$OLD_PATH
16819      fi
16820    fi
16821
16822    if test "x$FOUND_MAKE" = x; then
16823      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
16824    fi
16825  fi
16826
16827  MAKE=$FOUND_MAKE
16828
16829  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
16830$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
16831
16832
16833
16834  # Test if find supports -delete
16835  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
16836$as_echo_n "checking if find supports -delete... " >&6; }
16837  FIND_DELETE="-delete"
16838
16839  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
16840
16841  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
16842
16843  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
16844  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
16845    # No, it does not.
16846    rm $DELETEDIR/TestIfFindSupportsDelete
16847    FIND_DELETE="-exec rm \{\} \+"
16848    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16849$as_echo "no" >&6; }
16850  else
16851    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16852$as_echo "yes" >&6; }
16853  fi
16854  rmdir $DELETEDIR
16855
16856
16857
16858  # These tools might not be installed by default,
16859  # need hint on how to install them.
16860
16861
16862
16863  # Publish this variable in the help.
16864
16865
16866  if test "x$UNZIP" = x; then
16867    # The variable is not set by user, try to locate tool using the code snippet
16868    for ac_prog in unzip
16869do
16870  # Extract the first word of "$ac_prog", so it can be a program name with args.
16871set dummy $ac_prog; ac_word=$2
16872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16873$as_echo_n "checking for $ac_word... " >&6; }
16874if ${ac_cv_path_UNZIP+:} false; then :
16875  $as_echo_n "(cached) " >&6
16876else
16877  case $UNZIP in
16878  [\\/]* | ?:[\\/]*)
16879  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16880  ;;
16881  *)
16882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16883for as_dir in $PATH
16884do
16885  IFS=$as_save_IFS
16886  test -z "$as_dir" && as_dir=.
16887    for ac_exec_ext in '' $ac_executable_extensions; do
16888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16889    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16891    break 2
16892  fi
16893done
16894  done
16895IFS=$as_save_IFS
16896
16897  ;;
16898esac
16899fi
16900UNZIP=$ac_cv_path_UNZIP
16901if test -n "$UNZIP"; then
16902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16903$as_echo "$UNZIP" >&6; }
16904else
16905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16906$as_echo "no" >&6; }
16907fi
16908
16909
16910  test -n "$UNZIP" && break
16911done
16912
16913  else
16914    # The variable is set, but is it from the command line or the environment?
16915
16916    # Try to remove the string !UNZIP! from our list.
16917    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
16918    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
16919      # If it failed, the variable was not from the command line. Ignore it,
16920      # but warn the user (except for BASH, which is always set by the calling BASH).
16921      if test "xUNZIP" != xBASH; then
16922        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
16923$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
16924      fi
16925      # Try to locate tool using the code snippet
16926      for ac_prog in unzip
16927do
16928  # Extract the first word of "$ac_prog", so it can be a program name with args.
16929set dummy $ac_prog; ac_word=$2
16930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16931$as_echo_n "checking for $ac_word... " >&6; }
16932if ${ac_cv_path_UNZIP+:} false; then :
16933  $as_echo_n "(cached) " >&6
16934else
16935  case $UNZIP in
16936  [\\/]* | ?:[\\/]*)
16937  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16938  ;;
16939  *)
16940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16941for as_dir in $PATH
16942do
16943  IFS=$as_save_IFS
16944  test -z "$as_dir" && as_dir=.
16945    for ac_exec_ext in '' $ac_executable_extensions; do
16946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16947    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16949    break 2
16950  fi
16951done
16952  done
16953IFS=$as_save_IFS
16954
16955  ;;
16956esac
16957fi
16958UNZIP=$ac_cv_path_UNZIP
16959if test -n "$UNZIP"; then
16960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16961$as_echo "$UNZIP" >&6; }
16962else
16963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16964$as_echo "no" >&6; }
16965fi
16966
16967
16968  test -n "$UNZIP" && break
16969done
16970
16971    else
16972      # If it succeeded, then it was overridden by the user. We will use it
16973      # for the tool.
16974
16975      # First remove it from the list of overridden variables, so we can test
16976      # for unknown variables in the end.
16977      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
16978
16979      # Check if the provided tool contains a complete path.
16980      tool_specified="$UNZIP"
16981      tool_basename="${tool_specified##*/}"
16982      if test "x$tool_basename" = "x$tool_specified"; then
16983        # A command without a complete path is provided, search $PATH.
16984        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
16985$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
16986        # Extract the first word of "$tool_basename", so it can be a program name with args.
16987set dummy $tool_basename; ac_word=$2
16988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16989$as_echo_n "checking for $ac_word... " >&6; }
16990if ${ac_cv_path_UNZIP+:} false; then :
16991  $as_echo_n "(cached) " >&6
16992else
16993  case $UNZIP in
16994  [\\/]* | ?:[\\/]*)
16995  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16996  ;;
16997  *)
16998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16999for as_dir in $PATH
17000do
17001  IFS=$as_save_IFS
17002  test -z "$as_dir" && as_dir=.
17003    for ac_exec_ext in '' $ac_executable_extensions; do
17004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17005    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17007    break 2
17008  fi
17009done
17010  done
17011IFS=$as_save_IFS
17012
17013  ;;
17014esac
17015fi
17016UNZIP=$ac_cv_path_UNZIP
17017if test -n "$UNZIP"; then
17018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17019$as_echo "$UNZIP" >&6; }
17020else
17021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17022$as_echo "no" >&6; }
17023fi
17024
17025
17026        if test "x$UNZIP" = x; then
17027          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17028        fi
17029      else
17030        # Otherwise we believe it is a complete path. Use it as it is.
17031        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17032$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17033        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17034$as_echo_n "checking for UNZIP... " >&6; }
17035        if test ! -x "$tool_specified"; then
17036          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17037$as_echo "not found" >&6; }
17038          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17039        fi
17040        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17041$as_echo "$tool_specified" >&6; }
17042      fi
17043    fi
17044  fi
17045
17046
17047
17048  if test "x$UNZIP" = x; then
17049    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17050  fi
17051
17052
17053
17054
17055
17056  # Publish this variable in the help.
17057
17058
17059  if test "x$ZIP" = x; then
17060    # The variable is not set by user, try to locate tool using the code snippet
17061    for ac_prog in zip
17062do
17063  # Extract the first word of "$ac_prog", so it can be a program name with args.
17064set dummy $ac_prog; ac_word=$2
17065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17066$as_echo_n "checking for $ac_word... " >&6; }
17067if ${ac_cv_path_ZIP+:} false; then :
17068  $as_echo_n "(cached) " >&6
17069else
17070  case $ZIP in
17071  [\\/]* | ?:[\\/]*)
17072  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17073  ;;
17074  *)
17075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17076for as_dir in $PATH
17077do
17078  IFS=$as_save_IFS
17079  test -z "$as_dir" && as_dir=.
17080    for ac_exec_ext in '' $ac_executable_extensions; do
17081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17082    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17084    break 2
17085  fi
17086done
17087  done
17088IFS=$as_save_IFS
17089
17090  ;;
17091esac
17092fi
17093ZIP=$ac_cv_path_ZIP
17094if test -n "$ZIP"; then
17095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17096$as_echo "$ZIP" >&6; }
17097else
17098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17099$as_echo "no" >&6; }
17100fi
17101
17102
17103  test -n "$ZIP" && break
17104done
17105
17106  else
17107    # The variable is set, but is it from the command line or the environment?
17108
17109    # Try to remove the string !ZIP! from our list.
17110    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17111    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17112      # If it failed, the variable was not from the command line. Ignore it,
17113      # but warn the user (except for BASH, which is always set by the calling BASH).
17114      if test "xZIP" != xBASH; then
17115        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17116$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17117      fi
17118      # Try to locate tool using the code snippet
17119      for ac_prog in zip
17120do
17121  # Extract the first word of "$ac_prog", so it can be a program name with args.
17122set dummy $ac_prog; ac_word=$2
17123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17124$as_echo_n "checking for $ac_word... " >&6; }
17125if ${ac_cv_path_ZIP+:} false; then :
17126  $as_echo_n "(cached) " >&6
17127else
17128  case $ZIP in
17129  [\\/]* | ?:[\\/]*)
17130  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17131  ;;
17132  *)
17133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17134for as_dir in $PATH
17135do
17136  IFS=$as_save_IFS
17137  test -z "$as_dir" && as_dir=.
17138    for ac_exec_ext in '' $ac_executable_extensions; do
17139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17140    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17142    break 2
17143  fi
17144done
17145  done
17146IFS=$as_save_IFS
17147
17148  ;;
17149esac
17150fi
17151ZIP=$ac_cv_path_ZIP
17152if test -n "$ZIP"; then
17153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17154$as_echo "$ZIP" >&6; }
17155else
17156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17157$as_echo "no" >&6; }
17158fi
17159
17160
17161  test -n "$ZIP" && break
17162done
17163
17164    else
17165      # If it succeeded, then it was overridden by the user. We will use it
17166      # for the tool.
17167
17168      # First remove it from the list of overridden variables, so we can test
17169      # for unknown variables in the end.
17170      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17171
17172      # Check if the provided tool contains a complete path.
17173      tool_specified="$ZIP"
17174      tool_basename="${tool_specified##*/}"
17175      if test "x$tool_basename" = "x$tool_specified"; then
17176        # A command without a complete path is provided, search $PATH.
17177        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17178$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17179        # Extract the first word of "$tool_basename", so it can be a program name with args.
17180set dummy $tool_basename; ac_word=$2
17181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17182$as_echo_n "checking for $ac_word... " >&6; }
17183if ${ac_cv_path_ZIP+:} false; then :
17184  $as_echo_n "(cached) " >&6
17185else
17186  case $ZIP in
17187  [\\/]* | ?:[\\/]*)
17188  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17189  ;;
17190  *)
17191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17192for as_dir in $PATH
17193do
17194  IFS=$as_save_IFS
17195  test -z "$as_dir" && as_dir=.
17196    for ac_exec_ext in '' $ac_executable_extensions; do
17197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17198    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17200    break 2
17201  fi
17202done
17203  done
17204IFS=$as_save_IFS
17205
17206  ;;
17207esac
17208fi
17209ZIP=$ac_cv_path_ZIP
17210if test -n "$ZIP"; then
17211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17212$as_echo "$ZIP" >&6; }
17213else
17214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17215$as_echo "no" >&6; }
17216fi
17217
17218
17219        if test "x$ZIP" = x; then
17220          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17221        fi
17222      else
17223        # Otherwise we believe it is a complete path. Use it as it is.
17224        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17225$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17226        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17227$as_echo_n "checking for ZIP... " >&6; }
17228        if test ! -x "$tool_specified"; then
17229          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17230$as_echo "not found" >&6; }
17231          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17232        fi
17233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17234$as_echo "$tool_specified" >&6; }
17235      fi
17236    fi
17237  fi
17238
17239
17240
17241  if test "x$ZIP" = x; then
17242    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17243  fi
17244
17245
17246
17247  # Non-required basic tools
17248
17249
17250
17251  # Publish this variable in the help.
17252
17253
17254  if test "x$LDD" = x; then
17255    # The variable is not set by user, try to locate tool using the code snippet
17256    for ac_prog in ldd
17257do
17258  # Extract the first word of "$ac_prog", so it can be a program name with args.
17259set dummy $ac_prog; ac_word=$2
17260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17261$as_echo_n "checking for $ac_word... " >&6; }
17262if ${ac_cv_path_LDD+:} false; then :
17263  $as_echo_n "(cached) " >&6
17264else
17265  case $LDD in
17266  [\\/]* | ?:[\\/]*)
17267  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17268  ;;
17269  *)
17270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17271for as_dir in $PATH
17272do
17273  IFS=$as_save_IFS
17274  test -z "$as_dir" && as_dir=.
17275    for ac_exec_ext in '' $ac_executable_extensions; do
17276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17277    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17279    break 2
17280  fi
17281done
17282  done
17283IFS=$as_save_IFS
17284
17285  ;;
17286esac
17287fi
17288LDD=$ac_cv_path_LDD
17289if test -n "$LDD"; then
17290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17291$as_echo "$LDD" >&6; }
17292else
17293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17294$as_echo "no" >&6; }
17295fi
17296
17297
17298  test -n "$LDD" && break
17299done
17300
17301  else
17302    # The variable is set, but is it from the command line or the environment?
17303
17304    # Try to remove the string !LDD! from our list.
17305    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17306    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17307      # If it failed, the variable was not from the command line. Ignore it,
17308      # but warn the user (except for BASH, which is always set by the calling BASH).
17309      if test "xLDD" != xBASH; then
17310        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17311$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17312      fi
17313      # Try to locate tool using the code snippet
17314      for ac_prog in ldd
17315do
17316  # Extract the first word of "$ac_prog", so it can be a program name with args.
17317set dummy $ac_prog; ac_word=$2
17318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17319$as_echo_n "checking for $ac_word... " >&6; }
17320if ${ac_cv_path_LDD+:} false; then :
17321  $as_echo_n "(cached) " >&6
17322else
17323  case $LDD in
17324  [\\/]* | ?:[\\/]*)
17325  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17326  ;;
17327  *)
17328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17329for as_dir in $PATH
17330do
17331  IFS=$as_save_IFS
17332  test -z "$as_dir" && as_dir=.
17333    for ac_exec_ext in '' $ac_executable_extensions; do
17334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17335    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17337    break 2
17338  fi
17339done
17340  done
17341IFS=$as_save_IFS
17342
17343  ;;
17344esac
17345fi
17346LDD=$ac_cv_path_LDD
17347if test -n "$LDD"; then
17348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17349$as_echo "$LDD" >&6; }
17350else
17351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17352$as_echo "no" >&6; }
17353fi
17354
17355
17356  test -n "$LDD" && break
17357done
17358
17359    else
17360      # If it succeeded, then it was overridden by the user. We will use it
17361      # for the tool.
17362
17363      # First remove it from the list of overridden variables, so we can test
17364      # for unknown variables in the end.
17365      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17366
17367      # Check if the provided tool contains a complete path.
17368      tool_specified="$LDD"
17369      tool_basename="${tool_specified##*/}"
17370      if test "x$tool_basename" = "x$tool_specified"; then
17371        # A command without a complete path is provided, search $PATH.
17372        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17373$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17374        # Extract the first word of "$tool_basename", so it can be a program name with args.
17375set dummy $tool_basename; ac_word=$2
17376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17377$as_echo_n "checking for $ac_word... " >&6; }
17378if ${ac_cv_path_LDD+:} false; then :
17379  $as_echo_n "(cached) " >&6
17380else
17381  case $LDD in
17382  [\\/]* | ?:[\\/]*)
17383  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17384  ;;
17385  *)
17386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17387for as_dir in $PATH
17388do
17389  IFS=$as_save_IFS
17390  test -z "$as_dir" && as_dir=.
17391    for ac_exec_ext in '' $ac_executable_extensions; do
17392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17393    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17395    break 2
17396  fi
17397done
17398  done
17399IFS=$as_save_IFS
17400
17401  ;;
17402esac
17403fi
17404LDD=$ac_cv_path_LDD
17405if test -n "$LDD"; then
17406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17407$as_echo "$LDD" >&6; }
17408else
17409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17410$as_echo "no" >&6; }
17411fi
17412
17413
17414        if test "x$LDD" = x; then
17415          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17416        fi
17417      else
17418        # Otherwise we believe it is a complete path. Use it as it is.
17419        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17420$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17421        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17422$as_echo_n "checking for LDD... " >&6; }
17423        if test ! -x "$tool_specified"; then
17424          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17425$as_echo "not found" >&6; }
17426          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17427        fi
17428        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17429$as_echo "$tool_specified" >&6; }
17430      fi
17431    fi
17432  fi
17433
17434
17435  if test "x$LDD" = "x"; then
17436    # List shared lib dependencies is used for
17437    # debug output and checking for forbidden dependencies.
17438    # We can build without it.
17439    LDD="true"
17440  fi
17441
17442
17443  # Publish this variable in the help.
17444
17445
17446  if test "x$OTOOL" = x; then
17447    # The variable is not set by user, try to locate tool using the code snippet
17448    for ac_prog in otool
17449do
17450  # Extract the first word of "$ac_prog", so it can be a program name with args.
17451set dummy $ac_prog; ac_word=$2
17452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17453$as_echo_n "checking for $ac_word... " >&6; }
17454if ${ac_cv_path_OTOOL+:} false; then :
17455  $as_echo_n "(cached) " >&6
17456else
17457  case $OTOOL in
17458  [\\/]* | ?:[\\/]*)
17459  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17460  ;;
17461  *)
17462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17463for as_dir in $PATH
17464do
17465  IFS=$as_save_IFS
17466  test -z "$as_dir" && as_dir=.
17467    for ac_exec_ext in '' $ac_executable_extensions; do
17468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17469    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17471    break 2
17472  fi
17473done
17474  done
17475IFS=$as_save_IFS
17476
17477  ;;
17478esac
17479fi
17480OTOOL=$ac_cv_path_OTOOL
17481if test -n "$OTOOL"; then
17482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17483$as_echo "$OTOOL" >&6; }
17484else
17485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17486$as_echo "no" >&6; }
17487fi
17488
17489
17490  test -n "$OTOOL" && break
17491done
17492
17493  else
17494    # The variable is set, but is it from the command line or the environment?
17495
17496    # Try to remove the string !OTOOL! from our list.
17497    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17498    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17499      # If it failed, the variable was not from the command line. Ignore it,
17500      # but warn the user (except for BASH, which is always set by the calling BASH).
17501      if test "xOTOOL" != xBASH; then
17502        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17503$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17504      fi
17505      # Try to locate tool using the code snippet
17506      for ac_prog in otool
17507do
17508  # Extract the first word of "$ac_prog", so it can be a program name with args.
17509set dummy $ac_prog; ac_word=$2
17510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17511$as_echo_n "checking for $ac_word... " >&6; }
17512if ${ac_cv_path_OTOOL+:} false; then :
17513  $as_echo_n "(cached) " >&6
17514else
17515  case $OTOOL in
17516  [\\/]* | ?:[\\/]*)
17517  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17518  ;;
17519  *)
17520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17521for as_dir in $PATH
17522do
17523  IFS=$as_save_IFS
17524  test -z "$as_dir" && as_dir=.
17525    for ac_exec_ext in '' $ac_executable_extensions; do
17526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17527    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17529    break 2
17530  fi
17531done
17532  done
17533IFS=$as_save_IFS
17534
17535  ;;
17536esac
17537fi
17538OTOOL=$ac_cv_path_OTOOL
17539if test -n "$OTOOL"; then
17540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17541$as_echo "$OTOOL" >&6; }
17542else
17543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17544$as_echo "no" >&6; }
17545fi
17546
17547
17548  test -n "$OTOOL" && break
17549done
17550
17551    else
17552      # If it succeeded, then it was overridden by the user. We will use it
17553      # for the tool.
17554
17555      # First remove it from the list of overridden variables, so we can test
17556      # for unknown variables in the end.
17557      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17558
17559      # Check if the provided tool contains a complete path.
17560      tool_specified="$OTOOL"
17561      tool_basename="${tool_specified##*/}"
17562      if test "x$tool_basename" = "x$tool_specified"; then
17563        # A command without a complete path is provided, search $PATH.
17564        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
17565$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
17566        # Extract the first word of "$tool_basename", so it can be a program name with args.
17567set dummy $tool_basename; ac_word=$2
17568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17569$as_echo_n "checking for $ac_word... " >&6; }
17570if ${ac_cv_path_OTOOL+:} false; then :
17571  $as_echo_n "(cached) " >&6
17572else
17573  case $OTOOL in
17574  [\\/]* | ?:[\\/]*)
17575  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17576  ;;
17577  *)
17578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17579for as_dir in $PATH
17580do
17581  IFS=$as_save_IFS
17582  test -z "$as_dir" && as_dir=.
17583    for ac_exec_ext in '' $ac_executable_extensions; do
17584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17585    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17587    break 2
17588  fi
17589done
17590  done
17591IFS=$as_save_IFS
17592
17593  ;;
17594esac
17595fi
17596OTOOL=$ac_cv_path_OTOOL
17597if test -n "$OTOOL"; then
17598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17599$as_echo "$OTOOL" >&6; }
17600else
17601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17602$as_echo "no" >&6; }
17603fi
17604
17605
17606        if test "x$OTOOL" = x; then
17607          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17608        fi
17609      else
17610        # Otherwise we believe it is a complete path. Use it as it is.
17611        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
17612$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
17613        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
17614$as_echo_n "checking for OTOOL... " >&6; }
17615        if test ! -x "$tool_specified"; then
17616          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17617$as_echo "not found" >&6; }
17618          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
17619        fi
17620        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17621$as_echo "$tool_specified" >&6; }
17622      fi
17623    fi
17624  fi
17625
17626
17627  if test "x$OTOOL" = "x"; then
17628    OTOOL="true"
17629  fi
17630
17631
17632  # Publish this variable in the help.
17633
17634
17635  if test "x$READELF" = x; then
17636    # The variable is not set by user, try to locate tool using the code snippet
17637    for ac_prog in greadelf readelf
17638do
17639  # Extract the first word of "$ac_prog", so it can be a program name with args.
17640set dummy $ac_prog; ac_word=$2
17641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17642$as_echo_n "checking for $ac_word... " >&6; }
17643if ${ac_cv_path_READELF+:} false; then :
17644  $as_echo_n "(cached) " >&6
17645else
17646  case $READELF in
17647  [\\/]* | ?:[\\/]*)
17648  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17649  ;;
17650  *)
17651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17652for as_dir in $PATH
17653do
17654  IFS=$as_save_IFS
17655  test -z "$as_dir" && as_dir=.
17656    for ac_exec_ext in '' $ac_executable_extensions; do
17657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17658    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17660    break 2
17661  fi
17662done
17663  done
17664IFS=$as_save_IFS
17665
17666  ;;
17667esac
17668fi
17669READELF=$ac_cv_path_READELF
17670if test -n "$READELF"; then
17671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17672$as_echo "$READELF" >&6; }
17673else
17674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17675$as_echo "no" >&6; }
17676fi
17677
17678
17679  test -n "$READELF" && break
17680done
17681
17682  else
17683    # The variable is set, but is it from the command line or the environment?
17684
17685    # Try to remove the string !READELF! from our list.
17686    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
17687    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17688      # If it failed, the variable was not from the command line. Ignore it,
17689      # but warn the user (except for BASH, which is always set by the calling BASH).
17690      if test "xREADELF" != xBASH; then
17691        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
17692$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
17693      fi
17694      # Try to locate tool using the code snippet
17695      for ac_prog in greadelf readelf
17696do
17697  # Extract the first word of "$ac_prog", so it can be a program name with args.
17698set dummy $ac_prog; ac_word=$2
17699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17700$as_echo_n "checking for $ac_word... " >&6; }
17701if ${ac_cv_path_READELF+:} false; then :
17702  $as_echo_n "(cached) " >&6
17703else
17704  case $READELF in
17705  [\\/]* | ?:[\\/]*)
17706  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17707  ;;
17708  *)
17709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17710for as_dir in $PATH
17711do
17712  IFS=$as_save_IFS
17713  test -z "$as_dir" && as_dir=.
17714    for ac_exec_ext in '' $ac_executable_extensions; do
17715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17716    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17718    break 2
17719  fi
17720done
17721  done
17722IFS=$as_save_IFS
17723
17724  ;;
17725esac
17726fi
17727READELF=$ac_cv_path_READELF
17728if test -n "$READELF"; then
17729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17730$as_echo "$READELF" >&6; }
17731else
17732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17733$as_echo "no" >&6; }
17734fi
17735
17736
17737  test -n "$READELF" && break
17738done
17739
17740    else
17741      # If it succeeded, then it was overridden by the user. We will use it
17742      # for the tool.
17743
17744      # First remove it from the list of overridden variables, so we can test
17745      # for unknown variables in the end.
17746      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17747
17748      # Check if the provided tool contains a complete path.
17749      tool_specified="$READELF"
17750      tool_basename="${tool_specified##*/}"
17751      if test "x$tool_basename" = "x$tool_specified"; then
17752        # A command without a complete path is provided, search $PATH.
17753        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
17754$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
17755        # Extract the first word of "$tool_basename", so it can be a program name with args.
17756set dummy $tool_basename; ac_word=$2
17757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17758$as_echo_n "checking for $ac_word... " >&6; }
17759if ${ac_cv_path_READELF+:} false; then :
17760  $as_echo_n "(cached) " >&6
17761else
17762  case $READELF in
17763  [\\/]* | ?:[\\/]*)
17764  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17765  ;;
17766  *)
17767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17768for as_dir in $PATH
17769do
17770  IFS=$as_save_IFS
17771  test -z "$as_dir" && as_dir=.
17772    for ac_exec_ext in '' $ac_executable_extensions; do
17773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17774    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17776    break 2
17777  fi
17778done
17779  done
17780IFS=$as_save_IFS
17781
17782  ;;
17783esac
17784fi
17785READELF=$ac_cv_path_READELF
17786if test -n "$READELF"; then
17787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17788$as_echo "$READELF" >&6; }
17789else
17790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17791$as_echo "no" >&6; }
17792fi
17793
17794
17795        if test "x$READELF" = x; then
17796          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17797        fi
17798      else
17799        # Otherwise we believe it is a complete path. Use it as it is.
17800        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
17801$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
17802        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
17803$as_echo_n "checking for READELF... " >&6; }
17804        if test ! -x "$tool_specified"; then
17805          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17806$as_echo "not found" >&6; }
17807          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
17808        fi
17809        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17810$as_echo "$tool_specified" >&6; }
17811      fi
17812    fi
17813  fi
17814
17815
17816
17817
17818  # Publish this variable in the help.
17819
17820
17821  if test "x$HG" = x; then
17822    # The variable is not set by user, try to locate tool using the code snippet
17823    for ac_prog in hg
17824do
17825  # Extract the first word of "$ac_prog", so it can be a program name with args.
17826set dummy $ac_prog; ac_word=$2
17827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17828$as_echo_n "checking for $ac_word... " >&6; }
17829if ${ac_cv_path_HG+:} false; then :
17830  $as_echo_n "(cached) " >&6
17831else
17832  case $HG in
17833  [\\/]* | ?:[\\/]*)
17834  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17835  ;;
17836  *)
17837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17838for as_dir in $PATH
17839do
17840  IFS=$as_save_IFS
17841  test -z "$as_dir" && as_dir=.
17842    for ac_exec_ext in '' $ac_executable_extensions; do
17843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17844    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17846    break 2
17847  fi
17848done
17849  done
17850IFS=$as_save_IFS
17851
17852  ;;
17853esac
17854fi
17855HG=$ac_cv_path_HG
17856if test -n "$HG"; then
17857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17858$as_echo "$HG" >&6; }
17859else
17860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17861$as_echo "no" >&6; }
17862fi
17863
17864
17865  test -n "$HG" && break
17866done
17867
17868  else
17869    # The variable is set, but is it from the command line or the environment?
17870
17871    # Try to remove the string !HG! from our list.
17872    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
17873    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17874      # If it failed, the variable was not from the command line. Ignore it,
17875      # but warn the user (except for BASH, which is always set by the calling BASH).
17876      if test "xHG" != xBASH; then
17877        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
17878$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
17879      fi
17880      # Try to locate tool using the code snippet
17881      for ac_prog in hg
17882do
17883  # Extract the first word of "$ac_prog", so it can be a program name with args.
17884set dummy $ac_prog; ac_word=$2
17885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17886$as_echo_n "checking for $ac_word... " >&6; }
17887if ${ac_cv_path_HG+:} false; then :
17888  $as_echo_n "(cached) " >&6
17889else
17890  case $HG in
17891  [\\/]* | ?:[\\/]*)
17892  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17893  ;;
17894  *)
17895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17896for as_dir in $PATH
17897do
17898  IFS=$as_save_IFS
17899  test -z "$as_dir" && as_dir=.
17900    for ac_exec_ext in '' $ac_executable_extensions; do
17901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17902    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17904    break 2
17905  fi
17906done
17907  done
17908IFS=$as_save_IFS
17909
17910  ;;
17911esac
17912fi
17913HG=$ac_cv_path_HG
17914if test -n "$HG"; then
17915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17916$as_echo "$HG" >&6; }
17917else
17918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17919$as_echo "no" >&6; }
17920fi
17921
17922
17923  test -n "$HG" && break
17924done
17925
17926    else
17927      # If it succeeded, then it was overridden by the user. We will use it
17928      # for the tool.
17929
17930      # First remove it from the list of overridden variables, so we can test
17931      # for unknown variables in the end.
17932      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17933
17934      # Check if the provided tool contains a complete path.
17935      tool_specified="$HG"
17936      tool_basename="${tool_specified##*/}"
17937      if test "x$tool_basename" = "x$tool_specified"; then
17938        # A command without a complete path is provided, search $PATH.
17939        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
17940$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
17941        # Extract the first word of "$tool_basename", so it can be a program name with args.
17942set dummy $tool_basename; ac_word=$2
17943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17944$as_echo_n "checking for $ac_word... " >&6; }
17945if ${ac_cv_path_HG+:} false; then :
17946  $as_echo_n "(cached) " >&6
17947else
17948  case $HG in
17949  [\\/]* | ?:[\\/]*)
17950  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17951  ;;
17952  *)
17953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17954for as_dir in $PATH
17955do
17956  IFS=$as_save_IFS
17957  test -z "$as_dir" && as_dir=.
17958    for ac_exec_ext in '' $ac_executable_extensions; do
17959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17960    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17962    break 2
17963  fi
17964done
17965  done
17966IFS=$as_save_IFS
17967
17968  ;;
17969esac
17970fi
17971HG=$ac_cv_path_HG
17972if test -n "$HG"; then
17973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17974$as_echo "$HG" >&6; }
17975else
17976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17977$as_echo "no" >&6; }
17978fi
17979
17980
17981        if test "x$HG" = x; then
17982          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17983        fi
17984      else
17985        # Otherwise we believe it is a complete path. Use it as it is.
17986        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
17987$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
17988        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
17989$as_echo_n "checking for HG... " >&6; }
17990        if test ! -x "$tool_specified"; then
17991          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17992$as_echo "not found" >&6; }
17993          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
17994        fi
17995        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17996$as_echo "$tool_specified" >&6; }
17997      fi
17998    fi
17999  fi
18000
18001
18002
18003
18004  # Publish this variable in the help.
18005
18006
18007  if test "x$STAT" = x; then
18008    # The variable is not set by user, try to locate tool using the code snippet
18009    for ac_prog in stat
18010do
18011  # Extract the first word of "$ac_prog", so it can be a program name with args.
18012set dummy $ac_prog; ac_word=$2
18013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18014$as_echo_n "checking for $ac_word... " >&6; }
18015if ${ac_cv_path_STAT+:} false; then :
18016  $as_echo_n "(cached) " >&6
18017else
18018  case $STAT in
18019  [\\/]* | ?:[\\/]*)
18020  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18021  ;;
18022  *)
18023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18024for as_dir in $PATH
18025do
18026  IFS=$as_save_IFS
18027  test -z "$as_dir" && as_dir=.
18028    for ac_exec_ext in '' $ac_executable_extensions; do
18029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18030    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18032    break 2
18033  fi
18034done
18035  done
18036IFS=$as_save_IFS
18037
18038  ;;
18039esac
18040fi
18041STAT=$ac_cv_path_STAT
18042if test -n "$STAT"; then
18043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18044$as_echo "$STAT" >&6; }
18045else
18046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18047$as_echo "no" >&6; }
18048fi
18049
18050
18051  test -n "$STAT" && break
18052done
18053
18054  else
18055    # The variable is set, but is it from the command line or the environment?
18056
18057    # Try to remove the string !STAT! from our list.
18058    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18059    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18060      # If it failed, the variable was not from the command line. Ignore it,
18061      # but warn the user (except for BASH, which is always set by the calling BASH).
18062      if test "xSTAT" != xBASH; then
18063        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18064$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18065      fi
18066      # Try to locate tool using the code snippet
18067      for ac_prog in stat
18068do
18069  # Extract the first word of "$ac_prog", so it can be a program name with args.
18070set dummy $ac_prog; ac_word=$2
18071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18072$as_echo_n "checking for $ac_word... " >&6; }
18073if ${ac_cv_path_STAT+:} false; then :
18074  $as_echo_n "(cached) " >&6
18075else
18076  case $STAT in
18077  [\\/]* | ?:[\\/]*)
18078  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18079  ;;
18080  *)
18081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18082for as_dir in $PATH
18083do
18084  IFS=$as_save_IFS
18085  test -z "$as_dir" && as_dir=.
18086    for ac_exec_ext in '' $ac_executable_extensions; do
18087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18088    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18090    break 2
18091  fi
18092done
18093  done
18094IFS=$as_save_IFS
18095
18096  ;;
18097esac
18098fi
18099STAT=$ac_cv_path_STAT
18100if test -n "$STAT"; then
18101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18102$as_echo "$STAT" >&6; }
18103else
18104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18105$as_echo "no" >&6; }
18106fi
18107
18108
18109  test -n "$STAT" && break
18110done
18111
18112    else
18113      # If it succeeded, then it was overridden by the user. We will use it
18114      # for the tool.
18115
18116      # First remove it from the list of overridden variables, so we can test
18117      # for unknown variables in the end.
18118      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18119
18120      # Check if the provided tool contains a complete path.
18121      tool_specified="$STAT"
18122      tool_basename="${tool_specified##*/}"
18123      if test "x$tool_basename" = "x$tool_specified"; then
18124        # A command without a complete path is provided, search $PATH.
18125        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18126$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18127        # Extract the first word of "$tool_basename", so it can be a program name with args.
18128set dummy $tool_basename; ac_word=$2
18129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18130$as_echo_n "checking for $ac_word... " >&6; }
18131if ${ac_cv_path_STAT+:} false; then :
18132  $as_echo_n "(cached) " >&6
18133else
18134  case $STAT in
18135  [\\/]* | ?:[\\/]*)
18136  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18137  ;;
18138  *)
18139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18140for as_dir in $PATH
18141do
18142  IFS=$as_save_IFS
18143  test -z "$as_dir" && as_dir=.
18144    for ac_exec_ext in '' $ac_executable_extensions; do
18145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18146    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18148    break 2
18149  fi
18150done
18151  done
18152IFS=$as_save_IFS
18153
18154  ;;
18155esac
18156fi
18157STAT=$ac_cv_path_STAT
18158if test -n "$STAT"; then
18159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18160$as_echo "$STAT" >&6; }
18161else
18162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18163$as_echo "no" >&6; }
18164fi
18165
18166
18167        if test "x$STAT" = x; then
18168          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18169        fi
18170      else
18171        # Otherwise we believe it is a complete path. Use it as it is.
18172        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18173$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18174        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18175$as_echo_n "checking for STAT... " >&6; }
18176        if test ! -x "$tool_specified"; then
18177          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18178$as_echo "not found" >&6; }
18179          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18180        fi
18181        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18182$as_echo "$tool_specified" >&6; }
18183      fi
18184    fi
18185  fi
18186
18187
18188
18189
18190  # Publish this variable in the help.
18191
18192
18193  if test "x$TIME" = x; then
18194    # The variable is not set by user, try to locate tool using the code snippet
18195    for ac_prog in time
18196do
18197  # Extract the first word of "$ac_prog", so it can be a program name with args.
18198set dummy $ac_prog; ac_word=$2
18199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18200$as_echo_n "checking for $ac_word... " >&6; }
18201if ${ac_cv_path_TIME+:} false; then :
18202  $as_echo_n "(cached) " >&6
18203else
18204  case $TIME in
18205  [\\/]* | ?:[\\/]*)
18206  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18207  ;;
18208  *)
18209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18210for as_dir in $PATH
18211do
18212  IFS=$as_save_IFS
18213  test -z "$as_dir" && as_dir=.
18214    for ac_exec_ext in '' $ac_executable_extensions; do
18215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18216    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18218    break 2
18219  fi
18220done
18221  done
18222IFS=$as_save_IFS
18223
18224  ;;
18225esac
18226fi
18227TIME=$ac_cv_path_TIME
18228if test -n "$TIME"; then
18229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18230$as_echo "$TIME" >&6; }
18231else
18232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18233$as_echo "no" >&6; }
18234fi
18235
18236
18237  test -n "$TIME" && break
18238done
18239
18240  else
18241    # The variable is set, but is it from the command line or the environment?
18242
18243    # Try to remove the string !TIME! from our list.
18244    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18245    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18246      # If it failed, the variable was not from the command line. Ignore it,
18247      # but warn the user (except for BASH, which is always set by the calling BASH).
18248      if test "xTIME" != xBASH; then
18249        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18250$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18251      fi
18252      # Try to locate tool using the code snippet
18253      for ac_prog in time
18254do
18255  # Extract the first word of "$ac_prog", so it can be a program name with args.
18256set dummy $ac_prog; ac_word=$2
18257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18258$as_echo_n "checking for $ac_word... " >&6; }
18259if ${ac_cv_path_TIME+:} false; then :
18260  $as_echo_n "(cached) " >&6
18261else
18262  case $TIME in
18263  [\\/]* | ?:[\\/]*)
18264  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18265  ;;
18266  *)
18267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18268for as_dir in $PATH
18269do
18270  IFS=$as_save_IFS
18271  test -z "$as_dir" && as_dir=.
18272    for ac_exec_ext in '' $ac_executable_extensions; do
18273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18274    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18276    break 2
18277  fi
18278done
18279  done
18280IFS=$as_save_IFS
18281
18282  ;;
18283esac
18284fi
18285TIME=$ac_cv_path_TIME
18286if test -n "$TIME"; then
18287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18288$as_echo "$TIME" >&6; }
18289else
18290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18291$as_echo "no" >&6; }
18292fi
18293
18294
18295  test -n "$TIME" && break
18296done
18297
18298    else
18299      # If it succeeded, then it was overridden by the user. We will use it
18300      # for the tool.
18301
18302      # First remove it from the list of overridden variables, so we can test
18303      # for unknown variables in the end.
18304      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18305
18306      # Check if the provided tool contains a complete path.
18307      tool_specified="$TIME"
18308      tool_basename="${tool_specified##*/}"
18309      if test "x$tool_basename" = "x$tool_specified"; then
18310        # A command without a complete path is provided, search $PATH.
18311        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18312$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18313        # Extract the first word of "$tool_basename", so it can be a program name with args.
18314set dummy $tool_basename; ac_word=$2
18315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18316$as_echo_n "checking for $ac_word... " >&6; }
18317if ${ac_cv_path_TIME+:} false; then :
18318  $as_echo_n "(cached) " >&6
18319else
18320  case $TIME in
18321  [\\/]* | ?:[\\/]*)
18322  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18323  ;;
18324  *)
18325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18326for as_dir in $PATH
18327do
18328  IFS=$as_save_IFS
18329  test -z "$as_dir" && as_dir=.
18330    for ac_exec_ext in '' $ac_executable_extensions; do
18331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18332    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18334    break 2
18335  fi
18336done
18337  done
18338IFS=$as_save_IFS
18339
18340  ;;
18341esac
18342fi
18343TIME=$ac_cv_path_TIME
18344if test -n "$TIME"; then
18345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18346$as_echo "$TIME" >&6; }
18347else
18348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18349$as_echo "no" >&6; }
18350fi
18351
18352
18353        if test "x$TIME" = x; then
18354          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18355        fi
18356      else
18357        # Otherwise we believe it is a complete path. Use it as it is.
18358        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18359$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18360        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18361$as_echo_n "checking for TIME... " >&6; }
18362        if test ! -x "$tool_specified"; then
18363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18364$as_echo "not found" >&6; }
18365          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18366        fi
18367        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18368$as_echo "$tool_specified" >&6; }
18369      fi
18370    fi
18371  fi
18372
18373
18374  # Check if it's GNU time
18375  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18376  if test "x$IS_GNU_TIME" != x; then
18377    IS_GNU_TIME=yes
18378  else
18379    IS_GNU_TIME=no
18380  fi
18381
18382
18383  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18384
18385
18386
18387  # Publish this variable in the help.
18388
18389
18390  if test "x$COMM" = x; then
18391    # The variable is not set by user, try to locate tool using the code snippet
18392    for ac_prog in comm
18393do
18394  # Extract the first word of "$ac_prog", so it can be a program name with args.
18395set dummy $ac_prog; ac_word=$2
18396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18397$as_echo_n "checking for $ac_word... " >&6; }
18398if ${ac_cv_path_COMM+:} false; then :
18399  $as_echo_n "(cached) " >&6
18400else
18401  case $COMM in
18402  [\\/]* | ?:[\\/]*)
18403  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18404  ;;
18405  *)
18406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18407for as_dir in $PATH
18408do
18409  IFS=$as_save_IFS
18410  test -z "$as_dir" && as_dir=.
18411    for ac_exec_ext in '' $ac_executable_extensions; do
18412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18413    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18415    break 2
18416  fi
18417done
18418  done
18419IFS=$as_save_IFS
18420
18421  ;;
18422esac
18423fi
18424COMM=$ac_cv_path_COMM
18425if test -n "$COMM"; then
18426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18427$as_echo "$COMM" >&6; }
18428else
18429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18430$as_echo "no" >&6; }
18431fi
18432
18433
18434  test -n "$COMM" && break
18435done
18436
18437  else
18438    # The variable is set, but is it from the command line or the environment?
18439
18440    # Try to remove the string !COMM! from our list.
18441    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18442    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18443      # If it failed, the variable was not from the command line. Ignore it,
18444      # but warn the user (except for BASH, which is always set by the calling BASH).
18445      if test "xCOMM" != xBASH; then
18446        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18447$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18448      fi
18449      # Try to locate tool using the code snippet
18450      for ac_prog in comm
18451do
18452  # Extract the first word of "$ac_prog", so it can be a program name with args.
18453set dummy $ac_prog; ac_word=$2
18454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18455$as_echo_n "checking for $ac_word... " >&6; }
18456if ${ac_cv_path_COMM+:} false; then :
18457  $as_echo_n "(cached) " >&6
18458else
18459  case $COMM in
18460  [\\/]* | ?:[\\/]*)
18461  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18462  ;;
18463  *)
18464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18465for as_dir in $PATH
18466do
18467  IFS=$as_save_IFS
18468  test -z "$as_dir" && as_dir=.
18469    for ac_exec_ext in '' $ac_executable_extensions; do
18470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18471    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18473    break 2
18474  fi
18475done
18476  done
18477IFS=$as_save_IFS
18478
18479  ;;
18480esac
18481fi
18482COMM=$ac_cv_path_COMM
18483if test -n "$COMM"; then
18484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18485$as_echo "$COMM" >&6; }
18486else
18487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18488$as_echo "no" >&6; }
18489fi
18490
18491
18492  test -n "$COMM" && break
18493done
18494
18495    else
18496      # If it succeeded, then it was overridden by the user. We will use it
18497      # for the tool.
18498
18499      # First remove it from the list of overridden variables, so we can test
18500      # for unknown variables in the end.
18501      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18502
18503      # Check if the provided tool contains a complete path.
18504      tool_specified="$COMM"
18505      tool_basename="${tool_specified##*/}"
18506      if test "x$tool_basename" = "x$tool_specified"; then
18507        # A command without a complete path is provided, search $PATH.
18508        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18509$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18510        # Extract the first word of "$tool_basename", so it can be a program name with args.
18511set dummy $tool_basename; ac_word=$2
18512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18513$as_echo_n "checking for $ac_word... " >&6; }
18514if ${ac_cv_path_COMM+:} false; then :
18515  $as_echo_n "(cached) " >&6
18516else
18517  case $COMM in
18518  [\\/]* | ?:[\\/]*)
18519  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18520  ;;
18521  *)
18522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18523for as_dir in $PATH
18524do
18525  IFS=$as_save_IFS
18526  test -z "$as_dir" && as_dir=.
18527    for ac_exec_ext in '' $ac_executable_extensions; do
18528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18529    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18531    break 2
18532  fi
18533done
18534  done
18535IFS=$as_save_IFS
18536
18537  ;;
18538esac
18539fi
18540COMM=$ac_cv_path_COMM
18541if test -n "$COMM"; then
18542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18543$as_echo "$COMM" >&6; }
18544else
18545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18546$as_echo "no" >&6; }
18547fi
18548
18549
18550        if test "x$COMM" = x; then
18551          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18552        fi
18553      else
18554        # Otherwise we believe it is a complete path. Use it as it is.
18555        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18556$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18557        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18558$as_echo_n "checking for COMM... " >&6; }
18559        if test ! -x "$tool_specified"; then
18560          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18561$as_echo "not found" >&6; }
18562          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18563        fi
18564        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18565$as_echo "$tool_specified" >&6; }
18566      fi
18567    fi
18568  fi
18569
18570
18571
18572  if test "x$COMM" = x; then
18573    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18574  fi
18575
18576
18577  fi
18578
18579  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18580
18581
18582
18583  # Publish this variable in the help.
18584
18585
18586  if test "x$DSYMUTIL" = x; then
18587    # The variable is not set by user, try to locate tool using the code snippet
18588    for ac_prog in dsymutil
18589do
18590  # Extract the first word of "$ac_prog", so it can be a program name with args.
18591set dummy $ac_prog; ac_word=$2
18592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18593$as_echo_n "checking for $ac_word... " >&6; }
18594if ${ac_cv_path_DSYMUTIL+:} false; then :
18595  $as_echo_n "(cached) " >&6
18596else
18597  case $DSYMUTIL in
18598  [\\/]* | ?:[\\/]*)
18599  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18600  ;;
18601  *)
18602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18603for as_dir in $PATH
18604do
18605  IFS=$as_save_IFS
18606  test -z "$as_dir" && as_dir=.
18607    for ac_exec_ext in '' $ac_executable_extensions; do
18608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18609    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18611    break 2
18612  fi
18613done
18614  done
18615IFS=$as_save_IFS
18616
18617  ;;
18618esac
18619fi
18620DSYMUTIL=$ac_cv_path_DSYMUTIL
18621if test -n "$DSYMUTIL"; then
18622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18623$as_echo "$DSYMUTIL" >&6; }
18624else
18625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18626$as_echo "no" >&6; }
18627fi
18628
18629
18630  test -n "$DSYMUTIL" && break
18631done
18632
18633  else
18634    # The variable is set, but is it from the command line or the environment?
18635
18636    # Try to remove the string !DSYMUTIL! from our list.
18637    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18638    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18639      # If it failed, the variable was not from the command line. Ignore it,
18640      # but warn the user (except for BASH, which is always set by the calling BASH).
18641      if test "xDSYMUTIL" != xBASH; then
18642        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18643$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18644      fi
18645      # Try to locate tool using the code snippet
18646      for ac_prog in dsymutil
18647do
18648  # Extract the first word of "$ac_prog", so it can be a program name with args.
18649set dummy $ac_prog; ac_word=$2
18650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18651$as_echo_n "checking for $ac_word... " >&6; }
18652if ${ac_cv_path_DSYMUTIL+:} false; then :
18653  $as_echo_n "(cached) " >&6
18654else
18655  case $DSYMUTIL in
18656  [\\/]* | ?:[\\/]*)
18657  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18658  ;;
18659  *)
18660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18661for as_dir in $PATH
18662do
18663  IFS=$as_save_IFS
18664  test -z "$as_dir" && as_dir=.
18665    for ac_exec_ext in '' $ac_executable_extensions; do
18666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18667    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18669    break 2
18670  fi
18671done
18672  done
18673IFS=$as_save_IFS
18674
18675  ;;
18676esac
18677fi
18678DSYMUTIL=$ac_cv_path_DSYMUTIL
18679if test -n "$DSYMUTIL"; then
18680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18681$as_echo "$DSYMUTIL" >&6; }
18682else
18683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18684$as_echo "no" >&6; }
18685fi
18686
18687
18688  test -n "$DSYMUTIL" && break
18689done
18690
18691    else
18692      # If it succeeded, then it was overridden by the user. We will use it
18693      # for the tool.
18694
18695      # First remove it from the list of overridden variables, so we can test
18696      # for unknown variables in the end.
18697      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18698
18699      # Check if the provided tool contains a complete path.
18700      tool_specified="$DSYMUTIL"
18701      tool_basename="${tool_specified##*/}"
18702      if test "x$tool_basename" = "x$tool_specified"; then
18703        # A command without a complete path is provided, search $PATH.
18704        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
18705$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
18706        # Extract the first word of "$tool_basename", so it can be a program name with args.
18707set dummy $tool_basename; ac_word=$2
18708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18709$as_echo_n "checking for $ac_word... " >&6; }
18710if ${ac_cv_path_DSYMUTIL+:} false; then :
18711  $as_echo_n "(cached) " >&6
18712else
18713  case $DSYMUTIL in
18714  [\\/]* | ?:[\\/]*)
18715  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18716  ;;
18717  *)
18718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18719for as_dir in $PATH
18720do
18721  IFS=$as_save_IFS
18722  test -z "$as_dir" && as_dir=.
18723    for ac_exec_ext in '' $ac_executable_extensions; do
18724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18725    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18727    break 2
18728  fi
18729done
18730  done
18731IFS=$as_save_IFS
18732
18733  ;;
18734esac
18735fi
18736DSYMUTIL=$ac_cv_path_DSYMUTIL
18737if test -n "$DSYMUTIL"; then
18738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18739$as_echo "$DSYMUTIL" >&6; }
18740else
18741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18742$as_echo "no" >&6; }
18743fi
18744
18745
18746        if test "x$DSYMUTIL" = x; then
18747          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18748        fi
18749      else
18750        # Otherwise we believe it is a complete path. Use it as it is.
18751        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
18752$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
18753        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
18754$as_echo_n "checking for DSYMUTIL... " >&6; }
18755        if test ! -x "$tool_specified"; then
18756          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18757$as_echo "not found" >&6; }
18758          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
18759        fi
18760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18761$as_echo "$tool_specified" >&6; }
18762      fi
18763    fi
18764  fi
18765
18766
18767
18768  if test "x$DSYMUTIL" = x; then
18769    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
18770  fi
18771
18772
18773
18774
18775
18776  # Publish this variable in the help.
18777
18778
18779  if test "x$XATTR" = x; then
18780    # The variable is not set by user, try to locate tool using the code snippet
18781    for ac_prog in xattr
18782do
18783  # Extract the first word of "$ac_prog", so it can be a program name with args.
18784set dummy $ac_prog; ac_word=$2
18785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18786$as_echo_n "checking for $ac_word... " >&6; }
18787if ${ac_cv_path_XATTR+:} false; then :
18788  $as_echo_n "(cached) " >&6
18789else
18790  case $XATTR in
18791  [\\/]* | ?:[\\/]*)
18792  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18793  ;;
18794  *)
18795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18796for as_dir in $PATH
18797do
18798  IFS=$as_save_IFS
18799  test -z "$as_dir" && as_dir=.
18800    for ac_exec_ext in '' $ac_executable_extensions; do
18801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18802    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18804    break 2
18805  fi
18806done
18807  done
18808IFS=$as_save_IFS
18809
18810  ;;
18811esac
18812fi
18813XATTR=$ac_cv_path_XATTR
18814if test -n "$XATTR"; then
18815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18816$as_echo "$XATTR" >&6; }
18817else
18818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18819$as_echo "no" >&6; }
18820fi
18821
18822
18823  test -n "$XATTR" && break
18824done
18825
18826  else
18827    # The variable is set, but is it from the command line or the environment?
18828
18829    # Try to remove the string !XATTR! from our list.
18830    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
18831    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18832      # If it failed, the variable was not from the command line. Ignore it,
18833      # but warn the user (except for BASH, which is always set by the calling BASH).
18834      if test "xXATTR" != xBASH; then
18835        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
18836$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
18837      fi
18838      # Try to locate tool using the code snippet
18839      for ac_prog in xattr
18840do
18841  # Extract the first word of "$ac_prog", so it can be a program name with args.
18842set dummy $ac_prog; ac_word=$2
18843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18844$as_echo_n "checking for $ac_word... " >&6; }
18845if ${ac_cv_path_XATTR+:} false; then :
18846  $as_echo_n "(cached) " >&6
18847else
18848  case $XATTR in
18849  [\\/]* | ?:[\\/]*)
18850  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18851  ;;
18852  *)
18853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18854for as_dir in $PATH
18855do
18856  IFS=$as_save_IFS
18857  test -z "$as_dir" && as_dir=.
18858    for ac_exec_ext in '' $ac_executable_extensions; do
18859  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18860    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18862    break 2
18863  fi
18864done
18865  done
18866IFS=$as_save_IFS
18867
18868  ;;
18869esac
18870fi
18871XATTR=$ac_cv_path_XATTR
18872if test -n "$XATTR"; then
18873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18874$as_echo "$XATTR" >&6; }
18875else
18876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18877$as_echo "no" >&6; }
18878fi
18879
18880
18881  test -n "$XATTR" && break
18882done
18883
18884    else
18885      # If it succeeded, then it was overridden by the user. We will use it
18886      # for the tool.
18887
18888      # First remove it from the list of overridden variables, so we can test
18889      # for unknown variables in the end.
18890      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18891
18892      # Check if the provided tool contains a complete path.
18893      tool_specified="$XATTR"
18894      tool_basename="${tool_specified##*/}"
18895      if test "x$tool_basename" = "x$tool_specified"; then
18896        # A command without a complete path is provided, search $PATH.
18897        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
18898$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
18899        # Extract the first word of "$tool_basename", so it can be a program name with args.
18900set dummy $tool_basename; ac_word=$2
18901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18902$as_echo_n "checking for $ac_word... " >&6; }
18903if ${ac_cv_path_XATTR+:} false; then :
18904  $as_echo_n "(cached) " >&6
18905else
18906  case $XATTR in
18907  [\\/]* | ?:[\\/]*)
18908  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18909  ;;
18910  *)
18911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18912for as_dir in $PATH
18913do
18914  IFS=$as_save_IFS
18915  test -z "$as_dir" && as_dir=.
18916    for ac_exec_ext in '' $ac_executable_extensions; do
18917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18918    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18920    break 2
18921  fi
18922done
18923  done
18924IFS=$as_save_IFS
18925
18926  ;;
18927esac
18928fi
18929XATTR=$ac_cv_path_XATTR
18930if test -n "$XATTR"; then
18931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18932$as_echo "$XATTR" >&6; }
18933else
18934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18935$as_echo "no" >&6; }
18936fi
18937
18938
18939        if test "x$XATTR" = x; then
18940          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18941        fi
18942      else
18943        # Otherwise we believe it is a complete path. Use it as it is.
18944        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
18945$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
18946        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
18947$as_echo_n "checking for XATTR... " >&6; }
18948        if test ! -x "$tool_specified"; then
18949          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18950$as_echo "not found" >&6; }
18951          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
18952        fi
18953        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18954$as_echo "$tool_specified" >&6; }
18955      fi
18956    fi
18957  fi
18958
18959
18960
18961  if test "x$XATTR" = x; then
18962    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
18963  fi
18964
18965
18966
18967
18968  # Publish this variable in the help.
18969
18970
18971  if test "x$CODESIGN" = x; then
18972    # The variable is not set by user, try to locate tool using the code snippet
18973    for ac_prog in codesign
18974do
18975  # Extract the first word of "$ac_prog", so it can be a program name with args.
18976set dummy $ac_prog; ac_word=$2
18977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18978$as_echo_n "checking for $ac_word... " >&6; }
18979if ${ac_cv_path_CODESIGN+:} false; then :
18980  $as_echo_n "(cached) " >&6
18981else
18982  case $CODESIGN in
18983  [\\/]* | ?:[\\/]*)
18984  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18985  ;;
18986  *)
18987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18988for as_dir in $PATH
18989do
18990  IFS=$as_save_IFS
18991  test -z "$as_dir" && as_dir=.
18992    for ac_exec_ext in '' $ac_executable_extensions; do
18993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18994    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18996    break 2
18997  fi
18998done
18999  done
19000IFS=$as_save_IFS
19001
19002  ;;
19003esac
19004fi
19005CODESIGN=$ac_cv_path_CODESIGN
19006if test -n "$CODESIGN"; then
19007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19008$as_echo "$CODESIGN" >&6; }
19009else
19010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19011$as_echo "no" >&6; }
19012fi
19013
19014
19015  test -n "$CODESIGN" && break
19016done
19017
19018  else
19019    # The variable is set, but is it from the command line or the environment?
19020
19021    # Try to remove the string !CODESIGN! from our list.
19022    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19023    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19024      # If it failed, the variable was not from the command line. Ignore it,
19025      # but warn the user (except for BASH, which is always set by the calling BASH).
19026      if test "xCODESIGN" != xBASH; then
19027        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19028$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19029      fi
19030      # Try to locate tool using the code snippet
19031      for ac_prog in codesign
19032do
19033  # Extract the first word of "$ac_prog", so it can be a program name with args.
19034set dummy $ac_prog; ac_word=$2
19035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19036$as_echo_n "checking for $ac_word... " >&6; }
19037if ${ac_cv_path_CODESIGN+:} false; then :
19038  $as_echo_n "(cached) " >&6
19039else
19040  case $CODESIGN in
19041  [\\/]* | ?:[\\/]*)
19042  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19043  ;;
19044  *)
19045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19046for as_dir in $PATH
19047do
19048  IFS=$as_save_IFS
19049  test -z "$as_dir" && as_dir=.
19050    for ac_exec_ext in '' $ac_executable_extensions; do
19051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19052    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19054    break 2
19055  fi
19056done
19057  done
19058IFS=$as_save_IFS
19059
19060  ;;
19061esac
19062fi
19063CODESIGN=$ac_cv_path_CODESIGN
19064if test -n "$CODESIGN"; then
19065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19066$as_echo "$CODESIGN" >&6; }
19067else
19068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19069$as_echo "no" >&6; }
19070fi
19071
19072
19073  test -n "$CODESIGN" && break
19074done
19075
19076    else
19077      # If it succeeded, then it was overridden by the user. We will use it
19078      # for the tool.
19079
19080      # First remove it from the list of overridden variables, so we can test
19081      # for unknown variables in the end.
19082      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19083
19084      # Check if the provided tool contains a complete path.
19085      tool_specified="$CODESIGN"
19086      tool_basename="${tool_specified##*/}"
19087      if test "x$tool_basename" = "x$tool_specified"; then
19088        # A command without a complete path is provided, search $PATH.
19089        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19090$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19091        # Extract the first word of "$tool_basename", so it can be a program name with args.
19092set dummy $tool_basename; ac_word=$2
19093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19094$as_echo_n "checking for $ac_word... " >&6; }
19095if ${ac_cv_path_CODESIGN+:} false; then :
19096  $as_echo_n "(cached) " >&6
19097else
19098  case $CODESIGN in
19099  [\\/]* | ?:[\\/]*)
19100  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19101  ;;
19102  *)
19103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19104for as_dir in $PATH
19105do
19106  IFS=$as_save_IFS
19107  test -z "$as_dir" && as_dir=.
19108    for ac_exec_ext in '' $ac_executable_extensions; do
19109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19110    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19112    break 2
19113  fi
19114done
19115  done
19116IFS=$as_save_IFS
19117
19118  ;;
19119esac
19120fi
19121CODESIGN=$ac_cv_path_CODESIGN
19122if test -n "$CODESIGN"; then
19123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19124$as_echo "$CODESIGN" >&6; }
19125else
19126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19127$as_echo "no" >&6; }
19128fi
19129
19130
19131        if test "x$CODESIGN" = x; then
19132          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19133        fi
19134      else
19135        # Otherwise we believe it is a complete path. Use it as it is.
19136        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19137$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19138        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19139$as_echo_n "checking for CODESIGN... " >&6; }
19140        if test ! -x "$tool_specified"; then
19141          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19142$as_echo "not found" >&6; }
19143          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19144        fi
19145        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19146$as_echo "$tool_specified" >&6; }
19147      fi
19148    fi
19149  fi
19150
19151
19152    if test "x$CODESIGN" != "x"; then
19153      # Verify that the openjdk_codesign certificate is present
19154      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19155$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19156      rm -f codesign-testfile
19157      touch codesign-testfile
19158      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19159      rm -f codesign-testfile
19160      if test "x$CODESIGN" = x; then
19161        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19162$as_echo "no" >&6; }
19163      else
19164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19165$as_echo "yes" >&6; }
19166      fi
19167    fi
19168  fi
19169
19170
19171# Check if pkg-config is available.
19172
19173
19174if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19175	if test -n "$ac_tool_prefix"; then
19176  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19177set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19179$as_echo_n "checking for $ac_word... " >&6; }
19180if ${ac_cv_path_PKG_CONFIG+:} false; then :
19181  $as_echo_n "(cached) " >&6
19182else
19183  case $PKG_CONFIG in
19184  [\\/]* | ?:[\\/]*)
19185  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19186  ;;
19187  *)
19188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19189for as_dir in $PATH
19190do
19191  IFS=$as_save_IFS
19192  test -z "$as_dir" && as_dir=.
19193    for ac_exec_ext in '' $ac_executable_extensions; do
19194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19195    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19197    break 2
19198  fi
19199done
19200  done
19201IFS=$as_save_IFS
19202
19203  ;;
19204esac
19205fi
19206PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19207if test -n "$PKG_CONFIG"; then
19208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19209$as_echo "$PKG_CONFIG" >&6; }
19210else
19211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19212$as_echo "no" >&6; }
19213fi
19214
19215
19216fi
19217if test -z "$ac_cv_path_PKG_CONFIG"; then
19218  ac_pt_PKG_CONFIG=$PKG_CONFIG
19219  # Extract the first word of "pkg-config", so it can be a program name with args.
19220set dummy pkg-config; ac_word=$2
19221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19222$as_echo_n "checking for $ac_word... " >&6; }
19223if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19224  $as_echo_n "(cached) " >&6
19225else
19226  case $ac_pt_PKG_CONFIG in
19227  [\\/]* | ?:[\\/]*)
19228  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19229  ;;
19230  *)
19231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19232for as_dir in $PATH
19233do
19234  IFS=$as_save_IFS
19235  test -z "$as_dir" && as_dir=.
19236    for ac_exec_ext in '' $ac_executable_extensions; do
19237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19238    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19240    break 2
19241  fi
19242done
19243  done
19244IFS=$as_save_IFS
19245
19246  ;;
19247esac
19248fi
19249ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19250if test -n "$ac_pt_PKG_CONFIG"; then
19251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19252$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19253else
19254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19255$as_echo "no" >&6; }
19256fi
19257
19258  if test "x$ac_pt_PKG_CONFIG" = x; then
19259    PKG_CONFIG=""
19260  else
19261    case $cross_compiling:$ac_tool_warned in
19262yes:)
19263{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19264$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19265ac_tool_warned=yes ;;
19266esac
19267    PKG_CONFIG=$ac_pt_PKG_CONFIG
19268  fi
19269else
19270  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19271fi
19272
19273fi
19274if test -n "$PKG_CONFIG"; then
19275	_pkg_min_version=0.9.0
19276	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19277$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19278	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19279		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19280$as_echo "yes" >&6; }
19281	else
19282		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19283$as_echo "no" >&6; }
19284		PKG_CONFIG=""
19285	fi
19286
19287fi
19288
19289# After basic tools have been setup, we can check build os specific details.
19290
19291  ###############################################################################
19292
19293  # Note that this is the build platform OS version!
19294
19295  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19296  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19297  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19298  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19299
19300
19301
19302
19303
19304# Setup builddeps, for automatic downloading of tools we need.
19305# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19306# boot-jdk setup, but we need to have basic tools setup first.
19307
19308
19309# Check whether --with-builddeps-conf was given.
19310if test "${with_builddeps_conf+set}" = set; then :
19311  withval=$with_builddeps_conf;
19312fi
19313
19314
19315
19316# Check whether --with-builddeps-server was given.
19317if test "${with_builddeps_server+set}" = set; then :
19318  withval=$with_builddeps_server;
19319fi
19320
19321
19322
19323# Check whether --with-builddeps-dir was given.
19324if test "${with_builddeps_dir+set}" = set; then :
19325  withval=$with_builddeps_dir;
19326else
19327  with_builddeps_dir=/localhome/builddeps
19328fi
19329
19330
19331
19332# Check whether --with-builddeps-group was given.
19333if test "${with_builddeps_group+set}" = set; then :
19334  withval=$with_builddeps_group;
19335fi
19336
19337
19338
19339
19340  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19341    if test "x$with_builddeps_conf" != x; then
19342      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19343$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19344      builddepsfile=$with_builddeps_conf
19345      if test -s $builddepsfile; then
19346        . $builddepsfile
19347        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19348$as_echo "loaded!" >&6; }
19349      else
19350        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19351      fi
19352    else
19353      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19354$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19355      builddepsfile=`mktemp`
19356      touch $builddepsfile
19357      # Put all found confs into a single file.
19358      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19359      # Source the file to acquire the variables
19360      if test -s $builddepsfile; then
19361        . $builddepsfile
19362        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19363$as_echo "found at least one!" >&6; }
19364      else
19365        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19366      fi
19367    fi
19368    # Create build and target names that use _ instead of "-" and ".".
19369    # This is necessary to use them in variable names.
19370    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19371    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19372    # Extract rewrite information for build and target
19373    eval rewritten_build=\${REWRITE_${build_var}}
19374    if test "x$rewritten_build" = x; then
19375      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19376      echo Build stays the same $rewritten_build
19377    else
19378      echo Rewriting build for builddeps into $rewritten_build
19379    fi
19380    eval rewritten_target=\${REWRITE_${target_var}}
19381    if test "x$rewritten_target" = x; then
19382      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19383      echo Target stays the same $rewritten_target
19384    else
19385      echo Rewriting target for builddeps into $rewritten_target
19386    fi
19387    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19388    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19389  fi
19390  for ac_prog in 7z unzip
19391do
19392  # Extract the first word of "$ac_prog", so it can be a program name with args.
19393set dummy $ac_prog; ac_word=$2
19394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19395$as_echo_n "checking for $ac_word... " >&6; }
19396if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19397  $as_echo_n "(cached) " >&6
19398else
19399  if test -n "$BDEPS_UNZIP"; then
19400  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19401else
19402as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19403for as_dir in $PATH
19404do
19405  IFS=$as_save_IFS
19406  test -z "$as_dir" && as_dir=.
19407    for ac_exec_ext in '' $ac_executable_extensions; do
19408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19409    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19411    break 2
19412  fi
19413done
19414  done
19415IFS=$as_save_IFS
19416
19417fi
19418fi
19419BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19420if test -n "$BDEPS_UNZIP"; then
19421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19422$as_echo "$BDEPS_UNZIP" >&6; }
19423else
19424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19425$as_echo "no" >&6; }
19426fi
19427
19428
19429  test -n "$BDEPS_UNZIP" && break
19430done
19431
19432  if test "x$BDEPS_UNZIP" = x7z; then
19433    BDEPS_UNZIP="7z x"
19434  fi
19435
19436  for ac_prog in wget lftp ftp
19437do
19438  # Extract the first word of "$ac_prog", so it can be a program name with args.
19439set dummy $ac_prog; ac_word=$2
19440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19441$as_echo_n "checking for $ac_word... " >&6; }
19442if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19443  $as_echo_n "(cached) " >&6
19444else
19445  if test -n "$BDEPS_FTP"; then
19446  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19447else
19448as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19449for as_dir in $PATH
19450do
19451  IFS=$as_save_IFS
19452  test -z "$as_dir" && as_dir=.
19453    for ac_exec_ext in '' $ac_executable_extensions; do
19454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19455    ac_cv_prog_BDEPS_FTP="$ac_prog"
19456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19457    break 2
19458  fi
19459done
19460  done
19461IFS=$as_save_IFS
19462
19463fi
19464fi
19465BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19466if test -n "$BDEPS_FTP"; then
19467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19468$as_echo "$BDEPS_FTP" >&6; }
19469else
19470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19471$as_echo "no" >&6; }
19472fi
19473
19474
19475  test -n "$BDEPS_FTP" && break
19476done
19477
19478
19479
19480###############################################################################
19481#
19482# Determine OpenJDK variants, options and version numbers.
19483#
19484###############################################################################
19485
19486# We need build & target for this.
19487
19488
19489  ###############################################################################
19490  #
19491  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19492  # We always build headless support.
19493  #
19494  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19495$as_echo_n "checking headful support... " >&6; }
19496  # Check whether --enable-headful was given.
19497if test "${enable_headful+set}" = set; then :
19498  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19499else
19500  SUPPORT_HEADFUL=yes
19501fi
19502
19503
19504  SUPPORT_HEADLESS=yes
19505  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19506
19507  if test "x$SUPPORT_HEADFUL" = xyes; then
19508    # We are building both headful and headless.
19509    headful_msg="include support for both headful and headless"
19510  fi
19511
19512  if test "x$SUPPORT_HEADFUL" = xno; then
19513    # Thus we are building headless only.
19514    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19515    headful_msg="headless only"
19516  fi
19517
19518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19519$as_echo "$headful_msg" >&6; }
19520
19521
19522
19523
19524
19525  # Control wether Hotspot runs Queens test after build.
19526  # Check whether --enable-hotspot-test-in-build was given.
19527if test "${enable_hotspot_test_in_build+set}" = set; then :
19528  enableval=$enable_hotspot_test_in_build;
19529else
19530  enable_hotspot_test_in_build=no
19531fi
19532
19533  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19534    TEST_IN_BUILD=true
19535  else
19536    TEST_IN_BUILD=false
19537  fi
19538
19539
19540  ###############################################################################
19541  #
19542  # Choose cacerts source file
19543  #
19544
19545# Check whether --with-cacerts-file was given.
19546if test "${with_cacerts_file+set}" = set; then :
19547  withval=$with_cacerts_file;
19548fi
19549
19550  if test "x$with_cacerts_file" != x; then
19551    CACERTS_FILE=$with_cacerts_file
19552  else
19553    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19554  fi
19555
19556
19557  ###############################################################################
19558  #
19559  # Enable or disable unlimited crypto
19560  #
19561  # Check whether --enable-unlimited-crypto was given.
19562if test "${enable_unlimited_crypto+set}" = set; then :
19563  enableval=$enable_unlimited_crypto;
19564else
19565  enable_unlimited_crypto=no
19566fi
19567
19568  if test "x$enable_unlimited_crypto" = "xyes"; then
19569    UNLIMITED_CRYPTO=true
19570  else
19571    UNLIMITED_CRYPTO=false
19572  fi
19573
19574
19575  ###############################################################################
19576  #
19577  # Enable or disable the elliptic curve crypto implementation
19578  #
19579
19580
19581  ###############################################################################
19582  #
19583  # --enable-rmiconnector-iiop
19584  #
19585  # Check whether --enable-rmiconnector-iiop was given.
19586if test "${enable_rmiconnector_iiop+set}" = set; then :
19587  enableval=$enable_rmiconnector_iiop;
19588fi
19589
19590  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19591    RMICONNECTOR_IIOP=true
19592  else
19593    RMICONNECTOR_IIOP=false
19594  fi
19595
19596
19597  ###############################################################################
19598  #
19599  # Compress jars
19600  #
19601  COMPRESS_JARS=false
19602
19603
19604
19605
19606  # Source the version numbers
19607  . $AUTOCONF_DIR/version-numbers
19608
19609  # Get the settings from parameters
19610
19611# Check whether --with-milestone was given.
19612if test "${with_milestone+set}" = set; then :
19613  withval=$with_milestone;
19614fi
19615
19616  if test "x$with_milestone" = xyes; then
19617    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19618  elif test "x$with_milestone" != x; then
19619    MILESTONE="$with_milestone"
19620  fi
19621  if test "x$MILESTONE" = x; then
19622    MILESTONE=internal
19623  fi
19624
19625
19626# Check whether --with-update-version was given.
19627if test "${with_update_version+set}" = set; then :
19628  withval=$with_update_version;
19629fi
19630
19631  if test "x$with_update_version" = xyes; then
19632    as_fn_error $? "Update version must have a value" "$LINENO" 5
19633  elif test "x$with_update_version" != x; then
19634    JDK_UPDATE_VERSION="$with_update_version"
19635    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19636    # to a bug in expr (which reduces it to just X). To work around this, we
19637    # always add a 0 to one digit update versions.
19638    if test "${#JDK_UPDATE_VERSION}" = "1"; then
19639      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19640    fi
19641  fi
19642
19643
19644# Check whether --with-user-release-suffix was given.
19645if test "${with_user_release_suffix+set}" = set; then :
19646  withval=$with_user_release_suffix;
19647fi
19648
19649  if test "x$with_user_release_suffix" = xyes; then
19650    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19651  elif test "x$with_user_release_suffix" != x; then
19652    USER_RELEASE_SUFFIX="$with_user_release_suffix"
19653  fi
19654
19655
19656# Check whether --with-build-number was given.
19657if test "${with_build_number+set}" = set; then :
19658  withval=$with_build_number;
19659fi
19660
19661  if test "x$with_build_number" = xyes; then
19662    as_fn_error $? "Build number must have a value" "$LINENO" 5
19663  elif test "x$with_build_number" != x; then
19664    JDK_BUILD_NUMBER="$with_build_number"
19665  fi
19666  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19667  if test "x$JDK_BUILD_NUMBER" = x; then
19668    JDK_BUILD_NUMBER=b00
19669    if test "x$USER_RELEASE_SUFFIX" = x; then
19670      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19671      # Avoid [:alnum:] since it depends on the locale.
19672      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19673      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19674    fi
19675  fi
19676
19677  # Now set the JDK version, milestone, build number etc.
19678
19679
19680
19681
19682
19683
19684
19685
19686
19687
19688
19689
19690
19691
19692
19693  COPYRIGHT_YEAR=`date +'%Y'`
19694
19695
19696  if test "x$JDK_UPDATE_VERSION" != x; then
19697    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
19698  else
19699    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
19700  fi
19701
19702
19703  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
19704
19705
19706
19707###############################################################################
19708#
19709# Setup BootJDK, used to bootstrap the build.
19710#
19711###############################################################################
19712
19713
19714  BOOT_JDK_FOUND=no
19715
19716# Check whether --with-boot-jdk was given.
19717if test "${with_boot_jdk+set}" = set; then :
19718  withval=$with_boot_jdk;
19719fi
19720
19721
19722  # We look for the Boot JDK through various means, going from more certain to
19723  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
19724  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
19725  # must check if this is indeed valid; otherwise we'll continue looking.
19726
19727  # Test: Is bootjdk explicitely set by command line arguments?
19728
19729  if test "x$BOOT_JDK_FOUND" = xno; then
19730    # Now execute the test
19731
19732  if test "x$with_boot_jdk" != x; then
19733    BOOT_JDK=$with_boot_jdk
19734    BOOT_JDK_FOUND=maybe
19735    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
19736$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
19737  fi
19738
19739
19740    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19741    if test "x$BOOT_JDK_FOUND" = xmaybe; then
19742      # Do we have a bin/java?
19743      if test ! -x "$BOOT_JDK/bin/java"; then
19744        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19745$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19746        BOOT_JDK_FOUND=no
19747      else
19748        # Do we have a bin/javac?
19749        if test ! -x "$BOOT_JDK/bin/javac"; then
19750          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19751$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19752          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19753$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19754          BOOT_JDK_FOUND=no
19755        else
19756          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19757          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19758            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19759$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19760            BOOT_JDK_FOUND=no
19761          else
19762            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19763            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19764
19765            # Extra M4 quote needed to protect [] in grep expression.
19766            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
19767            if test "x$FOUND_CORRECT_VERSION" = x; then
19768              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19769$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19770              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
19771$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
19772              BOOT_JDK_FOUND=no
19773            else
19774              # We're done! :-)
19775              BOOT_JDK_FOUND=yes
19776
19777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19778
19779  # Input might be given as Windows format, start by converting to
19780  # unix format.
19781  path="$BOOT_JDK"
19782  new_path=`$CYGPATH -u "$path"`
19783
19784  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19785  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19786  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19787  # "foo.exe" is OK but "foo" is an error.
19788  #
19789  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19790  # It is also a way to make sure we got the proper file name for the real test later on.
19791  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19792  if test "x$test_shortpath" = x; then
19793    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19794$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19795    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19796  fi
19797
19798  # Call helper function which possibly converts this using DOS-style short mode.
19799  # If so, the updated path is stored in $new_path.
19800
19801  input_path="$new_path"
19802  # Check if we need to convert this using DOS-style short mode. If the path
19803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19804  # take no chances and rewrite it.
19805  # Note: m4 eats our [], so we need to use [ and ] instead.
19806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19807  if test "x$has_forbidden_chars" != x; then
19808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19809    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19810    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19811    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19812      # Going to short mode and back again did indeed matter. Since short mode is
19813      # case insensitive, let's make it lowercase to improve readability.
19814      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19815      # Now convert it back to Unix-stile (cygpath)
19816      input_path=`$CYGPATH -u "$shortmode_path"`
19817      new_path="$input_path"
19818    fi
19819  fi
19820
19821  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19822  if test "x$test_cygdrive_prefix" = x; then
19823    # As a simple fix, exclude /usr/bin since it's not a real path.
19824    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19825      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19826      # a path prefixed by /cygdrive for fixpath to work.
19827      new_path="$CYGWIN_ROOT_PATH$input_path"
19828    fi
19829  fi
19830
19831
19832  if test "x$path" != "x$new_path"; then
19833    BOOT_JDK="$new_path"
19834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19835$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19836  fi
19837
19838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19839
19840  path="$BOOT_JDK"
19841  has_colon=`$ECHO $path | $GREP ^.:`
19842  new_path="$path"
19843  if test "x$has_colon" = x; then
19844    # Not in mixed or Windows style, start by that.
19845    new_path=`cmd //c echo $path`
19846  fi
19847
19848
19849  input_path="$new_path"
19850  # Check if we need to convert this using DOS-style short mode. If the path
19851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19852  # take no chances and rewrite it.
19853  # Note: m4 eats our [], so we need to use [ and ] instead.
19854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19855  if test "x$has_forbidden_chars" != x; then
19856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19857    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19858  fi
19859
19860
19861  windows_path="$new_path"
19862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19863    unix_path=`$CYGPATH -u "$windows_path"`
19864    new_path="$unix_path"
19865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19867    new_path="$unix_path"
19868  fi
19869
19870  if test "x$path" != "x$new_path"; then
19871    BOOT_JDK="$new_path"
19872    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19873$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19874  fi
19875
19876  # Save the first 10 bytes of this path to the storage, so fixpath can work.
19877  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19878
19879  else
19880    # We're on a posix platform. Hooray! :)
19881    path="$BOOT_JDK"
19882    has_space=`$ECHO "$path" | $GREP " "`
19883    if test "x$has_space" != x; then
19884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19885$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19886      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
19887    fi
19888
19889    # Use eval to expand a potential ~
19890    eval path="$path"
19891    if test ! -f "$path" && test ! -d "$path"; then
19892      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
19893    fi
19894
19895    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
19896  fi
19897
19898              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
19899$as_echo_n "checking for Boot JDK... " >&6; }
19900              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
19901$as_echo "$BOOT_JDK" >&6; }
19902              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
19903$as_echo_n "checking Boot JDK version... " >&6; }
19904              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
19905              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
19906$as_echo "$BOOT_JDK_VERSION" >&6; }
19907            fi # end check jdk version
19908          fi # end check rt.jar
19909        fi # end check javac
19910      fi # end check java
19911    fi # end check boot jdk found
19912  fi
19913
19914  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
19915    # Having specified an argument which is incorrect will produce an instant failure;
19916    # we should not go on looking
19917    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
19918  fi
19919
19920  # Test: Is bootjdk available from builddeps?
19921
19922  if test "x$BOOT_JDK_FOUND" = xno; then
19923    # Now execute the test
19924
19925
19926
19927  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19928    # Source the builddeps file again, to make sure it uses the latest variables!
19929    . $builddepsfile
19930    # Look for a target and build machine specific resource!
19931    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19932    if test "x$resource" = x; then
19933      # Ok, lets instead look for a target specific resource
19934      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
19935    fi
19936    if test "x$resource" = x; then
19937      # Ok, lets instead look for a build specific resource
19938      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
19939    fi
19940    if test "x$resource" = x; then
19941      # Ok, lets instead look for a generic resource
19942      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
19943      resource=${builddep_bootjdk}
19944    fi
19945    if test "x$resource" != x; then
19946      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
19947$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
19948      # If the resource in the builddeps.conf file is an existing directory,
19949      # for example /java/linux/cups
19950      if test -d ${resource}; then
19951        depdir=${resource}
19952      else
19953
19954  # bootjdk is for example mymodule
19955  # $resource is for example libs/general/libmymod_1_2_3.zip
19956  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19957  # $with_builddeps_dir is for example /localhome/builddeps
19958  # depdir is the name of the variable into which we store the depdir, eg MYMOD
19959  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19960  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19961  filename=`basename $resource`
19962  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19963  filebase=${filename%%.*}
19964  extension=${filename#*.}
19965  installdir=$with_builddeps_dir/$filebase
19966  if test ! -f $installdir/$filename.unpacked; then
19967    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
19968$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19969    if test ! -d $installdir; then
19970      mkdir -p $installdir
19971    fi
19972    if test ! -d $installdir; then
19973      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19974    fi
19975    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
19976    touch $tmpfile
19977    if test ! -f $tmpfile; then
19978      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19979    fi
19980
19981  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19982  # $tmpfile is the local file name for the downloaded file.
19983  VALID_TOOL=no
19984  if test "x$BDEPS_FTP" = xwget; then
19985    VALID_TOOL=yes
19986    wget -O $tmpfile $with_builddeps_server/$resource
19987  fi
19988  if test "x$BDEPS_FTP" = xlftp; then
19989    VALID_TOOL=yes
19990    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19991  fi
19992  if test "x$BDEPS_FTP" = xftp; then
19993    VALID_TOOL=yes
19994    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19995    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19996    FTPUSERPWD=${FTPSERVER%%@*}
19997    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19998      FTPUSER=${userpwd%%:*}
19999      FTPPWD=${userpwd#*@}
20000      FTPSERVER=${FTPSERVER#*@}
20001    else
20002      FTPUSER=ftp
20003      FTPPWD=ftp
20004    fi
20005    # the "pass" command does not work on some
20006    # ftp clients (read ftp.exe) but if it works,
20007    # passive mode is better!
20008    ( \
20009        echo "user $FTPUSER $FTPPWD"        ; \
20010        echo "pass"                         ; \
20011        echo "bin"                          ; \
20012        echo "get $FTPPATH $tmpfile"              ; \
20013    ) | ftp -in $FTPSERVER
20014  fi
20015  if test "x$VALID_TOOL" != xyes; then
20016    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20017  fi
20018
20019    mv $tmpfile $installdir/$filename
20020    if test ! -s $installdir/$filename; then
20021      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20022    fi
20023    case "$extension" in
20024      zip)  echo "Unzipping $installdir/$filename..."
20025        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20026        ;;
20027      tar.gz) echo "Untaring $installdir/$filename..."
20028        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20029        ;;
20030      tgz) echo "Untaring $installdir/$filename..."
20031        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20032        ;;
20033      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20034        ;;
20035    esac
20036  fi
20037  if test -f $installdir/$filename.unpacked; then
20038    depdir=$installdir
20039  fi
20040
20041      fi
20042      # Source the builddeps file again, because in the previous command, the depdir
20043      # was updated to point at the current build dependency install directory.
20044      . $builddepsfile
20045      # Now extract variables from the builddeps.conf files.
20046      theroot=${builddep_bootjdk_ROOT}
20047      thecflags=${builddep_bootjdk_CFLAGS}
20048      thelibs=${builddep_bootjdk_LIBS}
20049      if test "x$depdir" = x; then
20050        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20051      fi
20052      BOOT_JDK=$depdir
20053      if test "x$theroot" != x; then
20054        BOOT_JDK="$theroot"
20055      fi
20056      if test "x$thecflags" != x; then
20057        BOOT_JDK_CFLAGS="$thecflags"
20058      fi
20059      if test "x$thelibs" != x; then
20060        BOOT_JDK_LIBS="$thelibs"
20061      fi
20062      BOOT_JDK_FOUND=maybe
20063      else BOOT_JDK_FOUND=no
20064
20065    fi
20066    else BOOT_JDK_FOUND=no
20067
20068  fi
20069
20070
20071
20072    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20073    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20074      # Do we have a bin/java?
20075      if test ! -x "$BOOT_JDK/bin/java"; then
20076        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20077$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20078        BOOT_JDK_FOUND=no
20079      else
20080        # Do we have a bin/javac?
20081        if test ! -x "$BOOT_JDK/bin/javac"; then
20082          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20083$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20084          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20085$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20086          BOOT_JDK_FOUND=no
20087        else
20088          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20089          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20090            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20091$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20092            BOOT_JDK_FOUND=no
20093          else
20094            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20095            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20096
20097            # Extra M4 quote needed to protect [] in grep expression.
20098            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20099            if test "x$FOUND_CORRECT_VERSION" = x; then
20100              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20101$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20102              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20103$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20104              BOOT_JDK_FOUND=no
20105            else
20106              # We're done! :-)
20107              BOOT_JDK_FOUND=yes
20108
20109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20110
20111  # Input might be given as Windows format, start by converting to
20112  # unix format.
20113  path="$BOOT_JDK"
20114  new_path=`$CYGPATH -u "$path"`
20115
20116  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20117  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20118  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20119  # "foo.exe" is OK but "foo" is an error.
20120  #
20121  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20122  # It is also a way to make sure we got the proper file name for the real test later on.
20123  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20124  if test "x$test_shortpath" = x; then
20125    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20126$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20127    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20128  fi
20129
20130  # Call helper function which possibly converts this using DOS-style short mode.
20131  # If so, the updated path is stored in $new_path.
20132
20133  input_path="$new_path"
20134  # Check if we need to convert this using DOS-style short mode. If the path
20135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20136  # take no chances and rewrite it.
20137  # Note: m4 eats our [], so we need to use [ and ] instead.
20138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20139  if test "x$has_forbidden_chars" != x; then
20140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20141    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20142    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20143    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20144      # Going to short mode and back again did indeed matter. Since short mode is
20145      # case insensitive, let's make it lowercase to improve readability.
20146      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20147      # Now convert it back to Unix-stile (cygpath)
20148      input_path=`$CYGPATH -u "$shortmode_path"`
20149      new_path="$input_path"
20150    fi
20151  fi
20152
20153  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20154  if test "x$test_cygdrive_prefix" = x; then
20155    # As a simple fix, exclude /usr/bin since it's not a real path.
20156    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20157      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20158      # a path prefixed by /cygdrive for fixpath to work.
20159      new_path="$CYGWIN_ROOT_PATH$input_path"
20160    fi
20161  fi
20162
20163
20164  if test "x$path" != "x$new_path"; then
20165    BOOT_JDK="$new_path"
20166    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20167$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20168  fi
20169
20170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20171
20172  path="$BOOT_JDK"
20173  has_colon=`$ECHO $path | $GREP ^.:`
20174  new_path="$path"
20175  if test "x$has_colon" = x; then
20176    # Not in mixed or Windows style, start by that.
20177    new_path=`cmd //c echo $path`
20178  fi
20179
20180
20181  input_path="$new_path"
20182  # Check if we need to convert this using DOS-style short mode. If the path
20183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20184  # take no chances and rewrite it.
20185  # Note: m4 eats our [], so we need to use [ and ] instead.
20186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20187  if test "x$has_forbidden_chars" != x; then
20188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20189    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20190  fi
20191
20192
20193  windows_path="$new_path"
20194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20195    unix_path=`$CYGPATH -u "$windows_path"`
20196    new_path="$unix_path"
20197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20199    new_path="$unix_path"
20200  fi
20201
20202  if test "x$path" != "x$new_path"; then
20203    BOOT_JDK="$new_path"
20204    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20205$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20206  fi
20207
20208  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20209  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20210
20211  else
20212    # We're on a posix platform. Hooray! :)
20213    path="$BOOT_JDK"
20214    has_space=`$ECHO "$path" | $GREP " "`
20215    if test "x$has_space" != x; then
20216      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20217$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20218      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20219    fi
20220
20221    # Use eval to expand a potential ~
20222    eval path="$path"
20223    if test ! -f "$path" && test ! -d "$path"; then
20224      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20225    fi
20226
20227    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20228  fi
20229
20230              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20231$as_echo_n "checking for Boot JDK... " >&6; }
20232              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20233$as_echo "$BOOT_JDK" >&6; }
20234              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20235$as_echo_n "checking Boot JDK version... " >&6; }
20236              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20237              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20238$as_echo "$BOOT_JDK_VERSION" >&6; }
20239            fi # end check jdk version
20240          fi # end check rt.jar
20241        fi # end check javac
20242      fi # end check java
20243    fi # end check boot jdk found
20244  fi
20245
20246
20247  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20248
20249  if test "x$BOOT_JDK_FOUND" = xno; then
20250    # Now execute the test
20251
20252  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20253    # First check at user selected default
20254
20255  if test "x$BOOT_JDK_FOUND" = xno; then
20256    # Now execute the test
20257
20258  if test -x /usr/libexec/java_home; then
20259    BOOT_JDK=`/usr/libexec/java_home `
20260    BOOT_JDK_FOUND=maybe
20261    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20262$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20263  fi
20264
20265
20266    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20267    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20268      # Do we have a bin/java?
20269      if test ! -x "$BOOT_JDK/bin/java"; then
20270        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20271$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20272        BOOT_JDK_FOUND=no
20273      else
20274        # Do we have a bin/javac?
20275        if test ! -x "$BOOT_JDK/bin/javac"; then
20276          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20277$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20278          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20279$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20280          BOOT_JDK_FOUND=no
20281        else
20282          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20283          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20284            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20285$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20286            BOOT_JDK_FOUND=no
20287          else
20288            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20289            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20290
20291            # Extra M4 quote needed to protect [] in grep expression.
20292            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20293            if test "x$FOUND_CORRECT_VERSION" = x; then
20294              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20295$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20296              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20297$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20298              BOOT_JDK_FOUND=no
20299            else
20300              # We're done! :-)
20301              BOOT_JDK_FOUND=yes
20302
20303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20304
20305  # Input might be given as Windows format, start by converting to
20306  # unix format.
20307  path="$BOOT_JDK"
20308  new_path=`$CYGPATH -u "$path"`
20309
20310  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20311  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20312  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20313  # "foo.exe" is OK but "foo" is an error.
20314  #
20315  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20316  # It is also a way to make sure we got the proper file name for the real test later on.
20317  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20318  if test "x$test_shortpath" = x; then
20319    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20320$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20321    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20322  fi
20323
20324  # Call helper function which possibly converts this using DOS-style short mode.
20325  # If so, the updated path is stored in $new_path.
20326
20327  input_path="$new_path"
20328  # Check if we need to convert this using DOS-style short mode. If the path
20329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20330  # take no chances and rewrite it.
20331  # Note: m4 eats our [], so we need to use [ and ] instead.
20332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20333  if test "x$has_forbidden_chars" != x; then
20334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20338      # Going to short mode and back again did indeed matter. Since short mode is
20339      # case insensitive, let's make it lowercase to improve readability.
20340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20341      # Now convert it back to Unix-stile (cygpath)
20342      input_path=`$CYGPATH -u "$shortmode_path"`
20343      new_path="$input_path"
20344    fi
20345  fi
20346
20347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20348  if test "x$test_cygdrive_prefix" = x; then
20349    # As a simple fix, exclude /usr/bin since it's not a real path.
20350    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20352      # a path prefixed by /cygdrive for fixpath to work.
20353      new_path="$CYGWIN_ROOT_PATH$input_path"
20354    fi
20355  fi
20356
20357
20358  if test "x$path" != "x$new_path"; then
20359    BOOT_JDK="$new_path"
20360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20361$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20362  fi
20363
20364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20365
20366  path="$BOOT_JDK"
20367  has_colon=`$ECHO $path | $GREP ^.:`
20368  new_path="$path"
20369  if test "x$has_colon" = x; then
20370    # Not in mixed or Windows style, start by that.
20371    new_path=`cmd //c echo $path`
20372  fi
20373
20374
20375  input_path="$new_path"
20376  # Check if we need to convert this using DOS-style short mode. If the path
20377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20378  # take no chances and rewrite it.
20379  # Note: m4 eats our [], so we need to use [ and ] instead.
20380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20381  if test "x$has_forbidden_chars" != x; then
20382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20383    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20384  fi
20385
20386
20387  windows_path="$new_path"
20388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20389    unix_path=`$CYGPATH -u "$windows_path"`
20390    new_path="$unix_path"
20391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20393    new_path="$unix_path"
20394  fi
20395
20396  if test "x$path" != "x$new_path"; then
20397    BOOT_JDK="$new_path"
20398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20399$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20400  fi
20401
20402  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20403  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20404
20405  else
20406    # We're on a posix platform. Hooray! :)
20407    path="$BOOT_JDK"
20408    has_space=`$ECHO "$path" | $GREP " "`
20409    if test "x$has_space" != x; then
20410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20411$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20412      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20413    fi
20414
20415    # Use eval to expand a potential ~
20416    eval path="$path"
20417    if test ! -f "$path" && test ! -d "$path"; then
20418      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20419    fi
20420
20421    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20422  fi
20423
20424              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20425$as_echo_n "checking for Boot JDK... " >&6; }
20426              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20427$as_echo "$BOOT_JDK" >&6; }
20428              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20429$as_echo_n "checking Boot JDK version... " >&6; }
20430              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20431              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20432$as_echo "$BOOT_JDK_VERSION" >&6; }
20433            fi # end check jdk version
20434          fi # end check rt.jar
20435        fi # end check javac
20436      fi # end check java
20437    fi # end check boot jdk found
20438  fi
20439
20440    # If that did not work out (e.g. too old), try explicit versions instead
20441
20442  if test "x$BOOT_JDK_FOUND" = xno; then
20443    # Now execute the test
20444
20445  if test -x /usr/libexec/java_home; then
20446    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20447    BOOT_JDK_FOUND=maybe
20448    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20449$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20450  fi
20451
20452
20453    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20454    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20455      # Do we have a bin/java?
20456      if test ! -x "$BOOT_JDK/bin/java"; then
20457        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20458$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20459        BOOT_JDK_FOUND=no
20460      else
20461        # Do we have a bin/javac?
20462        if test ! -x "$BOOT_JDK/bin/javac"; then
20463          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20464$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20465          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20466$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20467          BOOT_JDK_FOUND=no
20468        else
20469          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20470          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20471            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20472$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20473            BOOT_JDK_FOUND=no
20474          else
20475            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20476            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20477
20478            # Extra M4 quote needed to protect [] in grep expression.
20479            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20480            if test "x$FOUND_CORRECT_VERSION" = x; then
20481              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20482$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20483              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20484$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20485              BOOT_JDK_FOUND=no
20486            else
20487              # We're done! :-)
20488              BOOT_JDK_FOUND=yes
20489
20490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20491
20492  # Input might be given as Windows format, start by converting to
20493  # unix format.
20494  path="$BOOT_JDK"
20495  new_path=`$CYGPATH -u "$path"`
20496
20497  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20498  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20499  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20500  # "foo.exe" is OK but "foo" is an error.
20501  #
20502  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20503  # It is also a way to make sure we got the proper file name for the real test later on.
20504  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20505  if test "x$test_shortpath" = x; then
20506    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20507$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20508    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20509  fi
20510
20511  # Call helper function which possibly converts this using DOS-style short mode.
20512  # If so, the updated path is stored in $new_path.
20513
20514  input_path="$new_path"
20515  # Check if we need to convert this using DOS-style short mode. If the path
20516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20517  # take no chances and rewrite it.
20518  # Note: m4 eats our [], so we need to use [ and ] instead.
20519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20520  if test "x$has_forbidden_chars" != x; then
20521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20522    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20523    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20524    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20525      # Going to short mode and back again did indeed matter. Since short mode is
20526      # case insensitive, let's make it lowercase to improve readability.
20527      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20528      # Now convert it back to Unix-stile (cygpath)
20529      input_path=`$CYGPATH -u "$shortmode_path"`
20530      new_path="$input_path"
20531    fi
20532  fi
20533
20534  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20535  if test "x$test_cygdrive_prefix" = x; then
20536    # As a simple fix, exclude /usr/bin since it's not a real path.
20537    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20538      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20539      # a path prefixed by /cygdrive for fixpath to work.
20540      new_path="$CYGWIN_ROOT_PATH$input_path"
20541    fi
20542  fi
20543
20544
20545  if test "x$path" != "x$new_path"; then
20546    BOOT_JDK="$new_path"
20547    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20548$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20549  fi
20550
20551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20552
20553  path="$BOOT_JDK"
20554  has_colon=`$ECHO $path | $GREP ^.:`
20555  new_path="$path"
20556  if test "x$has_colon" = x; then
20557    # Not in mixed or Windows style, start by that.
20558    new_path=`cmd //c echo $path`
20559  fi
20560
20561
20562  input_path="$new_path"
20563  # Check if we need to convert this using DOS-style short mode. If the path
20564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20565  # take no chances and rewrite it.
20566  # Note: m4 eats our [], so we need to use [ and ] instead.
20567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20568  if test "x$has_forbidden_chars" != x; then
20569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20570    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20571  fi
20572
20573
20574  windows_path="$new_path"
20575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20576    unix_path=`$CYGPATH -u "$windows_path"`
20577    new_path="$unix_path"
20578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20580    new_path="$unix_path"
20581  fi
20582
20583  if test "x$path" != "x$new_path"; then
20584    BOOT_JDK="$new_path"
20585    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20586$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20587  fi
20588
20589  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20590  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20591
20592  else
20593    # We're on a posix platform. Hooray! :)
20594    path="$BOOT_JDK"
20595    has_space=`$ECHO "$path" | $GREP " "`
20596    if test "x$has_space" != x; then
20597      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20598$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20599      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20600    fi
20601
20602    # Use eval to expand a potential ~
20603    eval path="$path"
20604    if test ! -f "$path" && test ! -d "$path"; then
20605      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20606    fi
20607
20608    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20609  fi
20610
20611              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20612$as_echo_n "checking for Boot JDK... " >&6; }
20613              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20614$as_echo "$BOOT_JDK" >&6; }
20615              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20616$as_echo_n "checking Boot JDK version... " >&6; }
20617              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20618              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20619$as_echo "$BOOT_JDK_VERSION" >&6; }
20620            fi # end check jdk version
20621          fi # end check rt.jar
20622        fi # end check javac
20623      fi # end check java
20624    fi # end check boot jdk found
20625  fi
20626
20627
20628  if test "x$BOOT_JDK_FOUND" = xno; then
20629    # Now execute the test
20630
20631  if test -x /usr/libexec/java_home; then
20632    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20633    BOOT_JDK_FOUND=maybe
20634    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20635$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20636  fi
20637
20638
20639    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20640    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20641      # Do we have a bin/java?
20642      if test ! -x "$BOOT_JDK/bin/java"; then
20643        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20644$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20645        BOOT_JDK_FOUND=no
20646      else
20647        # Do we have a bin/javac?
20648        if test ! -x "$BOOT_JDK/bin/javac"; then
20649          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20650$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20651          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20652$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20653          BOOT_JDK_FOUND=no
20654        else
20655          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20656          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20657            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20658$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20659            BOOT_JDK_FOUND=no
20660          else
20661            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20662            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20663
20664            # Extra M4 quote needed to protect [] in grep expression.
20665            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20666            if test "x$FOUND_CORRECT_VERSION" = x; then
20667              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20668$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20669              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20670$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20671              BOOT_JDK_FOUND=no
20672            else
20673              # We're done! :-)
20674              BOOT_JDK_FOUND=yes
20675
20676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20677
20678  # Input might be given as Windows format, start by converting to
20679  # unix format.
20680  path="$BOOT_JDK"
20681  new_path=`$CYGPATH -u "$path"`
20682
20683  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20684  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20685  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20686  # "foo.exe" is OK but "foo" is an error.
20687  #
20688  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20689  # It is also a way to make sure we got the proper file name for the real test later on.
20690  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20691  if test "x$test_shortpath" = x; then
20692    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20693$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20694    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20695  fi
20696
20697  # Call helper function which possibly converts this using DOS-style short mode.
20698  # If so, the updated path is stored in $new_path.
20699
20700  input_path="$new_path"
20701  # Check if we need to convert this using DOS-style short mode. If the path
20702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20703  # take no chances and rewrite it.
20704  # Note: m4 eats our [], so we need to use [ and ] instead.
20705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20706  if test "x$has_forbidden_chars" != x; then
20707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20708    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20709    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20710    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20711      # Going to short mode and back again did indeed matter. Since short mode is
20712      # case insensitive, let's make it lowercase to improve readability.
20713      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20714      # Now convert it back to Unix-stile (cygpath)
20715      input_path=`$CYGPATH -u "$shortmode_path"`
20716      new_path="$input_path"
20717    fi
20718  fi
20719
20720  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20721  if test "x$test_cygdrive_prefix" = x; then
20722    # As a simple fix, exclude /usr/bin since it's not a real path.
20723    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20724      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20725      # a path prefixed by /cygdrive for fixpath to work.
20726      new_path="$CYGWIN_ROOT_PATH$input_path"
20727    fi
20728  fi
20729
20730
20731  if test "x$path" != "x$new_path"; then
20732    BOOT_JDK="$new_path"
20733    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20734$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20735  fi
20736
20737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20738
20739  path="$BOOT_JDK"
20740  has_colon=`$ECHO $path | $GREP ^.:`
20741  new_path="$path"
20742  if test "x$has_colon" = x; then
20743    # Not in mixed or Windows style, start by that.
20744    new_path=`cmd //c echo $path`
20745  fi
20746
20747
20748  input_path="$new_path"
20749  # Check if we need to convert this using DOS-style short mode. If the path
20750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20751  # take no chances and rewrite it.
20752  # Note: m4 eats our [], so we need to use [ and ] instead.
20753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20754  if test "x$has_forbidden_chars" != x; then
20755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20756    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20757  fi
20758
20759
20760  windows_path="$new_path"
20761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20762    unix_path=`$CYGPATH -u "$windows_path"`
20763    new_path="$unix_path"
20764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20766    new_path="$unix_path"
20767  fi
20768
20769  if test "x$path" != "x$new_path"; then
20770    BOOT_JDK="$new_path"
20771    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20772$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20773  fi
20774
20775  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20776  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20777
20778  else
20779    # We're on a posix platform. Hooray! :)
20780    path="$BOOT_JDK"
20781    has_space=`$ECHO "$path" | $GREP " "`
20782    if test "x$has_space" != x; then
20783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20784$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20785      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20786    fi
20787
20788    # Use eval to expand a potential ~
20789    eval path="$path"
20790    if test ! -f "$path" && test ! -d "$path"; then
20791      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20792    fi
20793
20794    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20795  fi
20796
20797              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20798$as_echo_n "checking for Boot JDK... " >&6; }
20799              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20800$as_echo "$BOOT_JDK" >&6; }
20801              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20802$as_echo_n "checking Boot JDK version... " >&6; }
20803              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20804              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20805$as_echo "$BOOT_JDK_VERSION" >&6; }
20806            fi # end check jdk version
20807          fi # end check rt.jar
20808        fi # end check javac
20809      fi # end check java
20810    fi # end check boot jdk found
20811  fi
20812
20813
20814  if test "x$BOOT_JDK_FOUND" = xno; then
20815    # Now execute the test
20816
20817  if test -x /usr/libexec/java_home; then
20818    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
20819    BOOT_JDK_FOUND=maybe
20820    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
20821$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
20822  fi
20823
20824
20825    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20826    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20827      # Do we have a bin/java?
20828      if test ! -x "$BOOT_JDK/bin/java"; then
20829        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20830$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20831        BOOT_JDK_FOUND=no
20832      else
20833        # Do we have a bin/javac?
20834        if test ! -x "$BOOT_JDK/bin/javac"; then
20835          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20836$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20837          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20838$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20839          BOOT_JDK_FOUND=no
20840        else
20841          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20842          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20843            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20844$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20845            BOOT_JDK_FOUND=no
20846          else
20847            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20848            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20849
20850            # Extra M4 quote needed to protect [] in grep expression.
20851            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20852            if test "x$FOUND_CORRECT_VERSION" = x; then
20853              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20854$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20855              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20856$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20857              BOOT_JDK_FOUND=no
20858            else
20859              # We're done! :-)
20860              BOOT_JDK_FOUND=yes
20861
20862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20863
20864  # Input might be given as Windows format, start by converting to
20865  # unix format.
20866  path="$BOOT_JDK"
20867  new_path=`$CYGPATH -u "$path"`
20868
20869  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20870  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20871  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20872  # "foo.exe" is OK but "foo" is an error.
20873  #
20874  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20875  # It is also a way to make sure we got the proper file name for the real test later on.
20876  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20877  if test "x$test_shortpath" = x; then
20878    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20879$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20880    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20881  fi
20882
20883  # Call helper function which possibly converts this using DOS-style short mode.
20884  # If so, the updated path is stored in $new_path.
20885
20886  input_path="$new_path"
20887  # Check if we need to convert this using DOS-style short mode. If the path
20888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20889  # take no chances and rewrite it.
20890  # Note: m4 eats our [], so we need to use [ and ] instead.
20891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20892  if test "x$has_forbidden_chars" != x; then
20893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20894    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20895    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20896    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20897      # Going to short mode and back again did indeed matter. Since short mode is
20898      # case insensitive, let's make it lowercase to improve readability.
20899      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20900      # Now convert it back to Unix-stile (cygpath)
20901      input_path=`$CYGPATH -u "$shortmode_path"`
20902      new_path="$input_path"
20903    fi
20904  fi
20905
20906  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20907  if test "x$test_cygdrive_prefix" = x; then
20908    # As a simple fix, exclude /usr/bin since it's not a real path.
20909    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20910      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20911      # a path prefixed by /cygdrive for fixpath to work.
20912      new_path="$CYGWIN_ROOT_PATH$input_path"
20913    fi
20914  fi
20915
20916
20917  if test "x$path" != "x$new_path"; then
20918    BOOT_JDK="$new_path"
20919    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20920$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20921  fi
20922
20923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20924
20925  path="$BOOT_JDK"
20926  has_colon=`$ECHO $path | $GREP ^.:`
20927  new_path="$path"
20928  if test "x$has_colon" = x; then
20929    # Not in mixed or Windows style, start by that.
20930    new_path=`cmd //c echo $path`
20931  fi
20932
20933
20934  input_path="$new_path"
20935  # Check if we need to convert this using DOS-style short mode. If the path
20936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20937  # take no chances and rewrite it.
20938  # Note: m4 eats our [], so we need to use [ and ] instead.
20939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20940  if test "x$has_forbidden_chars" != x; then
20941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20943  fi
20944
20945
20946  windows_path="$new_path"
20947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20948    unix_path=`$CYGPATH -u "$windows_path"`
20949    new_path="$unix_path"
20950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20952    new_path="$unix_path"
20953  fi
20954
20955  if test "x$path" != "x$new_path"; then
20956    BOOT_JDK="$new_path"
20957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20958$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20959  fi
20960
20961  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20962  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20963
20964  else
20965    # We're on a posix platform. Hooray! :)
20966    path="$BOOT_JDK"
20967    has_space=`$ECHO "$path" | $GREP " "`
20968    if test "x$has_space" != x; then
20969      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20970$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20971      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20972    fi
20973
20974    # Use eval to expand a potential ~
20975    eval path="$path"
20976    if test ! -f "$path" && test ! -d "$path"; then
20977      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20978    fi
20979
20980    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20981  fi
20982
20983              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20984$as_echo_n "checking for Boot JDK... " >&6; }
20985              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20986$as_echo "$BOOT_JDK" >&6; }
20987              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20988$as_echo_n "checking Boot JDK version... " >&6; }
20989              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20990              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20991$as_echo "$BOOT_JDK_VERSION" >&6; }
20992            fi # end check jdk version
20993          fi # end check rt.jar
20994        fi # end check javac
20995      fi # end check java
20996    fi # end check boot jdk found
20997  fi
20998
20999  fi
21000
21001
21002    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21003    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21004      # Do we have a bin/java?
21005      if test ! -x "$BOOT_JDK/bin/java"; then
21006        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21007$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21008        BOOT_JDK_FOUND=no
21009      else
21010        # Do we have a bin/javac?
21011        if test ! -x "$BOOT_JDK/bin/javac"; then
21012          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21013$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21014          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21015$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21016          BOOT_JDK_FOUND=no
21017        else
21018          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21019          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21020            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21021$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21022            BOOT_JDK_FOUND=no
21023          else
21024            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21025            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21026
21027            # Extra M4 quote needed to protect [] in grep expression.
21028            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21029            if test "x$FOUND_CORRECT_VERSION" = x; then
21030              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21031$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21032              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21033$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21034              BOOT_JDK_FOUND=no
21035            else
21036              # We're done! :-)
21037              BOOT_JDK_FOUND=yes
21038
21039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21040
21041  # Input might be given as Windows format, start by converting to
21042  # unix format.
21043  path="$BOOT_JDK"
21044  new_path=`$CYGPATH -u "$path"`
21045
21046  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21047  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21048  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21049  # "foo.exe" is OK but "foo" is an error.
21050  #
21051  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21052  # It is also a way to make sure we got the proper file name for the real test later on.
21053  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21054  if test "x$test_shortpath" = x; then
21055    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21056$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21057    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21058  fi
21059
21060  # Call helper function which possibly converts this using DOS-style short mode.
21061  # If so, the updated path is stored in $new_path.
21062
21063  input_path="$new_path"
21064  # Check if we need to convert this using DOS-style short mode. If the path
21065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21066  # take no chances and rewrite it.
21067  # Note: m4 eats our [], so we need to use [ and ] instead.
21068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21069  if test "x$has_forbidden_chars" != x; then
21070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21071    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21072    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21073    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21074      # Going to short mode and back again did indeed matter. Since short mode is
21075      # case insensitive, let's make it lowercase to improve readability.
21076      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21077      # Now convert it back to Unix-stile (cygpath)
21078      input_path=`$CYGPATH -u "$shortmode_path"`
21079      new_path="$input_path"
21080    fi
21081  fi
21082
21083  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21084  if test "x$test_cygdrive_prefix" = x; then
21085    # As a simple fix, exclude /usr/bin since it's not a real path.
21086    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21087      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21088      # a path prefixed by /cygdrive for fixpath to work.
21089      new_path="$CYGWIN_ROOT_PATH$input_path"
21090    fi
21091  fi
21092
21093
21094  if test "x$path" != "x$new_path"; then
21095    BOOT_JDK="$new_path"
21096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21097$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21098  fi
21099
21100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21101
21102  path="$BOOT_JDK"
21103  has_colon=`$ECHO $path | $GREP ^.:`
21104  new_path="$path"
21105  if test "x$has_colon" = x; then
21106    # Not in mixed or Windows style, start by that.
21107    new_path=`cmd //c echo $path`
21108  fi
21109
21110
21111  input_path="$new_path"
21112  # Check if we need to convert this using DOS-style short mode. If the path
21113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21114  # take no chances and rewrite it.
21115  # Note: m4 eats our [], so we need to use [ and ] instead.
21116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21117  if test "x$has_forbidden_chars" != x; then
21118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21119    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21120  fi
21121
21122
21123  windows_path="$new_path"
21124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21125    unix_path=`$CYGPATH -u "$windows_path"`
21126    new_path="$unix_path"
21127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21129    new_path="$unix_path"
21130  fi
21131
21132  if test "x$path" != "x$new_path"; then
21133    BOOT_JDK="$new_path"
21134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21135$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21136  fi
21137
21138  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21139  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21140
21141  else
21142    # We're on a posix platform. Hooray! :)
21143    path="$BOOT_JDK"
21144    has_space=`$ECHO "$path" | $GREP " "`
21145    if test "x$has_space" != x; then
21146      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21147$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21148      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21149    fi
21150
21151    # Use eval to expand a potential ~
21152    eval path="$path"
21153    if test ! -f "$path" && test ! -d "$path"; then
21154      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21155    fi
21156
21157    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21158  fi
21159
21160              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21161$as_echo_n "checking for Boot JDK... " >&6; }
21162              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21163$as_echo "$BOOT_JDK" >&6; }
21164              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21165$as_echo_n "checking Boot JDK version... " >&6; }
21166              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21167              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21168$as_echo "$BOOT_JDK_VERSION" >&6; }
21169            fi # end check jdk version
21170          fi # end check rt.jar
21171        fi # end check javac
21172      fi # end check java
21173    fi # end check boot jdk found
21174  fi
21175
21176
21177  # Test: Is $JAVA_HOME set?
21178
21179  if test "x$BOOT_JDK_FOUND" = xno; then
21180    # Now execute the test
21181
21182  if test "x$JAVA_HOME" != x; then
21183    JAVA_HOME_PROCESSED="$JAVA_HOME"
21184
21185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21186
21187  # Input might be given as Windows format, start by converting to
21188  # unix format.
21189  path="$JAVA_HOME_PROCESSED"
21190  new_path=`$CYGPATH -u "$path"`
21191
21192  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21193  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21194  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21195  # "foo.exe" is OK but "foo" is an error.
21196  #
21197  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21198  # It is also a way to make sure we got the proper file name for the real test later on.
21199  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21200  if test "x$test_shortpath" = x; then
21201    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21202$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21203    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21204  fi
21205
21206  # Call helper function which possibly converts this using DOS-style short mode.
21207  # If so, the updated path is stored in $new_path.
21208
21209  input_path="$new_path"
21210  # Check if we need to convert this using DOS-style short mode. If the path
21211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21212  # take no chances and rewrite it.
21213  # Note: m4 eats our [], so we need to use [ and ] instead.
21214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21215  if test "x$has_forbidden_chars" != x; then
21216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21217    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21218    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21219    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21220      # Going to short mode and back again did indeed matter. Since short mode is
21221      # case insensitive, let's make it lowercase to improve readability.
21222      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21223      # Now convert it back to Unix-stile (cygpath)
21224      input_path=`$CYGPATH -u "$shortmode_path"`
21225      new_path="$input_path"
21226    fi
21227  fi
21228
21229  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21230  if test "x$test_cygdrive_prefix" = x; then
21231    # As a simple fix, exclude /usr/bin since it's not a real path.
21232    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21233      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21234      # a path prefixed by /cygdrive for fixpath to work.
21235      new_path="$CYGWIN_ROOT_PATH$input_path"
21236    fi
21237  fi
21238
21239
21240  if test "x$path" != "x$new_path"; then
21241    JAVA_HOME_PROCESSED="$new_path"
21242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21243$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21244  fi
21245
21246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21247
21248  path="$JAVA_HOME_PROCESSED"
21249  has_colon=`$ECHO $path | $GREP ^.:`
21250  new_path="$path"
21251  if test "x$has_colon" = x; then
21252    # Not in mixed or Windows style, start by that.
21253    new_path=`cmd //c echo $path`
21254  fi
21255
21256
21257  input_path="$new_path"
21258  # Check if we need to convert this using DOS-style short mode. If the path
21259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21260  # take no chances and rewrite it.
21261  # Note: m4 eats our [], so we need to use [ and ] instead.
21262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21263  if test "x$has_forbidden_chars" != x; then
21264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21265    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21266  fi
21267
21268
21269  windows_path="$new_path"
21270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21271    unix_path=`$CYGPATH -u "$windows_path"`
21272    new_path="$unix_path"
21273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21275    new_path="$unix_path"
21276  fi
21277
21278  if test "x$path" != "x$new_path"; then
21279    JAVA_HOME_PROCESSED="$new_path"
21280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21281$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21282  fi
21283
21284  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21285  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21286
21287  else
21288    # We're on a posix platform. Hooray! :)
21289    path="$JAVA_HOME_PROCESSED"
21290    has_space=`$ECHO "$path" | $GREP " "`
21291    if test "x$has_space" != x; then
21292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21293$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21294      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21295    fi
21296
21297    # Use eval to expand a potential ~
21298    eval path="$path"
21299    if test ! -f "$path" && test ! -d "$path"; then
21300      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21301    fi
21302
21303    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21304  fi
21305
21306    if test ! -d "$JAVA_HOME_PROCESSED"; then
21307      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21308$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21309    else
21310      # Aha, the user has set a JAVA_HOME
21311      # let us use that as the Boot JDK.
21312      BOOT_JDK="$JAVA_HOME_PROCESSED"
21313      BOOT_JDK_FOUND=maybe
21314      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21315$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21316    fi
21317  fi
21318
21319
21320    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21321    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21322      # Do we have a bin/java?
21323      if test ! -x "$BOOT_JDK/bin/java"; then
21324        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21325$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21326        BOOT_JDK_FOUND=no
21327      else
21328        # Do we have a bin/javac?
21329        if test ! -x "$BOOT_JDK/bin/javac"; then
21330          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21332          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21333$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21334          BOOT_JDK_FOUND=no
21335        else
21336          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21337          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21338            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21339$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21340            BOOT_JDK_FOUND=no
21341          else
21342            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21343            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21344
21345            # Extra M4 quote needed to protect [] in grep expression.
21346            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21347            if test "x$FOUND_CORRECT_VERSION" = x; then
21348              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21350              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21351$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21352              BOOT_JDK_FOUND=no
21353            else
21354              # We're done! :-)
21355              BOOT_JDK_FOUND=yes
21356
21357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21358
21359  # Input might be given as Windows format, start by converting to
21360  # unix format.
21361  path="$BOOT_JDK"
21362  new_path=`$CYGPATH -u "$path"`
21363
21364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21367  # "foo.exe" is OK but "foo" is an error.
21368  #
21369  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21370  # It is also a way to make sure we got the proper file name for the real test later on.
21371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21372  if test "x$test_shortpath" = x; then
21373    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21374$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21375    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21376  fi
21377
21378  # Call helper function which possibly converts this using DOS-style short mode.
21379  # If so, the updated path is stored in $new_path.
21380
21381  input_path="$new_path"
21382  # Check if we need to convert this using DOS-style short mode. If the path
21383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21384  # take no chances and rewrite it.
21385  # Note: m4 eats our [], so we need to use [ and ] instead.
21386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21387  if test "x$has_forbidden_chars" != x; then
21388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21389    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21390    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21391    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21392      # Going to short mode and back again did indeed matter. Since short mode is
21393      # case insensitive, let's make it lowercase to improve readability.
21394      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21395      # Now convert it back to Unix-stile (cygpath)
21396      input_path=`$CYGPATH -u "$shortmode_path"`
21397      new_path="$input_path"
21398    fi
21399  fi
21400
21401  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21402  if test "x$test_cygdrive_prefix" = x; then
21403    # As a simple fix, exclude /usr/bin since it's not a real path.
21404    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21405      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21406      # a path prefixed by /cygdrive for fixpath to work.
21407      new_path="$CYGWIN_ROOT_PATH$input_path"
21408    fi
21409  fi
21410
21411
21412  if test "x$path" != "x$new_path"; then
21413    BOOT_JDK="$new_path"
21414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21415$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21416  fi
21417
21418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21419
21420  path="$BOOT_JDK"
21421  has_colon=`$ECHO $path | $GREP ^.:`
21422  new_path="$path"
21423  if test "x$has_colon" = x; then
21424    # Not in mixed or Windows style, start by that.
21425    new_path=`cmd //c echo $path`
21426  fi
21427
21428
21429  input_path="$new_path"
21430  # Check if we need to convert this using DOS-style short mode. If the path
21431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21432  # take no chances and rewrite it.
21433  # Note: m4 eats our [], so we need to use [ and ] instead.
21434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21435  if test "x$has_forbidden_chars" != x; then
21436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21438  fi
21439
21440
21441  windows_path="$new_path"
21442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21443    unix_path=`$CYGPATH -u "$windows_path"`
21444    new_path="$unix_path"
21445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21447    new_path="$unix_path"
21448  fi
21449
21450  if test "x$path" != "x$new_path"; then
21451    BOOT_JDK="$new_path"
21452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21453$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21454  fi
21455
21456  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21457  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21458
21459  else
21460    # We're on a posix platform. Hooray! :)
21461    path="$BOOT_JDK"
21462    has_space=`$ECHO "$path" | $GREP " "`
21463    if test "x$has_space" != x; then
21464      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21465$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21466      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21467    fi
21468
21469    # Use eval to expand a potential ~
21470    eval path="$path"
21471    if test ! -f "$path" && test ! -d "$path"; then
21472      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21473    fi
21474
21475    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21476  fi
21477
21478              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21479$as_echo_n "checking for Boot JDK... " >&6; }
21480              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21481$as_echo "$BOOT_JDK" >&6; }
21482              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21483$as_echo_n "checking Boot JDK version... " >&6; }
21484              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21485              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21486$as_echo "$BOOT_JDK_VERSION" >&6; }
21487            fi # end check jdk version
21488          fi # end check rt.jar
21489        fi # end check javac
21490      fi # end check java
21491    fi # end check boot jdk found
21492  fi
21493
21494
21495  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21496
21497  if test "x$BOOT_JDK_FOUND" = xno; then
21498    # Now execute the test
21499
21500  # Extract the first word of "javac", so it can be a program name with args.
21501set dummy javac; ac_word=$2
21502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21503$as_echo_n "checking for $ac_word... " >&6; }
21504if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21505  $as_echo_n "(cached) " >&6
21506else
21507  case $JAVAC_CHECK in
21508  [\\/]* | ?:[\\/]*)
21509  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21510  ;;
21511  *)
21512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21513for as_dir in $PATH
21514do
21515  IFS=$as_save_IFS
21516  test -z "$as_dir" && as_dir=.
21517    for ac_exec_ext in '' $ac_executable_extensions; do
21518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21519    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21521    break 2
21522  fi
21523done
21524  done
21525IFS=$as_save_IFS
21526
21527  ;;
21528esac
21529fi
21530JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21531if test -n "$JAVAC_CHECK"; then
21532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21533$as_echo "$JAVAC_CHECK" >&6; }
21534else
21535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21536$as_echo "no" >&6; }
21537fi
21538
21539
21540  # Extract the first word of "java", so it can be a program name with args.
21541set dummy java; ac_word=$2
21542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21543$as_echo_n "checking for $ac_word... " >&6; }
21544if ${ac_cv_path_JAVA_CHECK+:} false; then :
21545  $as_echo_n "(cached) " >&6
21546else
21547  case $JAVA_CHECK in
21548  [\\/]* | ?:[\\/]*)
21549  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21550  ;;
21551  *)
21552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21553for as_dir in $PATH
21554do
21555  IFS=$as_save_IFS
21556  test -z "$as_dir" && as_dir=.
21557    for ac_exec_ext in '' $ac_executable_extensions; do
21558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21559    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21561    break 2
21562  fi
21563done
21564  done
21565IFS=$as_save_IFS
21566
21567  ;;
21568esac
21569fi
21570JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21571if test -n "$JAVA_CHECK"; then
21572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21573$as_echo "$JAVA_CHECK" >&6; }
21574else
21575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21576$as_echo "no" >&6; }
21577fi
21578
21579
21580  BINARY="$JAVAC_CHECK"
21581  if test "x$JAVAC_CHECK" = x; then
21582    BINARY="$JAVA_CHECK"
21583  fi
21584  if test "x$BINARY" != x; then
21585    # So there is a java(c) binary, it might be part of a JDK.
21586    # Lets find the JDK/JRE directory by following symbolic links.
21587    # Linux/GNU systems often have links from /usr/bin/java to
21588    # /etc/alternatives/java to the real JDK binary.
21589
21590  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21591    # Follow a chain of symbolic links. Use readlink
21592    # where it exists, else fall back to horribly
21593    # complicated shell code.
21594    if test "x$READLINK_TESTED" != yes; then
21595      # On MacOSX there is a readlink tool with a different
21596      # purpose than the GNU readlink tool. Check the found readlink.
21597      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21598      if test "x$ISGNU" = x; then
21599        # A readlink that we do not know how to use.
21600        # Are there other non-GNU readlinks out there?
21601        READLINK_TESTED=yes
21602        READLINK=
21603      fi
21604    fi
21605
21606    if test "x$READLINK" != x; then
21607      BINARY=`$READLINK -f $BINARY`
21608    else
21609      # Save the current directory for restoring afterwards
21610      STARTDIR=$PWD
21611      COUNTER=0
21612      sym_link_dir=`$DIRNAME $BINARY`
21613      sym_link_file=`$BASENAME $BINARY`
21614      cd $sym_link_dir
21615      # Use -P flag to resolve symlinks in directories.
21616      cd `$THEPWDCMD -P`
21617      sym_link_dir=`$THEPWDCMD -P`
21618      # Resolve file symlinks
21619      while test $COUNTER -lt 20; do
21620        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21621        if test "x$ISLINK" == x; then
21622          # This is not a symbolic link! We are done!
21623          break
21624        fi
21625        # Again resolve directory symlinks since the target of the just found
21626        # link could be in a different directory
21627        cd `$DIRNAME $ISLINK`
21628        sym_link_dir=`$THEPWDCMD -P`
21629        sym_link_file=`$BASENAME $ISLINK`
21630        let COUNTER=COUNTER+1
21631      done
21632      cd $STARTDIR
21633      BINARY=$sym_link_dir/$sym_link_file
21634    fi
21635  fi
21636
21637    BOOT_JDK=`dirname "$BINARY"`
21638    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21639    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21640      # Looks like we found ourselves an JDK
21641      BOOT_JDK_FOUND=maybe
21642      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21643$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21644    fi
21645  fi
21646
21647
21648    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21649    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21650      # Do we have a bin/java?
21651      if test ! -x "$BOOT_JDK/bin/java"; then
21652        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21653$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21654        BOOT_JDK_FOUND=no
21655      else
21656        # Do we have a bin/javac?
21657        if test ! -x "$BOOT_JDK/bin/javac"; then
21658          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21659$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21660          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21661$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21662          BOOT_JDK_FOUND=no
21663        else
21664          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21665          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21666            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21667$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21668            BOOT_JDK_FOUND=no
21669          else
21670            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21671            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21672
21673            # Extra M4 quote needed to protect [] in grep expression.
21674            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21675            if test "x$FOUND_CORRECT_VERSION" = x; then
21676              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21677$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21678              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21679$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21680              BOOT_JDK_FOUND=no
21681            else
21682              # We're done! :-)
21683              BOOT_JDK_FOUND=yes
21684
21685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21686
21687  # Input might be given as Windows format, start by converting to
21688  # unix format.
21689  path="$BOOT_JDK"
21690  new_path=`$CYGPATH -u "$path"`
21691
21692  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21693  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21694  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21695  # "foo.exe" is OK but "foo" is an error.
21696  #
21697  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21698  # It is also a way to make sure we got the proper file name for the real test later on.
21699  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21700  if test "x$test_shortpath" = x; then
21701    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21702$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21703    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21704  fi
21705
21706  # Call helper function which possibly converts this using DOS-style short mode.
21707  # If so, the updated path is stored in $new_path.
21708
21709  input_path="$new_path"
21710  # Check if we need to convert this using DOS-style short mode. If the path
21711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21712  # take no chances and rewrite it.
21713  # Note: m4 eats our [], so we need to use [ and ] instead.
21714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21715  if test "x$has_forbidden_chars" != x; then
21716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21717    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21718    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21719    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21720      # Going to short mode and back again did indeed matter. Since short mode is
21721      # case insensitive, let's make it lowercase to improve readability.
21722      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21723      # Now convert it back to Unix-stile (cygpath)
21724      input_path=`$CYGPATH -u "$shortmode_path"`
21725      new_path="$input_path"
21726    fi
21727  fi
21728
21729  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21730  if test "x$test_cygdrive_prefix" = x; then
21731    # As a simple fix, exclude /usr/bin since it's not a real path.
21732    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21733      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21734      # a path prefixed by /cygdrive for fixpath to work.
21735      new_path="$CYGWIN_ROOT_PATH$input_path"
21736    fi
21737  fi
21738
21739
21740  if test "x$path" != "x$new_path"; then
21741    BOOT_JDK="$new_path"
21742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21743$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21744  fi
21745
21746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21747
21748  path="$BOOT_JDK"
21749  has_colon=`$ECHO $path | $GREP ^.:`
21750  new_path="$path"
21751  if test "x$has_colon" = x; then
21752    # Not in mixed or Windows style, start by that.
21753    new_path=`cmd //c echo $path`
21754  fi
21755
21756
21757  input_path="$new_path"
21758  # Check if we need to convert this using DOS-style short mode. If the path
21759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21760  # take no chances and rewrite it.
21761  # Note: m4 eats our [], so we need to use [ and ] instead.
21762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21763  if test "x$has_forbidden_chars" != x; then
21764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21765    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21766  fi
21767
21768
21769  windows_path="$new_path"
21770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21771    unix_path=`$CYGPATH -u "$windows_path"`
21772    new_path="$unix_path"
21773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21775    new_path="$unix_path"
21776  fi
21777
21778  if test "x$path" != "x$new_path"; then
21779    BOOT_JDK="$new_path"
21780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21781$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21782  fi
21783
21784  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21785  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21786
21787  else
21788    # We're on a posix platform. Hooray! :)
21789    path="$BOOT_JDK"
21790    has_space=`$ECHO "$path" | $GREP " "`
21791    if test "x$has_space" != x; then
21792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21793$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21794      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21795    fi
21796
21797    # Use eval to expand a potential ~
21798    eval path="$path"
21799    if test ! -f "$path" && test ! -d "$path"; then
21800      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21801    fi
21802
21803    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21804  fi
21805
21806              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21807$as_echo_n "checking for Boot JDK... " >&6; }
21808              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21809$as_echo "$BOOT_JDK" >&6; }
21810              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21811$as_echo_n "checking Boot JDK version... " >&6; }
21812              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21813              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21814$as_echo "$BOOT_JDK_VERSION" >&6; }
21815            fi # end check jdk version
21816          fi # end check rt.jar
21817        fi # end check javac
21818      fi # end check java
21819    fi # end check boot jdk found
21820  fi
21821
21822
21823  # Test: Is there a JDK installed in default, well-known locations?
21824
21825  if test "x$BOOT_JDK_FOUND" = xno; then
21826    # Now execute the test
21827
21828  if test "x$OPENJDK_TARGET_OS" = xwindows; then
21829
21830  if test "x$BOOT_JDK_FOUND" = xno; then
21831    # Now execute the test
21832
21833  if test "x$ProgramW6432" != x; then
21834    VIRTUAL_DIR="$ProgramW6432/Java"
21835
21836  windows_path="$VIRTUAL_DIR"
21837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21838    unix_path=`$CYGPATH -u "$windows_path"`
21839    VIRTUAL_DIR="$unix_path"
21840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21842    VIRTUAL_DIR="$unix_path"
21843  fi
21844
21845
21846  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21847  BOOT_JDK_SUFFIX=""
21848  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21849  if test "x$ALL_JDKS_FOUND" != x; then
21850    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21851
21852  if test "x$BOOT_JDK_FOUND" = xno; then
21853    # Now execute the test
21854
21855        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21856        if test -d "$BOOT_JDK"; then
21857          BOOT_JDK_FOUND=maybe
21858          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21859$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21860        fi
21861
21862
21863    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21864    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21865      # Do we have a bin/java?
21866      if test ! -x "$BOOT_JDK/bin/java"; then
21867        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21868$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21869        BOOT_JDK_FOUND=no
21870      else
21871        # Do we have a bin/javac?
21872        if test ! -x "$BOOT_JDK/bin/javac"; then
21873          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21874$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21875          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21876$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21877          BOOT_JDK_FOUND=no
21878        else
21879          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21880          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21881            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21882$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21883            BOOT_JDK_FOUND=no
21884          else
21885            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21886            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21887
21888            # Extra M4 quote needed to protect [] in grep expression.
21889            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21890            if test "x$FOUND_CORRECT_VERSION" = x; then
21891              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21892$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21893              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21894$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21895              BOOT_JDK_FOUND=no
21896            else
21897              # We're done! :-)
21898              BOOT_JDK_FOUND=yes
21899
21900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21901
21902  # Input might be given as Windows format, start by converting to
21903  # unix format.
21904  path="$BOOT_JDK"
21905  new_path=`$CYGPATH -u "$path"`
21906
21907  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21908  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21909  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21910  # "foo.exe" is OK but "foo" is an error.
21911  #
21912  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21913  # It is also a way to make sure we got the proper file name for the real test later on.
21914  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21915  if test "x$test_shortpath" = x; then
21916    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21917$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21918    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21919  fi
21920
21921  # Call helper function which possibly converts this using DOS-style short mode.
21922  # If so, the updated path is stored in $new_path.
21923
21924  input_path="$new_path"
21925  # Check if we need to convert this using DOS-style short mode. If the path
21926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21927  # take no chances and rewrite it.
21928  # Note: m4 eats our [], so we need to use [ and ] instead.
21929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21930  if test "x$has_forbidden_chars" != x; then
21931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21932    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21933    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21934    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21935      # Going to short mode and back again did indeed matter. Since short mode is
21936      # case insensitive, let's make it lowercase to improve readability.
21937      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21938      # Now convert it back to Unix-stile (cygpath)
21939      input_path=`$CYGPATH -u "$shortmode_path"`
21940      new_path="$input_path"
21941    fi
21942  fi
21943
21944  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21945  if test "x$test_cygdrive_prefix" = x; then
21946    # As a simple fix, exclude /usr/bin since it's not a real path.
21947    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21948      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21949      # a path prefixed by /cygdrive for fixpath to work.
21950      new_path="$CYGWIN_ROOT_PATH$input_path"
21951    fi
21952  fi
21953
21954
21955  if test "x$path" != "x$new_path"; then
21956    BOOT_JDK="$new_path"
21957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21958$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21959  fi
21960
21961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21962
21963  path="$BOOT_JDK"
21964  has_colon=`$ECHO $path | $GREP ^.:`
21965  new_path="$path"
21966  if test "x$has_colon" = x; then
21967    # Not in mixed or Windows style, start by that.
21968    new_path=`cmd //c echo $path`
21969  fi
21970
21971
21972  input_path="$new_path"
21973  # Check if we need to convert this using DOS-style short mode. If the path
21974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21975  # take no chances and rewrite it.
21976  # Note: m4 eats our [], so we need to use [ and ] instead.
21977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21978  if test "x$has_forbidden_chars" != x; then
21979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21980    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21981  fi
21982
21983
21984  windows_path="$new_path"
21985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21986    unix_path=`$CYGPATH -u "$windows_path"`
21987    new_path="$unix_path"
21988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21990    new_path="$unix_path"
21991  fi
21992
21993  if test "x$path" != "x$new_path"; then
21994    BOOT_JDK="$new_path"
21995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21996$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21997  fi
21998
21999  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22000  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22001
22002  else
22003    # We're on a posix platform. Hooray! :)
22004    path="$BOOT_JDK"
22005    has_space=`$ECHO "$path" | $GREP " "`
22006    if test "x$has_space" != x; then
22007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22008$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22009      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22010    fi
22011
22012    # Use eval to expand a potential ~
22013    eval path="$path"
22014    if test ! -f "$path" && test ! -d "$path"; then
22015      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22016    fi
22017
22018    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22019  fi
22020
22021              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22022$as_echo_n "checking for Boot JDK... " >&6; }
22023              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22024$as_echo "$BOOT_JDK" >&6; }
22025              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22026$as_echo_n "checking Boot JDK version... " >&6; }
22027              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22028              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22029$as_echo "$BOOT_JDK_VERSION" >&6; }
22030            fi # end check jdk version
22031          fi # end check rt.jar
22032        fi # end check javac
22033      fi # end check java
22034    fi # end check boot jdk found
22035  fi
22036
22037    done
22038  fi
22039
22040  fi
22041
22042
22043    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22044    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22045      # Do we have a bin/java?
22046      if test ! -x "$BOOT_JDK/bin/java"; then
22047        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22048$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22049        BOOT_JDK_FOUND=no
22050      else
22051        # Do we have a bin/javac?
22052        if test ! -x "$BOOT_JDK/bin/javac"; then
22053          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22054$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22055          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22056$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22057          BOOT_JDK_FOUND=no
22058        else
22059          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22060          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22061            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22062$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22063            BOOT_JDK_FOUND=no
22064          else
22065            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22066            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22067
22068            # Extra M4 quote needed to protect [] in grep expression.
22069            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22070            if test "x$FOUND_CORRECT_VERSION" = x; then
22071              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22072$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22073              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22074$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22075              BOOT_JDK_FOUND=no
22076            else
22077              # We're done! :-)
22078              BOOT_JDK_FOUND=yes
22079
22080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22081
22082  # Input might be given as Windows format, start by converting to
22083  # unix format.
22084  path="$BOOT_JDK"
22085  new_path=`$CYGPATH -u "$path"`
22086
22087  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22088  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22089  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22090  # "foo.exe" is OK but "foo" is an error.
22091  #
22092  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22093  # It is also a way to make sure we got the proper file name for the real test later on.
22094  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22095  if test "x$test_shortpath" = x; then
22096    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22097$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22098    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22099  fi
22100
22101  # Call helper function which possibly converts this using DOS-style short mode.
22102  # If so, the updated path is stored in $new_path.
22103
22104  input_path="$new_path"
22105  # Check if we need to convert this using DOS-style short mode. If the path
22106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22107  # take no chances and rewrite it.
22108  # Note: m4 eats our [], so we need to use [ and ] instead.
22109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22110  if test "x$has_forbidden_chars" != x; then
22111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22115      # Going to short mode and back again did indeed matter. Since short mode is
22116      # case insensitive, let's make it lowercase to improve readability.
22117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22118      # Now convert it back to Unix-stile (cygpath)
22119      input_path=`$CYGPATH -u "$shortmode_path"`
22120      new_path="$input_path"
22121    fi
22122  fi
22123
22124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22125  if test "x$test_cygdrive_prefix" = x; then
22126    # As a simple fix, exclude /usr/bin since it's not a real path.
22127    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22129      # a path prefixed by /cygdrive for fixpath to work.
22130      new_path="$CYGWIN_ROOT_PATH$input_path"
22131    fi
22132  fi
22133
22134
22135  if test "x$path" != "x$new_path"; then
22136    BOOT_JDK="$new_path"
22137    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22138$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22139  fi
22140
22141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22142
22143  path="$BOOT_JDK"
22144  has_colon=`$ECHO $path | $GREP ^.:`
22145  new_path="$path"
22146  if test "x$has_colon" = x; then
22147    # Not in mixed or Windows style, start by that.
22148    new_path=`cmd //c echo $path`
22149  fi
22150
22151
22152  input_path="$new_path"
22153  # Check if we need to convert this using DOS-style short mode. If the path
22154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22155  # take no chances and rewrite it.
22156  # Note: m4 eats our [], so we need to use [ and ] instead.
22157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22158  if test "x$has_forbidden_chars" != x; then
22159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22160    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22161  fi
22162
22163
22164  windows_path="$new_path"
22165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22166    unix_path=`$CYGPATH -u "$windows_path"`
22167    new_path="$unix_path"
22168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22170    new_path="$unix_path"
22171  fi
22172
22173  if test "x$path" != "x$new_path"; then
22174    BOOT_JDK="$new_path"
22175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22176$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22177  fi
22178
22179  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22180  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22181
22182  else
22183    # We're on a posix platform. Hooray! :)
22184    path="$BOOT_JDK"
22185    has_space=`$ECHO "$path" | $GREP " "`
22186    if test "x$has_space" != x; then
22187      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22188$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22189      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22190    fi
22191
22192    # Use eval to expand a potential ~
22193    eval path="$path"
22194    if test ! -f "$path" && test ! -d "$path"; then
22195      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22196    fi
22197
22198    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22199  fi
22200
22201              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22202$as_echo_n "checking for Boot JDK... " >&6; }
22203              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22204$as_echo "$BOOT_JDK" >&6; }
22205              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22206$as_echo_n "checking Boot JDK version... " >&6; }
22207              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22208              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22209$as_echo "$BOOT_JDK_VERSION" >&6; }
22210            fi # end check jdk version
22211          fi # end check rt.jar
22212        fi # end check javac
22213      fi # end check java
22214    fi # end check boot jdk found
22215  fi
22216
22217
22218  if test "x$BOOT_JDK_FOUND" = xno; then
22219    # Now execute the test
22220
22221  if test "x$PROGRAMW6432" != x; then
22222    VIRTUAL_DIR="$PROGRAMW6432/Java"
22223
22224  windows_path="$VIRTUAL_DIR"
22225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22226    unix_path=`$CYGPATH -u "$windows_path"`
22227    VIRTUAL_DIR="$unix_path"
22228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22229    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22230    VIRTUAL_DIR="$unix_path"
22231  fi
22232
22233
22234  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22235  BOOT_JDK_SUFFIX=""
22236  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22237  if test "x$ALL_JDKS_FOUND" != x; then
22238    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22239
22240  if test "x$BOOT_JDK_FOUND" = xno; then
22241    # Now execute the test
22242
22243        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22244        if test -d "$BOOT_JDK"; then
22245          BOOT_JDK_FOUND=maybe
22246          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22247$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22248        fi
22249
22250
22251    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22252    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22253      # Do we have a bin/java?
22254      if test ! -x "$BOOT_JDK/bin/java"; then
22255        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22256$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22257        BOOT_JDK_FOUND=no
22258      else
22259        # Do we have a bin/javac?
22260        if test ! -x "$BOOT_JDK/bin/javac"; then
22261          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22262$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22263          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22264$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22265          BOOT_JDK_FOUND=no
22266        else
22267          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22268          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22269            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22270$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22271            BOOT_JDK_FOUND=no
22272          else
22273            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22274            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22275
22276            # Extra M4 quote needed to protect [] in grep expression.
22277            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22278            if test "x$FOUND_CORRECT_VERSION" = x; then
22279              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22280$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22281              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22282$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22283              BOOT_JDK_FOUND=no
22284            else
22285              # We're done! :-)
22286              BOOT_JDK_FOUND=yes
22287
22288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22289
22290  # Input might be given as Windows format, start by converting to
22291  # unix format.
22292  path="$BOOT_JDK"
22293  new_path=`$CYGPATH -u "$path"`
22294
22295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22298  # "foo.exe" is OK but "foo" is an error.
22299  #
22300  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22301  # It is also a way to make sure we got the proper file name for the real test later on.
22302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22303  if test "x$test_shortpath" = x; then
22304    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22305$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22306    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22307  fi
22308
22309  # Call helper function which possibly converts this using DOS-style short mode.
22310  # If so, the updated path is stored in $new_path.
22311
22312  input_path="$new_path"
22313  # Check if we need to convert this using DOS-style short mode. If the path
22314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22315  # take no chances and rewrite it.
22316  # Note: m4 eats our [], so we need to use [ and ] instead.
22317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22318  if test "x$has_forbidden_chars" != x; then
22319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22323      # Going to short mode and back again did indeed matter. Since short mode is
22324      # case insensitive, let's make it lowercase to improve readability.
22325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22326      # Now convert it back to Unix-stile (cygpath)
22327      input_path=`$CYGPATH -u "$shortmode_path"`
22328      new_path="$input_path"
22329    fi
22330  fi
22331
22332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22333  if test "x$test_cygdrive_prefix" = x; then
22334    # As a simple fix, exclude /usr/bin since it's not a real path.
22335    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22337      # a path prefixed by /cygdrive for fixpath to work.
22338      new_path="$CYGWIN_ROOT_PATH$input_path"
22339    fi
22340  fi
22341
22342
22343  if test "x$path" != "x$new_path"; then
22344    BOOT_JDK="$new_path"
22345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22346$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22347  fi
22348
22349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22350
22351  path="$BOOT_JDK"
22352  has_colon=`$ECHO $path | $GREP ^.:`
22353  new_path="$path"
22354  if test "x$has_colon" = x; then
22355    # Not in mixed or Windows style, start by that.
22356    new_path=`cmd //c echo $path`
22357  fi
22358
22359
22360  input_path="$new_path"
22361  # Check if we need to convert this using DOS-style short mode. If the path
22362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22363  # take no chances and rewrite it.
22364  # Note: m4 eats our [], so we need to use [ and ] instead.
22365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22366  if test "x$has_forbidden_chars" != x; then
22367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22369  fi
22370
22371
22372  windows_path="$new_path"
22373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22374    unix_path=`$CYGPATH -u "$windows_path"`
22375    new_path="$unix_path"
22376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22378    new_path="$unix_path"
22379  fi
22380
22381  if test "x$path" != "x$new_path"; then
22382    BOOT_JDK="$new_path"
22383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22384$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22385  fi
22386
22387  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22388  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22389
22390  else
22391    # We're on a posix platform. Hooray! :)
22392    path="$BOOT_JDK"
22393    has_space=`$ECHO "$path" | $GREP " "`
22394    if test "x$has_space" != x; then
22395      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22396$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22397      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22398    fi
22399
22400    # Use eval to expand a potential ~
22401    eval path="$path"
22402    if test ! -f "$path" && test ! -d "$path"; then
22403      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22404    fi
22405
22406    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22407  fi
22408
22409              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22410$as_echo_n "checking for Boot JDK... " >&6; }
22411              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22412$as_echo "$BOOT_JDK" >&6; }
22413              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22414$as_echo_n "checking Boot JDK version... " >&6; }
22415              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22416              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22417$as_echo "$BOOT_JDK_VERSION" >&6; }
22418            fi # end check jdk version
22419          fi # end check rt.jar
22420        fi # end check javac
22421      fi # end check java
22422    fi # end check boot jdk found
22423  fi
22424
22425    done
22426  fi
22427
22428  fi
22429
22430
22431    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22432    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22433      # Do we have a bin/java?
22434      if test ! -x "$BOOT_JDK/bin/java"; then
22435        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22436$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22437        BOOT_JDK_FOUND=no
22438      else
22439        # Do we have a bin/javac?
22440        if test ! -x "$BOOT_JDK/bin/javac"; then
22441          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22442$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22443          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22444$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22445          BOOT_JDK_FOUND=no
22446        else
22447          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22448          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22449            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22450$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22451            BOOT_JDK_FOUND=no
22452          else
22453            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22454            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22455
22456            # Extra M4 quote needed to protect [] in grep expression.
22457            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22458            if test "x$FOUND_CORRECT_VERSION" = x; then
22459              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22460$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22461              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22462$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22463              BOOT_JDK_FOUND=no
22464            else
22465              # We're done! :-)
22466              BOOT_JDK_FOUND=yes
22467
22468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22469
22470  # Input might be given as Windows format, start by converting to
22471  # unix format.
22472  path="$BOOT_JDK"
22473  new_path=`$CYGPATH -u "$path"`
22474
22475  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22476  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22477  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22478  # "foo.exe" is OK but "foo" is an error.
22479  #
22480  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22481  # It is also a way to make sure we got the proper file name for the real test later on.
22482  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22483  if test "x$test_shortpath" = x; then
22484    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22485$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22486    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22487  fi
22488
22489  # Call helper function which possibly converts this using DOS-style short mode.
22490  # If so, the updated path is stored in $new_path.
22491
22492  input_path="$new_path"
22493  # Check if we need to convert this using DOS-style short mode. If the path
22494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22495  # take no chances and rewrite it.
22496  # Note: m4 eats our [], so we need to use [ and ] instead.
22497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22498  if test "x$has_forbidden_chars" != x; then
22499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22500    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22501    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22502    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22503      # Going to short mode and back again did indeed matter. Since short mode is
22504      # case insensitive, let's make it lowercase to improve readability.
22505      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22506      # Now convert it back to Unix-stile (cygpath)
22507      input_path=`$CYGPATH -u "$shortmode_path"`
22508      new_path="$input_path"
22509    fi
22510  fi
22511
22512  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22513  if test "x$test_cygdrive_prefix" = x; then
22514    # As a simple fix, exclude /usr/bin since it's not a real path.
22515    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22516      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22517      # a path prefixed by /cygdrive for fixpath to work.
22518      new_path="$CYGWIN_ROOT_PATH$input_path"
22519    fi
22520  fi
22521
22522
22523  if test "x$path" != "x$new_path"; then
22524    BOOT_JDK="$new_path"
22525    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22526$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22527  fi
22528
22529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22530
22531  path="$BOOT_JDK"
22532  has_colon=`$ECHO $path | $GREP ^.:`
22533  new_path="$path"
22534  if test "x$has_colon" = x; then
22535    # Not in mixed or Windows style, start by that.
22536    new_path=`cmd //c echo $path`
22537  fi
22538
22539
22540  input_path="$new_path"
22541  # Check if we need to convert this using DOS-style short mode. If the path
22542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22543  # take no chances and rewrite it.
22544  # Note: m4 eats our [], so we need to use [ and ] instead.
22545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22546  if test "x$has_forbidden_chars" != x; then
22547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22548    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22549  fi
22550
22551
22552  windows_path="$new_path"
22553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22554    unix_path=`$CYGPATH -u "$windows_path"`
22555    new_path="$unix_path"
22556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22558    new_path="$unix_path"
22559  fi
22560
22561  if test "x$path" != "x$new_path"; then
22562    BOOT_JDK="$new_path"
22563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22564$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22565  fi
22566
22567  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22568  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22569
22570  else
22571    # We're on a posix platform. Hooray! :)
22572    path="$BOOT_JDK"
22573    has_space=`$ECHO "$path" | $GREP " "`
22574    if test "x$has_space" != x; then
22575      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22576$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22577      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22578    fi
22579
22580    # Use eval to expand a potential ~
22581    eval path="$path"
22582    if test ! -f "$path" && test ! -d "$path"; then
22583      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22584    fi
22585
22586    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22587  fi
22588
22589              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22590$as_echo_n "checking for Boot JDK... " >&6; }
22591              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22592$as_echo "$BOOT_JDK" >&6; }
22593              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22594$as_echo_n "checking Boot JDK version... " >&6; }
22595              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22596              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22597$as_echo "$BOOT_JDK_VERSION" >&6; }
22598            fi # end check jdk version
22599          fi # end check rt.jar
22600        fi # end check javac
22601      fi # end check java
22602    fi # end check boot jdk found
22603  fi
22604
22605
22606  if test "x$BOOT_JDK_FOUND" = xno; then
22607    # Now execute the test
22608
22609  if test "x$PROGRAMFILES" != x; then
22610    VIRTUAL_DIR="$PROGRAMFILES/Java"
22611
22612  windows_path="$VIRTUAL_DIR"
22613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22614    unix_path=`$CYGPATH -u "$windows_path"`
22615    VIRTUAL_DIR="$unix_path"
22616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22618    VIRTUAL_DIR="$unix_path"
22619  fi
22620
22621
22622  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22623  BOOT_JDK_SUFFIX=""
22624  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22625  if test "x$ALL_JDKS_FOUND" != x; then
22626    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22627
22628  if test "x$BOOT_JDK_FOUND" = xno; then
22629    # Now execute the test
22630
22631        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22632        if test -d "$BOOT_JDK"; then
22633          BOOT_JDK_FOUND=maybe
22634          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22635$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22636        fi
22637
22638
22639    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22640    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22641      # Do we have a bin/java?
22642      if test ! -x "$BOOT_JDK/bin/java"; then
22643        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22644$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22645        BOOT_JDK_FOUND=no
22646      else
22647        # Do we have a bin/javac?
22648        if test ! -x "$BOOT_JDK/bin/javac"; then
22649          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22650$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22651          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22652$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22653          BOOT_JDK_FOUND=no
22654        else
22655          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22656          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22657            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22658$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22659            BOOT_JDK_FOUND=no
22660          else
22661            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22662            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22663
22664            # Extra M4 quote needed to protect [] in grep expression.
22665            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22666            if test "x$FOUND_CORRECT_VERSION" = x; then
22667              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22668$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22669              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22670$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22671              BOOT_JDK_FOUND=no
22672            else
22673              # We're done! :-)
22674              BOOT_JDK_FOUND=yes
22675
22676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22677
22678  # Input might be given as Windows format, start by converting to
22679  # unix format.
22680  path="$BOOT_JDK"
22681  new_path=`$CYGPATH -u "$path"`
22682
22683  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22684  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22685  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22686  # "foo.exe" is OK but "foo" is an error.
22687  #
22688  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22689  # It is also a way to make sure we got the proper file name for the real test later on.
22690  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22691  if test "x$test_shortpath" = x; then
22692    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22693$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22694    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22695  fi
22696
22697  # Call helper function which possibly converts this using DOS-style short mode.
22698  # If so, the updated path is stored in $new_path.
22699
22700  input_path="$new_path"
22701  # Check if we need to convert this using DOS-style short mode. If the path
22702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22703  # take no chances and rewrite it.
22704  # Note: m4 eats our [], so we need to use [ and ] instead.
22705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22706  if test "x$has_forbidden_chars" != x; then
22707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22708    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22709    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22710    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22711      # Going to short mode and back again did indeed matter. Since short mode is
22712      # case insensitive, let's make it lowercase to improve readability.
22713      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22714      # Now convert it back to Unix-stile (cygpath)
22715      input_path=`$CYGPATH -u "$shortmode_path"`
22716      new_path="$input_path"
22717    fi
22718  fi
22719
22720  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22721  if test "x$test_cygdrive_prefix" = x; then
22722    # As a simple fix, exclude /usr/bin since it's not a real path.
22723    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22724      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22725      # a path prefixed by /cygdrive for fixpath to work.
22726      new_path="$CYGWIN_ROOT_PATH$input_path"
22727    fi
22728  fi
22729
22730
22731  if test "x$path" != "x$new_path"; then
22732    BOOT_JDK="$new_path"
22733    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22734$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22735  fi
22736
22737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22738
22739  path="$BOOT_JDK"
22740  has_colon=`$ECHO $path | $GREP ^.:`
22741  new_path="$path"
22742  if test "x$has_colon" = x; then
22743    # Not in mixed or Windows style, start by that.
22744    new_path=`cmd //c echo $path`
22745  fi
22746
22747
22748  input_path="$new_path"
22749  # Check if we need to convert this using DOS-style short mode. If the path
22750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22751  # take no chances and rewrite it.
22752  # Note: m4 eats our [], so we need to use [ and ] instead.
22753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22754  if test "x$has_forbidden_chars" != x; then
22755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22756    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22757  fi
22758
22759
22760  windows_path="$new_path"
22761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22762    unix_path=`$CYGPATH -u "$windows_path"`
22763    new_path="$unix_path"
22764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22766    new_path="$unix_path"
22767  fi
22768
22769  if test "x$path" != "x$new_path"; then
22770    BOOT_JDK="$new_path"
22771    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22772$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22773  fi
22774
22775  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22776  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22777
22778  else
22779    # We're on a posix platform. Hooray! :)
22780    path="$BOOT_JDK"
22781    has_space=`$ECHO "$path" | $GREP " "`
22782    if test "x$has_space" != x; then
22783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22784$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22785      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22786    fi
22787
22788    # Use eval to expand a potential ~
22789    eval path="$path"
22790    if test ! -f "$path" && test ! -d "$path"; then
22791      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22792    fi
22793
22794    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22795  fi
22796
22797              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22798$as_echo_n "checking for Boot JDK... " >&6; }
22799              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22800$as_echo "$BOOT_JDK" >&6; }
22801              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22802$as_echo_n "checking Boot JDK version... " >&6; }
22803              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22804              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22805$as_echo "$BOOT_JDK_VERSION" >&6; }
22806            fi # end check jdk version
22807          fi # end check rt.jar
22808        fi # end check javac
22809      fi # end check java
22810    fi # end check boot jdk found
22811  fi
22812
22813    done
22814  fi
22815
22816  fi
22817
22818
22819    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22820    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22821      # Do we have a bin/java?
22822      if test ! -x "$BOOT_JDK/bin/java"; then
22823        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22824$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22825        BOOT_JDK_FOUND=no
22826      else
22827        # Do we have a bin/javac?
22828        if test ! -x "$BOOT_JDK/bin/javac"; then
22829          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22830$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22831          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22832$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22833          BOOT_JDK_FOUND=no
22834        else
22835          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22836          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22837            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22838$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22839            BOOT_JDK_FOUND=no
22840          else
22841            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22842            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22843
22844            # Extra M4 quote needed to protect [] in grep expression.
22845            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22846            if test "x$FOUND_CORRECT_VERSION" = x; then
22847              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22848$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22849              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22850$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22851              BOOT_JDK_FOUND=no
22852            else
22853              # We're done! :-)
22854              BOOT_JDK_FOUND=yes
22855
22856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22857
22858  # Input might be given as Windows format, start by converting to
22859  # unix format.
22860  path="$BOOT_JDK"
22861  new_path=`$CYGPATH -u "$path"`
22862
22863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22866  # "foo.exe" is OK but "foo" is an error.
22867  #
22868  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22869  # It is also a way to make sure we got the proper file name for the real test later on.
22870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22871  if test "x$test_shortpath" = x; then
22872    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22873$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22874    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22875  fi
22876
22877  # Call helper function which possibly converts this using DOS-style short mode.
22878  # If so, the updated path is stored in $new_path.
22879
22880  input_path="$new_path"
22881  # Check if we need to convert this using DOS-style short mode. If the path
22882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22883  # take no chances and rewrite it.
22884  # Note: m4 eats our [], so we need to use [ and ] instead.
22885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22886  if test "x$has_forbidden_chars" != x; then
22887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22891      # Going to short mode and back again did indeed matter. Since short mode is
22892      # case insensitive, let's make it lowercase to improve readability.
22893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22894      # Now convert it back to Unix-stile (cygpath)
22895      input_path=`$CYGPATH -u "$shortmode_path"`
22896      new_path="$input_path"
22897    fi
22898  fi
22899
22900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22901  if test "x$test_cygdrive_prefix" = x; then
22902    # As a simple fix, exclude /usr/bin since it's not a real path.
22903    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22905      # a path prefixed by /cygdrive for fixpath to work.
22906      new_path="$CYGWIN_ROOT_PATH$input_path"
22907    fi
22908  fi
22909
22910
22911  if test "x$path" != "x$new_path"; then
22912    BOOT_JDK="$new_path"
22913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22914$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22915  fi
22916
22917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22918
22919  path="$BOOT_JDK"
22920  has_colon=`$ECHO $path | $GREP ^.:`
22921  new_path="$path"
22922  if test "x$has_colon" = x; then
22923    # Not in mixed or Windows style, start by that.
22924    new_path=`cmd //c echo $path`
22925  fi
22926
22927
22928  input_path="$new_path"
22929  # Check if we need to convert this using DOS-style short mode. If the path
22930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22931  # take no chances and rewrite it.
22932  # Note: m4 eats our [], so we need to use [ and ] instead.
22933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22934  if test "x$has_forbidden_chars" != x; then
22935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22936    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22937  fi
22938
22939
22940  windows_path="$new_path"
22941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22942    unix_path=`$CYGPATH -u "$windows_path"`
22943    new_path="$unix_path"
22944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22946    new_path="$unix_path"
22947  fi
22948
22949  if test "x$path" != "x$new_path"; then
22950    BOOT_JDK="$new_path"
22951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22952$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22953  fi
22954
22955  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22956  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22957
22958  else
22959    # We're on a posix platform. Hooray! :)
22960    path="$BOOT_JDK"
22961    has_space=`$ECHO "$path" | $GREP " "`
22962    if test "x$has_space" != x; then
22963      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22964$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22965      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22966    fi
22967
22968    # Use eval to expand a potential ~
22969    eval path="$path"
22970    if test ! -f "$path" && test ! -d "$path"; then
22971      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22972    fi
22973
22974    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22975  fi
22976
22977              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22978$as_echo_n "checking for Boot JDK... " >&6; }
22979              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22980$as_echo "$BOOT_JDK" >&6; }
22981              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22982$as_echo_n "checking Boot JDK version... " >&6; }
22983              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22984              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22985$as_echo "$BOOT_JDK_VERSION" >&6; }
22986            fi # end check jdk version
22987          fi # end check rt.jar
22988        fi # end check javac
22989      fi # end check java
22990    fi # end check boot jdk found
22991  fi
22992
22993
22994  if test "x$BOOT_JDK_FOUND" = xno; then
22995    # Now execute the test
22996
22997  if test "x$ProgramFiles" != x; then
22998    VIRTUAL_DIR="$ProgramFiles/Java"
22999
23000  windows_path="$VIRTUAL_DIR"
23001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23002    unix_path=`$CYGPATH -u "$windows_path"`
23003    VIRTUAL_DIR="$unix_path"
23004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23006    VIRTUAL_DIR="$unix_path"
23007  fi
23008
23009
23010  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23011  BOOT_JDK_SUFFIX=""
23012  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23013  if test "x$ALL_JDKS_FOUND" != x; then
23014    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23015
23016  if test "x$BOOT_JDK_FOUND" = xno; then
23017    # Now execute the test
23018
23019        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23020        if test -d "$BOOT_JDK"; then
23021          BOOT_JDK_FOUND=maybe
23022          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23023$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23024        fi
23025
23026
23027    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23028    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23029      # Do we have a bin/java?
23030      if test ! -x "$BOOT_JDK/bin/java"; then
23031        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23032$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23033        BOOT_JDK_FOUND=no
23034      else
23035        # Do we have a bin/javac?
23036        if test ! -x "$BOOT_JDK/bin/javac"; then
23037          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23038$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23039          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23040$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23041          BOOT_JDK_FOUND=no
23042        else
23043          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23044          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23045            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23046$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23047            BOOT_JDK_FOUND=no
23048          else
23049            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23050            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23051
23052            # Extra M4 quote needed to protect [] in grep expression.
23053            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23054            if test "x$FOUND_CORRECT_VERSION" = x; then
23055              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23057              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23058$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23059              BOOT_JDK_FOUND=no
23060            else
23061              # We're done! :-)
23062              BOOT_JDK_FOUND=yes
23063
23064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23065
23066  # Input might be given as Windows format, start by converting to
23067  # unix format.
23068  path="$BOOT_JDK"
23069  new_path=`$CYGPATH -u "$path"`
23070
23071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23074  # "foo.exe" is OK but "foo" is an error.
23075  #
23076  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23077  # It is also a way to make sure we got the proper file name for the real test later on.
23078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23079  if test "x$test_shortpath" = x; then
23080    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23081$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23082    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23083  fi
23084
23085  # Call helper function which possibly converts this using DOS-style short mode.
23086  # If so, the updated path is stored in $new_path.
23087
23088  input_path="$new_path"
23089  # Check if we need to convert this using DOS-style short mode. If the path
23090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23091  # take no chances and rewrite it.
23092  # Note: m4 eats our [], so we need to use [ and ] instead.
23093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23094  if test "x$has_forbidden_chars" != x; then
23095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23096    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23097    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23098    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23099      # Going to short mode and back again did indeed matter. Since short mode is
23100      # case insensitive, let's make it lowercase to improve readability.
23101      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23102      # Now convert it back to Unix-stile (cygpath)
23103      input_path=`$CYGPATH -u "$shortmode_path"`
23104      new_path="$input_path"
23105    fi
23106  fi
23107
23108  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23109  if test "x$test_cygdrive_prefix" = x; then
23110    # As a simple fix, exclude /usr/bin since it's not a real path.
23111    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23112      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23113      # a path prefixed by /cygdrive for fixpath to work.
23114      new_path="$CYGWIN_ROOT_PATH$input_path"
23115    fi
23116  fi
23117
23118
23119  if test "x$path" != "x$new_path"; then
23120    BOOT_JDK="$new_path"
23121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23122$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23123  fi
23124
23125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23126
23127  path="$BOOT_JDK"
23128  has_colon=`$ECHO $path | $GREP ^.:`
23129  new_path="$path"
23130  if test "x$has_colon" = x; then
23131    # Not in mixed or Windows style, start by that.
23132    new_path=`cmd //c echo $path`
23133  fi
23134
23135
23136  input_path="$new_path"
23137  # Check if we need to convert this using DOS-style short mode. If the path
23138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23139  # take no chances and rewrite it.
23140  # Note: m4 eats our [], so we need to use [ and ] instead.
23141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23142  if test "x$has_forbidden_chars" != x; then
23143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23144    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23145  fi
23146
23147
23148  windows_path="$new_path"
23149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23150    unix_path=`$CYGPATH -u "$windows_path"`
23151    new_path="$unix_path"
23152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23154    new_path="$unix_path"
23155  fi
23156
23157  if test "x$path" != "x$new_path"; then
23158    BOOT_JDK="$new_path"
23159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23160$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23161  fi
23162
23163  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23164  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23165
23166  else
23167    # We're on a posix platform. Hooray! :)
23168    path="$BOOT_JDK"
23169    has_space=`$ECHO "$path" | $GREP " "`
23170    if test "x$has_space" != x; then
23171      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23172$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23173      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23174    fi
23175
23176    # Use eval to expand a potential ~
23177    eval path="$path"
23178    if test ! -f "$path" && test ! -d "$path"; then
23179      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23180    fi
23181
23182    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23183  fi
23184
23185              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23186$as_echo_n "checking for Boot JDK... " >&6; }
23187              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23188$as_echo "$BOOT_JDK" >&6; }
23189              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23190$as_echo_n "checking Boot JDK version... " >&6; }
23191              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23192              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23193$as_echo "$BOOT_JDK_VERSION" >&6; }
23194            fi # end check jdk version
23195          fi # end check rt.jar
23196        fi # end check javac
23197      fi # end check java
23198    fi # end check boot jdk found
23199  fi
23200
23201    done
23202  fi
23203
23204  fi
23205
23206
23207    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23208    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23209      # Do we have a bin/java?
23210      if test ! -x "$BOOT_JDK/bin/java"; then
23211        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23212$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23213        BOOT_JDK_FOUND=no
23214      else
23215        # Do we have a bin/javac?
23216        if test ! -x "$BOOT_JDK/bin/javac"; then
23217          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23218$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23219          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23220$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23221          BOOT_JDK_FOUND=no
23222        else
23223          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23224          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23225            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23226$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23227            BOOT_JDK_FOUND=no
23228          else
23229            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23230            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23231
23232            # Extra M4 quote needed to protect [] in grep expression.
23233            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23234            if test "x$FOUND_CORRECT_VERSION" = x; then
23235              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23236$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23237              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23238$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23239              BOOT_JDK_FOUND=no
23240            else
23241              # We're done! :-)
23242              BOOT_JDK_FOUND=yes
23243
23244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23245
23246  # Input might be given as Windows format, start by converting to
23247  # unix format.
23248  path="$BOOT_JDK"
23249  new_path=`$CYGPATH -u "$path"`
23250
23251  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23252  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23253  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23254  # "foo.exe" is OK but "foo" is an error.
23255  #
23256  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23257  # It is also a way to make sure we got the proper file name for the real test later on.
23258  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23259  if test "x$test_shortpath" = x; then
23260    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23261$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23262    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23263  fi
23264
23265  # Call helper function which possibly converts this using DOS-style short mode.
23266  # If so, the updated path is stored in $new_path.
23267
23268  input_path="$new_path"
23269  # Check if we need to convert this using DOS-style short mode. If the path
23270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23271  # take no chances and rewrite it.
23272  # Note: m4 eats our [], so we need to use [ and ] instead.
23273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23274  if test "x$has_forbidden_chars" != x; then
23275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23276    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23277    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23278    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23279      # Going to short mode and back again did indeed matter. Since short mode is
23280      # case insensitive, let's make it lowercase to improve readability.
23281      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23282      # Now convert it back to Unix-stile (cygpath)
23283      input_path=`$CYGPATH -u "$shortmode_path"`
23284      new_path="$input_path"
23285    fi
23286  fi
23287
23288  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23289  if test "x$test_cygdrive_prefix" = x; then
23290    # As a simple fix, exclude /usr/bin since it's not a real path.
23291    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23292      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23293      # a path prefixed by /cygdrive for fixpath to work.
23294      new_path="$CYGWIN_ROOT_PATH$input_path"
23295    fi
23296  fi
23297
23298
23299  if test "x$path" != "x$new_path"; then
23300    BOOT_JDK="$new_path"
23301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23302$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23303  fi
23304
23305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23306
23307  path="$BOOT_JDK"
23308  has_colon=`$ECHO $path | $GREP ^.:`
23309  new_path="$path"
23310  if test "x$has_colon" = x; then
23311    # Not in mixed or Windows style, start by that.
23312    new_path=`cmd //c echo $path`
23313  fi
23314
23315
23316  input_path="$new_path"
23317  # Check if we need to convert this using DOS-style short mode. If the path
23318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23319  # take no chances and rewrite it.
23320  # Note: m4 eats our [], so we need to use [ and ] instead.
23321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23322  if test "x$has_forbidden_chars" != x; then
23323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23324    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23325  fi
23326
23327
23328  windows_path="$new_path"
23329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23330    unix_path=`$CYGPATH -u "$windows_path"`
23331    new_path="$unix_path"
23332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23334    new_path="$unix_path"
23335  fi
23336
23337  if test "x$path" != "x$new_path"; then
23338    BOOT_JDK="$new_path"
23339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23340$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23341  fi
23342
23343  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23344  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23345
23346  else
23347    # We're on a posix platform. Hooray! :)
23348    path="$BOOT_JDK"
23349    has_space=`$ECHO "$path" | $GREP " "`
23350    if test "x$has_space" != x; then
23351      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23352$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23353      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23354    fi
23355
23356    # Use eval to expand a potential ~
23357    eval path="$path"
23358    if test ! -f "$path" && test ! -d "$path"; then
23359      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23360    fi
23361
23362    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23363  fi
23364
23365              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23366$as_echo_n "checking for Boot JDK... " >&6; }
23367              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23368$as_echo "$BOOT_JDK" >&6; }
23369              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23370$as_echo_n "checking Boot JDK version... " >&6; }
23371              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23372              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23373$as_echo "$BOOT_JDK_VERSION" >&6; }
23374            fi # end check jdk version
23375          fi # end check rt.jar
23376        fi # end check javac
23377      fi # end check java
23378    fi # end check boot jdk found
23379  fi
23380
23381
23382  if test "x$BOOT_JDK_FOUND" = xno; then
23383    # Now execute the test
23384
23385  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23386  BOOT_JDK_SUFFIX=""
23387  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23388  if test "x$ALL_JDKS_FOUND" != x; then
23389    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23390
23391  if test "x$BOOT_JDK_FOUND" = xno; then
23392    # Now execute the test
23393
23394        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23395        if test -d "$BOOT_JDK"; then
23396          BOOT_JDK_FOUND=maybe
23397          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23398$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23399        fi
23400
23401
23402    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23403    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23404      # Do we have a bin/java?
23405      if test ! -x "$BOOT_JDK/bin/java"; then
23406        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23407$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23408        BOOT_JDK_FOUND=no
23409      else
23410        # Do we have a bin/javac?
23411        if test ! -x "$BOOT_JDK/bin/javac"; then
23412          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23413$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23414          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23415$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23416          BOOT_JDK_FOUND=no
23417        else
23418          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23419          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23420            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23421$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23422            BOOT_JDK_FOUND=no
23423          else
23424            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23425            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23426
23427            # Extra M4 quote needed to protect [] in grep expression.
23428            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23429            if test "x$FOUND_CORRECT_VERSION" = x; then
23430              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23431$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23432              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23433$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23434              BOOT_JDK_FOUND=no
23435            else
23436              # We're done! :-)
23437              BOOT_JDK_FOUND=yes
23438
23439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23440
23441  # Input might be given as Windows format, start by converting to
23442  # unix format.
23443  path="$BOOT_JDK"
23444  new_path=`$CYGPATH -u "$path"`
23445
23446  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23447  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23448  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23449  # "foo.exe" is OK but "foo" is an error.
23450  #
23451  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23452  # It is also a way to make sure we got the proper file name for the real test later on.
23453  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23454  if test "x$test_shortpath" = x; then
23455    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23456$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23457    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23458  fi
23459
23460  # Call helper function which possibly converts this using DOS-style short mode.
23461  # If so, the updated path is stored in $new_path.
23462
23463  input_path="$new_path"
23464  # Check if we need to convert this using DOS-style short mode. If the path
23465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23466  # take no chances and rewrite it.
23467  # Note: m4 eats our [], so we need to use [ and ] instead.
23468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23469  if test "x$has_forbidden_chars" != x; then
23470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23471    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23472    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23473    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23474      # Going to short mode and back again did indeed matter. Since short mode is
23475      # case insensitive, let's make it lowercase to improve readability.
23476      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23477      # Now convert it back to Unix-stile (cygpath)
23478      input_path=`$CYGPATH -u "$shortmode_path"`
23479      new_path="$input_path"
23480    fi
23481  fi
23482
23483  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23484  if test "x$test_cygdrive_prefix" = x; then
23485    # As a simple fix, exclude /usr/bin since it's not a real path.
23486    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23487      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23488      # a path prefixed by /cygdrive for fixpath to work.
23489      new_path="$CYGWIN_ROOT_PATH$input_path"
23490    fi
23491  fi
23492
23493
23494  if test "x$path" != "x$new_path"; then
23495    BOOT_JDK="$new_path"
23496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23497$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23498  fi
23499
23500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23501
23502  path="$BOOT_JDK"
23503  has_colon=`$ECHO $path | $GREP ^.:`
23504  new_path="$path"
23505  if test "x$has_colon" = x; then
23506    # Not in mixed or Windows style, start by that.
23507    new_path=`cmd //c echo $path`
23508  fi
23509
23510
23511  input_path="$new_path"
23512  # Check if we need to convert this using DOS-style short mode. If the path
23513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23514  # take no chances and rewrite it.
23515  # Note: m4 eats our [], so we need to use [ and ] instead.
23516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23517  if test "x$has_forbidden_chars" != x; then
23518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23519    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23520  fi
23521
23522
23523  windows_path="$new_path"
23524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23525    unix_path=`$CYGPATH -u "$windows_path"`
23526    new_path="$unix_path"
23527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23529    new_path="$unix_path"
23530  fi
23531
23532  if test "x$path" != "x$new_path"; then
23533    BOOT_JDK="$new_path"
23534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23535$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23536  fi
23537
23538  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23539  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23540
23541  else
23542    # We're on a posix platform. Hooray! :)
23543    path="$BOOT_JDK"
23544    has_space=`$ECHO "$path" | $GREP " "`
23545    if test "x$has_space" != x; then
23546      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23547$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23548      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23549    fi
23550
23551    # Use eval to expand a potential ~
23552    eval path="$path"
23553    if test ! -f "$path" && test ! -d "$path"; then
23554      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23555    fi
23556
23557    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23558  fi
23559
23560              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23561$as_echo_n "checking for Boot JDK... " >&6; }
23562              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23563$as_echo "$BOOT_JDK" >&6; }
23564              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23565$as_echo_n "checking Boot JDK version... " >&6; }
23566              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23567              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23568$as_echo "$BOOT_JDK_VERSION" >&6; }
23569            fi # end check jdk version
23570          fi # end check rt.jar
23571        fi # end check javac
23572      fi # end check java
23573    fi # end check boot jdk found
23574  fi
23575
23576    done
23577  fi
23578
23579
23580    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23581    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23582      # Do we have a bin/java?
23583      if test ! -x "$BOOT_JDK/bin/java"; then
23584        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23586        BOOT_JDK_FOUND=no
23587      else
23588        # Do we have a bin/javac?
23589        if test ! -x "$BOOT_JDK/bin/javac"; then
23590          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23591$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23592          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23593$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23594          BOOT_JDK_FOUND=no
23595        else
23596          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23597          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23598            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23599$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23600            BOOT_JDK_FOUND=no
23601          else
23602            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23603            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23604
23605            # Extra M4 quote needed to protect [] in grep expression.
23606            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23607            if test "x$FOUND_CORRECT_VERSION" = x; then
23608              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23609$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23610              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23611$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23612              BOOT_JDK_FOUND=no
23613            else
23614              # We're done! :-)
23615              BOOT_JDK_FOUND=yes
23616
23617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23618
23619  # Input might be given as Windows format, start by converting to
23620  # unix format.
23621  path="$BOOT_JDK"
23622  new_path=`$CYGPATH -u "$path"`
23623
23624  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23625  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23626  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23627  # "foo.exe" is OK but "foo" is an error.
23628  #
23629  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23630  # It is also a way to make sure we got the proper file name for the real test later on.
23631  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23632  if test "x$test_shortpath" = x; then
23633    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23634$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23635    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23636  fi
23637
23638  # Call helper function which possibly converts this using DOS-style short mode.
23639  # If so, the updated path is stored in $new_path.
23640
23641  input_path="$new_path"
23642  # Check if we need to convert this using DOS-style short mode. If the path
23643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23644  # take no chances and rewrite it.
23645  # Note: m4 eats our [], so we need to use [ and ] instead.
23646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23647  if test "x$has_forbidden_chars" != x; then
23648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23649    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23650    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23651    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23652      # Going to short mode and back again did indeed matter. Since short mode is
23653      # case insensitive, let's make it lowercase to improve readability.
23654      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23655      # Now convert it back to Unix-stile (cygpath)
23656      input_path=`$CYGPATH -u "$shortmode_path"`
23657      new_path="$input_path"
23658    fi
23659  fi
23660
23661  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23662  if test "x$test_cygdrive_prefix" = x; then
23663    # As a simple fix, exclude /usr/bin since it's not a real path.
23664    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23665      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23666      # a path prefixed by /cygdrive for fixpath to work.
23667      new_path="$CYGWIN_ROOT_PATH$input_path"
23668    fi
23669  fi
23670
23671
23672  if test "x$path" != "x$new_path"; then
23673    BOOT_JDK="$new_path"
23674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23675$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23676  fi
23677
23678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23679
23680  path="$BOOT_JDK"
23681  has_colon=`$ECHO $path | $GREP ^.:`
23682  new_path="$path"
23683  if test "x$has_colon" = x; then
23684    # Not in mixed or Windows style, start by that.
23685    new_path=`cmd //c echo $path`
23686  fi
23687
23688
23689  input_path="$new_path"
23690  # Check if we need to convert this using DOS-style short mode. If the path
23691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23692  # take no chances and rewrite it.
23693  # Note: m4 eats our [], so we need to use [ and ] instead.
23694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23695  if test "x$has_forbidden_chars" != x; then
23696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23697    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23698  fi
23699
23700
23701  windows_path="$new_path"
23702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23703    unix_path=`$CYGPATH -u "$windows_path"`
23704    new_path="$unix_path"
23705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23707    new_path="$unix_path"
23708  fi
23709
23710  if test "x$path" != "x$new_path"; then
23711    BOOT_JDK="$new_path"
23712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23713$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23714  fi
23715
23716  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23717  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23718
23719  else
23720    # We're on a posix platform. Hooray! :)
23721    path="$BOOT_JDK"
23722    has_space=`$ECHO "$path" | $GREP " "`
23723    if test "x$has_space" != x; then
23724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23725$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23726      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23727    fi
23728
23729    # Use eval to expand a potential ~
23730    eval path="$path"
23731    if test ! -f "$path" && test ! -d "$path"; then
23732      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23733    fi
23734
23735    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23736  fi
23737
23738              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23739$as_echo_n "checking for Boot JDK... " >&6; }
23740              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23741$as_echo "$BOOT_JDK" >&6; }
23742              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23743$as_echo_n "checking Boot JDK version... " >&6; }
23744              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23745              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23746$as_echo "$BOOT_JDK_VERSION" >&6; }
23747            fi # end check jdk version
23748          fi # end check rt.jar
23749        fi # end check javac
23750      fi # end check java
23751    fi # end check boot jdk found
23752  fi
23753
23754  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23755
23756  if test "x$BOOT_JDK_FOUND" = xno; then
23757    # Now execute the test
23758
23759  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23760  BOOT_JDK_SUFFIX="/Contents/Home"
23761  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23762  if test "x$ALL_JDKS_FOUND" != x; then
23763    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23764
23765  if test "x$BOOT_JDK_FOUND" = xno; then
23766    # Now execute the test
23767
23768        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23769        if test -d "$BOOT_JDK"; then
23770          BOOT_JDK_FOUND=maybe
23771          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23772$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23773        fi
23774
23775
23776    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23777    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23778      # Do we have a bin/java?
23779      if test ! -x "$BOOT_JDK/bin/java"; then
23780        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23781$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23782        BOOT_JDK_FOUND=no
23783      else
23784        # Do we have a bin/javac?
23785        if test ! -x "$BOOT_JDK/bin/javac"; then
23786          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23787$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23788          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23789$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23790          BOOT_JDK_FOUND=no
23791        else
23792          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23793          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23794            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23796            BOOT_JDK_FOUND=no
23797          else
23798            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23799            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23800
23801            # Extra M4 quote needed to protect [] in grep expression.
23802            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23803            if test "x$FOUND_CORRECT_VERSION" = x; then
23804              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23805$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23806              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23807$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23808              BOOT_JDK_FOUND=no
23809            else
23810              # We're done! :-)
23811              BOOT_JDK_FOUND=yes
23812
23813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23814
23815  # Input might be given as Windows format, start by converting to
23816  # unix format.
23817  path="$BOOT_JDK"
23818  new_path=`$CYGPATH -u "$path"`
23819
23820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23823  # "foo.exe" is OK but "foo" is an error.
23824  #
23825  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23826  # It is also a way to make sure we got the proper file name for the real test later on.
23827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23828  if test "x$test_shortpath" = x; then
23829    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23830$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23831    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23832  fi
23833
23834  # Call helper function which possibly converts this using DOS-style short mode.
23835  # If so, the updated path is stored in $new_path.
23836
23837  input_path="$new_path"
23838  # Check if we need to convert this using DOS-style short mode. If the path
23839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23840  # take no chances and rewrite it.
23841  # Note: m4 eats our [], so we need to use [ and ] instead.
23842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23843  if test "x$has_forbidden_chars" != x; then
23844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23848      # Going to short mode and back again did indeed matter. Since short mode is
23849      # case insensitive, let's make it lowercase to improve readability.
23850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23851      # Now convert it back to Unix-stile (cygpath)
23852      input_path=`$CYGPATH -u "$shortmode_path"`
23853      new_path="$input_path"
23854    fi
23855  fi
23856
23857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23858  if test "x$test_cygdrive_prefix" = x; then
23859    # As a simple fix, exclude /usr/bin since it's not a real path.
23860    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23862      # a path prefixed by /cygdrive for fixpath to work.
23863      new_path="$CYGWIN_ROOT_PATH$input_path"
23864    fi
23865  fi
23866
23867
23868  if test "x$path" != "x$new_path"; then
23869    BOOT_JDK="$new_path"
23870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23871$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23872  fi
23873
23874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23875
23876  path="$BOOT_JDK"
23877  has_colon=`$ECHO $path | $GREP ^.:`
23878  new_path="$path"
23879  if test "x$has_colon" = x; then
23880    # Not in mixed or Windows style, start by that.
23881    new_path=`cmd //c echo $path`
23882  fi
23883
23884
23885  input_path="$new_path"
23886  # Check if we need to convert this using DOS-style short mode. If the path
23887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23888  # take no chances and rewrite it.
23889  # Note: m4 eats our [], so we need to use [ and ] instead.
23890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23891  if test "x$has_forbidden_chars" != x; then
23892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23893    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23894  fi
23895
23896
23897  windows_path="$new_path"
23898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23899    unix_path=`$CYGPATH -u "$windows_path"`
23900    new_path="$unix_path"
23901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23903    new_path="$unix_path"
23904  fi
23905
23906  if test "x$path" != "x$new_path"; then
23907    BOOT_JDK="$new_path"
23908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23909$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23910  fi
23911
23912  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23913  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23914
23915  else
23916    # We're on a posix platform. Hooray! :)
23917    path="$BOOT_JDK"
23918    has_space=`$ECHO "$path" | $GREP " "`
23919    if test "x$has_space" != x; then
23920      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23921$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23922      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23923    fi
23924
23925    # Use eval to expand a potential ~
23926    eval path="$path"
23927    if test ! -f "$path" && test ! -d "$path"; then
23928      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23929    fi
23930
23931    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23932  fi
23933
23934              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23935$as_echo_n "checking for Boot JDK... " >&6; }
23936              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23937$as_echo "$BOOT_JDK" >&6; }
23938              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23939$as_echo_n "checking Boot JDK version... " >&6; }
23940              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23941              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23942$as_echo "$BOOT_JDK_VERSION" >&6; }
23943            fi # end check jdk version
23944          fi # end check rt.jar
23945        fi # end check javac
23946      fi # end check java
23947    fi # end check boot jdk found
23948  fi
23949
23950    done
23951  fi
23952
23953
23954    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23955    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23956      # Do we have a bin/java?
23957      if test ! -x "$BOOT_JDK/bin/java"; then
23958        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23959$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23960        BOOT_JDK_FOUND=no
23961      else
23962        # Do we have a bin/javac?
23963        if test ! -x "$BOOT_JDK/bin/javac"; then
23964          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23965$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23966          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23967$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23968          BOOT_JDK_FOUND=no
23969        else
23970          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23971          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23972            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23973$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23974            BOOT_JDK_FOUND=no
23975          else
23976            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23977            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23978
23979            # Extra M4 quote needed to protect [] in grep expression.
23980            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23981            if test "x$FOUND_CORRECT_VERSION" = x; then
23982              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23983$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23984              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23985$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23986              BOOT_JDK_FOUND=no
23987            else
23988              # We're done! :-)
23989              BOOT_JDK_FOUND=yes
23990
23991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23992
23993  # Input might be given as Windows format, start by converting to
23994  # unix format.
23995  path="$BOOT_JDK"
23996  new_path=`$CYGPATH -u "$path"`
23997
23998  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23999  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24000  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24001  # "foo.exe" is OK but "foo" is an error.
24002  #
24003  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24004  # It is also a way to make sure we got the proper file name for the real test later on.
24005  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24006  if test "x$test_shortpath" = x; then
24007    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24008$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24009    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24010  fi
24011
24012  # Call helper function which possibly converts this using DOS-style short mode.
24013  # If so, the updated path is stored in $new_path.
24014
24015  input_path="$new_path"
24016  # Check if we need to convert this using DOS-style short mode. If the path
24017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24018  # take no chances and rewrite it.
24019  # Note: m4 eats our [], so we need to use [ and ] instead.
24020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24021  if test "x$has_forbidden_chars" != x; then
24022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24023    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24024    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24025    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24026      # Going to short mode and back again did indeed matter. Since short mode is
24027      # case insensitive, let's make it lowercase to improve readability.
24028      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24029      # Now convert it back to Unix-stile (cygpath)
24030      input_path=`$CYGPATH -u "$shortmode_path"`
24031      new_path="$input_path"
24032    fi
24033  fi
24034
24035  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24036  if test "x$test_cygdrive_prefix" = x; then
24037    # As a simple fix, exclude /usr/bin since it's not a real path.
24038    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24039      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24040      # a path prefixed by /cygdrive for fixpath to work.
24041      new_path="$CYGWIN_ROOT_PATH$input_path"
24042    fi
24043  fi
24044
24045
24046  if test "x$path" != "x$new_path"; then
24047    BOOT_JDK="$new_path"
24048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24049$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24050  fi
24051
24052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24053
24054  path="$BOOT_JDK"
24055  has_colon=`$ECHO $path | $GREP ^.:`
24056  new_path="$path"
24057  if test "x$has_colon" = x; then
24058    # Not in mixed or Windows style, start by that.
24059    new_path=`cmd //c echo $path`
24060  fi
24061
24062
24063  input_path="$new_path"
24064  # Check if we need to convert this using DOS-style short mode. If the path
24065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24066  # take no chances and rewrite it.
24067  # Note: m4 eats our [], so we need to use [ and ] instead.
24068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24069  if test "x$has_forbidden_chars" != x; then
24070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24071    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24072  fi
24073
24074
24075  windows_path="$new_path"
24076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24077    unix_path=`$CYGPATH -u "$windows_path"`
24078    new_path="$unix_path"
24079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24081    new_path="$unix_path"
24082  fi
24083
24084  if test "x$path" != "x$new_path"; then
24085    BOOT_JDK="$new_path"
24086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24087$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24088  fi
24089
24090  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24091  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24092
24093  else
24094    # We're on a posix platform. Hooray! :)
24095    path="$BOOT_JDK"
24096    has_space=`$ECHO "$path" | $GREP " "`
24097    if test "x$has_space" != x; then
24098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24099$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24100      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24101    fi
24102
24103    # Use eval to expand a potential ~
24104    eval path="$path"
24105    if test ! -f "$path" && test ! -d "$path"; then
24106      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24107    fi
24108
24109    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24110  fi
24111
24112              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24113$as_echo_n "checking for Boot JDK... " >&6; }
24114              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24115$as_echo "$BOOT_JDK" >&6; }
24116              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24117$as_echo_n "checking Boot JDK version... " >&6; }
24118              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24119              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24120$as_echo "$BOOT_JDK_VERSION" >&6; }
24121            fi # end check jdk version
24122          fi # end check rt.jar
24123        fi # end check javac
24124      fi # end check java
24125    fi # end check boot jdk found
24126  fi
24127
24128
24129  if test "x$BOOT_JDK_FOUND" = xno; then
24130    # Now execute the test
24131
24132  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24133  BOOT_JDK_SUFFIX="/Contents/Home"
24134  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24135  if test "x$ALL_JDKS_FOUND" != x; then
24136    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24137
24138  if test "x$BOOT_JDK_FOUND" = xno; then
24139    # Now execute the test
24140
24141        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24142        if test -d "$BOOT_JDK"; then
24143          BOOT_JDK_FOUND=maybe
24144          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24145$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24146        fi
24147
24148
24149    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24150    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24151      # Do we have a bin/java?
24152      if test ! -x "$BOOT_JDK/bin/java"; then
24153        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24154$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24155        BOOT_JDK_FOUND=no
24156      else
24157        # Do we have a bin/javac?
24158        if test ! -x "$BOOT_JDK/bin/javac"; then
24159          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24160$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24161          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24162$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24163          BOOT_JDK_FOUND=no
24164        else
24165          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24166          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24167            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24168$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24169            BOOT_JDK_FOUND=no
24170          else
24171            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24172            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24173
24174            # Extra M4 quote needed to protect [] in grep expression.
24175            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24176            if test "x$FOUND_CORRECT_VERSION" = x; then
24177              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24178$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24179              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24180$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24181              BOOT_JDK_FOUND=no
24182            else
24183              # We're done! :-)
24184              BOOT_JDK_FOUND=yes
24185
24186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24187
24188  # Input might be given as Windows format, start by converting to
24189  # unix format.
24190  path="$BOOT_JDK"
24191  new_path=`$CYGPATH -u "$path"`
24192
24193  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24194  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24195  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24196  # "foo.exe" is OK but "foo" is an error.
24197  #
24198  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24199  # It is also a way to make sure we got the proper file name for the real test later on.
24200  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24201  if test "x$test_shortpath" = x; then
24202    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24203$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24204    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24205  fi
24206
24207  # Call helper function which possibly converts this using DOS-style short mode.
24208  # If so, the updated path is stored in $new_path.
24209
24210  input_path="$new_path"
24211  # Check if we need to convert this using DOS-style short mode. If the path
24212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24213  # take no chances and rewrite it.
24214  # Note: m4 eats our [], so we need to use [ and ] instead.
24215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24216  if test "x$has_forbidden_chars" != x; then
24217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24218    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24219    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24220    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24221      # Going to short mode and back again did indeed matter. Since short mode is
24222      # case insensitive, let's make it lowercase to improve readability.
24223      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24224      # Now convert it back to Unix-stile (cygpath)
24225      input_path=`$CYGPATH -u "$shortmode_path"`
24226      new_path="$input_path"
24227    fi
24228  fi
24229
24230  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24231  if test "x$test_cygdrive_prefix" = x; then
24232    # As a simple fix, exclude /usr/bin since it's not a real path.
24233    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24234      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24235      # a path prefixed by /cygdrive for fixpath to work.
24236      new_path="$CYGWIN_ROOT_PATH$input_path"
24237    fi
24238  fi
24239
24240
24241  if test "x$path" != "x$new_path"; then
24242    BOOT_JDK="$new_path"
24243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24244$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24245  fi
24246
24247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24248
24249  path="$BOOT_JDK"
24250  has_colon=`$ECHO $path | $GREP ^.:`
24251  new_path="$path"
24252  if test "x$has_colon" = x; then
24253    # Not in mixed or Windows style, start by that.
24254    new_path=`cmd //c echo $path`
24255  fi
24256
24257
24258  input_path="$new_path"
24259  # Check if we need to convert this using DOS-style short mode. If the path
24260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24261  # take no chances and rewrite it.
24262  # Note: m4 eats our [], so we need to use [ and ] instead.
24263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24264  if test "x$has_forbidden_chars" != x; then
24265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24266    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24267  fi
24268
24269
24270  windows_path="$new_path"
24271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24272    unix_path=`$CYGPATH -u "$windows_path"`
24273    new_path="$unix_path"
24274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24276    new_path="$unix_path"
24277  fi
24278
24279  if test "x$path" != "x$new_path"; then
24280    BOOT_JDK="$new_path"
24281    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24282$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24283  fi
24284
24285  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24286  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24287
24288  else
24289    # We're on a posix platform. Hooray! :)
24290    path="$BOOT_JDK"
24291    has_space=`$ECHO "$path" | $GREP " "`
24292    if test "x$has_space" != x; then
24293      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24294$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24295      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24296    fi
24297
24298    # Use eval to expand a potential ~
24299    eval path="$path"
24300    if test ! -f "$path" && test ! -d "$path"; then
24301      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24302    fi
24303
24304    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24305  fi
24306
24307              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24308$as_echo_n "checking for Boot JDK... " >&6; }
24309              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24310$as_echo "$BOOT_JDK" >&6; }
24311              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24312$as_echo_n "checking Boot JDK version... " >&6; }
24313              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24314              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24315$as_echo "$BOOT_JDK_VERSION" >&6; }
24316            fi # end check jdk version
24317          fi # end check rt.jar
24318        fi # end check javac
24319      fi # end check java
24320    fi # end check boot jdk found
24321  fi
24322
24323    done
24324  fi
24325
24326
24327    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24328    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24329      # Do we have a bin/java?
24330      if test ! -x "$BOOT_JDK/bin/java"; then
24331        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24332$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24333        BOOT_JDK_FOUND=no
24334      else
24335        # Do we have a bin/javac?
24336        if test ! -x "$BOOT_JDK/bin/javac"; then
24337          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24339          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24340$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24341          BOOT_JDK_FOUND=no
24342        else
24343          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24344          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24345            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24346$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24347            BOOT_JDK_FOUND=no
24348          else
24349            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24350            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24351
24352            # Extra M4 quote needed to protect [] in grep expression.
24353            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24354            if test "x$FOUND_CORRECT_VERSION" = x; then
24355              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24357              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24358$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24359              BOOT_JDK_FOUND=no
24360            else
24361              # We're done! :-)
24362              BOOT_JDK_FOUND=yes
24363
24364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24365
24366  # Input might be given as Windows format, start by converting to
24367  # unix format.
24368  path="$BOOT_JDK"
24369  new_path=`$CYGPATH -u "$path"`
24370
24371  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24372  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24373  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24374  # "foo.exe" is OK but "foo" is an error.
24375  #
24376  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24377  # It is also a way to make sure we got the proper file name for the real test later on.
24378  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24379  if test "x$test_shortpath" = x; then
24380    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24381$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24382    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24383  fi
24384
24385  # Call helper function which possibly converts this using DOS-style short mode.
24386  # If so, the updated path is stored in $new_path.
24387
24388  input_path="$new_path"
24389  # Check if we need to convert this using DOS-style short mode. If the path
24390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24391  # take no chances and rewrite it.
24392  # Note: m4 eats our [], so we need to use [ and ] instead.
24393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24394  if test "x$has_forbidden_chars" != x; then
24395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24396    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24397    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24398    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24399      # Going to short mode and back again did indeed matter. Since short mode is
24400      # case insensitive, let's make it lowercase to improve readability.
24401      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24402      # Now convert it back to Unix-stile (cygpath)
24403      input_path=`$CYGPATH -u "$shortmode_path"`
24404      new_path="$input_path"
24405    fi
24406  fi
24407
24408  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24409  if test "x$test_cygdrive_prefix" = x; then
24410    # As a simple fix, exclude /usr/bin since it's not a real path.
24411    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24412      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24413      # a path prefixed by /cygdrive for fixpath to work.
24414      new_path="$CYGWIN_ROOT_PATH$input_path"
24415    fi
24416  fi
24417
24418
24419  if test "x$path" != "x$new_path"; then
24420    BOOT_JDK="$new_path"
24421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24422$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24423  fi
24424
24425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24426
24427  path="$BOOT_JDK"
24428  has_colon=`$ECHO $path | $GREP ^.:`
24429  new_path="$path"
24430  if test "x$has_colon" = x; then
24431    # Not in mixed or Windows style, start by that.
24432    new_path=`cmd //c echo $path`
24433  fi
24434
24435
24436  input_path="$new_path"
24437  # Check if we need to convert this using DOS-style short mode. If the path
24438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24439  # take no chances and rewrite it.
24440  # Note: m4 eats our [], so we need to use [ and ] instead.
24441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24442  if test "x$has_forbidden_chars" != x; then
24443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24445  fi
24446
24447
24448  windows_path="$new_path"
24449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24450    unix_path=`$CYGPATH -u "$windows_path"`
24451    new_path="$unix_path"
24452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24454    new_path="$unix_path"
24455  fi
24456
24457  if test "x$path" != "x$new_path"; then
24458    BOOT_JDK="$new_path"
24459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24460$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24461  fi
24462
24463  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24464  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24465
24466  else
24467    # We're on a posix platform. Hooray! :)
24468    path="$BOOT_JDK"
24469    has_space=`$ECHO "$path" | $GREP " "`
24470    if test "x$has_space" != x; then
24471      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24472$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24473      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24474    fi
24475
24476    # Use eval to expand a potential ~
24477    eval path="$path"
24478    if test ! -f "$path" && test ! -d "$path"; then
24479      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24480    fi
24481
24482    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24483  fi
24484
24485              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24486$as_echo_n "checking for Boot JDK... " >&6; }
24487              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24488$as_echo "$BOOT_JDK" >&6; }
24489              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24490$as_echo_n "checking Boot JDK version... " >&6; }
24491              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24492              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24493$as_echo "$BOOT_JDK_VERSION" >&6; }
24494            fi # end check jdk version
24495          fi # end check rt.jar
24496        fi # end check javac
24497      fi # end check java
24498    fi # end check boot jdk found
24499  fi
24500
24501  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24502
24503  if test "x$BOOT_JDK_FOUND" = xno; then
24504    # Now execute the test
24505
24506  BOOT_JDK_PREFIX="/usr/lib/jvm"
24507  BOOT_JDK_SUFFIX=""
24508  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24509  if test "x$ALL_JDKS_FOUND" != x; then
24510    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24511
24512  if test "x$BOOT_JDK_FOUND" = xno; then
24513    # Now execute the test
24514
24515        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24516        if test -d "$BOOT_JDK"; then
24517          BOOT_JDK_FOUND=maybe
24518          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24519$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24520        fi
24521
24522
24523    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24524    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24525      # Do we have a bin/java?
24526      if test ! -x "$BOOT_JDK/bin/java"; then
24527        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24529        BOOT_JDK_FOUND=no
24530      else
24531        # Do we have a bin/javac?
24532        if test ! -x "$BOOT_JDK/bin/javac"; then
24533          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24534$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24535          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24536$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24537          BOOT_JDK_FOUND=no
24538        else
24539          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24540          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24541            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24542$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24543            BOOT_JDK_FOUND=no
24544          else
24545            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24546            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24547
24548            # Extra M4 quote needed to protect [] in grep expression.
24549            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24550            if test "x$FOUND_CORRECT_VERSION" = x; then
24551              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24552$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24553              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24554$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24555              BOOT_JDK_FOUND=no
24556            else
24557              # We're done! :-)
24558              BOOT_JDK_FOUND=yes
24559
24560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24561
24562  # Input might be given as Windows format, start by converting to
24563  # unix format.
24564  path="$BOOT_JDK"
24565  new_path=`$CYGPATH -u "$path"`
24566
24567  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24568  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24569  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24570  # "foo.exe" is OK but "foo" is an error.
24571  #
24572  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24573  # It is also a way to make sure we got the proper file name for the real test later on.
24574  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24575  if test "x$test_shortpath" = x; then
24576    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24577$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24578    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24579  fi
24580
24581  # Call helper function which possibly converts this using DOS-style short mode.
24582  # If so, the updated path is stored in $new_path.
24583
24584  input_path="$new_path"
24585  # Check if we need to convert this using DOS-style short mode. If the path
24586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24587  # take no chances and rewrite it.
24588  # Note: m4 eats our [], so we need to use [ and ] instead.
24589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24590  if test "x$has_forbidden_chars" != x; then
24591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24592    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24593    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24594    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24595      # Going to short mode and back again did indeed matter. Since short mode is
24596      # case insensitive, let's make it lowercase to improve readability.
24597      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24598      # Now convert it back to Unix-stile (cygpath)
24599      input_path=`$CYGPATH -u "$shortmode_path"`
24600      new_path="$input_path"
24601    fi
24602  fi
24603
24604  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24605  if test "x$test_cygdrive_prefix" = x; then
24606    # As a simple fix, exclude /usr/bin since it's not a real path.
24607    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24608      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24609      # a path prefixed by /cygdrive for fixpath to work.
24610      new_path="$CYGWIN_ROOT_PATH$input_path"
24611    fi
24612  fi
24613
24614
24615  if test "x$path" != "x$new_path"; then
24616    BOOT_JDK="$new_path"
24617    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24618$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24619  fi
24620
24621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24622
24623  path="$BOOT_JDK"
24624  has_colon=`$ECHO $path | $GREP ^.:`
24625  new_path="$path"
24626  if test "x$has_colon" = x; then
24627    # Not in mixed or Windows style, start by that.
24628    new_path=`cmd //c echo $path`
24629  fi
24630
24631
24632  input_path="$new_path"
24633  # Check if we need to convert this using DOS-style short mode. If the path
24634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24635  # take no chances and rewrite it.
24636  # Note: m4 eats our [], so we need to use [ and ] instead.
24637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24638  if test "x$has_forbidden_chars" != x; then
24639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24640    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24641  fi
24642
24643
24644  windows_path="$new_path"
24645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24646    unix_path=`$CYGPATH -u "$windows_path"`
24647    new_path="$unix_path"
24648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24650    new_path="$unix_path"
24651  fi
24652
24653  if test "x$path" != "x$new_path"; then
24654    BOOT_JDK="$new_path"
24655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24656$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24657  fi
24658
24659  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24660  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24661
24662  else
24663    # We're on a posix platform. Hooray! :)
24664    path="$BOOT_JDK"
24665    has_space=`$ECHO "$path" | $GREP " "`
24666    if test "x$has_space" != x; then
24667      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24668$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24669      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24670    fi
24671
24672    # Use eval to expand a potential ~
24673    eval path="$path"
24674    if test ! -f "$path" && test ! -d "$path"; then
24675      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24676    fi
24677
24678    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24679  fi
24680
24681              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24682$as_echo_n "checking for Boot JDK... " >&6; }
24683              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24684$as_echo "$BOOT_JDK" >&6; }
24685              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24686$as_echo_n "checking Boot JDK version... " >&6; }
24687              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24688              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24689$as_echo "$BOOT_JDK_VERSION" >&6; }
24690            fi # end check jdk version
24691          fi # end check rt.jar
24692        fi # end check javac
24693      fi # end check java
24694    fi # end check boot jdk found
24695  fi
24696
24697    done
24698  fi
24699
24700
24701    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24702    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24703      # Do we have a bin/java?
24704      if test ! -x "$BOOT_JDK/bin/java"; then
24705        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24706$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24707        BOOT_JDK_FOUND=no
24708      else
24709        # Do we have a bin/javac?
24710        if test ! -x "$BOOT_JDK/bin/javac"; then
24711          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24712$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24713          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24714$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24715          BOOT_JDK_FOUND=no
24716        else
24717          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24718          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24719            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24720$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24721            BOOT_JDK_FOUND=no
24722          else
24723            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24724            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24725
24726            # Extra M4 quote needed to protect [] in grep expression.
24727            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24728            if test "x$FOUND_CORRECT_VERSION" = x; then
24729              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24730$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24731              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24732$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24733              BOOT_JDK_FOUND=no
24734            else
24735              # We're done! :-)
24736              BOOT_JDK_FOUND=yes
24737
24738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24739
24740  # Input might be given as Windows format, start by converting to
24741  # unix format.
24742  path="$BOOT_JDK"
24743  new_path=`$CYGPATH -u "$path"`
24744
24745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24748  # "foo.exe" is OK but "foo" is an error.
24749  #
24750  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24751  # It is also a way to make sure we got the proper file name for the real test later on.
24752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24753  if test "x$test_shortpath" = x; then
24754    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24755$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24756    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24757  fi
24758
24759  # Call helper function which possibly converts this using DOS-style short mode.
24760  # If so, the updated path is stored in $new_path.
24761
24762  input_path="$new_path"
24763  # Check if we need to convert this using DOS-style short mode. If the path
24764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24765  # take no chances and rewrite it.
24766  # Note: m4 eats our [], so we need to use [ and ] instead.
24767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24768  if test "x$has_forbidden_chars" != x; then
24769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24770    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24771    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24772    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24773      # Going to short mode and back again did indeed matter. Since short mode is
24774      # case insensitive, let's make it lowercase to improve readability.
24775      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24776      # Now convert it back to Unix-stile (cygpath)
24777      input_path=`$CYGPATH -u "$shortmode_path"`
24778      new_path="$input_path"
24779    fi
24780  fi
24781
24782  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24783  if test "x$test_cygdrive_prefix" = x; then
24784    # As a simple fix, exclude /usr/bin since it's not a real path.
24785    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24786      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24787      # a path prefixed by /cygdrive for fixpath to work.
24788      new_path="$CYGWIN_ROOT_PATH$input_path"
24789    fi
24790  fi
24791
24792
24793  if test "x$path" != "x$new_path"; then
24794    BOOT_JDK="$new_path"
24795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24796$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24797  fi
24798
24799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24800
24801  path="$BOOT_JDK"
24802  has_colon=`$ECHO $path | $GREP ^.:`
24803  new_path="$path"
24804  if test "x$has_colon" = x; then
24805    # Not in mixed or Windows style, start by that.
24806    new_path=`cmd //c echo $path`
24807  fi
24808
24809
24810  input_path="$new_path"
24811  # Check if we need to convert this using DOS-style short mode. If the path
24812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24813  # take no chances and rewrite it.
24814  # Note: m4 eats our [], so we need to use [ and ] instead.
24815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24816  if test "x$has_forbidden_chars" != x; then
24817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24818    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24819  fi
24820
24821
24822  windows_path="$new_path"
24823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24824    unix_path=`$CYGPATH -u "$windows_path"`
24825    new_path="$unix_path"
24826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24828    new_path="$unix_path"
24829  fi
24830
24831  if test "x$path" != "x$new_path"; then
24832    BOOT_JDK="$new_path"
24833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24834$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24835  fi
24836
24837  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24838  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24839
24840  else
24841    # We're on a posix platform. Hooray! :)
24842    path="$BOOT_JDK"
24843    has_space=`$ECHO "$path" | $GREP " "`
24844    if test "x$has_space" != x; then
24845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24846$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24847      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24848    fi
24849
24850    # Use eval to expand a potential ~
24851    eval path="$path"
24852    if test ! -f "$path" && test ! -d "$path"; then
24853      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24854    fi
24855
24856    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24857  fi
24858
24859              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24860$as_echo_n "checking for Boot JDK... " >&6; }
24861              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24862$as_echo "$BOOT_JDK" >&6; }
24863              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24864$as_echo_n "checking Boot JDK version... " >&6; }
24865              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24866              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24867$as_echo "$BOOT_JDK_VERSION" >&6; }
24868            fi # end check jdk version
24869          fi # end check rt.jar
24870        fi # end check javac
24871      fi # end check java
24872    fi # end check boot jdk found
24873  fi
24874
24875  fi
24876
24877
24878    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24879    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24880      # Do we have a bin/java?
24881      if test ! -x "$BOOT_JDK/bin/java"; then
24882        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24883$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24884        BOOT_JDK_FOUND=no
24885      else
24886        # Do we have a bin/javac?
24887        if test ! -x "$BOOT_JDK/bin/javac"; then
24888          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24889$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24890          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24891$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24892          BOOT_JDK_FOUND=no
24893        else
24894          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24895          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24896            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24897$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24898            BOOT_JDK_FOUND=no
24899          else
24900            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24901            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24902
24903            # Extra M4 quote needed to protect [] in grep expression.
24904            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24905            if test "x$FOUND_CORRECT_VERSION" = x; then
24906              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24907$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24908              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24909$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24910              BOOT_JDK_FOUND=no
24911            else
24912              # We're done! :-)
24913              BOOT_JDK_FOUND=yes
24914
24915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24916
24917  # Input might be given as Windows format, start by converting to
24918  # unix format.
24919  path="$BOOT_JDK"
24920  new_path=`$CYGPATH -u "$path"`
24921
24922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24925  # "foo.exe" is OK but "foo" is an error.
24926  #
24927  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24928  # It is also a way to make sure we got the proper file name for the real test later on.
24929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24930  if test "x$test_shortpath" = x; then
24931    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24932$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24933    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24934  fi
24935
24936  # Call helper function which possibly converts this using DOS-style short mode.
24937  # If so, the updated path is stored in $new_path.
24938
24939  input_path="$new_path"
24940  # Check if we need to convert this using DOS-style short mode. If the path
24941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24942  # take no chances and rewrite it.
24943  # Note: m4 eats our [], so we need to use [ and ] instead.
24944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24945  if test "x$has_forbidden_chars" != x; then
24946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24947    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24948    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24949    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24950      # Going to short mode and back again did indeed matter. Since short mode is
24951      # case insensitive, let's make it lowercase to improve readability.
24952      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24953      # Now convert it back to Unix-stile (cygpath)
24954      input_path=`$CYGPATH -u "$shortmode_path"`
24955      new_path="$input_path"
24956    fi
24957  fi
24958
24959  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24960  if test "x$test_cygdrive_prefix" = x; then
24961    # As a simple fix, exclude /usr/bin since it's not a real path.
24962    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24963      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24964      # a path prefixed by /cygdrive for fixpath to work.
24965      new_path="$CYGWIN_ROOT_PATH$input_path"
24966    fi
24967  fi
24968
24969
24970  if test "x$path" != "x$new_path"; then
24971    BOOT_JDK="$new_path"
24972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24973$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24974  fi
24975
24976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24977
24978  path="$BOOT_JDK"
24979  has_colon=`$ECHO $path | $GREP ^.:`
24980  new_path="$path"
24981  if test "x$has_colon" = x; then
24982    # Not in mixed or Windows style, start by that.
24983    new_path=`cmd //c echo $path`
24984  fi
24985
24986
24987  input_path="$new_path"
24988  # Check if we need to convert this using DOS-style short mode. If the path
24989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24990  # take no chances and rewrite it.
24991  # Note: m4 eats our [], so we need to use [ and ] instead.
24992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24993  if test "x$has_forbidden_chars" != x; then
24994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24996  fi
24997
24998
24999  windows_path="$new_path"
25000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25001    unix_path=`$CYGPATH -u "$windows_path"`
25002    new_path="$unix_path"
25003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25005    new_path="$unix_path"
25006  fi
25007
25008  if test "x$path" != "x$new_path"; then
25009    BOOT_JDK="$new_path"
25010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25011$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25012  fi
25013
25014  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25015  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25016
25017  else
25018    # We're on a posix platform. Hooray! :)
25019    path="$BOOT_JDK"
25020    has_space=`$ECHO "$path" | $GREP " "`
25021    if test "x$has_space" != x; then
25022      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25023$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25024      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25025    fi
25026
25027    # Use eval to expand a potential ~
25028    eval path="$path"
25029    if test ! -f "$path" && test ! -d "$path"; then
25030      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25031    fi
25032
25033    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25034  fi
25035
25036              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25037$as_echo_n "checking for Boot JDK... " >&6; }
25038              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25039$as_echo "$BOOT_JDK" >&6; }
25040              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25041$as_echo_n "checking Boot JDK version... " >&6; }
25042              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25043              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25044$as_echo "$BOOT_JDK_VERSION" >&6; }
25045            fi # end check jdk version
25046          fi # end check rt.jar
25047        fi # end check javac
25048      fi # end check java
25049    fi # end check boot jdk found
25050  fi
25051
25052
25053  # If we haven't found anything yet, we've truly lost. Give up.
25054  if test "x$BOOT_JDK_FOUND" = xno; then
25055
25056  # Print a helpful message on how to acquire the necessary build dependency.
25057  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25058  MISSING_DEPENDENCY=openjdk
25059
25060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25061    cygwin_help $MISSING_DEPENDENCY
25062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25063    msys_help $MISSING_DEPENDENCY
25064  else
25065    PKGHANDLER_COMMAND=
25066
25067    case $PKGHANDLER in
25068      apt-get)
25069        apt_help     $MISSING_DEPENDENCY ;;
25070      yum)
25071        yum_help     $MISSING_DEPENDENCY ;;
25072      port)
25073        port_help    $MISSING_DEPENDENCY ;;
25074      pkgutil)
25075        pkgutil_help $MISSING_DEPENDENCY ;;
25076      pkgadd)
25077        pkgadd_help  $MISSING_DEPENDENCY ;;
25078    esac
25079
25080    if test "x$PKGHANDLER_COMMAND" != x; then
25081      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25082    fi
25083  fi
25084
25085    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25086$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25087    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25088$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25089    as_fn_error $? "Cannot continue" "$LINENO" 5
25090  fi
25091
25092  # Setup proper paths for what we found
25093  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
25094  if test ! -f "$BOOT_RTJAR"; then
25095    # On MacOSX it is called classes.jar
25096    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
25097    if test -f "$BOOT_RTJAR"; then
25098      # Remove the ..
25099      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
25100    fi
25101  fi
25102  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
25103  BOOT_JDK="$BOOT_JDK"
25104
25105
25106
25107
25108  # Setup tools from the Boot JDK.
25109
25110  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25111
25112  # Publish this variable in the help.
25113
25114
25115  if test "x$JAVA" = x; then
25116    # The variable is not set by user, try to locate tool using the code snippet
25117
25118      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25119$as_echo_n "checking for java in Boot JDK... " >&6; }
25120      JAVA=$BOOT_JDK/bin/java
25121      if test ! -x $JAVA; then
25122        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25123$as_echo "not found" >&6; }
25124        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25125$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25126        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25127      fi
25128      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25129$as_echo "ok" >&6; }
25130
25131
25132  else
25133    # The variable is set, but is it from the command line or the environment?
25134
25135    # Try to remove the string !JAVA! from our list.
25136    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25137    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25138      # If it failed, the variable was not from the command line. Ignore it,
25139      # but warn the user (except for BASH, which is always set by the calling BASH).
25140      if test "xJAVA" != xBASH; then
25141        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25142$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25143      fi
25144      # Try to locate tool using the code snippet
25145
25146      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25147$as_echo_n "checking for java in Boot JDK... " >&6; }
25148      JAVA=$BOOT_JDK/bin/java
25149      if test ! -x $JAVA; then
25150        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25151$as_echo "not found" >&6; }
25152        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25153$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25154        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25155      fi
25156      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25157$as_echo "ok" >&6; }
25158
25159
25160    else
25161      # If it succeeded, then it was overridden by the user. We will use it
25162      # for the tool.
25163
25164      # First remove it from the list of overridden variables, so we can test
25165      # for unknown variables in the end.
25166      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25167
25168      # Check if the provided tool contains a complete path.
25169      tool_specified="$JAVA"
25170      tool_basename="${tool_specified##*/}"
25171      if test "x$tool_basename" = "x$tool_specified"; then
25172        # A command without a complete path is provided, search $PATH.
25173        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25174$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25175        # Extract the first word of "$tool_basename", so it can be a program name with args.
25176set dummy $tool_basename; ac_word=$2
25177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25178$as_echo_n "checking for $ac_word... " >&6; }
25179if ${ac_cv_path_JAVA+:} false; then :
25180  $as_echo_n "(cached) " >&6
25181else
25182  case $JAVA in
25183  [\\/]* | ?:[\\/]*)
25184  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25185  ;;
25186  *)
25187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25188for as_dir in $PATH
25189do
25190  IFS=$as_save_IFS
25191  test -z "$as_dir" && as_dir=.
25192    for ac_exec_ext in '' $ac_executable_extensions; do
25193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25194    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25196    break 2
25197  fi
25198done
25199  done
25200IFS=$as_save_IFS
25201
25202  ;;
25203esac
25204fi
25205JAVA=$ac_cv_path_JAVA
25206if test -n "$JAVA"; then
25207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25208$as_echo "$JAVA" >&6; }
25209else
25210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25211$as_echo "no" >&6; }
25212fi
25213
25214
25215        if test "x$JAVA" = x; then
25216          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25217        fi
25218      else
25219        # Otherwise we believe it is a complete path. Use it as it is.
25220        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25221$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25222        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25223$as_echo_n "checking for JAVA... " >&6; }
25224        if test ! -x "$tool_specified"; then
25225          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25226$as_echo "not found" >&6; }
25227          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25228        fi
25229        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25230$as_echo "$tool_specified" >&6; }
25231      fi
25232    fi
25233  fi
25234
25235
25236
25237  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25238
25239  # Publish this variable in the help.
25240
25241
25242  if test "x$JAVAC" = x; then
25243    # The variable is not set by user, try to locate tool using the code snippet
25244
25245      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25246$as_echo_n "checking for javac in Boot JDK... " >&6; }
25247      JAVAC=$BOOT_JDK/bin/javac
25248      if test ! -x $JAVAC; then
25249        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25250$as_echo "not found" >&6; }
25251        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25252$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25253        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25254      fi
25255      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25256$as_echo "ok" >&6; }
25257
25258
25259  else
25260    # The variable is set, but is it from the command line or the environment?
25261
25262    # Try to remove the string !JAVAC! from our list.
25263    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25264    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25265      # If it failed, the variable was not from the command line. Ignore it,
25266      # but warn the user (except for BASH, which is always set by the calling BASH).
25267      if test "xJAVAC" != xBASH; then
25268        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25269$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25270      fi
25271      # Try to locate tool using the code snippet
25272
25273      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25274$as_echo_n "checking for javac in Boot JDK... " >&6; }
25275      JAVAC=$BOOT_JDK/bin/javac
25276      if test ! -x $JAVAC; then
25277        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25278$as_echo "not found" >&6; }
25279        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25280$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25281        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25282      fi
25283      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25284$as_echo "ok" >&6; }
25285
25286
25287    else
25288      # If it succeeded, then it was overridden by the user. We will use it
25289      # for the tool.
25290
25291      # First remove it from the list of overridden variables, so we can test
25292      # for unknown variables in the end.
25293      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25294
25295      # Check if the provided tool contains a complete path.
25296      tool_specified="$JAVAC"
25297      tool_basename="${tool_specified##*/}"
25298      if test "x$tool_basename" = "x$tool_specified"; then
25299        # A command without a complete path is provided, search $PATH.
25300        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25301$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25302        # Extract the first word of "$tool_basename", so it can be a program name with args.
25303set dummy $tool_basename; ac_word=$2
25304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25305$as_echo_n "checking for $ac_word... " >&6; }
25306if ${ac_cv_path_JAVAC+:} false; then :
25307  $as_echo_n "(cached) " >&6
25308else
25309  case $JAVAC in
25310  [\\/]* | ?:[\\/]*)
25311  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25312  ;;
25313  *)
25314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25315for as_dir in $PATH
25316do
25317  IFS=$as_save_IFS
25318  test -z "$as_dir" && as_dir=.
25319    for ac_exec_ext in '' $ac_executable_extensions; do
25320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25321    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25323    break 2
25324  fi
25325done
25326  done
25327IFS=$as_save_IFS
25328
25329  ;;
25330esac
25331fi
25332JAVAC=$ac_cv_path_JAVAC
25333if test -n "$JAVAC"; then
25334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25335$as_echo "$JAVAC" >&6; }
25336else
25337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25338$as_echo "no" >&6; }
25339fi
25340
25341
25342        if test "x$JAVAC" = x; then
25343          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25344        fi
25345      else
25346        # Otherwise we believe it is a complete path. Use it as it is.
25347        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25348$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25349        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25350$as_echo_n "checking for JAVAC... " >&6; }
25351        if test ! -x "$tool_specified"; then
25352          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25353$as_echo "not found" >&6; }
25354          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25355        fi
25356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25357$as_echo "$tool_specified" >&6; }
25358      fi
25359    fi
25360  fi
25361
25362
25363
25364  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25365
25366  # Publish this variable in the help.
25367
25368
25369  if test "x$JAVAH" = x; then
25370    # The variable is not set by user, try to locate tool using the code snippet
25371
25372      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25373$as_echo_n "checking for javah in Boot JDK... " >&6; }
25374      JAVAH=$BOOT_JDK/bin/javah
25375      if test ! -x $JAVAH; then
25376        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25377$as_echo "not found" >&6; }
25378        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25379$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25380        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25381      fi
25382      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25383$as_echo "ok" >&6; }
25384
25385
25386  else
25387    # The variable is set, but is it from the command line or the environment?
25388
25389    # Try to remove the string !JAVAH! from our list.
25390    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25391    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25392      # If it failed, the variable was not from the command line. Ignore it,
25393      # but warn the user (except for BASH, which is always set by the calling BASH).
25394      if test "xJAVAH" != xBASH; then
25395        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25396$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25397      fi
25398      # Try to locate tool using the code snippet
25399
25400      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25401$as_echo_n "checking for javah in Boot JDK... " >&6; }
25402      JAVAH=$BOOT_JDK/bin/javah
25403      if test ! -x $JAVAH; then
25404        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25405$as_echo "not found" >&6; }
25406        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25407$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25408        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25409      fi
25410      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25411$as_echo "ok" >&6; }
25412
25413
25414    else
25415      # If it succeeded, then it was overridden by the user. We will use it
25416      # for the tool.
25417
25418      # First remove it from the list of overridden variables, so we can test
25419      # for unknown variables in the end.
25420      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25421
25422      # Check if the provided tool contains a complete path.
25423      tool_specified="$JAVAH"
25424      tool_basename="${tool_specified##*/}"
25425      if test "x$tool_basename" = "x$tool_specified"; then
25426        # A command without a complete path is provided, search $PATH.
25427        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25428$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25429        # Extract the first word of "$tool_basename", so it can be a program name with args.
25430set dummy $tool_basename; ac_word=$2
25431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25432$as_echo_n "checking for $ac_word... " >&6; }
25433if ${ac_cv_path_JAVAH+:} false; then :
25434  $as_echo_n "(cached) " >&6
25435else
25436  case $JAVAH in
25437  [\\/]* | ?:[\\/]*)
25438  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25439  ;;
25440  *)
25441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25442for as_dir in $PATH
25443do
25444  IFS=$as_save_IFS
25445  test -z "$as_dir" && as_dir=.
25446    for ac_exec_ext in '' $ac_executable_extensions; do
25447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25448    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25450    break 2
25451  fi
25452done
25453  done
25454IFS=$as_save_IFS
25455
25456  ;;
25457esac
25458fi
25459JAVAH=$ac_cv_path_JAVAH
25460if test -n "$JAVAH"; then
25461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25462$as_echo "$JAVAH" >&6; }
25463else
25464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25465$as_echo "no" >&6; }
25466fi
25467
25468
25469        if test "x$JAVAH" = x; then
25470          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25471        fi
25472      else
25473        # Otherwise we believe it is a complete path. Use it as it is.
25474        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25475$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25476        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25477$as_echo_n "checking for JAVAH... " >&6; }
25478        if test ! -x "$tool_specified"; then
25479          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25480$as_echo "not found" >&6; }
25481          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25482        fi
25483        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25484$as_echo "$tool_specified" >&6; }
25485      fi
25486    fi
25487  fi
25488
25489
25490
25491  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25492
25493  # Publish this variable in the help.
25494
25495
25496  if test "x$JAR" = x; then
25497    # The variable is not set by user, try to locate tool using the code snippet
25498
25499      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25500$as_echo_n "checking for jar in Boot JDK... " >&6; }
25501      JAR=$BOOT_JDK/bin/jar
25502      if test ! -x $JAR; then
25503        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25504$as_echo "not found" >&6; }
25505        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25506$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25507        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25508      fi
25509      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25510$as_echo "ok" >&6; }
25511
25512
25513  else
25514    # The variable is set, but is it from the command line or the environment?
25515
25516    # Try to remove the string !JAR! from our list.
25517    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25518    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25519      # If it failed, the variable was not from the command line. Ignore it,
25520      # but warn the user (except for BASH, which is always set by the calling BASH).
25521      if test "xJAR" != xBASH; then
25522        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25523$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25524      fi
25525      # Try to locate tool using the code snippet
25526
25527      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25528$as_echo_n "checking for jar in Boot JDK... " >&6; }
25529      JAR=$BOOT_JDK/bin/jar
25530      if test ! -x $JAR; then
25531        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25532$as_echo "not found" >&6; }
25533        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25534$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25535        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25536      fi
25537      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25538$as_echo "ok" >&6; }
25539
25540
25541    else
25542      # If it succeeded, then it was overridden by the user. We will use it
25543      # for the tool.
25544
25545      # First remove it from the list of overridden variables, so we can test
25546      # for unknown variables in the end.
25547      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25548
25549      # Check if the provided tool contains a complete path.
25550      tool_specified="$JAR"
25551      tool_basename="${tool_specified##*/}"
25552      if test "x$tool_basename" = "x$tool_specified"; then
25553        # A command without a complete path is provided, search $PATH.
25554        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25555$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25556        # Extract the first word of "$tool_basename", so it can be a program name with args.
25557set dummy $tool_basename; ac_word=$2
25558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25559$as_echo_n "checking for $ac_word... " >&6; }
25560if ${ac_cv_path_JAR+:} false; then :
25561  $as_echo_n "(cached) " >&6
25562else
25563  case $JAR in
25564  [\\/]* | ?:[\\/]*)
25565  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25566  ;;
25567  *)
25568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25569for as_dir in $PATH
25570do
25571  IFS=$as_save_IFS
25572  test -z "$as_dir" && as_dir=.
25573    for ac_exec_ext in '' $ac_executable_extensions; do
25574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25575    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25577    break 2
25578  fi
25579done
25580  done
25581IFS=$as_save_IFS
25582
25583  ;;
25584esac
25585fi
25586JAR=$ac_cv_path_JAR
25587if test -n "$JAR"; then
25588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25589$as_echo "$JAR" >&6; }
25590else
25591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25592$as_echo "no" >&6; }
25593fi
25594
25595
25596        if test "x$JAR" = x; then
25597          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25598        fi
25599      else
25600        # Otherwise we believe it is a complete path. Use it as it is.
25601        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25602$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25603        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25604$as_echo_n "checking for JAR... " >&6; }
25605        if test ! -x "$tool_specified"; then
25606          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25607$as_echo "not found" >&6; }
25608          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25609        fi
25610        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25611$as_echo "$tool_specified" >&6; }
25612      fi
25613    fi
25614  fi
25615
25616
25617
25618  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25619
25620  # Publish this variable in the help.
25621
25622
25623  if test "x$NATIVE2ASCII" = x; then
25624    # The variable is not set by user, try to locate tool using the code snippet
25625
25626      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25627$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25628      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25629      if test ! -x $NATIVE2ASCII; then
25630        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25631$as_echo "not found" >&6; }
25632        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25633$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25634        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25635      fi
25636      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25637$as_echo "ok" >&6; }
25638
25639
25640  else
25641    # The variable is set, but is it from the command line or the environment?
25642
25643    # Try to remove the string !NATIVE2ASCII! from our list.
25644    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25645    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25646      # If it failed, the variable was not from the command line. Ignore it,
25647      # but warn the user (except for BASH, which is always set by the calling BASH).
25648      if test "xNATIVE2ASCII" != xBASH; then
25649        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25650$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25651      fi
25652      # Try to locate tool using the code snippet
25653
25654      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25655$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25656      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25657      if test ! -x $NATIVE2ASCII; then
25658        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25659$as_echo "not found" >&6; }
25660        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25661$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25662        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25663      fi
25664      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25665$as_echo "ok" >&6; }
25666
25667
25668    else
25669      # If it succeeded, then it was overridden by the user. We will use it
25670      # for the tool.
25671
25672      # First remove it from the list of overridden variables, so we can test
25673      # for unknown variables in the end.
25674      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25675
25676      # Check if the provided tool contains a complete path.
25677      tool_specified="$NATIVE2ASCII"
25678      tool_basename="${tool_specified##*/}"
25679      if test "x$tool_basename" = "x$tool_specified"; then
25680        # A command without a complete path is provided, search $PATH.
25681        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25682$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25683        # Extract the first word of "$tool_basename", so it can be a program name with args.
25684set dummy $tool_basename; ac_word=$2
25685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25686$as_echo_n "checking for $ac_word... " >&6; }
25687if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25688  $as_echo_n "(cached) " >&6
25689else
25690  case $NATIVE2ASCII in
25691  [\\/]* | ?:[\\/]*)
25692  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25693  ;;
25694  *)
25695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25696for as_dir in $PATH
25697do
25698  IFS=$as_save_IFS
25699  test -z "$as_dir" && as_dir=.
25700    for ac_exec_ext in '' $ac_executable_extensions; do
25701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25702    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25704    break 2
25705  fi
25706done
25707  done
25708IFS=$as_save_IFS
25709
25710  ;;
25711esac
25712fi
25713NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25714if test -n "$NATIVE2ASCII"; then
25715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25716$as_echo "$NATIVE2ASCII" >&6; }
25717else
25718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25719$as_echo "no" >&6; }
25720fi
25721
25722
25723        if test "x$NATIVE2ASCII" = x; then
25724          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25725        fi
25726      else
25727        # Otherwise we believe it is a complete path. Use it as it is.
25728        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25729$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25730        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
25731$as_echo_n "checking for NATIVE2ASCII... " >&6; }
25732        if test ! -x "$tool_specified"; then
25733          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25734$as_echo "not found" >&6; }
25735          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
25736        fi
25737        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25738$as_echo "$tool_specified" >&6; }
25739      fi
25740    fi
25741  fi
25742
25743
25744
25745  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25746
25747  # Publish this variable in the help.
25748
25749
25750  if test "x$JARSIGNER" = x; then
25751    # The variable is not set by user, try to locate tool using the code snippet
25752
25753      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25754$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25755      JARSIGNER=$BOOT_JDK/bin/jarsigner
25756      if test ! -x $JARSIGNER; then
25757        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25758$as_echo "not found" >&6; }
25759        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25760$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25761        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25762      fi
25763      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25764$as_echo "ok" >&6; }
25765
25766
25767  else
25768    # The variable is set, but is it from the command line or the environment?
25769
25770    # Try to remove the string !JARSIGNER! from our list.
25771    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
25772    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25773      # If it failed, the variable was not from the command line. Ignore it,
25774      # but warn the user (except for BASH, which is always set by the calling BASH).
25775      if test "xJARSIGNER" != xBASH; then
25776        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
25777$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
25778      fi
25779      # Try to locate tool using the code snippet
25780
25781      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25782$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25783      JARSIGNER=$BOOT_JDK/bin/jarsigner
25784      if test ! -x $JARSIGNER; then
25785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25786$as_echo "not found" >&6; }
25787        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25788$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25789        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25790      fi
25791      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25792$as_echo "ok" >&6; }
25793
25794
25795    else
25796      # If it succeeded, then it was overridden by the user. We will use it
25797      # for the tool.
25798
25799      # First remove it from the list of overridden variables, so we can test
25800      # for unknown variables in the end.
25801      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25802
25803      # Check if the provided tool contains a complete path.
25804      tool_specified="$JARSIGNER"
25805      tool_basename="${tool_specified##*/}"
25806      if test "x$tool_basename" = "x$tool_specified"; then
25807        # A command without a complete path is provided, search $PATH.
25808        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
25809$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
25810        # Extract the first word of "$tool_basename", so it can be a program name with args.
25811set dummy $tool_basename; ac_word=$2
25812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25813$as_echo_n "checking for $ac_word... " >&6; }
25814if ${ac_cv_path_JARSIGNER+:} false; then :
25815  $as_echo_n "(cached) " >&6
25816else
25817  case $JARSIGNER in
25818  [\\/]* | ?:[\\/]*)
25819  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
25820  ;;
25821  *)
25822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25823for as_dir in $PATH
25824do
25825  IFS=$as_save_IFS
25826  test -z "$as_dir" && as_dir=.
25827    for ac_exec_ext in '' $ac_executable_extensions; do
25828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25829    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
25830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25831    break 2
25832  fi
25833done
25834  done
25835IFS=$as_save_IFS
25836
25837  ;;
25838esac
25839fi
25840JARSIGNER=$ac_cv_path_JARSIGNER
25841if test -n "$JARSIGNER"; then
25842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
25843$as_echo "$JARSIGNER" >&6; }
25844else
25845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25846$as_echo "no" >&6; }
25847fi
25848
25849
25850        if test "x$JARSIGNER" = x; then
25851          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25852        fi
25853      else
25854        # Otherwise we believe it is a complete path. Use it as it is.
25855        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
25856$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
25857        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
25858$as_echo_n "checking for JARSIGNER... " >&6; }
25859        if test ! -x "$tool_specified"; then
25860          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25861$as_echo "not found" >&6; }
25862          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
25863        fi
25864        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25865$as_echo "$tool_specified" >&6; }
25866      fi
25867    fi
25868  fi
25869
25870
25871
25872  # Finally, set some other options...
25873
25874  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
25875  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
25876
25877
25878
25879
25880  ##############################################################################
25881  #
25882  # Specify jvm options for anything that is run with the Boot JDK.
25883  # Not all JVM:s accept the same arguments on the command line.
25884  #
25885
25886# Check whether --with-boot-jdk-jvmargs was given.
25887if test "${with_boot_jdk_jvmargs+set}" = set; then :
25888  withval=$with_boot_jdk_jvmargs;
25889fi
25890
25891
25892  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
25893$as_echo_n "checking flags for boot jdk java command ... " >&6; }
25894
25895  # Disable special log output when a debug build is used as Boot JDK...
25896
25897  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
25898  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
25899  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
25900  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25901  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25902  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25903    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
25904    JVM_ARG_OK=true
25905  else
25906    $ECHO "Arg failed:" >&5
25907    $ECHO "$OUTPUT" >&5
25908    JVM_ARG_OK=false
25909  fi
25910
25911
25912  # Apply user provided options.
25913
25914  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
25915  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
25916  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
25917  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25918  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25919  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25920    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
25921    JVM_ARG_OK=true
25922  else
25923    $ECHO "Arg failed:" >&5
25924    $ECHO "$OUTPUT" >&5
25925    JVM_ARG_OK=false
25926  fi
25927
25928
25929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
25930$as_echo "$boot_jdk_jvmargs" >&6; }
25931
25932  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
25933  JAVA_FLAGS=$boot_jdk_jvmargs
25934
25935
25936
25937  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
25938$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
25939
25940  # Starting amount of heap memory.
25941
25942  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
25943  $ECHO "Command: $JAVA -Xms64M -version" >&5
25944  OUTPUT=`$JAVA -Xms64M -version 2>&1`
25945  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25946  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25947  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25948    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
25949    JVM_ARG_OK=true
25950  else
25951    $ECHO "Arg failed:" >&5
25952    $ECHO "$OUTPUT" >&5
25953    JVM_ARG_OK=false
25954  fi
25955
25956
25957  # Maximum amount of heap memory.
25958  # Maximum stack size.
25959  if test "x$BUILD_NUM_BITS" = x32; then
25960    JVM_MAX_HEAP=1100M
25961    STACK_SIZE=768
25962  else
25963    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
25964    # pointers are used. Apparently, we need to increase the heap and stack
25965    # space for the jvm. More specifically, when running javac to build huge
25966    # jdk batch
25967    JVM_MAX_HEAP=1600M
25968    STACK_SIZE=1536
25969  fi
25970
25971  $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
25972  $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
25973  OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
25974  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25975  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25976  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25977    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
25978    JVM_ARG_OK=true
25979  else
25980    $ECHO "Arg failed:" >&5
25981    $ECHO "$OUTPUT" >&5
25982    JVM_ARG_OK=false
25983  fi
25984
25985
25986  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
25987  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
25988  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
25989  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25990  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25991  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25992    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
25993    JVM_ARG_OK=true
25994  else
25995    $ECHO "Arg failed:" >&5
25996    $ECHO "$OUTPUT" >&5
25997    JVM_ARG_OK=false
25998  fi
25999
26000
26001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
26002$as_echo "$boot_jdk_jvmargs_big" >&6; }
26003
26004  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
26005
26006
26007
26008  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
26009$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
26010
26011  # Use serial gc for small short lived tools if possible
26012
26013  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
26014  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
26015  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
26016  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26017  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26018  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26019    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
26020    JVM_ARG_OK=true
26021  else
26022    $ECHO "Arg failed:" >&5
26023    $ECHO "$OUTPUT" >&5
26024    JVM_ARG_OK=false
26025  fi
26026
26027
26028  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
26029  $ECHO "Command: $JAVA -Xms32M -version" >&5
26030  OUTPUT=`$JAVA -Xms32M -version 2>&1`
26031  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26032  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26033  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26034    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
26035    JVM_ARG_OK=true
26036  else
26037    $ECHO "Arg failed:" >&5
26038    $ECHO "$OUTPUT" >&5
26039    JVM_ARG_OK=false
26040  fi
26041
26042
26043  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
26044  $ECHO "Command: $JAVA -Xmx512M -version" >&5
26045  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
26046  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26047  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26048  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26049    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
26050    JVM_ARG_OK=true
26051  else
26052    $ECHO "Arg failed:" >&5
26053    $ECHO "$OUTPUT" >&5
26054    JVM_ARG_OK=false
26055  fi
26056
26057
26058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
26059$as_echo "$boot_jdk_jvmargs_small" >&6; }
26060
26061  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
26062
26063
26064
26065###############################################################################
26066#
26067# Configure the sources to use. We can add or override individual directories.
26068#
26069###############################################################################
26070
26071
26072  # Where are the sources. Any of these can be overridden
26073  # using --with-override-corba and the likes.
26074  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26075  CORBA_TOPDIR="$SRC_ROOT/corba"
26076  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26077  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26078  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26079  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26080  JDK_TOPDIR="$SRC_ROOT/jdk"
26081
26082
26083
26084
26085
26086
26087
26088
26089
26090
26091  ###############################################################################
26092  #
26093  # Pickup additional source for a component from outside of the source root
26094  # or override source for a component.
26095  #
26096
26097# Check whether --with-add-source-root was given.
26098if test "${with_add_source_root+set}" = set; then :
26099  withval=$with_add_source_root;
26100fi
26101
26102
26103
26104# Check whether --with-override-source-root was given.
26105if test "${with_override_source_root+set}" = set; then :
26106  withval=$with_override_source_root;
26107fi
26108
26109
26110
26111# Check whether --with-adds-and-overrides was given.
26112if test "${with_adds_and_overrides+set}" = set; then :
26113  withval=$with_adds_and_overrides;
26114fi
26115
26116
26117  if test "x$with_adds_and_overrides" != x; then
26118    with_add_source_root="$with_adds_and_overrides/adds"
26119    with_override_source_root="$with_adds_and_overrides/overrides"
26120  fi
26121
26122  if test "x$with_add_source_root" != x; then
26123    if ! test -d $with_add_source_root; then
26124      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26125    fi
26126    CURDIR="$PWD"
26127    cd "$with_add_source_root"
26128    ADD_SRC_ROOT="`pwd`"
26129    cd "$CURDIR"
26130    # Verify that the addon source root does not have any root makefiles.
26131    # If it does, then it is usually an error, prevent this.
26132    if test -f $with_add_source_root/langtools/make/Makefile; then
26133      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
26134    fi
26135    if test -f $with_add_source_root/corba/make/Makefile; then
26136      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
26137    fi
26138    if test -f $with_add_source_root/jaxp/make/Makefile; then
26139      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
26140    fi
26141    if test -f $with_add_source_root/jaxws/make/Makefile; then
26142      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
26143    fi
26144    if test -f $with_add_source_root/hotspot/make/Makefile; then
26145      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
26146    fi
26147    if test -f $with_add_source_root/nashorn/make/Makefile; then
26148      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
26149    fi
26150    if test -f $with_add_source_root/jdk/make/Makefile; then
26151      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
26152    fi
26153  fi
26154
26155
26156  if test "x$with_override_source_root" != x; then
26157    if ! test -d $with_override_source_root; then
26158      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26159    fi
26160    CURDIR="$PWD"
26161    cd "$with_override_source_root"
26162    OVERRIDE_SRC_ROOT="`pwd`"
26163    cd "$CURDIR"
26164    if test -f $with_override_source_root/langtools/make/Makefile; then
26165      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
26166    fi
26167    if test -f $with_override_source_root/corba/make/Makefile; then
26168      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
26169    fi
26170    if test -f $with_override_source_root/jaxp/make/Makefile; then
26171      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
26172    fi
26173    if test -f $with_override_source_root/jaxws/make/Makefile; then
26174      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
26175    fi
26176    if test -f $with_override_source_root/hotspot/make/Makefile; then
26177      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
26178    fi
26179    if test -f $with_override_source_root/nashorn/make/Makefile; then
26180      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
26181    fi
26182    if test -f $with_override_source_root/jdk/make/Makefile; then
26183      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
26184    fi
26185  fi
26186
26187
26188  ###############################################################################
26189  #
26190  # Override a repo completely, this is used for example when you have 3 small
26191  # development sandboxes of the langtools sources and want to avoid having 3 full
26192  # OpenJDK sources checked out on disk.
26193  #
26194  # Assuming that the 3 langtools sandboxes are located here:
26195  # /home/fredrik/sandbox1/langtools
26196  # /home/fredrik/sandbox2/langtools
26197  # /home/fredrik/sandbox3/langtools
26198  #
26199  # From the source root you create build subdirs manually:
26200  #     mkdir -p build1 build2 build3
26201  # in each build directory run:
26202  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26203  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26204  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26205  #
26206
26207
26208# Check whether --with-override-langtools was given.
26209if test "${with_override_langtools+set}" = set; then :
26210  withval=$with_override_langtools;
26211fi
26212
26213
26214
26215# Check whether --with-override-corba was given.
26216if test "${with_override_corba+set}" = set; then :
26217  withval=$with_override_corba;
26218fi
26219
26220
26221
26222# Check whether --with-override-jaxp was given.
26223if test "${with_override_jaxp+set}" = set; then :
26224  withval=$with_override_jaxp;
26225fi
26226
26227
26228
26229# Check whether --with-override-jaxws was given.
26230if test "${with_override_jaxws+set}" = set; then :
26231  withval=$with_override_jaxws;
26232fi
26233
26234
26235
26236# Check whether --with-override-hotspot was given.
26237if test "${with_override_hotspot+set}" = set; then :
26238  withval=$with_override_hotspot;
26239fi
26240
26241
26242
26243# Check whether --with-override-nashorn was given.
26244if test "${with_override_nashorn+set}" = set; then :
26245  withval=$with_override_nashorn;
26246fi
26247
26248
26249
26250# Check whether --with-override-jdk was given.
26251if test "${with_override_jdk+set}" = set; then :
26252  withval=$with_override_jdk;
26253fi
26254
26255
26256  if test "x$with_override_langtools" != x; then
26257    CURDIR="$PWD"
26258    cd "$with_override_langtools"
26259    LANGTOOLS_TOPDIR="`pwd`"
26260    cd "$CURDIR"
26261    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26262      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26263    fi
26264    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26265$as_echo_n "checking if langtools should be overridden... " >&6; }
26266    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26267$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26268  fi
26269  if test "x$with_override_corba" != x; then
26270    CURDIR="$PWD"
26271    cd "$with_override_corba"
26272    CORBA_TOPDIR="`pwd`"
26273    cd "$CURDIR"
26274    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26275      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26276    fi
26277    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26278$as_echo_n "checking if corba should be overridden... " >&6; }
26279    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26280$as_echo "yes with $CORBA_TOPDIR" >&6; }
26281  fi
26282  if test "x$with_override_jaxp" != x; then
26283    CURDIR="$PWD"
26284    cd "$with_override_jaxp"
26285    JAXP_TOPDIR="`pwd`"
26286    cd "$CURDIR"
26287    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26288      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26289    fi
26290    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26291$as_echo_n "checking if jaxp should be overridden... " >&6; }
26292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26293$as_echo "yes with $JAXP_TOPDIR" >&6; }
26294  fi
26295  if test "x$with_override_jaxws" != x; then
26296    CURDIR="$PWD"
26297    cd "$with_override_jaxws"
26298    JAXWS_TOPDIR="`pwd`"
26299    cd "$CURDIR"
26300    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26301      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26302    fi
26303    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26304$as_echo_n "checking if jaxws should be overridden... " >&6; }
26305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26306$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26307  fi
26308  if test "x$with_override_hotspot" != x; then
26309    CURDIR="$PWD"
26310    cd "$with_override_hotspot"
26311    HOTSPOT_TOPDIR="`pwd`"
26312    cd "$CURDIR"
26313    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26314      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26315    fi
26316    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26317$as_echo_n "checking if hotspot should be overridden... " >&6; }
26318    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26319$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26320  fi
26321  if test "x$with_override_nashorn" != x; then
26322    CURDIR="$PWD"
26323    cd "$with_override_nashorn"
26324    NASHORN_TOPDIR="`pwd`"
26325    cd "$CURDIR"
26326    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26327      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26328    fi
26329    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26330$as_echo_n "checking if nashorn should be overridden... " >&6; }
26331    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26332$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26333  fi
26334  if test "x$with_override_jdk" != x; then
26335    CURDIR="$PWD"
26336    cd "$with_override_jdk"
26337    JDK_TOPDIR="`pwd`"
26338    cd "$CURDIR"
26339    if ! test -f $JDK_TOPDIR/make/Makefile; then
26340      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26341    fi
26342    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26343$as_echo_n "checking if JDK should be overridden... " >&6; }
26344    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26345$as_echo "yes with $JDK_TOPDIR" >&6; }
26346  fi
26347
26348
26349  BUILD_OUTPUT="$OUTPUT_ROOT"
26350
26351
26352  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26353  BUILD_HOTSPOT=true
26354
26355
26356
26357# Check whether --with-import-hotspot was given.
26358if test "${with_import_hotspot+set}" = set; then :
26359  withval=$with_import_hotspot;
26360fi
26361
26362  if test "x$with_import_hotspot" != x; then
26363    CURDIR="$PWD"
26364    cd "$with_import_hotspot"
26365    HOTSPOT_DIST="`pwd`"
26366    cd "$CURDIR"
26367    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26368      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26369    fi
26370    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26371$as_echo_n "checking if hotspot should be imported... " >&6; }
26372    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26373$as_echo "yes from $HOTSPOT_DIST" >&6; }
26374    BUILD_HOTSPOT=false
26375  fi
26376
26377  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26378
26379
26380###############################################################################
26381#
26382# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26383# native code.
26384#
26385###############################################################################
26386
26387# First determine the toolchain type (compiler family)
26388
26389
26390# Check whether --with-toolchain-type was given.
26391if test "${with_toolchain_type+set}" = set; then :
26392  withval=$with_toolchain_type;
26393fi
26394
26395
26396  # Use indirect variable referencing
26397  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26398  VALID_TOOLCHAINS=${!toolchain_var_name}
26399
26400  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26401    # On Mac OS X, default toolchain to clang after Xcode 5
26402    XCODE_VERSION_OUTPUT=`xcodebuild -version 2>&1 | $HEAD -n 1`
26403    $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26404    if test $? -ne 0; then
26405      as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26406    fi
26407    XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26408        $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26409        $CUT -f 1 -d .`
26410    { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26411$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26412    if test $XCODE_MAJOR_VERSION -ge 5; then
26413        DEFAULT_TOOLCHAIN="clang"
26414    else
26415        DEFAULT_TOOLCHAIN="gcc"
26416    fi
26417  else
26418    # First toolchain type in the list is the default
26419    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26420  fi
26421
26422  if test "x$with_toolchain_type" = xlist; then
26423    # List all toolchains
26424    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26425$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26426    for toolchain in $VALID_TOOLCHAINS; do
26427      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26428      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26429      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26430    done
26431
26432    exit 0
26433  elif test "x$with_toolchain_type" != x; then
26434    # User override; check that it is valid
26435    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26436      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26437$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26438      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26439$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26440      as_fn_error $? "Cannot continue." "$LINENO" 5
26441    fi
26442    TOOLCHAIN_TYPE=$with_toolchain_type
26443  else
26444    # No flag given, use default
26445    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26446  fi
26447
26448
26449  TOOLCHAIN_CC_BINARY_clang="clang"
26450  TOOLCHAIN_CC_BINARY_gcc="gcc"
26451  TOOLCHAIN_CC_BINARY_microsoft="cl"
26452  TOOLCHAIN_CC_BINARY_solstudio="cc"
26453  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26454
26455  TOOLCHAIN_CXX_BINARY_clang="clang++"
26456  TOOLCHAIN_CXX_BINARY_gcc="g++"
26457  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26458  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26459  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26460
26461  # Use indirect variable referencing
26462  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26463  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26464  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26465  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26466  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26467  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26468
26469
26470  # Define filename patterns
26471  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26472    LIBRARY_PREFIX=
26473    SHARED_LIBRARY_SUFFIX='.dll'
26474    STATIC_LIBRARY_SUFFIX='.lib'
26475    SHARED_LIBRARY='$1.dll'
26476    STATIC_LIBRARY='$1.lib'
26477    OBJ_SUFFIX='.obj'
26478    EXE_SUFFIX='.exe'
26479  else
26480    LIBRARY_PREFIX=lib
26481    SHARED_LIBRARY_SUFFIX='.so'
26482    STATIC_LIBRARY_SUFFIX='.a'
26483    SHARED_LIBRARY='lib$1.so'
26484    STATIC_LIBRARY='lib$1.a'
26485    OBJ_SUFFIX='.o'
26486    EXE_SUFFIX=''
26487    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26488      SHARED_LIBRARY='lib$1.dylib'
26489      SHARED_LIBRARY_SUFFIX='.dylib'
26490    fi
26491  fi
26492
26493
26494
26495
26496
26497
26498
26499
26500
26501
26502  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26503    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26504$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26505  else
26506    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26507$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26508  fi
26509
26510
26511# Then detect the actual binaries needed
26512
26513  # FIXME: Is this needed?
26514  ac_ext=cpp
26515ac_cpp='$CXXCPP $CPPFLAGS'
26516ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26517ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26518ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26519
26520
26521  # Store the CFLAGS etc passed to the configure script.
26522  ORG_CFLAGS="$CFLAGS"
26523  ORG_CXXFLAGS="$CXXFLAGS"
26524  ORG_OBJCFLAGS="$OBJCFLAGS"
26525
26526  # On Windows, we need to detect the visual studio installation first.
26527  # This will change the PATH, but we need to keep that new PATH even
26528  # after toolchain detection is done, since the compiler (on x86) uses
26529  # it for DLL resolution in runtime.
26530  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26531
26532  # Store path to cygwin link.exe to help excluding it when searching for
26533  # VS linker. This must be done before changing the PATH when looking for VS.
26534  # Extract the first word of "link", so it can be a program name with args.
26535set dummy link; ac_word=$2
26536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26537$as_echo_n "checking for $ac_word... " >&6; }
26538if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26539  $as_echo_n "(cached) " >&6
26540else
26541  case $CYGWIN_LINK in
26542  [\\/]* | ?:[\\/]*)
26543  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26544  ;;
26545  *)
26546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26547for as_dir in $PATH
26548do
26549  IFS=$as_save_IFS
26550  test -z "$as_dir" && as_dir=.
26551    for ac_exec_ext in '' $ac_executable_extensions; do
26552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26553    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26555    break 2
26556  fi
26557done
26558  done
26559IFS=$as_save_IFS
26560
26561  ;;
26562esac
26563fi
26564CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26565if test -n "$CYGWIN_LINK"; then
26566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26567$as_echo "$CYGWIN_LINK" >&6; }
26568else
26569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26570$as_echo "no" >&6; }
26571fi
26572
26573
26574  if test "x$CYGWIN_LINK" != x; then
26575    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26576$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26577    "$CYGWIN_LINK" --version > /dev/null
26578    if test $? -eq 0 ; then
26579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26580$as_echo "yes" >&6; }
26581    else
26582      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26583$as_echo "no" >&6; }
26584      # This might be the VS linker. Don't exclude it later on.
26585      CYGWIN_LINK=""
26586    fi
26587  fi
26588
26589  # First-hand choice is to locate and run the vsvars bat file.
26590
26591  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26592    VCVARSFILE="vc/bin/vcvars32.bat"
26593  else
26594    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26595  fi
26596
26597  VS_ENV_CMD=""
26598  VS_ENV_ARGS=""
26599  if test "x$with_toolsdir" != x; then
26600
26601  if test "x$VS_ENV_CMD" = x; then
26602    VS100BASE="$with_toolsdir/../.."
26603    METHOD="--with-tools-dir"
26604
26605  windows_path="$VS100BASE"
26606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26607    unix_path=`$CYGPATH -u "$windows_path"`
26608    VS100BASE="$unix_path"
26609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26611    VS100BASE="$unix_path"
26612  fi
26613
26614    if test -d "$VS100BASE"; then
26615      if test -f "$VS100BASE/$VCVARSFILE"; then
26616        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26617$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26618        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26619      else
26620        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26621$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26622        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26623$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26624      fi
26625    fi
26626  fi
26627
26628  fi
26629
26630  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26631    # Having specified an argument which is incorrect will produce an instant failure;
26632    # we should not go on looking
26633    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26634$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26635    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26636$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26637    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26638  fi
26639
26640  if test "x$VS100COMNTOOLS" != x; then
26641
26642  if test "x$VS_ENV_CMD" = x; then
26643    VS100BASE="$VS100COMNTOOLS/../.."
26644    METHOD="VS100COMNTOOLS variable"
26645
26646  windows_path="$VS100BASE"
26647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26648    unix_path=`$CYGPATH -u "$windows_path"`
26649    VS100BASE="$unix_path"
26650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26652    VS100BASE="$unix_path"
26653  fi
26654
26655    if test -d "$VS100BASE"; then
26656      if test -f "$VS100BASE/$VCVARSFILE"; then
26657        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26658$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26659        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26660      else
26661        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26662$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26663        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26664$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26665      fi
26666    fi
26667  fi
26668
26669  fi
26670  if test "x$PROGRAMFILES" != x; then
26671
26672  if test "x$VS_ENV_CMD" = x; then
26673    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26674    METHOD="well-known name"
26675
26676  windows_path="$VS100BASE"
26677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26678    unix_path=`$CYGPATH -u "$windows_path"`
26679    VS100BASE="$unix_path"
26680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26682    VS100BASE="$unix_path"
26683  fi
26684
26685    if test -d "$VS100BASE"; then
26686      if test -f "$VS100BASE/$VCVARSFILE"; then
26687        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26688$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26689        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26690      else
26691        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26692$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26693        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26694$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26695      fi
26696    fi
26697  fi
26698
26699  fi
26700
26701  if test "x$VS_ENV_CMD" = x; then
26702    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26703    METHOD="well-known name"
26704
26705  windows_path="$VS100BASE"
26706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26707    unix_path=`$CYGPATH -u "$windows_path"`
26708    VS100BASE="$unix_path"
26709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26711    VS100BASE="$unix_path"
26712  fi
26713
26714    if test -d "$VS100BASE"; then
26715      if test -f "$VS100BASE/$VCVARSFILE"; then
26716        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26717$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26718        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26719      else
26720        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26721$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26722        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26723$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26724      fi
26725    fi
26726  fi
26727
26728
26729  if test "x$VS_ENV_CMD" = x; then
26730    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26731    METHOD="well-known name"
26732
26733  windows_path="$VS100BASE"
26734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26735    unix_path=`$CYGPATH -u "$windows_path"`
26736    VS100BASE="$unix_path"
26737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26739    VS100BASE="$unix_path"
26740  fi
26741
26742    if test -d "$VS100BASE"; then
26743      if test -f "$VS100BASE/$VCVARSFILE"; then
26744        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26745$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26746        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26747      else
26748        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26749$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26750        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26751$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26752      fi
26753    fi
26754  fi
26755
26756
26757  if test "x$ProgramW6432" != x; then
26758
26759  if test "x$VS_ENV_CMD" = x; then
26760    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
26761    METHOD="well-known name"
26762
26763  windows_path="$WIN_SDK_BASE"
26764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26765    unix_path=`$CYGPATH -u "$windows_path"`
26766    WIN_SDK_BASE="$unix_path"
26767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26769    WIN_SDK_BASE="$unix_path"
26770  fi
26771
26772    if test -d "$WIN_SDK_BASE"; then
26773      # There have been cases of partial or broken SDK installations. A missing
26774      # lib dir is not going to work.
26775      if test ! -d "$WIN_SDK_BASE/../lib"; then
26776        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26777$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26778        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26779$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26780      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26781        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26782$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26783        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26784        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26785          VS_ENV_ARGS="/x86"
26786        else
26787          VS_ENV_ARGS="/x64"
26788        fi
26789      else
26790        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26791$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26792        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26793$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26794      fi
26795    fi
26796  fi
26797
26798  fi
26799  if test "x$PROGRAMW6432" != x; then
26800
26801  if test "x$VS_ENV_CMD" = x; then
26802    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
26803    METHOD="well-known name"
26804
26805  windows_path="$WIN_SDK_BASE"
26806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26807    unix_path=`$CYGPATH -u "$windows_path"`
26808    WIN_SDK_BASE="$unix_path"
26809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26811    WIN_SDK_BASE="$unix_path"
26812  fi
26813
26814    if test -d "$WIN_SDK_BASE"; then
26815      # There have been cases of partial or broken SDK installations. A missing
26816      # lib dir is not going to work.
26817      if test ! -d "$WIN_SDK_BASE/../lib"; then
26818        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26819$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26820        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26821$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26822      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26823        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26824$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26825        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26826        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26827          VS_ENV_ARGS="/x86"
26828        else
26829          VS_ENV_ARGS="/x64"
26830        fi
26831      else
26832        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26833$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26834        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26835$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26836      fi
26837    fi
26838  fi
26839
26840  fi
26841  if test "x$PROGRAMFILES" != x; then
26842
26843  if test "x$VS_ENV_CMD" = x; then
26844    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
26845    METHOD="well-known name"
26846
26847  windows_path="$WIN_SDK_BASE"
26848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26849    unix_path=`$CYGPATH -u "$windows_path"`
26850    WIN_SDK_BASE="$unix_path"
26851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26853    WIN_SDK_BASE="$unix_path"
26854  fi
26855
26856    if test -d "$WIN_SDK_BASE"; then
26857      # There have been cases of partial or broken SDK installations. A missing
26858      # lib dir is not going to work.
26859      if test ! -d "$WIN_SDK_BASE/../lib"; then
26860        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26861$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26862        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26863$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26864      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26865        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26866$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26867        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26868        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26869          VS_ENV_ARGS="/x86"
26870        else
26871          VS_ENV_ARGS="/x64"
26872        fi
26873      else
26874        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26875$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26876        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26877$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26878      fi
26879    fi
26880  fi
26881
26882  fi
26883
26884  if test "x$VS_ENV_CMD" = x; then
26885    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
26886    METHOD="well-known name"
26887
26888  windows_path="$WIN_SDK_BASE"
26889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26890    unix_path=`$CYGPATH -u "$windows_path"`
26891    WIN_SDK_BASE="$unix_path"
26892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26894    WIN_SDK_BASE="$unix_path"
26895  fi
26896
26897    if test -d "$WIN_SDK_BASE"; then
26898      # There have been cases of partial or broken SDK installations. A missing
26899      # lib dir is not going to work.
26900      if test ! -d "$WIN_SDK_BASE/../lib"; then
26901        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26902$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26903        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26904$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26905      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26906        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26907$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26908        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26909        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26910          VS_ENV_ARGS="/x86"
26911        else
26912          VS_ENV_ARGS="/x64"
26913        fi
26914      else
26915        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26916$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26917        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26918$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26919      fi
26920    fi
26921  fi
26922
26923
26924  if test "x$VS_ENV_CMD" = x; then
26925    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
26926    METHOD="well-known name"
26927
26928  windows_path="$WIN_SDK_BASE"
26929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26930    unix_path=`$CYGPATH -u "$windows_path"`
26931    WIN_SDK_BASE="$unix_path"
26932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26934    WIN_SDK_BASE="$unix_path"
26935  fi
26936
26937    if test -d "$WIN_SDK_BASE"; then
26938      # There have been cases of partial or broken SDK installations. A missing
26939      # lib dir is not going to work.
26940      if test ! -d "$WIN_SDK_BASE/../lib"; then
26941        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26942$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26943        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26944$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26945      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26946        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26947$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26948        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26949        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26950          VS_ENV_ARGS="/x86"
26951        else
26952          VS_ENV_ARGS="/x64"
26953        fi
26954      else
26955        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26956$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26957        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26958$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26959      fi
26960    fi
26961  fi
26962
26963
26964  if test "x$VS_ENV_CMD" != x; then
26965    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
26966
26967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26968
26969  # First separate the path from the arguments. This will split at the first
26970  # space.
26971  complete="$VS_ENV_CMD"
26972  path="${complete%% *}"
26973  tmp="$complete EOL"
26974  arguments="${tmp#* }"
26975
26976  # Input might be given as Windows format, start by converting to
26977  # unix format.
26978  new_path=`$CYGPATH -u "$path"`
26979
26980  # Now try to locate executable using which
26981  new_path=`$WHICH "$new_path" 2> /dev/null`
26982  # bat and cmd files are not always considered executable in cygwin causing which
26983  # to not find them
26984  if test "x$new_path" = x \
26985      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26986      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26987    new_path=`$CYGPATH -u "$path"`
26988  fi
26989  if test "x$new_path" = x; then
26990    # Oops. Which didn't find the executable.
26991    # The splitting of arguments from the executable at a space might have been incorrect,
26992    # since paths with space are more likely in Windows. Give it another try with the whole
26993    # argument.
26994    path="$complete"
26995    arguments="EOL"
26996    new_path=`$CYGPATH -u "$path"`
26997    new_path=`$WHICH "$new_path" 2> /dev/null`
26998    # bat and cmd files are not always considered executable in cygwin causing which
26999    # to not find them
27000    if test "x$new_path" = x \
27001        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27002        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27003      new_path=`$CYGPATH -u "$path"`
27004    fi
27005    if test "x$new_path" = x; then
27006      # It's still not found. Now this is an unrecoverable error.
27007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27008$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27009      has_space=`$ECHO "$complete" | $GREP " "`
27010      if test "x$has_space" != x; then
27011        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27012$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27013      fi
27014      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27015    fi
27016  fi
27017
27018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27021  # "foo.exe" is OK but "foo" is an error.
27022  #
27023  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27024  # It is also a way to make sure we got the proper file name for the real test later on.
27025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27026  if test "x$test_shortpath" = x; then
27027    # Short path failed, file does not exist as specified.
27028    # Try adding .exe or .cmd
27029    if test -f "${new_path}.exe"; then
27030      input_to_shortpath="${new_path}.exe"
27031    elif test -f "${new_path}.cmd"; then
27032      input_to_shortpath="${new_path}.cmd"
27033    else
27034      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27035$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27036      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27037$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27038      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27039    fi
27040  else
27041    input_to_shortpath="$new_path"
27042  fi
27043
27044  # Call helper function which possibly converts this using DOS-style short mode.
27045  # If so, the updated path is stored in $new_path.
27046  new_path="$input_to_shortpath"
27047
27048  input_path="$input_to_shortpath"
27049  # Check if we need to convert this using DOS-style short mode. If the path
27050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27051  # take no chances and rewrite it.
27052  # Note: m4 eats our [], so we need to use [ and ] instead.
27053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27054  if test "x$has_forbidden_chars" != x; then
27055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27056    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27057    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27058    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27059      # Going to short mode and back again did indeed matter. Since short mode is
27060      # case insensitive, let's make it lowercase to improve readability.
27061      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27062      # Now convert it back to Unix-stile (cygpath)
27063      input_path=`$CYGPATH -u "$shortmode_path"`
27064      new_path="$input_path"
27065    fi
27066  fi
27067
27068  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27069  if test "x$test_cygdrive_prefix" = x; then
27070    # As a simple fix, exclude /usr/bin since it's not a real path.
27071    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27072      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27073      # a path prefixed by /cygdrive for fixpath to work.
27074      new_path="$CYGWIN_ROOT_PATH$input_path"
27075    fi
27076  fi
27077
27078  # remove trailing .exe if any
27079  new_path="${new_path/%.exe/}"
27080
27081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27082
27083  # First separate the path from the arguments. This will split at the first
27084  # space.
27085  complete="$VS_ENV_CMD"
27086  path="${complete%% *}"
27087  tmp="$complete EOL"
27088  arguments="${tmp#* }"
27089
27090  # Input might be given as Windows format, start by converting to
27091  # unix format.
27092  new_path="$path"
27093
27094  windows_path="$new_path"
27095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27096    unix_path=`$CYGPATH -u "$windows_path"`
27097    new_path="$unix_path"
27098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27100    new_path="$unix_path"
27101  fi
27102
27103
27104  # Now try to locate executable using which
27105  new_path=`$WHICH "$new_path" 2> /dev/null`
27106
27107  if test "x$new_path" = x; then
27108    # Oops. Which didn't find the executable.
27109    # The splitting of arguments from the executable at a space might have been incorrect,
27110    # since paths with space are more likely in Windows. Give it another try with the whole
27111    # argument.
27112    path="$complete"
27113    arguments="EOL"
27114    new_path="$path"
27115
27116  windows_path="$new_path"
27117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27118    unix_path=`$CYGPATH -u "$windows_path"`
27119    new_path="$unix_path"
27120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27122    new_path="$unix_path"
27123  fi
27124
27125
27126    new_path=`$WHICH "$new_path" 2> /dev/null`
27127
27128    if test "x$new_path" = x; then
27129      # It's still not found. Now this is an unrecoverable error.
27130      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27131$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27132      has_space=`$ECHO "$complete" | $GREP " "`
27133      if test "x$has_space" != x; then
27134        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27135$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27136      fi
27137      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27138    fi
27139  fi
27140
27141  # Now new_path has a complete unix path to the binary
27142  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27143    # Keep paths in /bin as-is, but remove trailing .exe if any
27144    new_path="${new_path/%.exe/}"
27145    # Do not save /bin paths to all_fixpath_prefixes!
27146  else
27147    # Not in mixed or Windows style, start by that.
27148    new_path=`cmd //c echo $new_path`
27149
27150  input_path="$new_path"
27151  # Check if we need to convert this using DOS-style short mode. If the path
27152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27153  # take no chances and rewrite it.
27154  # Note: m4 eats our [], so we need to use [ and ] instead.
27155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27156  if test "x$has_forbidden_chars" != x; then
27157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27158    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27159  fi
27160
27161    # Output is in $new_path
27162
27163  windows_path="$new_path"
27164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27165    unix_path=`$CYGPATH -u "$windows_path"`
27166    new_path="$unix_path"
27167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27169    new_path="$unix_path"
27170  fi
27171
27172    # remove trailing .exe if any
27173    new_path="${new_path/%.exe/}"
27174
27175    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27176    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27177  fi
27178
27179  else
27180    # We're on a posix platform. Hooray! :)
27181    # First separate the path from the arguments. This will split at the first
27182    # space.
27183    complete="$VS_ENV_CMD"
27184    path="${complete%% *}"
27185    tmp="$complete EOL"
27186    arguments="${tmp#* }"
27187
27188    # Cannot rely on the command "which" here since it doesn't always work.
27189    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27190    if test -z "$is_absolute_path"; then
27191      # Path to executable is not absolute. Find it.
27192      IFS_save="$IFS"
27193      IFS=:
27194      for p in $PATH; do
27195        if test -f "$p/$path" && test -x "$p/$path"; then
27196          new_path="$p/$path"
27197          break
27198        fi
27199      done
27200      IFS="$IFS_save"
27201    else
27202      # This is an absolute path, we can use it without further modifications.
27203      new_path="$path"
27204    fi
27205
27206    if test "x$new_path" = x; then
27207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27208$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27209      has_space=`$ECHO "$complete" | $GREP " "`
27210      if test "x$has_space" != x; then
27211        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27212$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27213      fi
27214      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27215    fi
27216  fi
27217
27218  # Now join together the path and the arguments once again
27219  if test "x$arguments" != xEOL; then
27220    new_complete="$new_path ${arguments% *}"
27221  else
27222    new_complete="$new_path"
27223  fi
27224
27225  if test "x$complete" != "x$new_complete"; then
27226    VS_ENV_CMD="$new_complete"
27227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27228$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27229  fi
27230
27231
27232    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27233    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27234$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27235    cd $OUTPUT_ROOT
27236    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
27237    # to autoconf standards.
27238
27239    #----
27240
27241    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
27242    # but calculate the difference in Cygwin environment before/after running it and then
27243    # apply the diff.
27244
27245    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
27246      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
27247      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
27248      _dosbash=`cygpath -a -w -s \`which bash\`.*`
27249    else
27250      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
27251      _dosbash=`cmd //c echo \`which bash\``
27252    fi
27253
27254    # generate the set of exported vars before/after the vs10 setup
27255    $ECHO "@echo off"                                           >  localdevenvtmp.bat
27256    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
27257    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
27258    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
27259
27260    # Now execute the newly created bat file.
27261    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
27262    cmd /c localdevenvtmp.bat | cat
27263
27264    # apply the diff (less some non-vs10 vars named by "!")
27265    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
27266    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
27267    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
27268
27269    # cleanup
27270    $RM localdevenvtmp*
27271    #----
27272    cd $CURDIR
27273    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
27274      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27275$as_echo "no" >&6; }
27276      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27277$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27278      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27279$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27280      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27281$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27282      as_fn_error $? "Cannot continue" "$LINENO" 5
27283    fi
27284
27285    # Now set all paths and other env variables. This will allow the rest of
27286    # the configure script to find and run the compiler in the proper way.
27287    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27288$as_echo "$as_me: Setting extracted environment variables" >&6;}
27289    . $OUTPUT_ROOT/localdevenv.sh
27290  else
27291    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27292    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27293$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27294  fi
27295
27296  # At this point, we should have corrent variables in the environment, or we can't continue.
27297  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27298$as_echo_n "checking for Visual Studio variables... " >&6; }
27299
27300  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27301    if test "x$INCLUDE" = x || test "x$LIB" = x; then
27302      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27303$as_echo "present but broken" >&6; }
27304      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27305    else
27306      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27307$as_echo "ok" >&6; }
27308      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
27309      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
27310      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
27311      # Remove any paths containing # (typically F#) as that messes up make
27312      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
27313      VS_PATH="$PATH"
27314
27315
27316
27317    fi
27318  else
27319    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27320$as_echo "not found" >&6; }
27321
27322    if test "x$VS_ENV_CMD" = x; then
27323      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27324$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27325      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27326$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27327    else
27328      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27329$as_echo "$as_me: Running the extraction script failed." >&6;}
27330    fi
27331    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27332$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27333    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27334$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27335    as_fn_error $? "Cannot continue" "$LINENO" 5
27336  fi
27337
27338  fi
27339
27340  # autoconf magic only relies on PATH, so update it if tools dir is specified
27341  OLD_PATH="$PATH"
27342
27343  # For solaris we really need solaris tools, and not the GNU equivalent.
27344  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27345  # so add that to path before starting to probe.
27346  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27347  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27348    PATH="/usr/ccs/bin:$PATH"
27349  fi
27350
27351  # Finally add TOOLS_DIR at the beginning, to allow --with-tools-dir to
27352  # override all other locations.
27353  if test "x$TOOLS_DIR" != x; then
27354    PATH=$TOOLS_DIR:$PATH
27355  fi
27356
27357  # If a devkit is found on the builddeps server, then prepend its path to the
27358  # PATH variable. If there are cross compilers available in the devkit, these
27359  # will be found by AC_PROG_CC et al.
27360  DEVKIT=
27361
27362
27363  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
27364    # Source the builddeps file again, to make sure it uses the latest variables!
27365    . $builddepsfile
27366    # Look for a target and build machine specific resource!
27367    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
27368    if test "x$resource" = x; then
27369      # Ok, lets instead look for a target specific resource
27370      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
27371    fi
27372    if test "x$resource" = x; then
27373      # Ok, lets instead look for a build specific resource
27374      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
27375    fi
27376    if test "x$resource" = x; then
27377      # Ok, lets instead look for a generic resource
27378      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
27379      resource=${builddep_devkit}
27380    fi
27381    if test "x$resource" != x; then
27382      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
27383$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
27384      # If the resource in the builddeps.conf file is an existing directory,
27385      # for example /java/linux/cups
27386      if test -d ${resource}; then
27387        depdir=${resource}
27388      else
27389
27390  # devkit is for example mymodule
27391  # $resource is for example libs/general/libmymod_1_2_3.zip
27392  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
27393  # $with_builddeps_dir is for example /localhome/builddeps
27394  # depdir is the name of the variable into which we store the depdir, eg MYMOD
27395  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
27396  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
27397  filename=`basename $resource`
27398  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
27399  filebase=${filename%%.*}
27400  extension=${filename#*.}
27401  installdir=$with_builddeps_dir/$filebase
27402  if test ! -f $installdir/$filename.unpacked; then
27403    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
27404$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
27405    if test ! -d $installdir; then
27406      mkdir -p $installdir
27407    fi
27408    if test ! -d $installdir; then
27409      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
27410    fi
27411    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
27412    touch $tmpfile
27413    if test ! -f $tmpfile; then
27414      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
27415    fi
27416
27417  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
27418  # $tmpfile is the local file name for the downloaded file.
27419  VALID_TOOL=no
27420  if test "x$BDEPS_FTP" = xwget; then
27421    VALID_TOOL=yes
27422    wget -O $tmpfile $with_builddeps_server/$resource
27423  fi
27424  if test "x$BDEPS_FTP" = xlftp; then
27425    VALID_TOOL=yes
27426    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
27427  fi
27428  if test "x$BDEPS_FTP" = xftp; then
27429    VALID_TOOL=yes
27430    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
27431    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
27432    FTPUSERPWD=${FTPSERVER%%@*}
27433    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
27434      FTPUSER=${userpwd%%:*}
27435      FTPPWD=${userpwd#*@}
27436      FTPSERVER=${FTPSERVER#*@}
27437    else
27438      FTPUSER=ftp
27439      FTPPWD=ftp
27440    fi
27441    # the "pass" command does not work on some
27442    # ftp clients (read ftp.exe) but if it works,
27443    # passive mode is better!
27444    ( \
27445        echo "user $FTPUSER $FTPPWD"        ; \
27446        echo "pass"                         ; \
27447        echo "bin"                          ; \
27448        echo "get $FTPPATH $tmpfile"              ; \
27449    ) | ftp -in $FTPSERVER
27450  fi
27451  if test "x$VALID_TOOL" != xyes; then
27452    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
27453  fi
27454
27455    mv $tmpfile $installdir/$filename
27456    if test ! -s $installdir/$filename; then
27457      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
27458    fi
27459    case "$extension" in
27460      zip)  echo "Unzipping $installdir/$filename..."
27461        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
27462        ;;
27463      tar.gz) echo "Untaring $installdir/$filename..."
27464        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
27465        ;;
27466      tgz) echo "Untaring $installdir/$filename..."
27467        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
27468        ;;
27469      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
27470        ;;
27471    esac
27472  fi
27473  if test -f $installdir/$filename.unpacked; then
27474    depdir=$installdir
27475  fi
27476
27477      fi
27478      # Source the builddeps file again, because in the previous command, the depdir
27479      # was updated to point at the current build dependency install directory.
27480      . $builddepsfile
27481      # Now extract variables from the builddeps.conf files.
27482      theroot=${builddep_devkit_ROOT}
27483      thecflags=${builddep_devkit_CFLAGS}
27484      thelibs=${builddep_devkit_LIBS}
27485      if test "x$depdir" = x; then
27486        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
27487      fi
27488      DEVKIT=$depdir
27489      if test "x$theroot" != x; then
27490        DEVKIT="$theroot"
27491      fi
27492      if test "x$thecflags" != x; then
27493        DEVKIT_CFLAGS="$thecflags"
27494      fi
27495      if test "x$thelibs" != x; then
27496        DEVKIT_LIBS="$thelibs"
27497      fi
27498
27499        # Found devkit
27500        PATH="$DEVKIT/bin:$PATH"
27501        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
27502        if test "x$x_includes" = "xNONE"; then
27503          x_includes="$SYS_ROOT/usr/include/X11"
27504        fi
27505        if test "x$x_libraries" = "xNONE"; then
27506          x_libraries="$SYS_ROOT/usr/lib"
27507        fi
27508
27509
27510    fi
27511
27512  fi
27513
27514
27515
27516  #
27517  # Setup the compilers (CC and CXX)
27518  #
27519
27520  COMPILER_NAME=C
27521  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27522
27523  if test "x$CC" != x; then
27524    # User has supplied compiler name already, always let that override.
27525    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27526$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27527    if test "x`basename $CC`" = "x$CC"; then
27528      # A command without a complete path is provided, search $PATH.
27529
27530      for ac_prog in $CC
27531do
27532  # Extract the first word of "$ac_prog", so it can be a program name with args.
27533set dummy $ac_prog; ac_word=$2
27534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27535$as_echo_n "checking for $ac_word... " >&6; }
27536if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27537  $as_echo_n "(cached) " >&6
27538else
27539  case $POTENTIAL_CC in
27540  [\\/]* | ?:[\\/]*)
27541  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27542  ;;
27543  *)
27544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27545for as_dir in $PATH
27546do
27547  IFS=$as_save_IFS
27548  test -z "$as_dir" && as_dir=.
27549    for ac_exec_ext in '' $ac_executable_extensions; do
27550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27551    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27553    break 2
27554  fi
27555done
27556  done
27557IFS=$as_save_IFS
27558
27559  ;;
27560esac
27561fi
27562POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27563if test -n "$POTENTIAL_CC"; then
27564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27565$as_echo "$POTENTIAL_CC" >&6; }
27566else
27567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27568$as_echo "no" >&6; }
27569fi
27570
27571
27572  test -n "$POTENTIAL_CC" && break
27573done
27574
27575      if test "x$POTENTIAL_CC" != x; then
27576        CC=$POTENTIAL_CC
27577      else
27578        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27579      fi
27580    else
27581      # Otherwise it might already be a complete path
27582      if test ! -x "$CC"; then
27583        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27584      fi
27585    fi
27586  else
27587    # No user supplied value. Locate compiler ourselves.
27588
27589    # If we are cross compiling, assume cross compilation tools follows the
27590    # cross compilation standard where they are prefixed with the autoconf
27591    # standard name for the target. For example the binary
27592    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27593    # If we are not cross compiling, then the default compiler name will be
27594    # used.
27595
27596    CC=
27597    # If TOOLS_DIR is set, check for all compiler names in there first
27598    # before checking the rest of the PATH.
27599    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27600    # step, this should not be necessary.
27601    if test -n "$TOOLS_DIR"; then
27602      PATH_save="$PATH"
27603      PATH="$TOOLS_DIR"
27604      for ac_prog in $SEARCH_LIST
27605do
27606  # Extract the first word of "$ac_prog", so it can be a program name with args.
27607set dummy $ac_prog; ac_word=$2
27608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27609$as_echo_n "checking for $ac_word... " >&6; }
27610if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
27611  $as_echo_n "(cached) " >&6
27612else
27613  case $TOOLS_DIR_CC in
27614  [\\/]* | ?:[\\/]*)
27615  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
27616  ;;
27617  *)
27618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27619for as_dir in $PATH
27620do
27621  IFS=$as_save_IFS
27622  test -z "$as_dir" && as_dir=.
27623    for ac_exec_ext in '' $ac_executable_extensions; do
27624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27625    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
27626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27627    break 2
27628  fi
27629done
27630  done
27631IFS=$as_save_IFS
27632
27633  ;;
27634esac
27635fi
27636TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
27637if test -n "$TOOLS_DIR_CC"; then
27638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
27639$as_echo "$TOOLS_DIR_CC" >&6; }
27640else
27641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27642$as_echo "no" >&6; }
27643fi
27644
27645
27646  test -n "$TOOLS_DIR_CC" && break
27647done
27648
27649      CC=$TOOLS_DIR_CC
27650      PATH="$PATH_save"
27651    fi
27652
27653    # AC_PATH_PROGS can't be run multiple times with the same variable,
27654    # so create a new name for this run.
27655    if test "x$CC" = x; then
27656      for ac_prog in $SEARCH_LIST
27657do
27658  # Extract the first word of "$ac_prog", so it can be a program name with args.
27659set dummy $ac_prog; ac_word=$2
27660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27661$as_echo_n "checking for $ac_word... " >&6; }
27662if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27663  $as_echo_n "(cached) " >&6
27664else
27665  case $POTENTIAL_CC in
27666  [\\/]* | ?:[\\/]*)
27667  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27668  ;;
27669  *)
27670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27671for as_dir in $PATH
27672do
27673  IFS=$as_save_IFS
27674  test -z "$as_dir" && as_dir=.
27675    for ac_exec_ext in '' $ac_executable_extensions; do
27676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27677    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27679    break 2
27680  fi
27681done
27682  done
27683IFS=$as_save_IFS
27684
27685  ;;
27686esac
27687fi
27688POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27689if test -n "$POTENTIAL_CC"; then
27690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27691$as_echo "$POTENTIAL_CC" >&6; }
27692else
27693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27694$as_echo "no" >&6; }
27695fi
27696
27697
27698  test -n "$POTENTIAL_CC" && break
27699done
27700
27701      CC=$POTENTIAL_CC
27702    fi
27703
27704    if test "x$CC" = x; then
27705
27706  # Print a helpful message on how to acquire the necessary build dependency.
27707  # devkit is the help tag: freetype, cups, pulse, alsa etc
27708  MISSING_DEPENDENCY=devkit
27709
27710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27711    cygwin_help $MISSING_DEPENDENCY
27712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27713    msys_help $MISSING_DEPENDENCY
27714  else
27715    PKGHANDLER_COMMAND=
27716
27717    case $PKGHANDLER in
27718      apt-get)
27719        apt_help     $MISSING_DEPENDENCY ;;
27720      yum)
27721        yum_help     $MISSING_DEPENDENCY ;;
27722      port)
27723        port_help    $MISSING_DEPENDENCY ;;
27724      pkgutil)
27725        pkgutil_help $MISSING_DEPENDENCY ;;
27726      pkgadd)
27727        pkgadd_help  $MISSING_DEPENDENCY ;;
27728    esac
27729
27730    if test "x$PKGHANDLER_COMMAND" != x; then
27731      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27732    fi
27733  fi
27734
27735      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27736    fi
27737  fi
27738
27739  # Now we have a compiler binary in CC. Make sure it's okay.
27740
27741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27742
27743  # First separate the path from the arguments. This will split at the first
27744  # space.
27745  complete="$CC"
27746  path="${complete%% *}"
27747  tmp="$complete EOL"
27748  arguments="${tmp#* }"
27749
27750  # Input might be given as Windows format, start by converting to
27751  # unix format.
27752  new_path=`$CYGPATH -u "$path"`
27753
27754  # Now try to locate executable using which
27755  new_path=`$WHICH "$new_path" 2> /dev/null`
27756  # bat and cmd files are not always considered executable in cygwin causing which
27757  # to not find them
27758  if test "x$new_path" = x \
27759      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27760      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27761    new_path=`$CYGPATH -u "$path"`
27762  fi
27763  if test "x$new_path" = x; then
27764    # Oops. Which didn't find the executable.
27765    # The splitting of arguments from the executable at a space might have been incorrect,
27766    # since paths with space are more likely in Windows. Give it another try with the whole
27767    # argument.
27768    path="$complete"
27769    arguments="EOL"
27770    new_path=`$CYGPATH -u "$path"`
27771    new_path=`$WHICH "$new_path" 2> /dev/null`
27772    # bat and cmd files are not always considered executable in cygwin causing which
27773    # to not find them
27774    if test "x$new_path" = x \
27775        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27776        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27777      new_path=`$CYGPATH -u "$path"`
27778    fi
27779    if test "x$new_path" = x; then
27780      # It's still not found. Now this is an unrecoverable error.
27781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27782$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27783      has_space=`$ECHO "$complete" | $GREP " "`
27784      if test "x$has_space" != x; then
27785        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27786$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27787      fi
27788      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27789    fi
27790  fi
27791
27792  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27793  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27794  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27795  # "foo.exe" is OK but "foo" is an error.
27796  #
27797  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27798  # It is also a way to make sure we got the proper file name for the real test later on.
27799  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27800  if test "x$test_shortpath" = x; then
27801    # Short path failed, file does not exist as specified.
27802    # Try adding .exe or .cmd
27803    if test -f "${new_path}.exe"; then
27804      input_to_shortpath="${new_path}.exe"
27805    elif test -f "${new_path}.cmd"; then
27806      input_to_shortpath="${new_path}.cmd"
27807    else
27808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27809$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27810      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27811$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27812      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27813    fi
27814  else
27815    input_to_shortpath="$new_path"
27816  fi
27817
27818  # Call helper function which possibly converts this using DOS-style short mode.
27819  # If so, the updated path is stored in $new_path.
27820  new_path="$input_to_shortpath"
27821
27822  input_path="$input_to_shortpath"
27823  # Check if we need to convert this using DOS-style short mode. If the path
27824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27825  # take no chances and rewrite it.
27826  # Note: m4 eats our [], so we need to use [ and ] instead.
27827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27828  if test "x$has_forbidden_chars" != x; then
27829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27830    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27831    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27832    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27833      # Going to short mode and back again did indeed matter. Since short mode is
27834      # case insensitive, let's make it lowercase to improve readability.
27835      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27836      # Now convert it back to Unix-stile (cygpath)
27837      input_path=`$CYGPATH -u "$shortmode_path"`
27838      new_path="$input_path"
27839    fi
27840  fi
27841
27842  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27843  if test "x$test_cygdrive_prefix" = x; then
27844    # As a simple fix, exclude /usr/bin since it's not a real path.
27845    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27846      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27847      # a path prefixed by /cygdrive for fixpath to work.
27848      new_path="$CYGWIN_ROOT_PATH$input_path"
27849    fi
27850  fi
27851
27852  # remove trailing .exe if any
27853  new_path="${new_path/%.exe/}"
27854
27855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27856
27857  # First separate the path from the arguments. This will split at the first
27858  # space.
27859  complete="$CC"
27860  path="${complete%% *}"
27861  tmp="$complete EOL"
27862  arguments="${tmp#* }"
27863
27864  # Input might be given as Windows format, start by converting to
27865  # unix format.
27866  new_path="$path"
27867
27868  windows_path="$new_path"
27869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27870    unix_path=`$CYGPATH -u "$windows_path"`
27871    new_path="$unix_path"
27872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27874    new_path="$unix_path"
27875  fi
27876
27877
27878  # Now try to locate executable using which
27879  new_path=`$WHICH "$new_path" 2> /dev/null`
27880
27881  if test "x$new_path" = x; then
27882    # Oops. Which didn't find the executable.
27883    # The splitting of arguments from the executable at a space might have been incorrect,
27884    # since paths with space are more likely in Windows. Give it another try with the whole
27885    # argument.
27886    path="$complete"
27887    arguments="EOL"
27888    new_path="$path"
27889
27890  windows_path="$new_path"
27891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27892    unix_path=`$CYGPATH -u "$windows_path"`
27893    new_path="$unix_path"
27894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27896    new_path="$unix_path"
27897  fi
27898
27899
27900    new_path=`$WHICH "$new_path" 2> /dev/null`
27901
27902    if test "x$new_path" = x; then
27903      # It's still not found. Now this is an unrecoverable error.
27904      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27905$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27906      has_space=`$ECHO "$complete" | $GREP " "`
27907      if test "x$has_space" != x; then
27908        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27909$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27910      fi
27911      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27912    fi
27913  fi
27914
27915  # Now new_path has a complete unix path to the binary
27916  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27917    # Keep paths in /bin as-is, but remove trailing .exe if any
27918    new_path="${new_path/%.exe/}"
27919    # Do not save /bin paths to all_fixpath_prefixes!
27920  else
27921    # Not in mixed or Windows style, start by that.
27922    new_path=`cmd //c echo $new_path`
27923
27924  input_path="$new_path"
27925  # Check if we need to convert this using DOS-style short mode. If the path
27926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27927  # take no chances and rewrite it.
27928  # Note: m4 eats our [], so we need to use [ and ] instead.
27929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27930  if test "x$has_forbidden_chars" != x; then
27931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27932    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27933  fi
27934
27935    # Output is in $new_path
27936
27937  windows_path="$new_path"
27938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27939    unix_path=`$CYGPATH -u "$windows_path"`
27940    new_path="$unix_path"
27941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27943    new_path="$unix_path"
27944  fi
27945
27946    # remove trailing .exe if any
27947    new_path="${new_path/%.exe/}"
27948
27949    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27950    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27951  fi
27952
27953  else
27954    # We're on a posix platform. Hooray! :)
27955    # First separate the path from the arguments. This will split at the first
27956    # space.
27957    complete="$CC"
27958    path="${complete%% *}"
27959    tmp="$complete EOL"
27960    arguments="${tmp#* }"
27961
27962    # Cannot rely on the command "which" here since it doesn't always work.
27963    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27964    if test -z "$is_absolute_path"; then
27965      # Path to executable is not absolute. Find it.
27966      IFS_save="$IFS"
27967      IFS=:
27968      for p in $PATH; do
27969        if test -f "$p/$path" && test -x "$p/$path"; then
27970          new_path="$p/$path"
27971          break
27972        fi
27973      done
27974      IFS="$IFS_save"
27975    else
27976      # This is an absolute path, we can use it without further modifications.
27977      new_path="$path"
27978    fi
27979
27980    if test "x$new_path" = x; then
27981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27982$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27983      has_space=`$ECHO "$complete" | $GREP " "`
27984      if test "x$has_space" != x; then
27985        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27986$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27987      fi
27988      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27989    fi
27990  fi
27991
27992  # Now join together the path and the arguments once again
27993  if test "x$arguments" != xEOL; then
27994    new_complete="$new_path ${arguments% *}"
27995  else
27996    new_complete="$new_path"
27997  fi
27998
27999  if test "x$complete" != "x$new_complete"; then
28000    CC="$new_complete"
28001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28002$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28003  fi
28004
28005  TEST_COMPILER="$CC"
28006  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28007  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28008  if test "x$OPENJDK_BUILD_OS" != xaix; then
28009    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28010    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28011$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28012
28013  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28014    # Follow a chain of symbolic links. Use readlink
28015    # where it exists, else fall back to horribly
28016    # complicated shell code.
28017    if test "x$READLINK_TESTED" != yes; then
28018      # On MacOSX there is a readlink tool with a different
28019      # purpose than the GNU readlink tool. Check the found readlink.
28020      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28021      if test "x$ISGNU" = x; then
28022        # A readlink that we do not know how to use.
28023        # Are there other non-GNU readlinks out there?
28024        READLINK_TESTED=yes
28025        READLINK=
28026      fi
28027    fi
28028
28029    if test "x$READLINK" != x; then
28030      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28031    else
28032      # Save the current directory for restoring afterwards
28033      STARTDIR=$PWD
28034      COUNTER=0
28035      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28036      sym_link_file=`$BASENAME $TEST_COMPILER`
28037      cd $sym_link_dir
28038      # Use -P flag to resolve symlinks in directories.
28039      cd `$THEPWDCMD -P`
28040      sym_link_dir=`$THEPWDCMD -P`
28041      # Resolve file symlinks
28042      while test $COUNTER -lt 20; do
28043        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28044        if test "x$ISLINK" == x; then
28045          # This is not a symbolic link! We are done!
28046          break
28047        fi
28048        # Again resolve directory symlinks since the target of the just found
28049        # link could be in a different directory
28050        cd `$DIRNAME $ISLINK`
28051        sym_link_dir=`$THEPWDCMD -P`
28052        sym_link_file=`$BASENAME $ISLINK`
28053        let COUNTER=COUNTER+1
28054      done
28055      cd $STARTDIR
28056      TEST_COMPILER=$sym_link_dir/$sym_link_file
28057    fi
28058  fi
28059
28060    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28061$as_echo "$TEST_COMPILER" >&6; }
28062  fi
28063  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28064$as_echo_n "checking if CC is disguised ccache... " >&6; }
28065
28066  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28067  if test "x$COMPILER_BASENAME" = "xccache"; then
28068    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28069$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28070    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28071    # We want to control ccache invocation ourselves, so ignore this cc and try
28072    # searching again.
28073
28074    # Remove the path to the fake ccache cc from the PATH
28075    RETRY_COMPILER_SAVED_PATH="$PATH"
28076    COMPILER_DIRNAME=`$DIRNAME $CC`
28077    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28078
28079    # Try again looking for our compiler
28080    if test -n "$ac_tool_prefix"; then
28081  for ac_prog in $TOOLCHAIN_CC_BINARY
28082  do
28083    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28084set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28086$as_echo_n "checking for $ac_word... " >&6; }
28087if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28088  $as_echo_n "(cached) " >&6
28089else
28090  if test -n "$PROPER_COMPILER_CC"; then
28091  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28092else
28093as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28094for as_dir in $PATH
28095do
28096  IFS=$as_save_IFS
28097  test -z "$as_dir" && as_dir=.
28098    for ac_exec_ext in '' $ac_executable_extensions; do
28099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28100    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28102    break 2
28103  fi
28104done
28105  done
28106IFS=$as_save_IFS
28107
28108fi
28109fi
28110PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28111if test -n "$PROPER_COMPILER_CC"; then
28112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28113$as_echo "$PROPER_COMPILER_CC" >&6; }
28114else
28115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28116$as_echo "no" >&6; }
28117fi
28118
28119
28120    test -n "$PROPER_COMPILER_CC" && break
28121  done
28122fi
28123if test -z "$PROPER_COMPILER_CC"; then
28124  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28125  for ac_prog in $TOOLCHAIN_CC_BINARY
28126do
28127  # Extract the first word of "$ac_prog", so it can be a program name with args.
28128set dummy $ac_prog; ac_word=$2
28129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28130$as_echo_n "checking for $ac_word... " >&6; }
28131if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28132  $as_echo_n "(cached) " >&6
28133else
28134  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28135  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28136else
28137as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28138for as_dir in $PATH
28139do
28140  IFS=$as_save_IFS
28141  test -z "$as_dir" && as_dir=.
28142    for ac_exec_ext in '' $ac_executable_extensions; do
28143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28144    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28146    break 2
28147  fi
28148done
28149  done
28150IFS=$as_save_IFS
28151
28152fi
28153fi
28154ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28155if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28157$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28158else
28159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28160$as_echo "no" >&6; }
28161fi
28162
28163
28164  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28165done
28166
28167  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28168    PROPER_COMPILER_CC=""
28169  else
28170    case $cross_compiling:$ac_tool_warned in
28171yes:)
28172{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28173$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28174ac_tool_warned=yes ;;
28175esac
28176    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28177  fi
28178fi
28179
28180
28181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28182
28183  # First separate the path from the arguments. This will split at the first
28184  # space.
28185  complete="$PROPER_COMPILER_CC"
28186  path="${complete%% *}"
28187  tmp="$complete EOL"
28188  arguments="${tmp#* }"
28189
28190  # Input might be given as Windows format, start by converting to
28191  # unix format.
28192  new_path=`$CYGPATH -u "$path"`
28193
28194  # Now try to locate executable using which
28195  new_path=`$WHICH "$new_path" 2> /dev/null`
28196  # bat and cmd files are not always considered executable in cygwin causing which
28197  # to not find them
28198  if test "x$new_path" = x \
28199      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28200      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28201    new_path=`$CYGPATH -u "$path"`
28202  fi
28203  if test "x$new_path" = x; then
28204    # Oops. Which didn't find the executable.
28205    # The splitting of arguments from the executable at a space might have been incorrect,
28206    # since paths with space are more likely in Windows. Give it another try with the whole
28207    # argument.
28208    path="$complete"
28209    arguments="EOL"
28210    new_path=`$CYGPATH -u "$path"`
28211    new_path=`$WHICH "$new_path" 2> /dev/null`
28212    # bat and cmd files are not always considered executable in cygwin causing which
28213    # to not find them
28214    if test "x$new_path" = x \
28215        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28216        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28217      new_path=`$CYGPATH -u "$path"`
28218    fi
28219    if test "x$new_path" = x; then
28220      # It's still not found. Now this is an unrecoverable error.
28221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28222$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28223      has_space=`$ECHO "$complete" | $GREP " "`
28224      if test "x$has_space" != x; then
28225        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28226$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28227      fi
28228      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28229    fi
28230  fi
28231
28232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28235  # "foo.exe" is OK but "foo" is an error.
28236  #
28237  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28238  # It is also a way to make sure we got the proper file name for the real test later on.
28239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28240  if test "x$test_shortpath" = x; then
28241    # Short path failed, file does not exist as specified.
28242    # Try adding .exe or .cmd
28243    if test -f "${new_path}.exe"; then
28244      input_to_shortpath="${new_path}.exe"
28245    elif test -f "${new_path}.cmd"; then
28246      input_to_shortpath="${new_path}.cmd"
28247    else
28248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28249$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28250      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28251$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28252      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28253    fi
28254  else
28255    input_to_shortpath="$new_path"
28256  fi
28257
28258  # Call helper function which possibly converts this using DOS-style short mode.
28259  # If so, the updated path is stored in $new_path.
28260  new_path="$input_to_shortpath"
28261
28262  input_path="$input_to_shortpath"
28263  # Check if we need to convert this using DOS-style short mode. If the path
28264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28265  # take no chances and rewrite it.
28266  # Note: m4 eats our [], so we need to use [ and ] instead.
28267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28268  if test "x$has_forbidden_chars" != x; then
28269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28270    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28271    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28272    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28273      # Going to short mode and back again did indeed matter. Since short mode is
28274      # case insensitive, let's make it lowercase to improve readability.
28275      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28276      # Now convert it back to Unix-stile (cygpath)
28277      input_path=`$CYGPATH -u "$shortmode_path"`
28278      new_path="$input_path"
28279    fi
28280  fi
28281
28282  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28283  if test "x$test_cygdrive_prefix" = x; then
28284    # As a simple fix, exclude /usr/bin since it's not a real path.
28285    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28286      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28287      # a path prefixed by /cygdrive for fixpath to work.
28288      new_path="$CYGWIN_ROOT_PATH$input_path"
28289    fi
28290  fi
28291
28292  # remove trailing .exe if any
28293  new_path="${new_path/%.exe/}"
28294
28295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28296
28297  # First separate the path from the arguments. This will split at the first
28298  # space.
28299  complete="$PROPER_COMPILER_CC"
28300  path="${complete%% *}"
28301  tmp="$complete EOL"
28302  arguments="${tmp#* }"
28303
28304  # Input might be given as Windows format, start by converting to
28305  # unix format.
28306  new_path="$path"
28307
28308  windows_path="$new_path"
28309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28310    unix_path=`$CYGPATH -u "$windows_path"`
28311    new_path="$unix_path"
28312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28314    new_path="$unix_path"
28315  fi
28316
28317
28318  # Now try to locate executable using which
28319  new_path=`$WHICH "$new_path" 2> /dev/null`
28320
28321  if test "x$new_path" = x; then
28322    # Oops. Which didn't find the executable.
28323    # The splitting of arguments from the executable at a space might have been incorrect,
28324    # since paths with space are more likely in Windows. Give it another try with the whole
28325    # argument.
28326    path="$complete"
28327    arguments="EOL"
28328    new_path="$path"
28329
28330  windows_path="$new_path"
28331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28332    unix_path=`$CYGPATH -u "$windows_path"`
28333    new_path="$unix_path"
28334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28336    new_path="$unix_path"
28337  fi
28338
28339
28340    new_path=`$WHICH "$new_path" 2> /dev/null`
28341
28342    if test "x$new_path" = x; then
28343      # It's still not found. Now this is an unrecoverable error.
28344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28345$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28346      has_space=`$ECHO "$complete" | $GREP " "`
28347      if test "x$has_space" != x; then
28348        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28349$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28350      fi
28351      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28352    fi
28353  fi
28354
28355  # Now new_path has a complete unix path to the binary
28356  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28357    # Keep paths in /bin as-is, but remove trailing .exe if any
28358    new_path="${new_path/%.exe/}"
28359    # Do not save /bin paths to all_fixpath_prefixes!
28360  else
28361    # Not in mixed or Windows style, start by that.
28362    new_path=`cmd //c echo $new_path`
28363
28364  input_path="$new_path"
28365  # Check if we need to convert this using DOS-style short mode. If the path
28366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28367  # take no chances and rewrite it.
28368  # Note: m4 eats our [], so we need to use [ and ] instead.
28369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28370  if test "x$has_forbidden_chars" != x; then
28371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28372    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28373  fi
28374
28375    # Output is in $new_path
28376
28377  windows_path="$new_path"
28378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28379    unix_path=`$CYGPATH -u "$windows_path"`
28380    new_path="$unix_path"
28381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28383    new_path="$unix_path"
28384  fi
28385
28386    # remove trailing .exe if any
28387    new_path="${new_path/%.exe/}"
28388
28389    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28390    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28391  fi
28392
28393  else
28394    # We're on a posix platform. Hooray! :)
28395    # First separate the path from the arguments. This will split at the first
28396    # space.
28397    complete="$PROPER_COMPILER_CC"
28398    path="${complete%% *}"
28399    tmp="$complete EOL"
28400    arguments="${tmp#* }"
28401
28402    # Cannot rely on the command "which" here since it doesn't always work.
28403    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28404    if test -z "$is_absolute_path"; then
28405      # Path to executable is not absolute. Find it.
28406      IFS_save="$IFS"
28407      IFS=:
28408      for p in $PATH; do
28409        if test -f "$p/$path" && test -x "$p/$path"; then
28410          new_path="$p/$path"
28411          break
28412        fi
28413      done
28414      IFS="$IFS_save"
28415    else
28416      # This is an absolute path, we can use it without further modifications.
28417      new_path="$path"
28418    fi
28419
28420    if test "x$new_path" = x; then
28421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28422$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28423      has_space=`$ECHO "$complete" | $GREP " "`
28424      if test "x$has_space" != x; then
28425        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28426$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28427      fi
28428      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28429    fi
28430  fi
28431
28432  # Now join together the path and the arguments once again
28433  if test "x$arguments" != xEOL; then
28434    new_complete="$new_path ${arguments% *}"
28435  else
28436    new_complete="$new_path"
28437  fi
28438
28439  if test "x$complete" != "x$new_complete"; then
28440    PROPER_COMPILER_CC="$new_complete"
28441    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28442$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28443  fi
28444
28445    PATH="$RETRY_COMPILER_SAVED_PATH"
28446
28447    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28448$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28449
28450  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28451    # Follow a chain of symbolic links. Use readlink
28452    # where it exists, else fall back to horribly
28453    # complicated shell code.
28454    if test "x$READLINK_TESTED" != yes; then
28455      # On MacOSX there is a readlink tool with a different
28456      # purpose than the GNU readlink tool. Check the found readlink.
28457      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28458      if test "x$ISGNU" = x; then
28459        # A readlink that we do not know how to use.
28460        # Are there other non-GNU readlinks out there?
28461        READLINK_TESTED=yes
28462        READLINK=
28463      fi
28464    fi
28465
28466    if test "x$READLINK" != x; then
28467      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28468    else
28469      # Save the current directory for restoring afterwards
28470      STARTDIR=$PWD
28471      COUNTER=0
28472      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28473      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28474      cd $sym_link_dir
28475      # Use -P flag to resolve symlinks in directories.
28476      cd `$THEPWDCMD -P`
28477      sym_link_dir=`$THEPWDCMD -P`
28478      # Resolve file symlinks
28479      while test $COUNTER -lt 20; do
28480        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28481        if test "x$ISLINK" == x; then
28482          # This is not a symbolic link! We are done!
28483          break
28484        fi
28485        # Again resolve directory symlinks since the target of the just found
28486        # link could be in a different directory
28487        cd `$DIRNAME $ISLINK`
28488        sym_link_dir=`$THEPWDCMD -P`
28489        sym_link_file=`$BASENAME $ISLINK`
28490        let COUNTER=COUNTER+1
28491      done
28492      cd $STARTDIR
28493      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28494    fi
28495  fi
28496
28497    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28498$as_echo "$PROPER_COMPILER_CC" >&6; }
28499    CC="$PROPER_COMPILER_CC"
28500  else
28501    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28502$as_echo "no, keeping CC" >&6; }
28503  fi
28504
28505
28506  COMPILER=$CC
28507  COMPILER_NAME=$COMPILER_NAME
28508
28509  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28510    # cc -V output typically looks like
28511    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28512    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28513    # Check that this is likely to be the Solaris Studio cc.
28514    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28515    if test $? -ne 0; then
28516      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28517      { $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
28518$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28519      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28520$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28521      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28522$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28523      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28524    fi
28525    # Remove usage instructions (if present), and
28526    # collapse compiler output into a single line
28527    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28528        $SED -e 's/ *[Uu]sage:.*//'`
28529    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28530        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28531  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28532    # xlc -qversion output typically looks like
28533    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28534    #     Version: 11.01.0000.0015
28535    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28536    # Check that this is likely to be the IBM XL C compiler.
28537    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28538    if test $? -ne 0; then
28539      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28540      { $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
28541$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28542      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28543$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28544      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28545$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28546      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28547    fi
28548    # Collapse compiler output into a single line
28549    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28550    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28551        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28552  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28553    # There is no specific version flag, but all output starts with a version string.
28554    # First line typically looks something like:
28555    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28556    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28557    # Check that this is likely to be Microsoft CL.EXE.
28558    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28559    if test $? -ne 0; then
28560      { $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
28561$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28562      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28563$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28564      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28565    fi
28566    # Collapse compiler output into a single line
28567    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28568    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28569        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28570  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28571    # gcc --version output typically looks like
28572    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28573    #     Copyright (C) 2013 Free Software Foundation, Inc.
28574    #     This is free software; see the source for copying conditions.  There is NO
28575    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28576    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28577    # Check that this is likely to be GCC.
28578    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28579    if test $? -ne 0; then
28580      { $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
28581$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28582      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28583$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28584      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28585    fi
28586    # Remove Copyright and legalese from version string, and
28587    # collapse into a single line
28588    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28589        $SED -e 's/ *Copyright .*//'`
28590    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28591        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28592  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28593    # clang --version output typically looks like
28594    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28595    #    clang version 3.3 (tags/RELEASE_33/final)
28596    # or
28597    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28598    #    Target: x86_64-pc-linux-gnu
28599    #    Thread model: posix
28600    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28601    # Check that this is likely to be clang
28602    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28603    if test $? -ne 0; then
28604      { $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
28605$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28606      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28607$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28608      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28609    fi
28610    # Collapse compiler output into a single line
28611    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28612    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28613        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28614  else
28615      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28616  fi
28617  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28618  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28619  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28620  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28621
28622  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28623$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28624
28625
28626  # Now that we have resolved CC ourself, let autoconf have its go at it
28627  ac_ext=c
28628ac_cpp='$CPP $CPPFLAGS'
28629ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28630ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28631ac_compiler_gnu=$ac_cv_c_compiler_gnu
28632if test -n "$ac_tool_prefix"; then
28633  for ac_prog in $CC
28634  do
28635    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28636set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28638$as_echo_n "checking for $ac_word... " >&6; }
28639if ${ac_cv_prog_CC+:} false; then :
28640  $as_echo_n "(cached) " >&6
28641else
28642  if test -n "$CC"; then
28643  ac_cv_prog_CC="$CC" # Let the user override the test.
28644else
28645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28646for as_dir in $PATH
28647do
28648  IFS=$as_save_IFS
28649  test -z "$as_dir" && as_dir=.
28650    for ac_exec_ext in '' $ac_executable_extensions; do
28651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28652    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28654    break 2
28655  fi
28656done
28657  done
28658IFS=$as_save_IFS
28659
28660fi
28661fi
28662CC=$ac_cv_prog_CC
28663if test -n "$CC"; then
28664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28665$as_echo "$CC" >&6; }
28666else
28667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28668$as_echo "no" >&6; }
28669fi
28670
28671
28672    test -n "$CC" && break
28673  done
28674fi
28675if test -z "$CC"; then
28676  ac_ct_CC=$CC
28677  for ac_prog in $CC
28678do
28679  # Extract the first word of "$ac_prog", so it can be a program name with args.
28680set dummy $ac_prog; ac_word=$2
28681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28682$as_echo_n "checking for $ac_word... " >&6; }
28683if ${ac_cv_prog_ac_ct_CC+:} false; then :
28684  $as_echo_n "(cached) " >&6
28685else
28686  if test -n "$ac_ct_CC"; then
28687  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28688else
28689as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28690for as_dir in $PATH
28691do
28692  IFS=$as_save_IFS
28693  test -z "$as_dir" && as_dir=.
28694    for ac_exec_ext in '' $ac_executable_extensions; do
28695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28696    ac_cv_prog_ac_ct_CC="$ac_prog"
28697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28698    break 2
28699  fi
28700done
28701  done
28702IFS=$as_save_IFS
28703
28704fi
28705fi
28706ac_ct_CC=$ac_cv_prog_ac_ct_CC
28707if test -n "$ac_ct_CC"; then
28708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28709$as_echo "$ac_ct_CC" >&6; }
28710else
28711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28712$as_echo "no" >&6; }
28713fi
28714
28715
28716  test -n "$ac_ct_CC" && break
28717done
28718
28719  if test "x$ac_ct_CC" = x; then
28720    CC=""
28721  else
28722    case $cross_compiling:$ac_tool_warned in
28723yes:)
28724{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28725$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28726ac_tool_warned=yes ;;
28727esac
28728    CC=$ac_ct_CC
28729  fi
28730fi
28731
28732
28733test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28734$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28735as_fn_error $? "no acceptable C compiler found in \$PATH
28736See \`config.log' for more details" "$LINENO" 5; }
28737
28738# Provide some information about the compiler.
28739$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28740set X $ac_compile
28741ac_compiler=$2
28742for ac_option in --version -v -V -qversion; do
28743  { { ac_try="$ac_compiler $ac_option >&5"
28744case "(($ac_try" in
28745  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28746  *) ac_try_echo=$ac_try;;
28747esac
28748eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28749$as_echo "$ac_try_echo"; } >&5
28750  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28751  ac_status=$?
28752  if test -s conftest.err; then
28753    sed '10a\
28754... rest of stderr output deleted ...
28755         10q' conftest.err >conftest.er1
28756    cat conftest.er1 >&5
28757  fi
28758  rm -f conftest.er1 conftest.err
28759  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28760  test $ac_status = 0; }
28761done
28762
28763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28764/* end confdefs.h.  */
28765
28766int
28767main ()
28768{
28769
28770  ;
28771  return 0;
28772}
28773_ACEOF
28774ac_clean_files_save=$ac_clean_files
28775ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28776# Try to create an executable without -o first, disregard a.out.
28777# It will help us diagnose broken compilers, and finding out an intuition
28778# of exeext.
28779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28780$as_echo_n "checking whether the C compiler works... " >&6; }
28781ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28782
28783# The possible output files:
28784ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28785
28786ac_rmfiles=
28787for ac_file in $ac_files
28788do
28789  case $ac_file in
28790    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28791    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28792  esac
28793done
28794rm -f $ac_rmfiles
28795
28796if { { ac_try="$ac_link_default"
28797case "(($ac_try" in
28798  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28799  *) ac_try_echo=$ac_try;;
28800esac
28801eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28802$as_echo "$ac_try_echo"; } >&5
28803  (eval "$ac_link_default") 2>&5
28804  ac_status=$?
28805  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28806  test $ac_status = 0; }; then :
28807  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28808# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28809# in a Makefile.  We should not override ac_cv_exeext if it was cached,
28810# so that the user can short-circuit this test for compilers unknown to
28811# Autoconf.
28812for ac_file in $ac_files ''
28813do
28814  test -f "$ac_file" || continue
28815  case $ac_file in
28816    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28817	;;
28818    [ab].out )
28819	# We found the default executable, but exeext='' is most
28820	# certainly right.
28821	break;;
28822    *.* )
28823	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28824	then :; else
28825	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28826	fi
28827	# We set ac_cv_exeext here because the later test for it is not
28828	# safe: cross compilers may not add the suffix if given an `-o'
28829	# argument, so we may need to know it at that point already.
28830	# Even if this section looks crufty: it has the advantage of
28831	# actually working.
28832	break;;
28833    * )
28834	break;;
28835  esac
28836done
28837test "$ac_cv_exeext" = no && ac_cv_exeext=
28838
28839else
28840  ac_file=''
28841fi
28842if test -z "$ac_file"; then :
28843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28844$as_echo "no" >&6; }
28845$as_echo "$as_me: failed program was:" >&5
28846sed 's/^/| /' conftest.$ac_ext >&5
28847
28848{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28849$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28850as_fn_error 77 "C compiler cannot create executables
28851See \`config.log' for more details" "$LINENO" 5; }
28852else
28853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28854$as_echo "yes" >&6; }
28855fi
28856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28857$as_echo_n "checking for C compiler default output file name... " >&6; }
28858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28859$as_echo "$ac_file" >&6; }
28860ac_exeext=$ac_cv_exeext
28861
28862rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28863ac_clean_files=$ac_clean_files_save
28864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28865$as_echo_n "checking for suffix of executables... " >&6; }
28866if { { ac_try="$ac_link"
28867case "(($ac_try" in
28868  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28869  *) ac_try_echo=$ac_try;;
28870esac
28871eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28872$as_echo "$ac_try_echo"; } >&5
28873  (eval "$ac_link") 2>&5
28874  ac_status=$?
28875  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28876  test $ac_status = 0; }; then :
28877  # If both `conftest.exe' and `conftest' are `present' (well, observable)
28878# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28879# work properly (i.e., refer to `conftest.exe'), while it won't with
28880# `rm'.
28881for ac_file in conftest.exe conftest conftest.*; do
28882  test -f "$ac_file" || continue
28883  case $ac_file in
28884    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28885    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28886	  break;;
28887    * ) break;;
28888  esac
28889done
28890else
28891  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28892$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28893as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28894See \`config.log' for more details" "$LINENO" 5; }
28895fi
28896rm -f conftest conftest$ac_cv_exeext
28897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
28898$as_echo "$ac_cv_exeext" >&6; }
28899
28900rm -f conftest.$ac_ext
28901EXEEXT=$ac_cv_exeext
28902ac_exeext=$EXEEXT
28903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28904/* end confdefs.h.  */
28905#include <stdio.h>
28906int
28907main ()
28908{
28909FILE *f = fopen ("conftest.out", "w");
28910 return ferror (f) || fclose (f) != 0;
28911
28912  ;
28913  return 0;
28914}
28915_ACEOF
28916ac_clean_files="$ac_clean_files conftest.out"
28917# Check that the compiler produces executables we can run.  If not, either
28918# the compiler is broken, or we cross compile.
28919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
28920$as_echo_n "checking whether we are cross compiling... " >&6; }
28921if test "$cross_compiling" != yes; then
28922  { { ac_try="$ac_link"
28923case "(($ac_try" in
28924  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28925  *) ac_try_echo=$ac_try;;
28926esac
28927eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28928$as_echo "$ac_try_echo"; } >&5
28929  (eval "$ac_link") 2>&5
28930  ac_status=$?
28931  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28932  test $ac_status = 0; }
28933  if { ac_try='./conftest$ac_cv_exeext'
28934  { { case "(($ac_try" in
28935  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28936  *) ac_try_echo=$ac_try;;
28937esac
28938eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28939$as_echo "$ac_try_echo"; } >&5
28940  (eval "$ac_try") 2>&5
28941  ac_status=$?
28942  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28943  test $ac_status = 0; }; }; then
28944    cross_compiling=no
28945  else
28946    if test "$cross_compiling" = maybe; then
28947	cross_compiling=yes
28948    else
28949	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28950$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28951as_fn_error $? "cannot run C compiled programs.
28952If you meant to cross compile, use \`--host'.
28953See \`config.log' for more details" "$LINENO" 5; }
28954    fi
28955  fi
28956fi
28957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
28958$as_echo "$cross_compiling" >&6; }
28959
28960rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
28961ac_clean_files=$ac_clean_files_save
28962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
28963$as_echo_n "checking for suffix of object files... " >&6; }
28964if ${ac_cv_objext+:} false; then :
28965  $as_echo_n "(cached) " >&6
28966else
28967  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28968/* end confdefs.h.  */
28969
28970int
28971main ()
28972{
28973
28974  ;
28975  return 0;
28976}
28977_ACEOF
28978rm -f conftest.o conftest.obj
28979if { { ac_try="$ac_compile"
28980case "(($ac_try" in
28981  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28982  *) ac_try_echo=$ac_try;;
28983esac
28984eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28985$as_echo "$ac_try_echo"; } >&5
28986  (eval "$ac_compile") 2>&5
28987  ac_status=$?
28988  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28989  test $ac_status = 0; }; then :
28990  for ac_file in conftest.o conftest.obj conftest.*; do
28991  test -f "$ac_file" || continue;
28992  case $ac_file in
28993    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
28994    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
28995       break;;
28996  esac
28997done
28998else
28999  $as_echo "$as_me: failed program was:" >&5
29000sed 's/^/| /' conftest.$ac_ext >&5
29001
29002{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29003$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29004as_fn_error $? "cannot compute suffix of object files: cannot compile
29005See \`config.log' for more details" "$LINENO" 5; }
29006fi
29007rm -f conftest.$ac_cv_objext conftest.$ac_ext
29008fi
29009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29010$as_echo "$ac_cv_objext" >&6; }
29011OBJEXT=$ac_cv_objext
29012ac_objext=$OBJEXT
29013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29014$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29015if ${ac_cv_c_compiler_gnu+:} false; then :
29016  $as_echo_n "(cached) " >&6
29017else
29018  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29019/* end confdefs.h.  */
29020
29021int
29022main ()
29023{
29024#ifndef __GNUC__
29025       choke me
29026#endif
29027
29028  ;
29029  return 0;
29030}
29031_ACEOF
29032if ac_fn_c_try_compile "$LINENO"; then :
29033  ac_compiler_gnu=yes
29034else
29035  ac_compiler_gnu=no
29036fi
29037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29038ac_cv_c_compiler_gnu=$ac_compiler_gnu
29039
29040fi
29041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29042$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29043if test $ac_compiler_gnu = yes; then
29044  GCC=yes
29045else
29046  GCC=
29047fi
29048ac_test_CFLAGS=${CFLAGS+set}
29049ac_save_CFLAGS=$CFLAGS
29050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29051$as_echo_n "checking whether $CC accepts -g... " >&6; }
29052if ${ac_cv_prog_cc_g+:} false; then :
29053  $as_echo_n "(cached) " >&6
29054else
29055  ac_save_c_werror_flag=$ac_c_werror_flag
29056   ac_c_werror_flag=yes
29057   ac_cv_prog_cc_g=no
29058   CFLAGS="-g"
29059   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29060/* end confdefs.h.  */
29061
29062int
29063main ()
29064{
29065
29066  ;
29067  return 0;
29068}
29069_ACEOF
29070if ac_fn_c_try_compile "$LINENO"; then :
29071  ac_cv_prog_cc_g=yes
29072else
29073  CFLAGS=""
29074      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29075/* end confdefs.h.  */
29076
29077int
29078main ()
29079{
29080
29081  ;
29082  return 0;
29083}
29084_ACEOF
29085if ac_fn_c_try_compile "$LINENO"; then :
29086
29087else
29088  ac_c_werror_flag=$ac_save_c_werror_flag
29089	 CFLAGS="-g"
29090	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29091/* end confdefs.h.  */
29092
29093int
29094main ()
29095{
29096
29097  ;
29098  return 0;
29099}
29100_ACEOF
29101if ac_fn_c_try_compile "$LINENO"; then :
29102  ac_cv_prog_cc_g=yes
29103fi
29104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29105fi
29106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29107fi
29108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29109   ac_c_werror_flag=$ac_save_c_werror_flag
29110fi
29111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29112$as_echo "$ac_cv_prog_cc_g" >&6; }
29113if test "$ac_test_CFLAGS" = set; then
29114  CFLAGS=$ac_save_CFLAGS
29115elif test $ac_cv_prog_cc_g = yes; then
29116  if test "$GCC" = yes; then
29117    CFLAGS="-g -O2"
29118  else
29119    CFLAGS="-g"
29120  fi
29121else
29122  if test "$GCC" = yes; then
29123    CFLAGS="-O2"
29124  else
29125    CFLAGS=
29126  fi
29127fi
29128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29129$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29130if ${ac_cv_prog_cc_c89+:} false; then :
29131  $as_echo_n "(cached) " >&6
29132else
29133  ac_cv_prog_cc_c89=no
29134ac_save_CC=$CC
29135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29136/* end confdefs.h.  */
29137#include <stdarg.h>
29138#include <stdio.h>
29139struct stat;
29140/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29141struct buf { int x; };
29142FILE * (*rcsopen) (struct buf *, struct stat *, int);
29143static char *e (p, i)
29144     char **p;
29145     int i;
29146{
29147  return p[i];
29148}
29149static char *f (char * (*g) (char **, int), char **p, ...)
29150{
29151  char *s;
29152  va_list v;
29153  va_start (v,p);
29154  s = g (p, va_arg (v,int));
29155  va_end (v);
29156  return s;
29157}
29158
29159/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29160   function prototypes and stuff, but not '\xHH' hex character constants.
29161   These don't provoke an error unfortunately, instead are silently treated
29162   as 'x'.  The following induces an error, until -std is added to get
29163   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29164   array size at least.  It's necessary to write '\x00'==0 to get something
29165   that's true only with -std.  */
29166int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29167
29168/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29169   inside strings and character constants.  */
29170#define FOO(x) 'x'
29171int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29172
29173int test (int i, double x);
29174struct s1 {int (*f) (int a);};
29175struct s2 {int (*f) (double a);};
29176int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29177int argc;
29178char **argv;
29179int
29180main ()
29181{
29182return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29183  ;
29184  return 0;
29185}
29186_ACEOF
29187for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29188	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29189do
29190  CC="$ac_save_CC $ac_arg"
29191  if ac_fn_c_try_compile "$LINENO"; then :
29192  ac_cv_prog_cc_c89=$ac_arg
29193fi
29194rm -f core conftest.err conftest.$ac_objext
29195  test "x$ac_cv_prog_cc_c89" != "xno" && break
29196done
29197rm -f conftest.$ac_ext
29198CC=$ac_save_CC
29199
29200fi
29201# AC_CACHE_VAL
29202case "x$ac_cv_prog_cc_c89" in
29203  x)
29204    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29205$as_echo "none needed" >&6; } ;;
29206  xno)
29207    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29208$as_echo "unsupported" >&6; } ;;
29209  *)
29210    CC="$CC $ac_cv_prog_cc_c89"
29211    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29212$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29213esac
29214if test "x$ac_cv_prog_cc_c89" != xno; then :
29215
29216fi
29217
29218ac_ext=cpp
29219ac_cpp='$CXXCPP $CPPFLAGS'
29220ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29221ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29222ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29223
29224
29225
29226  COMPILER_NAME=C++
29227  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29228
29229  if test "x$CXX" != x; then
29230    # User has supplied compiler name already, always let that override.
29231    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29232$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29233    if test "x`basename $CXX`" = "x$CXX"; then
29234      # A command without a complete path is provided, search $PATH.
29235
29236      for ac_prog in $CXX
29237do
29238  # Extract the first word of "$ac_prog", so it can be a program name with args.
29239set dummy $ac_prog; ac_word=$2
29240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29241$as_echo_n "checking for $ac_word... " >&6; }
29242if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29243  $as_echo_n "(cached) " >&6
29244else
29245  case $POTENTIAL_CXX in
29246  [\\/]* | ?:[\\/]*)
29247  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29248  ;;
29249  *)
29250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29251for as_dir in $PATH
29252do
29253  IFS=$as_save_IFS
29254  test -z "$as_dir" && as_dir=.
29255    for ac_exec_ext in '' $ac_executable_extensions; do
29256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29257    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29259    break 2
29260  fi
29261done
29262  done
29263IFS=$as_save_IFS
29264
29265  ;;
29266esac
29267fi
29268POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29269if test -n "$POTENTIAL_CXX"; then
29270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29271$as_echo "$POTENTIAL_CXX" >&6; }
29272else
29273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29274$as_echo "no" >&6; }
29275fi
29276
29277
29278  test -n "$POTENTIAL_CXX" && break
29279done
29280
29281      if test "x$POTENTIAL_CXX" != x; then
29282        CXX=$POTENTIAL_CXX
29283      else
29284        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29285      fi
29286    else
29287      # Otherwise it might already be a complete path
29288      if test ! -x "$CXX"; then
29289        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29290      fi
29291    fi
29292  else
29293    # No user supplied value. Locate compiler ourselves.
29294
29295    # If we are cross compiling, assume cross compilation tools follows the
29296    # cross compilation standard where they are prefixed with the autoconf
29297    # standard name for the target. For example the binary
29298    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29299    # If we are not cross compiling, then the default compiler name will be
29300    # used.
29301
29302    CXX=
29303    # If TOOLS_DIR is set, check for all compiler names in there first
29304    # before checking the rest of the PATH.
29305    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29306    # step, this should not be necessary.
29307    if test -n "$TOOLS_DIR"; then
29308      PATH_save="$PATH"
29309      PATH="$TOOLS_DIR"
29310      for ac_prog in $SEARCH_LIST
29311do
29312  # Extract the first word of "$ac_prog", so it can be a program name with args.
29313set dummy $ac_prog; ac_word=$2
29314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29315$as_echo_n "checking for $ac_word... " >&6; }
29316if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
29317  $as_echo_n "(cached) " >&6
29318else
29319  case $TOOLS_DIR_CXX in
29320  [\\/]* | ?:[\\/]*)
29321  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
29322  ;;
29323  *)
29324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29325for as_dir in $PATH
29326do
29327  IFS=$as_save_IFS
29328  test -z "$as_dir" && as_dir=.
29329    for ac_exec_ext in '' $ac_executable_extensions; do
29330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29331    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
29332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29333    break 2
29334  fi
29335done
29336  done
29337IFS=$as_save_IFS
29338
29339  ;;
29340esac
29341fi
29342TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
29343if test -n "$TOOLS_DIR_CXX"; then
29344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
29345$as_echo "$TOOLS_DIR_CXX" >&6; }
29346else
29347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29348$as_echo "no" >&6; }
29349fi
29350
29351
29352  test -n "$TOOLS_DIR_CXX" && break
29353done
29354
29355      CXX=$TOOLS_DIR_CXX
29356      PATH="$PATH_save"
29357    fi
29358
29359    # AC_PATH_PROGS can't be run multiple times with the same variable,
29360    # so create a new name for this run.
29361    if test "x$CXX" = x; then
29362      for ac_prog in $SEARCH_LIST
29363do
29364  # Extract the first word of "$ac_prog", so it can be a program name with args.
29365set dummy $ac_prog; ac_word=$2
29366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29367$as_echo_n "checking for $ac_word... " >&6; }
29368if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29369  $as_echo_n "(cached) " >&6
29370else
29371  case $POTENTIAL_CXX in
29372  [\\/]* | ?:[\\/]*)
29373  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29374  ;;
29375  *)
29376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29377for as_dir in $PATH
29378do
29379  IFS=$as_save_IFS
29380  test -z "$as_dir" && as_dir=.
29381    for ac_exec_ext in '' $ac_executable_extensions; do
29382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29383    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29385    break 2
29386  fi
29387done
29388  done
29389IFS=$as_save_IFS
29390
29391  ;;
29392esac
29393fi
29394POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29395if test -n "$POTENTIAL_CXX"; then
29396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29397$as_echo "$POTENTIAL_CXX" >&6; }
29398else
29399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29400$as_echo "no" >&6; }
29401fi
29402
29403
29404  test -n "$POTENTIAL_CXX" && break
29405done
29406
29407      CXX=$POTENTIAL_CXX
29408    fi
29409
29410    if test "x$CXX" = x; then
29411
29412  # Print a helpful message on how to acquire the necessary build dependency.
29413  # devkit is the help tag: freetype, cups, pulse, alsa etc
29414  MISSING_DEPENDENCY=devkit
29415
29416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29417    cygwin_help $MISSING_DEPENDENCY
29418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29419    msys_help $MISSING_DEPENDENCY
29420  else
29421    PKGHANDLER_COMMAND=
29422
29423    case $PKGHANDLER in
29424      apt-get)
29425        apt_help     $MISSING_DEPENDENCY ;;
29426      yum)
29427        yum_help     $MISSING_DEPENDENCY ;;
29428      port)
29429        port_help    $MISSING_DEPENDENCY ;;
29430      pkgutil)
29431        pkgutil_help $MISSING_DEPENDENCY ;;
29432      pkgadd)
29433        pkgadd_help  $MISSING_DEPENDENCY ;;
29434    esac
29435
29436    if test "x$PKGHANDLER_COMMAND" != x; then
29437      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29438    fi
29439  fi
29440
29441      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29442    fi
29443  fi
29444
29445  # Now we have a compiler binary in CXX. Make sure it's okay.
29446
29447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29448
29449  # First separate the path from the arguments. This will split at the first
29450  # space.
29451  complete="$CXX"
29452  path="${complete%% *}"
29453  tmp="$complete EOL"
29454  arguments="${tmp#* }"
29455
29456  # Input might be given as Windows format, start by converting to
29457  # unix format.
29458  new_path=`$CYGPATH -u "$path"`
29459
29460  # Now try to locate executable using which
29461  new_path=`$WHICH "$new_path" 2> /dev/null`
29462  # bat and cmd files are not always considered executable in cygwin causing which
29463  # to not find them
29464  if test "x$new_path" = x \
29465      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29466      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29467    new_path=`$CYGPATH -u "$path"`
29468  fi
29469  if test "x$new_path" = x; then
29470    # Oops. Which didn't find the executable.
29471    # The splitting of arguments from the executable at a space might have been incorrect,
29472    # since paths with space are more likely in Windows. Give it another try with the whole
29473    # argument.
29474    path="$complete"
29475    arguments="EOL"
29476    new_path=`$CYGPATH -u "$path"`
29477    new_path=`$WHICH "$new_path" 2> /dev/null`
29478    # bat and cmd files are not always considered executable in cygwin causing which
29479    # to not find them
29480    if test "x$new_path" = x \
29481        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29482        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29483      new_path=`$CYGPATH -u "$path"`
29484    fi
29485    if test "x$new_path" = x; then
29486      # It's still not found. Now this is an unrecoverable error.
29487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29488$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29489      has_space=`$ECHO "$complete" | $GREP " "`
29490      if test "x$has_space" != x; then
29491        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29492$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29493      fi
29494      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29495    fi
29496  fi
29497
29498  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29499  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29500  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29501  # "foo.exe" is OK but "foo" is an error.
29502  #
29503  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29504  # It is also a way to make sure we got the proper file name for the real test later on.
29505  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29506  if test "x$test_shortpath" = x; then
29507    # Short path failed, file does not exist as specified.
29508    # Try adding .exe or .cmd
29509    if test -f "${new_path}.exe"; then
29510      input_to_shortpath="${new_path}.exe"
29511    elif test -f "${new_path}.cmd"; then
29512      input_to_shortpath="${new_path}.cmd"
29513    else
29514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29515$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29516      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29517$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29518      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29519    fi
29520  else
29521    input_to_shortpath="$new_path"
29522  fi
29523
29524  # Call helper function which possibly converts this using DOS-style short mode.
29525  # If so, the updated path is stored in $new_path.
29526  new_path="$input_to_shortpath"
29527
29528  input_path="$input_to_shortpath"
29529  # Check if we need to convert this using DOS-style short mode. If the path
29530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29531  # take no chances and rewrite it.
29532  # Note: m4 eats our [], so we need to use [ and ] instead.
29533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29534  if test "x$has_forbidden_chars" != x; then
29535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29536    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29537    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29538    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29539      # Going to short mode and back again did indeed matter. Since short mode is
29540      # case insensitive, let's make it lowercase to improve readability.
29541      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29542      # Now convert it back to Unix-stile (cygpath)
29543      input_path=`$CYGPATH -u "$shortmode_path"`
29544      new_path="$input_path"
29545    fi
29546  fi
29547
29548  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29549  if test "x$test_cygdrive_prefix" = x; then
29550    # As a simple fix, exclude /usr/bin since it's not a real path.
29551    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29552      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29553      # a path prefixed by /cygdrive for fixpath to work.
29554      new_path="$CYGWIN_ROOT_PATH$input_path"
29555    fi
29556  fi
29557
29558  # remove trailing .exe if any
29559  new_path="${new_path/%.exe/}"
29560
29561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29562
29563  # First separate the path from the arguments. This will split at the first
29564  # space.
29565  complete="$CXX"
29566  path="${complete%% *}"
29567  tmp="$complete EOL"
29568  arguments="${tmp#* }"
29569
29570  # Input might be given as Windows format, start by converting to
29571  # unix format.
29572  new_path="$path"
29573
29574  windows_path="$new_path"
29575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29576    unix_path=`$CYGPATH -u "$windows_path"`
29577    new_path="$unix_path"
29578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29580    new_path="$unix_path"
29581  fi
29582
29583
29584  # Now try to locate executable using which
29585  new_path=`$WHICH "$new_path" 2> /dev/null`
29586
29587  if test "x$new_path" = x; then
29588    # Oops. Which didn't find the executable.
29589    # The splitting of arguments from the executable at a space might have been incorrect,
29590    # since paths with space are more likely in Windows. Give it another try with the whole
29591    # argument.
29592    path="$complete"
29593    arguments="EOL"
29594    new_path="$path"
29595
29596  windows_path="$new_path"
29597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29598    unix_path=`$CYGPATH -u "$windows_path"`
29599    new_path="$unix_path"
29600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29602    new_path="$unix_path"
29603  fi
29604
29605
29606    new_path=`$WHICH "$new_path" 2> /dev/null`
29607
29608    if test "x$new_path" = x; then
29609      # It's still not found. Now this is an unrecoverable error.
29610      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29611$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29612      has_space=`$ECHO "$complete" | $GREP " "`
29613      if test "x$has_space" != x; then
29614        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29615$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29616      fi
29617      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29618    fi
29619  fi
29620
29621  # Now new_path has a complete unix path to the binary
29622  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29623    # Keep paths in /bin as-is, but remove trailing .exe if any
29624    new_path="${new_path/%.exe/}"
29625    # Do not save /bin paths to all_fixpath_prefixes!
29626  else
29627    # Not in mixed or Windows style, start by that.
29628    new_path=`cmd //c echo $new_path`
29629
29630  input_path="$new_path"
29631  # Check if we need to convert this using DOS-style short mode. If the path
29632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29633  # take no chances and rewrite it.
29634  # Note: m4 eats our [], so we need to use [ and ] instead.
29635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29636  if test "x$has_forbidden_chars" != x; then
29637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29639  fi
29640
29641    # Output is in $new_path
29642
29643  windows_path="$new_path"
29644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29645    unix_path=`$CYGPATH -u "$windows_path"`
29646    new_path="$unix_path"
29647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29649    new_path="$unix_path"
29650  fi
29651
29652    # remove trailing .exe if any
29653    new_path="${new_path/%.exe/}"
29654
29655    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29656    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29657  fi
29658
29659  else
29660    # We're on a posix platform. Hooray! :)
29661    # First separate the path from the arguments. This will split at the first
29662    # space.
29663    complete="$CXX"
29664    path="${complete%% *}"
29665    tmp="$complete EOL"
29666    arguments="${tmp#* }"
29667
29668    # Cannot rely on the command "which" here since it doesn't always work.
29669    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29670    if test -z "$is_absolute_path"; then
29671      # Path to executable is not absolute. Find it.
29672      IFS_save="$IFS"
29673      IFS=:
29674      for p in $PATH; do
29675        if test -f "$p/$path" && test -x "$p/$path"; then
29676          new_path="$p/$path"
29677          break
29678        fi
29679      done
29680      IFS="$IFS_save"
29681    else
29682      # This is an absolute path, we can use it without further modifications.
29683      new_path="$path"
29684    fi
29685
29686    if test "x$new_path" = x; then
29687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29688$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29689      has_space=`$ECHO "$complete" | $GREP " "`
29690      if test "x$has_space" != x; then
29691        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29692$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29693      fi
29694      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29695    fi
29696  fi
29697
29698  # Now join together the path and the arguments once again
29699  if test "x$arguments" != xEOL; then
29700    new_complete="$new_path ${arguments% *}"
29701  else
29702    new_complete="$new_path"
29703  fi
29704
29705  if test "x$complete" != "x$new_complete"; then
29706    CXX="$new_complete"
29707    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29708$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29709  fi
29710
29711  TEST_COMPILER="$CXX"
29712  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29713  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29714  if test "x$OPENJDK_BUILD_OS" != xaix; then
29715    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29716    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29717$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29718
29719  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29720    # Follow a chain of symbolic links. Use readlink
29721    # where it exists, else fall back to horribly
29722    # complicated shell code.
29723    if test "x$READLINK_TESTED" != yes; then
29724      # On MacOSX there is a readlink tool with a different
29725      # purpose than the GNU readlink tool. Check the found readlink.
29726      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29727      if test "x$ISGNU" = x; then
29728        # A readlink that we do not know how to use.
29729        # Are there other non-GNU readlinks out there?
29730        READLINK_TESTED=yes
29731        READLINK=
29732      fi
29733    fi
29734
29735    if test "x$READLINK" != x; then
29736      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29737    else
29738      # Save the current directory for restoring afterwards
29739      STARTDIR=$PWD
29740      COUNTER=0
29741      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29742      sym_link_file=`$BASENAME $TEST_COMPILER`
29743      cd $sym_link_dir
29744      # Use -P flag to resolve symlinks in directories.
29745      cd `$THEPWDCMD -P`
29746      sym_link_dir=`$THEPWDCMD -P`
29747      # Resolve file symlinks
29748      while test $COUNTER -lt 20; do
29749        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29750        if test "x$ISLINK" == x; then
29751          # This is not a symbolic link! We are done!
29752          break
29753        fi
29754        # Again resolve directory symlinks since the target of the just found
29755        # link could be in a different directory
29756        cd `$DIRNAME $ISLINK`
29757        sym_link_dir=`$THEPWDCMD -P`
29758        sym_link_file=`$BASENAME $ISLINK`
29759        let COUNTER=COUNTER+1
29760      done
29761      cd $STARTDIR
29762      TEST_COMPILER=$sym_link_dir/$sym_link_file
29763    fi
29764  fi
29765
29766    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29767$as_echo "$TEST_COMPILER" >&6; }
29768  fi
29769  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29770$as_echo_n "checking if CXX is disguised ccache... " >&6; }
29771
29772  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29773  if test "x$COMPILER_BASENAME" = "xccache"; then
29774    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29775$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29776    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29777    # We want to control ccache invocation ourselves, so ignore this cc and try
29778    # searching again.
29779
29780    # Remove the path to the fake ccache cc from the PATH
29781    RETRY_COMPILER_SAVED_PATH="$PATH"
29782    COMPILER_DIRNAME=`$DIRNAME $CXX`
29783    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29784
29785    # Try again looking for our compiler
29786    if test -n "$ac_tool_prefix"; then
29787  for ac_prog in $TOOLCHAIN_CXX_BINARY
29788  do
29789    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29790set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29792$as_echo_n "checking for $ac_word... " >&6; }
29793if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29794  $as_echo_n "(cached) " >&6
29795else
29796  if test -n "$PROPER_COMPILER_CXX"; then
29797  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29798else
29799as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29800for as_dir in $PATH
29801do
29802  IFS=$as_save_IFS
29803  test -z "$as_dir" && as_dir=.
29804    for ac_exec_ext in '' $ac_executable_extensions; do
29805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29806    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29808    break 2
29809  fi
29810done
29811  done
29812IFS=$as_save_IFS
29813
29814fi
29815fi
29816PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29817if test -n "$PROPER_COMPILER_CXX"; then
29818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29819$as_echo "$PROPER_COMPILER_CXX" >&6; }
29820else
29821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29822$as_echo "no" >&6; }
29823fi
29824
29825
29826    test -n "$PROPER_COMPILER_CXX" && break
29827  done
29828fi
29829if test -z "$PROPER_COMPILER_CXX"; then
29830  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29831  for ac_prog in $TOOLCHAIN_CXX_BINARY
29832do
29833  # Extract the first word of "$ac_prog", so it can be a program name with args.
29834set dummy $ac_prog; ac_word=$2
29835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29836$as_echo_n "checking for $ac_word... " >&6; }
29837if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29838  $as_echo_n "(cached) " >&6
29839else
29840  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29841  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29842else
29843as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29844for as_dir in $PATH
29845do
29846  IFS=$as_save_IFS
29847  test -z "$as_dir" && as_dir=.
29848    for ac_exec_ext in '' $ac_executable_extensions; do
29849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29850    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29852    break 2
29853  fi
29854done
29855  done
29856IFS=$as_save_IFS
29857
29858fi
29859fi
29860ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29861if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29863$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29864else
29865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29866$as_echo "no" >&6; }
29867fi
29868
29869
29870  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29871done
29872
29873  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29874    PROPER_COMPILER_CXX=""
29875  else
29876    case $cross_compiling:$ac_tool_warned in
29877yes:)
29878{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29879$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29880ac_tool_warned=yes ;;
29881esac
29882    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
29883  fi
29884fi
29885
29886
29887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29888
29889  # First separate the path from the arguments. This will split at the first
29890  # space.
29891  complete="$PROPER_COMPILER_CXX"
29892  path="${complete%% *}"
29893  tmp="$complete EOL"
29894  arguments="${tmp#* }"
29895
29896  # Input might be given as Windows format, start by converting to
29897  # unix format.
29898  new_path=`$CYGPATH -u "$path"`
29899
29900  # Now try to locate executable using which
29901  new_path=`$WHICH "$new_path" 2> /dev/null`
29902  # bat and cmd files are not always considered executable in cygwin causing which
29903  # to not find them
29904  if test "x$new_path" = x \
29905      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29906      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29907    new_path=`$CYGPATH -u "$path"`
29908  fi
29909  if test "x$new_path" = x; then
29910    # Oops. Which didn't find the executable.
29911    # The splitting of arguments from the executable at a space might have been incorrect,
29912    # since paths with space are more likely in Windows. Give it another try with the whole
29913    # argument.
29914    path="$complete"
29915    arguments="EOL"
29916    new_path=`$CYGPATH -u "$path"`
29917    new_path=`$WHICH "$new_path" 2> /dev/null`
29918    # bat and cmd files are not always considered executable in cygwin causing which
29919    # to not find them
29920    if test "x$new_path" = x \
29921        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29922        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29923      new_path=`$CYGPATH -u "$path"`
29924    fi
29925    if test "x$new_path" = x; then
29926      # It's still not found. Now this is an unrecoverable error.
29927      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29928$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29929      has_space=`$ECHO "$complete" | $GREP " "`
29930      if test "x$has_space" != x; then
29931        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29932$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29933      fi
29934      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29935    fi
29936  fi
29937
29938  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29939  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29940  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29941  # "foo.exe" is OK but "foo" is an error.
29942  #
29943  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29944  # It is also a way to make sure we got the proper file name for the real test later on.
29945  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29946  if test "x$test_shortpath" = x; then
29947    # Short path failed, file does not exist as specified.
29948    # Try adding .exe or .cmd
29949    if test -f "${new_path}.exe"; then
29950      input_to_shortpath="${new_path}.exe"
29951    elif test -f "${new_path}.cmd"; then
29952      input_to_shortpath="${new_path}.cmd"
29953    else
29954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
29955$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
29956      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29957$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29958      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29959    fi
29960  else
29961    input_to_shortpath="$new_path"
29962  fi
29963
29964  # Call helper function which possibly converts this using DOS-style short mode.
29965  # If so, the updated path is stored in $new_path.
29966  new_path="$input_to_shortpath"
29967
29968  input_path="$input_to_shortpath"
29969  # Check if we need to convert this using DOS-style short mode. If the path
29970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29971  # take no chances and rewrite it.
29972  # Note: m4 eats our [], so we need to use [ and ] instead.
29973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29974  if test "x$has_forbidden_chars" != x; then
29975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29976    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29977    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29978    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29979      # Going to short mode and back again did indeed matter. Since short mode is
29980      # case insensitive, let's make it lowercase to improve readability.
29981      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29982      # Now convert it back to Unix-stile (cygpath)
29983      input_path=`$CYGPATH -u "$shortmode_path"`
29984      new_path="$input_path"
29985    fi
29986  fi
29987
29988  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29989  if test "x$test_cygdrive_prefix" = x; then
29990    # As a simple fix, exclude /usr/bin since it's not a real path.
29991    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29992      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29993      # a path prefixed by /cygdrive for fixpath to work.
29994      new_path="$CYGWIN_ROOT_PATH$input_path"
29995    fi
29996  fi
29997
29998  # remove trailing .exe if any
29999  new_path="${new_path/%.exe/}"
30000
30001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30002
30003  # First separate the path from the arguments. This will split at the first
30004  # space.
30005  complete="$PROPER_COMPILER_CXX"
30006  path="${complete%% *}"
30007  tmp="$complete EOL"
30008  arguments="${tmp#* }"
30009
30010  # Input might be given as Windows format, start by converting to
30011  # unix format.
30012  new_path="$path"
30013
30014  windows_path="$new_path"
30015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30016    unix_path=`$CYGPATH -u "$windows_path"`
30017    new_path="$unix_path"
30018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30020    new_path="$unix_path"
30021  fi
30022
30023
30024  # Now try to locate executable using which
30025  new_path=`$WHICH "$new_path" 2> /dev/null`
30026
30027  if test "x$new_path" = x; then
30028    # Oops. Which didn't find the executable.
30029    # The splitting of arguments from the executable at a space might have been incorrect,
30030    # since paths with space are more likely in Windows. Give it another try with the whole
30031    # argument.
30032    path="$complete"
30033    arguments="EOL"
30034    new_path="$path"
30035
30036  windows_path="$new_path"
30037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30038    unix_path=`$CYGPATH -u "$windows_path"`
30039    new_path="$unix_path"
30040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30042    new_path="$unix_path"
30043  fi
30044
30045
30046    new_path=`$WHICH "$new_path" 2> /dev/null`
30047
30048    if test "x$new_path" = x; then
30049      # It's still not found. Now this is an unrecoverable error.
30050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30051$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30052      has_space=`$ECHO "$complete" | $GREP " "`
30053      if test "x$has_space" != x; then
30054        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30055$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30056      fi
30057      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30058    fi
30059  fi
30060
30061  # Now new_path has a complete unix path to the binary
30062  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30063    # Keep paths in /bin as-is, but remove trailing .exe if any
30064    new_path="${new_path/%.exe/}"
30065    # Do not save /bin paths to all_fixpath_prefixes!
30066  else
30067    # Not in mixed or Windows style, start by that.
30068    new_path=`cmd //c echo $new_path`
30069
30070  input_path="$new_path"
30071  # Check if we need to convert this using DOS-style short mode. If the path
30072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30073  # take no chances and rewrite it.
30074  # Note: m4 eats our [], so we need to use [ and ] instead.
30075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30076  if test "x$has_forbidden_chars" != x; then
30077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30078    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30079  fi
30080
30081    # Output is in $new_path
30082
30083  windows_path="$new_path"
30084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30085    unix_path=`$CYGPATH -u "$windows_path"`
30086    new_path="$unix_path"
30087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30089    new_path="$unix_path"
30090  fi
30091
30092    # remove trailing .exe if any
30093    new_path="${new_path/%.exe/}"
30094
30095    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30096    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30097  fi
30098
30099  else
30100    # We're on a posix platform. Hooray! :)
30101    # First separate the path from the arguments. This will split at the first
30102    # space.
30103    complete="$PROPER_COMPILER_CXX"
30104    path="${complete%% *}"
30105    tmp="$complete EOL"
30106    arguments="${tmp#* }"
30107
30108    # Cannot rely on the command "which" here since it doesn't always work.
30109    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30110    if test -z "$is_absolute_path"; then
30111      # Path to executable is not absolute. Find it.
30112      IFS_save="$IFS"
30113      IFS=:
30114      for p in $PATH; do
30115        if test -f "$p/$path" && test -x "$p/$path"; then
30116          new_path="$p/$path"
30117          break
30118        fi
30119      done
30120      IFS="$IFS_save"
30121    else
30122      # This is an absolute path, we can use it without further modifications.
30123      new_path="$path"
30124    fi
30125
30126    if test "x$new_path" = x; then
30127      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30128$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30129      has_space=`$ECHO "$complete" | $GREP " "`
30130      if test "x$has_space" != x; then
30131        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30132$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30133      fi
30134      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30135    fi
30136  fi
30137
30138  # Now join together the path and the arguments once again
30139  if test "x$arguments" != xEOL; then
30140    new_complete="$new_path ${arguments% *}"
30141  else
30142    new_complete="$new_path"
30143  fi
30144
30145  if test "x$complete" != "x$new_complete"; then
30146    PROPER_COMPILER_CXX="$new_complete"
30147    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30148$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30149  fi
30150
30151    PATH="$RETRY_COMPILER_SAVED_PATH"
30152
30153    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30154$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30155
30156  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30157    # Follow a chain of symbolic links. Use readlink
30158    # where it exists, else fall back to horribly
30159    # complicated shell code.
30160    if test "x$READLINK_TESTED" != yes; then
30161      # On MacOSX there is a readlink tool with a different
30162      # purpose than the GNU readlink tool. Check the found readlink.
30163      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30164      if test "x$ISGNU" = x; then
30165        # A readlink that we do not know how to use.
30166        # Are there other non-GNU readlinks out there?
30167        READLINK_TESTED=yes
30168        READLINK=
30169      fi
30170    fi
30171
30172    if test "x$READLINK" != x; then
30173      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30174    else
30175      # Save the current directory for restoring afterwards
30176      STARTDIR=$PWD
30177      COUNTER=0
30178      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30179      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30180      cd $sym_link_dir
30181      # Use -P flag to resolve symlinks in directories.
30182      cd `$THEPWDCMD -P`
30183      sym_link_dir=`$THEPWDCMD -P`
30184      # Resolve file symlinks
30185      while test $COUNTER -lt 20; do
30186        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30187        if test "x$ISLINK" == x; then
30188          # This is not a symbolic link! We are done!
30189          break
30190        fi
30191        # Again resolve directory symlinks since the target of the just found
30192        # link could be in a different directory
30193        cd `$DIRNAME $ISLINK`
30194        sym_link_dir=`$THEPWDCMD -P`
30195        sym_link_file=`$BASENAME $ISLINK`
30196        let COUNTER=COUNTER+1
30197      done
30198      cd $STARTDIR
30199      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30200    fi
30201  fi
30202
30203    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30204$as_echo "$PROPER_COMPILER_CXX" >&6; }
30205    CXX="$PROPER_COMPILER_CXX"
30206  else
30207    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30208$as_echo "no, keeping CXX" >&6; }
30209  fi
30210
30211
30212  COMPILER=$CXX
30213  COMPILER_NAME=$COMPILER_NAME
30214
30215  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30216    # cc -V output typically looks like
30217    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30218    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30219    # Check that this is likely to be the Solaris Studio cc.
30220    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30221    if test $? -ne 0; then
30222      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30223      { $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
30224$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30225      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30226$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30227      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30228$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30229      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30230    fi
30231    # Remove usage instructions (if present), and
30232    # collapse compiler output into a single line
30233    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30234        $SED -e 's/ *[Uu]sage:.*//'`
30235    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30236        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30237  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30238    # xlc -qversion output typically looks like
30239    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30240    #     Version: 11.01.0000.0015
30241    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30242    # Check that this is likely to be the IBM XL C compiler.
30243    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30244    if test $? -ne 0; then
30245      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30246      { $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
30247$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30248      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30249$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30250      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30251$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30252      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30253    fi
30254    # Collapse compiler output into a single line
30255    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30256    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30257        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30258  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30259    # There is no specific version flag, but all output starts with a version string.
30260    # First line typically looks something like:
30261    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30262    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30263    # Check that this is likely to be Microsoft CL.EXE.
30264    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30265    if test $? -ne 0; then
30266      { $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
30267$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30268      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30269$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30270      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30271    fi
30272    # Collapse compiler output into a single line
30273    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30274    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30275        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30276  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30277    # gcc --version output typically looks like
30278    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30279    #     Copyright (C) 2013 Free Software Foundation, Inc.
30280    #     This is free software; see the source for copying conditions.  There is NO
30281    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30282    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30283    # Check that this is likely to be GCC.
30284    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30285    if test $? -ne 0; then
30286      { $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
30287$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30288      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30289$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30290      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30291    fi
30292    # Remove Copyright and legalese from version string, and
30293    # collapse into a single line
30294    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30295        $SED -e 's/ *Copyright .*//'`
30296    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30297        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30298  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30299    # clang --version output typically looks like
30300    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30301    #    clang version 3.3 (tags/RELEASE_33/final)
30302    # or
30303    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30304    #    Target: x86_64-pc-linux-gnu
30305    #    Thread model: posix
30306    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30307    # Check that this is likely to be clang
30308    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30309    if test $? -ne 0; then
30310      { $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
30311$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30312      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30313$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30314      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30315    fi
30316    # Collapse compiler output into a single line
30317    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30318    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30319        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30320  else
30321      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30322  fi
30323  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30324  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30325  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30326  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30327
30328  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30329$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30330
30331
30332  # Now that we have resolved CXX ourself, let autoconf have its go at it
30333  ac_ext=cpp
30334ac_cpp='$CXXCPP $CPPFLAGS'
30335ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30336ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30337ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30338if test -z "$CXX"; then
30339  if test -n "$CCC"; then
30340    CXX=$CCC
30341  else
30342    if test -n "$ac_tool_prefix"; then
30343  for ac_prog in $CXX
30344  do
30345    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30346set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30348$as_echo_n "checking for $ac_word... " >&6; }
30349if ${ac_cv_prog_CXX+:} false; then :
30350  $as_echo_n "(cached) " >&6
30351else
30352  if test -n "$CXX"; then
30353  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30354else
30355as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30356for as_dir in $PATH
30357do
30358  IFS=$as_save_IFS
30359  test -z "$as_dir" && as_dir=.
30360    for ac_exec_ext in '' $ac_executable_extensions; do
30361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30362    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30364    break 2
30365  fi
30366done
30367  done
30368IFS=$as_save_IFS
30369
30370fi
30371fi
30372CXX=$ac_cv_prog_CXX
30373if test -n "$CXX"; then
30374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30375$as_echo "$CXX" >&6; }
30376else
30377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30378$as_echo "no" >&6; }
30379fi
30380
30381
30382    test -n "$CXX" && break
30383  done
30384fi
30385if test -z "$CXX"; then
30386  ac_ct_CXX=$CXX
30387  for ac_prog in $CXX
30388do
30389  # Extract the first word of "$ac_prog", so it can be a program name with args.
30390set dummy $ac_prog; ac_word=$2
30391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30392$as_echo_n "checking for $ac_word... " >&6; }
30393if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30394  $as_echo_n "(cached) " >&6
30395else
30396  if test -n "$ac_ct_CXX"; then
30397  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30398else
30399as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30400for as_dir in $PATH
30401do
30402  IFS=$as_save_IFS
30403  test -z "$as_dir" && as_dir=.
30404    for ac_exec_ext in '' $ac_executable_extensions; do
30405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30406    ac_cv_prog_ac_ct_CXX="$ac_prog"
30407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30408    break 2
30409  fi
30410done
30411  done
30412IFS=$as_save_IFS
30413
30414fi
30415fi
30416ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30417if test -n "$ac_ct_CXX"; then
30418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30419$as_echo "$ac_ct_CXX" >&6; }
30420else
30421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30422$as_echo "no" >&6; }
30423fi
30424
30425
30426  test -n "$ac_ct_CXX" && break
30427done
30428
30429  if test "x$ac_ct_CXX" = x; then
30430    CXX="g++"
30431  else
30432    case $cross_compiling:$ac_tool_warned in
30433yes:)
30434{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30435$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30436ac_tool_warned=yes ;;
30437esac
30438    CXX=$ac_ct_CXX
30439  fi
30440fi
30441
30442  fi
30443fi
30444# Provide some information about the compiler.
30445$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30446set X $ac_compile
30447ac_compiler=$2
30448for ac_option in --version -v -V -qversion; do
30449  { { ac_try="$ac_compiler $ac_option >&5"
30450case "(($ac_try" in
30451  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30452  *) ac_try_echo=$ac_try;;
30453esac
30454eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30455$as_echo "$ac_try_echo"; } >&5
30456  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30457  ac_status=$?
30458  if test -s conftest.err; then
30459    sed '10a\
30460... rest of stderr output deleted ...
30461         10q' conftest.err >conftest.er1
30462    cat conftest.er1 >&5
30463  fi
30464  rm -f conftest.er1 conftest.err
30465  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30466  test $ac_status = 0; }
30467done
30468
30469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30470$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30471if ${ac_cv_cxx_compiler_gnu+:} false; then :
30472  $as_echo_n "(cached) " >&6
30473else
30474  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30475/* end confdefs.h.  */
30476
30477int
30478main ()
30479{
30480#ifndef __GNUC__
30481       choke me
30482#endif
30483
30484  ;
30485  return 0;
30486}
30487_ACEOF
30488if ac_fn_cxx_try_compile "$LINENO"; then :
30489  ac_compiler_gnu=yes
30490else
30491  ac_compiler_gnu=no
30492fi
30493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30494ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30495
30496fi
30497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30498$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30499if test $ac_compiler_gnu = yes; then
30500  GXX=yes
30501else
30502  GXX=
30503fi
30504ac_test_CXXFLAGS=${CXXFLAGS+set}
30505ac_save_CXXFLAGS=$CXXFLAGS
30506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30507$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30508if ${ac_cv_prog_cxx_g+:} false; then :
30509  $as_echo_n "(cached) " >&6
30510else
30511  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30512   ac_cxx_werror_flag=yes
30513   ac_cv_prog_cxx_g=no
30514   CXXFLAGS="-g"
30515   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30516/* end confdefs.h.  */
30517
30518int
30519main ()
30520{
30521
30522  ;
30523  return 0;
30524}
30525_ACEOF
30526if ac_fn_cxx_try_compile "$LINENO"; then :
30527  ac_cv_prog_cxx_g=yes
30528else
30529  CXXFLAGS=""
30530      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30531/* end confdefs.h.  */
30532
30533int
30534main ()
30535{
30536
30537  ;
30538  return 0;
30539}
30540_ACEOF
30541if ac_fn_cxx_try_compile "$LINENO"; then :
30542
30543else
30544  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30545	 CXXFLAGS="-g"
30546	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30547/* end confdefs.h.  */
30548
30549int
30550main ()
30551{
30552
30553  ;
30554  return 0;
30555}
30556_ACEOF
30557if ac_fn_cxx_try_compile "$LINENO"; then :
30558  ac_cv_prog_cxx_g=yes
30559fi
30560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30561fi
30562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30563fi
30564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30565   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30566fi
30567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30568$as_echo "$ac_cv_prog_cxx_g" >&6; }
30569if test "$ac_test_CXXFLAGS" = set; then
30570  CXXFLAGS=$ac_save_CXXFLAGS
30571elif test $ac_cv_prog_cxx_g = yes; then
30572  if test "$GXX" = yes; then
30573    CXXFLAGS="-g -O2"
30574  else
30575    CXXFLAGS="-g"
30576  fi
30577else
30578  if test "$GXX" = yes; then
30579    CXXFLAGS="-O2"
30580  else
30581    CXXFLAGS=
30582  fi
30583fi
30584ac_ext=cpp
30585ac_cpp='$CXXCPP $CPPFLAGS'
30586ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30587ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30588ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30589
30590
30591  #
30592  # Setup the preprocessor (CPP and CXXCPP)
30593  #
30594  ac_ext=c
30595ac_cpp='$CPP $CPPFLAGS'
30596ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30597ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30598ac_compiler_gnu=$ac_cv_c_compiler_gnu
30599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30600$as_echo_n "checking how to run the C preprocessor... " >&6; }
30601# On Suns, sometimes $CPP names a directory.
30602if test -n "$CPP" && test -d "$CPP"; then
30603  CPP=
30604fi
30605if test -z "$CPP"; then
30606  if ${ac_cv_prog_CPP+:} false; then :
30607  $as_echo_n "(cached) " >&6
30608else
30609      # Double quotes because CPP needs to be expanded
30610    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30611    do
30612      ac_preproc_ok=false
30613for ac_c_preproc_warn_flag in '' yes
30614do
30615  # Use a header file that comes with gcc, so configuring glibc
30616  # with a fresh cross-compiler works.
30617  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30618  # <limits.h> exists even on freestanding compilers.
30619  # On the NeXT, cc -E runs the code through the compiler's parser,
30620  # not just through cpp. "Syntax error" is here to catch this case.
30621  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30622/* end confdefs.h.  */
30623#ifdef __STDC__
30624# include <limits.h>
30625#else
30626# include <assert.h>
30627#endif
30628		     Syntax error
30629_ACEOF
30630if ac_fn_c_try_cpp "$LINENO"; then :
30631
30632else
30633  # Broken: fails on valid input.
30634continue
30635fi
30636rm -f conftest.err conftest.i conftest.$ac_ext
30637
30638  # OK, works on sane cases.  Now check whether nonexistent headers
30639  # can be detected and how.
30640  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30641/* end confdefs.h.  */
30642#include <ac_nonexistent.h>
30643_ACEOF
30644if ac_fn_c_try_cpp "$LINENO"; then :
30645  # Broken: success on invalid input.
30646continue
30647else
30648  # Passes both tests.
30649ac_preproc_ok=:
30650break
30651fi
30652rm -f conftest.err conftest.i conftest.$ac_ext
30653
30654done
30655# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30656rm -f conftest.i conftest.err conftest.$ac_ext
30657if $ac_preproc_ok; then :
30658  break
30659fi
30660
30661    done
30662    ac_cv_prog_CPP=$CPP
30663
30664fi
30665  CPP=$ac_cv_prog_CPP
30666else
30667  ac_cv_prog_CPP=$CPP
30668fi
30669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30670$as_echo "$CPP" >&6; }
30671ac_preproc_ok=false
30672for ac_c_preproc_warn_flag in '' yes
30673do
30674  # Use a header file that comes with gcc, so configuring glibc
30675  # with a fresh cross-compiler works.
30676  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30677  # <limits.h> exists even on freestanding compilers.
30678  # On the NeXT, cc -E runs the code through the compiler's parser,
30679  # not just through cpp. "Syntax error" is here to catch this case.
30680  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30681/* end confdefs.h.  */
30682#ifdef __STDC__
30683# include <limits.h>
30684#else
30685# include <assert.h>
30686#endif
30687		     Syntax error
30688_ACEOF
30689if ac_fn_c_try_cpp "$LINENO"; then :
30690
30691else
30692  # Broken: fails on valid input.
30693continue
30694fi
30695rm -f conftest.err conftest.i conftest.$ac_ext
30696
30697  # OK, works on sane cases.  Now check whether nonexistent headers
30698  # can be detected and how.
30699  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30700/* end confdefs.h.  */
30701#include <ac_nonexistent.h>
30702_ACEOF
30703if ac_fn_c_try_cpp "$LINENO"; then :
30704  # Broken: success on invalid input.
30705continue
30706else
30707  # Passes both tests.
30708ac_preproc_ok=:
30709break
30710fi
30711rm -f conftest.err conftest.i conftest.$ac_ext
30712
30713done
30714# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30715rm -f conftest.i conftest.err conftest.$ac_ext
30716if $ac_preproc_ok; then :
30717
30718else
30719  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30720$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30721as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30722See \`config.log' for more details" "$LINENO" 5; }
30723fi
30724
30725ac_ext=cpp
30726ac_cpp='$CXXCPP $CPPFLAGS'
30727ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30728ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30729ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30730
30731
30732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30733
30734  # First separate the path from the arguments. This will split at the first
30735  # space.
30736  complete="$CPP"
30737  path="${complete%% *}"
30738  tmp="$complete EOL"
30739  arguments="${tmp#* }"
30740
30741  # Input might be given as Windows format, start by converting to
30742  # unix format.
30743  new_path=`$CYGPATH -u "$path"`
30744
30745  # Now try to locate executable using which
30746  new_path=`$WHICH "$new_path" 2> /dev/null`
30747  # bat and cmd files are not always considered executable in cygwin causing which
30748  # to not find them
30749  if test "x$new_path" = x \
30750      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30751      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30752    new_path=`$CYGPATH -u "$path"`
30753  fi
30754  if test "x$new_path" = x; then
30755    # Oops. Which didn't find the executable.
30756    # The splitting of arguments from the executable at a space might have been incorrect,
30757    # since paths with space are more likely in Windows. Give it another try with the whole
30758    # argument.
30759    path="$complete"
30760    arguments="EOL"
30761    new_path=`$CYGPATH -u "$path"`
30762    new_path=`$WHICH "$new_path" 2> /dev/null`
30763    # bat and cmd files are not always considered executable in cygwin causing which
30764    # to not find them
30765    if test "x$new_path" = x \
30766        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30767        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30768      new_path=`$CYGPATH -u "$path"`
30769    fi
30770    if test "x$new_path" = x; then
30771      # It's still not found. Now this is an unrecoverable error.
30772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30773$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30774      has_space=`$ECHO "$complete" | $GREP " "`
30775      if test "x$has_space" != x; then
30776        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30777$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30778      fi
30779      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30780    fi
30781  fi
30782
30783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30786  # "foo.exe" is OK but "foo" is an error.
30787  #
30788  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30789  # It is also a way to make sure we got the proper file name for the real test later on.
30790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30791  if test "x$test_shortpath" = x; then
30792    # Short path failed, file does not exist as specified.
30793    # Try adding .exe or .cmd
30794    if test -f "${new_path}.exe"; then
30795      input_to_shortpath="${new_path}.exe"
30796    elif test -f "${new_path}.cmd"; then
30797      input_to_shortpath="${new_path}.cmd"
30798    else
30799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30800$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30801      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30802$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30803      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30804    fi
30805  else
30806    input_to_shortpath="$new_path"
30807  fi
30808
30809  # Call helper function which possibly converts this using DOS-style short mode.
30810  # If so, the updated path is stored in $new_path.
30811  new_path="$input_to_shortpath"
30812
30813  input_path="$input_to_shortpath"
30814  # Check if we need to convert this using DOS-style short mode. If the path
30815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30816  # take no chances and rewrite it.
30817  # Note: m4 eats our [], so we need to use [ and ] instead.
30818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30819  if test "x$has_forbidden_chars" != x; then
30820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30824      # Going to short mode and back again did indeed matter. Since short mode is
30825      # case insensitive, let's make it lowercase to improve readability.
30826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30827      # Now convert it back to Unix-stile (cygpath)
30828      input_path=`$CYGPATH -u "$shortmode_path"`
30829      new_path="$input_path"
30830    fi
30831  fi
30832
30833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30834  if test "x$test_cygdrive_prefix" = x; then
30835    # As a simple fix, exclude /usr/bin since it's not a real path.
30836    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30838      # a path prefixed by /cygdrive for fixpath to work.
30839      new_path="$CYGWIN_ROOT_PATH$input_path"
30840    fi
30841  fi
30842
30843  # remove trailing .exe if any
30844  new_path="${new_path/%.exe/}"
30845
30846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30847
30848  # First separate the path from the arguments. This will split at the first
30849  # space.
30850  complete="$CPP"
30851  path="${complete%% *}"
30852  tmp="$complete EOL"
30853  arguments="${tmp#* }"
30854
30855  # Input might be given as Windows format, start by converting to
30856  # unix format.
30857  new_path="$path"
30858
30859  windows_path="$new_path"
30860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30861    unix_path=`$CYGPATH -u "$windows_path"`
30862    new_path="$unix_path"
30863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30865    new_path="$unix_path"
30866  fi
30867
30868
30869  # Now try to locate executable using which
30870  new_path=`$WHICH "$new_path" 2> /dev/null`
30871
30872  if test "x$new_path" = x; then
30873    # Oops. Which didn't find the executable.
30874    # The splitting of arguments from the executable at a space might have been incorrect,
30875    # since paths with space are more likely in Windows. Give it another try with the whole
30876    # argument.
30877    path="$complete"
30878    arguments="EOL"
30879    new_path="$path"
30880
30881  windows_path="$new_path"
30882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30883    unix_path=`$CYGPATH -u "$windows_path"`
30884    new_path="$unix_path"
30885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30887    new_path="$unix_path"
30888  fi
30889
30890
30891    new_path=`$WHICH "$new_path" 2> /dev/null`
30892
30893    if test "x$new_path" = x; then
30894      # It's still not found. Now this is an unrecoverable error.
30895      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30896$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30897      has_space=`$ECHO "$complete" | $GREP " "`
30898      if test "x$has_space" != x; then
30899        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30900$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30901      fi
30902      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30903    fi
30904  fi
30905
30906  # Now new_path has a complete unix path to the binary
30907  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30908    # Keep paths in /bin as-is, but remove trailing .exe if any
30909    new_path="${new_path/%.exe/}"
30910    # Do not save /bin paths to all_fixpath_prefixes!
30911  else
30912    # Not in mixed or Windows style, start by that.
30913    new_path=`cmd //c echo $new_path`
30914
30915  input_path="$new_path"
30916  # Check if we need to convert this using DOS-style short mode. If the path
30917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30918  # take no chances and rewrite it.
30919  # Note: m4 eats our [], so we need to use [ and ] instead.
30920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30921  if test "x$has_forbidden_chars" != x; then
30922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30923    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30924  fi
30925
30926    # Output is in $new_path
30927
30928  windows_path="$new_path"
30929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30930    unix_path=`$CYGPATH -u "$windows_path"`
30931    new_path="$unix_path"
30932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30934    new_path="$unix_path"
30935  fi
30936
30937    # remove trailing .exe if any
30938    new_path="${new_path/%.exe/}"
30939
30940    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30941    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30942  fi
30943
30944  else
30945    # We're on a posix platform. Hooray! :)
30946    # First separate the path from the arguments. This will split at the first
30947    # space.
30948    complete="$CPP"
30949    path="${complete%% *}"
30950    tmp="$complete EOL"
30951    arguments="${tmp#* }"
30952
30953    # Cannot rely on the command "which" here since it doesn't always work.
30954    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30955    if test -z "$is_absolute_path"; then
30956      # Path to executable is not absolute. Find it.
30957      IFS_save="$IFS"
30958      IFS=:
30959      for p in $PATH; do
30960        if test -f "$p/$path" && test -x "$p/$path"; then
30961          new_path="$p/$path"
30962          break
30963        fi
30964      done
30965      IFS="$IFS_save"
30966    else
30967      # This is an absolute path, we can use it without further modifications.
30968      new_path="$path"
30969    fi
30970
30971    if test "x$new_path" = x; then
30972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30973$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30974      has_space=`$ECHO "$complete" | $GREP " "`
30975      if test "x$has_space" != x; then
30976        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30977$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30978      fi
30979      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30980    fi
30981  fi
30982
30983  # Now join together the path and the arguments once again
30984  if test "x$arguments" != xEOL; then
30985    new_complete="$new_path ${arguments% *}"
30986  else
30987    new_complete="$new_path"
30988  fi
30989
30990  if test "x$complete" != "x$new_complete"; then
30991    CPP="$new_complete"
30992    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
30993$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
30994  fi
30995
30996  ac_ext=cpp
30997ac_cpp='$CXXCPP $CPPFLAGS'
30998ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30999ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31000ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31002$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31003if test -z "$CXXCPP"; then
31004  if ${ac_cv_prog_CXXCPP+:} false; then :
31005  $as_echo_n "(cached) " >&6
31006else
31007      # Double quotes because CXXCPP needs to be expanded
31008    for CXXCPP in "$CXX -E" "/lib/cpp"
31009    do
31010      ac_preproc_ok=false
31011for ac_cxx_preproc_warn_flag in '' yes
31012do
31013  # Use a header file that comes with gcc, so configuring glibc
31014  # with a fresh cross-compiler works.
31015  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31016  # <limits.h> exists even on freestanding compilers.
31017  # On the NeXT, cc -E runs the code through the compiler's parser,
31018  # not just through cpp. "Syntax error" is here to catch this case.
31019  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31020/* end confdefs.h.  */
31021#ifdef __STDC__
31022# include <limits.h>
31023#else
31024# include <assert.h>
31025#endif
31026		     Syntax error
31027_ACEOF
31028if ac_fn_cxx_try_cpp "$LINENO"; then :
31029
31030else
31031  # Broken: fails on valid input.
31032continue
31033fi
31034rm -f conftest.err conftest.i conftest.$ac_ext
31035
31036  # OK, works on sane cases.  Now check whether nonexistent headers
31037  # can be detected and how.
31038  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31039/* end confdefs.h.  */
31040#include <ac_nonexistent.h>
31041_ACEOF
31042if ac_fn_cxx_try_cpp "$LINENO"; then :
31043  # Broken: success on invalid input.
31044continue
31045else
31046  # Passes both tests.
31047ac_preproc_ok=:
31048break
31049fi
31050rm -f conftest.err conftest.i conftest.$ac_ext
31051
31052done
31053# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31054rm -f conftest.i conftest.err conftest.$ac_ext
31055if $ac_preproc_ok; then :
31056  break
31057fi
31058
31059    done
31060    ac_cv_prog_CXXCPP=$CXXCPP
31061
31062fi
31063  CXXCPP=$ac_cv_prog_CXXCPP
31064else
31065  ac_cv_prog_CXXCPP=$CXXCPP
31066fi
31067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31068$as_echo "$CXXCPP" >&6; }
31069ac_preproc_ok=false
31070for ac_cxx_preproc_warn_flag in '' yes
31071do
31072  # Use a header file that comes with gcc, so configuring glibc
31073  # with a fresh cross-compiler works.
31074  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31075  # <limits.h> exists even on freestanding compilers.
31076  # On the NeXT, cc -E runs the code through the compiler's parser,
31077  # not just through cpp. "Syntax error" is here to catch this case.
31078  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31079/* end confdefs.h.  */
31080#ifdef __STDC__
31081# include <limits.h>
31082#else
31083# include <assert.h>
31084#endif
31085		     Syntax error
31086_ACEOF
31087if ac_fn_cxx_try_cpp "$LINENO"; then :
31088
31089else
31090  # Broken: fails on valid input.
31091continue
31092fi
31093rm -f conftest.err conftest.i conftest.$ac_ext
31094
31095  # OK, works on sane cases.  Now check whether nonexistent headers
31096  # can be detected and how.
31097  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31098/* end confdefs.h.  */
31099#include <ac_nonexistent.h>
31100_ACEOF
31101if ac_fn_cxx_try_cpp "$LINENO"; then :
31102  # Broken: success on invalid input.
31103continue
31104else
31105  # Passes both tests.
31106ac_preproc_ok=:
31107break
31108fi
31109rm -f conftest.err conftest.i conftest.$ac_ext
31110
31111done
31112# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31113rm -f conftest.i conftest.err conftest.$ac_ext
31114if $ac_preproc_ok; then :
31115
31116else
31117  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31118$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31119as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31120See \`config.log' for more details" "$LINENO" 5; }
31121fi
31122
31123ac_ext=cpp
31124ac_cpp='$CXXCPP $CPPFLAGS'
31125ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31126ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31127ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31128
31129
31130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31131
31132  # First separate the path from the arguments. This will split at the first
31133  # space.
31134  complete="$CXXCPP"
31135  path="${complete%% *}"
31136  tmp="$complete EOL"
31137  arguments="${tmp#* }"
31138
31139  # Input might be given as Windows format, start by converting to
31140  # unix format.
31141  new_path=`$CYGPATH -u "$path"`
31142
31143  # Now try to locate executable using which
31144  new_path=`$WHICH "$new_path" 2> /dev/null`
31145  # bat and cmd files are not always considered executable in cygwin causing which
31146  # to not find them
31147  if test "x$new_path" = x \
31148      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31149      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31150    new_path=`$CYGPATH -u "$path"`
31151  fi
31152  if test "x$new_path" = x; then
31153    # Oops. Which didn't find the executable.
31154    # The splitting of arguments from the executable at a space might have been incorrect,
31155    # since paths with space are more likely in Windows. Give it another try with the whole
31156    # argument.
31157    path="$complete"
31158    arguments="EOL"
31159    new_path=`$CYGPATH -u "$path"`
31160    new_path=`$WHICH "$new_path" 2> /dev/null`
31161    # bat and cmd files are not always considered executable in cygwin causing which
31162    # to not find them
31163    if test "x$new_path" = x \
31164        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31165        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31166      new_path=`$CYGPATH -u "$path"`
31167    fi
31168    if test "x$new_path" = x; then
31169      # It's still not found. Now this is an unrecoverable error.
31170      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31171$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31172      has_space=`$ECHO "$complete" | $GREP " "`
31173      if test "x$has_space" != x; then
31174        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31175$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31176      fi
31177      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31178    fi
31179  fi
31180
31181  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31182  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31183  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31184  # "foo.exe" is OK but "foo" is an error.
31185  #
31186  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31187  # It is also a way to make sure we got the proper file name for the real test later on.
31188  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31189  if test "x$test_shortpath" = x; then
31190    # Short path failed, file does not exist as specified.
31191    # Try adding .exe or .cmd
31192    if test -f "${new_path}.exe"; then
31193      input_to_shortpath="${new_path}.exe"
31194    elif test -f "${new_path}.cmd"; then
31195      input_to_shortpath="${new_path}.cmd"
31196    else
31197      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31198$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31199      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31200$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31201      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31202    fi
31203  else
31204    input_to_shortpath="$new_path"
31205  fi
31206
31207  # Call helper function which possibly converts this using DOS-style short mode.
31208  # If so, the updated path is stored in $new_path.
31209  new_path="$input_to_shortpath"
31210
31211  input_path="$input_to_shortpath"
31212  # Check if we need to convert this using DOS-style short mode. If the path
31213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31214  # take no chances and rewrite it.
31215  # Note: m4 eats our [], so we need to use [ and ] instead.
31216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31217  if test "x$has_forbidden_chars" != x; then
31218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31219    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31220    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31221    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31222      # Going to short mode and back again did indeed matter. Since short mode is
31223      # case insensitive, let's make it lowercase to improve readability.
31224      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31225      # Now convert it back to Unix-stile (cygpath)
31226      input_path=`$CYGPATH -u "$shortmode_path"`
31227      new_path="$input_path"
31228    fi
31229  fi
31230
31231  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31232  if test "x$test_cygdrive_prefix" = x; then
31233    # As a simple fix, exclude /usr/bin since it's not a real path.
31234    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31235      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31236      # a path prefixed by /cygdrive for fixpath to work.
31237      new_path="$CYGWIN_ROOT_PATH$input_path"
31238    fi
31239  fi
31240
31241  # remove trailing .exe if any
31242  new_path="${new_path/%.exe/}"
31243
31244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31245
31246  # First separate the path from the arguments. This will split at the first
31247  # space.
31248  complete="$CXXCPP"
31249  path="${complete%% *}"
31250  tmp="$complete EOL"
31251  arguments="${tmp#* }"
31252
31253  # Input might be given as Windows format, start by converting to
31254  # unix format.
31255  new_path="$path"
31256
31257  windows_path="$new_path"
31258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31259    unix_path=`$CYGPATH -u "$windows_path"`
31260    new_path="$unix_path"
31261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31263    new_path="$unix_path"
31264  fi
31265
31266
31267  # Now try to locate executable using which
31268  new_path=`$WHICH "$new_path" 2> /dev/null`
31269
31270  if test "x$new_path" = x; then
31271    # Oops. Which didn't find the executable.
31272    # The splitting of arguments from the executable at a space might have been incorrect,
31273    # since paths with space are more likely in Windows. Give it another try with the whole
31274    # argument.
31275    path="$complete"
31276    arguments="EOL"
31277    new_path="$path"
31278
31279  windows_path="$new_path"
31280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31281    unix_path=`$CYGPATH -u "$windows_path"`
31282    new_path="$unix_path"
31283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31285    new_path="$unix_path"
31286  fi
31287
31288
31289    new_path=`$WHICH "$new_path" 2> /dev/null`
31290
31291    if test "x$new_path" = x; then
31292      # It's still not found. Now this is an unrecoverable error.
31293      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31294$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31295      has_space=`$ECHO "$complete" | $GREP " "`
31296      if test "x$has_space" != x; then
31297        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31298$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31299      fi
31300      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31301    fi
31302  fi
31303
31304  # Now new_path has a complete unix path to the binary
31305  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31306    # Keep paths in /bin as-is, but remove trailing .exe if any
31307    new_path="${new_path/%.exe/}"
31308    # Do not save /bin paths to all_fixpath_prefixes!
31309  else
31310    # Not in mixed or Windows style, start by that.
31311    new_path=`cmd //c echo $new_path`
31312
31313  input_path="$new_path"
31314  # Check if we need to convert this using DOS-style short mode. If the path
31315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31316  # take no chances and rewrite it.
31317  # Note: m4 eats our [], so we need to use [ and ] instead.
31318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31319  if test "x$has_forbidden_chars" != x; then
31320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31321    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31322  fi
31323
31324    # Output is in $new_path
31325
31326  windows_path="$new_path"
31327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31328    unix_path=`$CYGPATH -u "$windows_path"`
31329    new_path="$unix_path"
31330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31332    new_path="$unix_path"
31333  fi
31334
31335    # remove trailing .exe if any
31336    new_path="${new_path/%.exe/}"
31337
31338    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31339    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31340  fi
31341
31342  else
31343    # We're on a posix platform. Hooray! :)
31344    # First separate the path from the arguments. This will split at the first
31345    # space.
31346    complete="$CXXCPP"
31347    path="${complete%% *}"
31348    tmp="$complete EOL"
31349    arguments="${tmp#* }"
31350
31351    # Cannot rely on the command "which" here since it doesn't always work.
31352    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31353    if test -z "$is_absolute_path"; then
31354      # Path to executable is not absolute. Find it.
31355      IFS_save="$IFS"
31356      IFS=:
31357      for p in $PATH; do
31358        if test -f "$p/$path" && test -x "$p/$path"; then
31359          new_path="$p/$path"
31360          break
31361        fi
31362      done
31363      IFS="$IFS_save"
31364    else
31365      # This is an absolute path, we can use it without further modifications.
31366      new_path="$path"
31367    fi
31368
31369    if test "x$new_path" = x; then
31370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31371$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31372      has_space=`$ECHO "$complete" | $GREP " "`
31373      if test "x$has_space" != x; then
31374        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31375$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31376      fi
31377      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31378    fi
31379  fi
31380
31381  # Now join together the path and the arguments once again
31382  if test "x$arguments" != xEOL; then
31383    new_complete="$new_path ${arguments% *}"
31384  else
31385    new_complete="$new_path"
31386  fi
31387
31388  if test "x$complete" != "x$new_complete"; then
31389    CXXCPP="$new_complete"
31390    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31391$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31392  fi
31393
31394
31395  #
31396  # Setup the linker (LD)
31397  #
31398  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31399    # In the Microsoft toolchain we have a separate LD command "link".
31400    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31401    # a cygwin program for something completely different.
31402    # Extract the first word of "link", so it can be a program name with args.
31403set dummy link; ac_word=$2
31404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31405$as_echo_n "checking for $ac_word... " >&6; }
31406if ${ac_cv_prog_LD+:} false; then :
31407  $as_echo_n "(cached) " >&6
31408else
31409  if test -n "$LD"; then
31410  ac_cv_prog_LD="$LD" # Let the user override the test.
31411else
31412  ac_prog_rejected=no
31413as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31414for as_dir in $PATH
31415do
31416  IFS=$as_save_IFS
31417  test -z "$as_dir" && as_dir=.
31418    for ac_exec_ext in '' $ac_executable_extensions; do
31419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31420    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31421       ac_prog_rejected=yes
31422       continue
31423     fi
31424    ac_cv_prog_LD="link"
31425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31426    break 2
31427  fi
31428done
31429  done
31430IFS=$as_save_IFS
31431
31432if test $ac_prog_rejected = yes; then
31433  # We found a bogon in the path, so make sure we never use it.
31434  set dummy $ac_cv_prog_LD
31435  shift
31436  if test $# != 0; then
31437    # We chose a different compiler from the bogus one.
31438    # However, it has the same basename, so the bogon will be chosen
31439    # first if we set LD to just the basename; use the full file name.
31440    shift
31441    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31442  fi
31443fi
31444fi
31445fi
31446LD=$ac_cv_prog_LD
31447if test -n "$LD"; then
31448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31449$as_echo "$LD" >&6; }
31450else
31451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31452$as_echo "no" >&6; }
31453fi
31454
31455
31456
31457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31458
31459  # First separate the path from the arguments. This will split at the first
31460  # space.
31461  complete="$LD"
31462  path="${complete%% *}"
31463  tmp="$complete EOL"
31464  arguments="${tmp#* }"
31465
31466  # Input might be given as Windows format, start by converting to
31467  # unix format.
31468  new_path=`$CYGPATH -u "$path"`
31469
31470  # Now try to locate executable using which
31471  new_path=`$WHICH "$new_path" 2> /dev/null`
31472  # bat and cmd files are not always considered executable in cygwin causing which
31473  # to not find them
31474  if test "x$new_path" = x \
31475      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31476      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31477    new_path=`$CYGPATH -u "$path"`
31478  fi
31479  if test "x$new_path" = x; then
31480    # Oops. Which didn't find the executable.
31481    # The splitting of arguments from the executable at a space might have been incorrect,
31482    # since paths with space are more likely in Windows. Give it another try with the whole
31483    # argument.
31484    path="$complete"
31485    arguments="EOL"
31486    new_path=`$CYGPATH -u "$path"`
31487    new_path=`$WHICH "$new_path" 2> /dev/null`
31488    # bat and cmd files are not always considered executable in cygwin causing which
31489    # to not find them
31490    if test "x$new_path" = x \
31491        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31492        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31493      new_path=`$CYGPATH -u "$path"`
31494    fi
31495    if test "x$new_path" = x; then
31496      # It's still not found. Now this is an unrecoverable error.
31497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31498$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31499      has_space=`$ECHO "$complete" | $GREP " "`
31500      if test "x$has_space" != x; then
31501        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31502$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31503      fi
31504      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31505    fi
31506  fi
31507
31508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31511  # "foo.exe" is OK but "foo" is an error.
31512  #
31513  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31514  # It is also a way to make sure we got the proper file name for the real test later on.
31515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31516  if test "x$test_shortpath" = x; then
31517    # Short path failed, file does not exist as specified.
31518    # Try adding .exe or .cmd
31519    if test -f "${new_path}.exe"; then
31520      input_to_shortpath="${new_path}.exe"
31521    elif test -f "${new_path}.cmd"; then
31522      input_to_shortpath="${new_path}.cmd"
31523    else
31524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31525$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31526      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31527$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31528      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31529    fi
31530  else
31531    input_to_shortpath="$new_path"
31532  fi
31533
31534  # Call helper function which possibly converts this using DOS-style short mode.
31535  # If so, the updated path is stored in $new_path.
31536  new_path="$input_to_shortpath"
31537
31538  input_path="$input_to_shortpath"
31539  # Check if we need to convert this using DOS-style short mode. If the path
31540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31541  # take no chances and rewrite it.
31542  # Note: m4 eats our [], so we need to use [ and ] instead.
31543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31544  if test "x$has_forbidden_chars" != x; then
31545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31549      # Going to short mode and back again did indeed matter. Since short mode is
31550      # case insensitive, let's make it lowercase to improve readability.
31551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31552      # Now convert it back to Unix-stile (cygpath)
31553      input_path=`$CYGPATH -u "$shortmode_path"`
31554      new_path="$input_path"
31555    fi
31556  fi
31557
31558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31559  if test "x$test_cygdrive_prefix" = x; then
31560    # As a simple fix, exclude /usr/bin since it's not a real path.
31561    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31563      # a path prefixed by /cygdrive for fixpath to work.
31564      new_path="$CYGWIN_ROOT_PATH$input_path"
31565    fi
31566  fi
31567
31568  # remove trailing .exe if any
31569  new_path="${new_path/%.exe/}"
31570
31571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31572
31573  # First separate the path from the arguments. This will split at the first
31574  # space.
31575  complete="$LD"
31576  path="${complete%% *}"
31577  tmp="$complete EOL"
31578  arguments="${tmp#* }"
31579
31580  # Input might be given as Windows format, start by converting to
31581  # unix format.
31582  new_path="$path"
31583
31584  windows_path="$new_path"
31585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31586    unix_path=`$CYGPATH -u "$windows_path"`
31587    new_path="$unix_path"
31588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31590    new_path="$unix_path"
31591  fi
31592
31593
31594  # Now try to locate executable using which
31595  new_path=`$WHICH "$new_path" 2> /dev/null`
31596
31597  if test "x$new_path" = x; then
31598    # Oops. Which didn't find the executable.
31599    # The splitting of arguments from the executable at a space might have been incorrect,
31600    # since paths with space are more likely in Windows. Give it another try with the whole
31601    # argument.
31602    path="$complete"
31603    arguments="EOL"
31604    new_path="$path"
31605
31606  windows_path="$new_path"
31607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31608    unix_path=`$CYGPATH -u "$windows_path"`
31609    new_path="$unix_path"
31610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31612    new_path="$unix_path"
31613  fi
31614
31615
31616    new_path=`$WHICH "$new_path" 2> /dev/null`
31617
31618    if test "x$new_path" = x; then
31619      # It's still not found. Now this is an unrecoverable error.
31620      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31621$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31622      has_space=`$ECHO "$complete" | $GREP " "`
31623      if test "x$has_space" != x; then
31624        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31625$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31626      fi
31627      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31628    fi
31629  fi
31630
31631  # Now new_path has a complete unix path to the binary
31632  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31633    # Keep paths in /bin as-is, but remove trailing .exe if any
31634    new_path="${new_path/%.exe/}"
31635    # Do not save /bin paths to all_fixpath_prefixes!
31636  else
31637    # Not in mixed or Windows style, start by that.
31638    new_path=`cmd //c echo $new_path`
31639
31640  input_path="$new_path"
31641  # Check if we need to convert this using DOS-style short mode. If the path
31642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31643  # take no chances and rewrite it.
31644  # Note: m4 eats our [], so we need to use [ and ] instead.
31645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31646  if test "x$has_forbidden_chars" != x; then
31647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31648    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31649  fi
31650
31651    # Output is in $new_path
31652
31653  windows_path="$new_path"
31654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31655    unix_path=`$CYGPATH -u "$windows_path"`
31656    new_path="$unix_path"
31657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31659    new_path="$unix_path"
31660  fi
31661
31662    # remove trailing .exe if any
31663    new_path="${new_path/%.exe/}"
31664
31665    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31666    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31667  fi
31668
31669  else
31670    # We're on a posix platform. Hooray! :)
31671    # First separate the path from the arguments. This will split at the first
31672    # space.
31673    complete="$LD"
31674    path="${complete%% *}"
31675    tmp="$complete EOL"
31676    arguments="${tmp#* }"
31677
31678    # Cannot rely on the command "which" here since it doesn't always work.
31679    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31680    if test -z "$is_absolute_path"; then
31681      # Path to executable is not absolute. Find it.
31682      IFS_save="$IFS"
31683      IFS=:
31684      for p in $PATH; do
31685        if test -f "$p/$path" && test -x "$p/$path"; then
31686          new_path="$p/$path"
31687          break
31688        fi
31689      done
31690      IFS="$IFS_save"
31691    else
31692      # This is an absolute path, we can use it without further modifications.
31693      new_path="$path"
31694    fi
31695
31696    if test "x$new_path" = x; then
31697      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31698$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31699      has_space=`$ECHO "$complete" | $GREP " "`
31700      if test "x$has_space" != x; then
31701        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31702$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31703      fi
31704      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31705    fi
31706  fi
31707
31708  # Now join together the path and the arguments once again
31709  if test "x$arguments" != xEOL; then
31710    new_complete="$new_path ${arguments% *}"
31711  else
31712    new_complete="$new_path"
31713  fi
31714
31715  if test "x$complete" != "x$new_complete"; then
31716    LD="$new_complete"
31717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31718$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31719  fi
31720
31721    # Verify that we indeed succeeded with this trick.
31722    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31723$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31724    "$LD" --version > /dev/null
31725    if test $? -eq 0 ; then
31726      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31727$as_echo "no" >&6; }
31728      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31729    else
31730      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31731$as_echo "yes" >&6; }
31732    fi
31733    LDCXX="$LD"
31734  else
31735    # All other toolchains use the compiler to link.
31736    LD="$CC"
31737    LDCXX="$CXX"
31738  fi
31739
31740  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31741
31742
31743  #
31744  # Setup the assembler (AS)
31745  #
31746  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31747    # FIXME: should this really be solaris, or solstudio?
31748
31749
31750  # Publish this variable in the help.
31751
31752
31753  if test "x$AS" = x; then
31754    # The variable is not set by user, try to locate tool using the code snippet
31755    for ac_prog in as
31756do
31757  # Extract the first word of "$ac_prog", so it can be a program name with args.
31758set dummy $ac_prog; ac_word=$2
31759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31760$as_echo_n "checking for $ac_word... " >&6; }
31761if ${ac_cv_path_AS+:} false; then :
31762  $as_echo_n "(cached) " >&6
31763else
31764  case $AS in
31765  [\\/]* | ?:[\\/]*)
31766  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31767  ;;
31768  *)
31769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31770for as_dir in $PATH
31771do
31772  IFS=$as_save_IFS
31773  test -z "$as_dir" && as_dir=.
31774    for ac_exec_ext in '' $ac_executable_extensions; do
31775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31776    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31778    break 2
31779  fi
31780done
31781  done
31782IFS=$as_save_IFS
31783
31784  ;;
31785esac
31786fi
31787AS=$ac_cv_path_AS
31788if test -n "$AS"; then
31789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31790$as_echo "$AS" >&6; }
31791else
31792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31793$as_echo "no" >&6; }
31794fi
31795
31796
31797  test -n "$AS" && break
31798done
31799
31800  else
31801    # The variable is set, but is it from the command line or the environment?
31802
31803    # Try to remove the string !AS! from our list.
31804    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31805    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31806      # If it failed, the variable was not from the command line. Ignore it,
31807      # but warn the user (except for BASH, which is always set by the calling BASH).
31808      if test "xAS" != xBASH; then
31809        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
31810$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
31811      fi
31812      # Try to locate tool using the code snippet
31813      for ac_prog in as
31814do
31815  # Extract the first word of "$ac_prog", so it can be a program name with args.
31816set dummy $ac_prog; ac_word=$2
31817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31818$as_echo_n "checking for $ac_word... " >&6; }
31819if ${ac_cv_path_AS+:} false; then :
31820  $as_echo_n "(cached) " >&6
31821else
31822  case $AS in
31823  [\\/]* | ?:[\\/]*)
31824  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31825  ;;
31826  *)
31827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31828for as_dir in $PATH
31829do
31830  IFS=$as_save_IFS
31831  test -z "$as_dir" && as_dir=.
31832    for ac_exec_ext in '' $ac_executable_extensions; do
31833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31834    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31836    break 2
31837  fi
31838done
31839  done
31840IFS=$as_save_IFS
31841
31842  ;;
31843esac
31844fi
31845AS=$ac_cv_path_AS
31846if test -n "$AS"; then
31847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31848$as_echo "$AS" >&6; }
31849else
31850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31851$as_echo "no" >&6; }
31852fi
31853
31854
31855  test -n "$AS" && break
31856done
31857
31858    else
31859      # If it succeeded, then it was overridden by the user. We will use it
31860      # for the tool.
31861
31862      # First remove it from the list of overridden variables, so we can test
31863      # for unknown variables in the end.
31864      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31865
31866      # Check if the provided tool contains a complete path.
31867      tool_specified="$AS"
31868      tool_basename="${tool_specified##*/}"
31869      if test "x$tool_basename" = "x$tool_specified"; then
31870        # A command without a complete path is provided, search $PATH.
31871        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
31872$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
31873        # Extract the first word of "$tool_basename", so it can be a program name with args.
31874set dummy $tool_basename; ac_word=$2
31875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31876$as_echo_n "checking for $ac_word... " >&6; }
31877if ${ac_cv_path_AS+:} false; then :
31878  $as_echo_n "(cached) " >&6
31879else
31880  case $AS in
31881  [\\/]* | ?:[\\/]*)
31882  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31883  ;;
31884  *)
31885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31886for as_dir in $PATH
31887do
31888  IFS=$as_save_IFS
31889  test -z "$as_dir" && as_dir=.
31890    for ac_exec_ext in '' $ac_executable_extensions; do
31891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31892    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31894    break 2
31895  fi
31896done
31897  done
31898IFS=$as_save_IFS
31899
31900  ;;
31901esac
31902fi
31903AS=$ac_cv_path_AS
31904if test -n "$AS"; then
31905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31906$as_echo "$AS" >&6; }
31907else
31908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31909$as_echo "no" >&6; }
31910fi
31911
31912
31913        if test "x$AS" = x; then
31914          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31915        fi
31916      else
31917        # Otherwise we believe it is a complete path. Use it as it is.
31918        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
31919$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
31920        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
31921$as_echo_n "checking for AS... " >&6; }
31922        if test ! -x "$tool_specified"; then
31923          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31924$as_echo "not found" >&6; }
31925          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
31926        fi
31927        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31928$as_echo "$tool_specified" >&6; }
31929      fi
31930    fi
31931  fi
31932
31933
31934
31935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31936
31937  # First separate the path from the arguments. This will split at the first
31938  # space.
31939  complete="$AS"
31940  path="${complete%% *}"
31941  tmp="$complete EOL"
31942  arguments="${tmp#* }"
31943
31944  # Input might be given as Windows format, start by converting to
31945  # unix format.
31946  new_path=`$CYGPATH -u "$path"`
31947
31948  # Now try to locate executable using which
31949  new_path=`$WHICH "$new_path" 2> /dev/null`
31950  # bat and cmd files are not always considered executable in cygwin causing which
31951  # to not find them
31952  if test "x$new_path" = x \
31953      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31954      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31955    new_path=`$CYGPATH -u "$path"`
31956  fi
31957  if test "x$new_path" = x; then
31958    # Oops. Which didn't find the executable.
31959    # The splitting of arguments from the executable at a space might have been incorrect,
31960    # since paths with space are more likely in Windows. Give it another try with the whole
31961    # argument.
31962    path="$complete"
31963    arguments="EOL"
31964    new_path=`$CYGPATH -u "$path"`
31965    new_path=`$WHICH "$new_path" 2> /dev/null`
31966    # bat and cmd files are not always considered executable in cygwin causing which
31967    # to not find them
31968    if test "x$new_path" = x \
31969        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31970        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31971      new_path=`$CYGPATH -u "$path"`
31972    fi
31973    if test "x$new_path" = x; then
31974      # It's still not found. Now this is an unrecoverable error.
31975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31976$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31977      has_space=`$ECHO "$complete" | $GREP " "`
31978      if test "x$has_space" != x; then
31979        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31980$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31981      fi
31982      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31983    fi
31984  fi
31985
31986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31989  # "foo.exe" is OK but "foo" is an error.
31990  #
31991  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31992  # It is also a way to make sure we got the proper file name for the real test later on.
31993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31994  if test "x$test_shortpath" = x; then
31995    # Short path failed, file does not exist as specified.
31996    # Try adding .exe or .cmd
31997    if test -f "${new_path}.exe"; then
31998      input_to_shortpath="${new_path}.exe"
31999    elif test -f "${new_path}.cmd"; then
32000      input_to_shortpath="${new_path}.cmd"
32001    else
32002      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32003$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32004      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32005$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32006      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32007    fi
32008  else
32009    input_to_shortpath="$new_path"
32010  fi
32011
32012  # Call helper function which possibly converts this using DOS-style short mode.
32013  # If so, the updated path is stored in $new_path.
32014  new_path="$input_to_shortpath"
32015
32016  input_path="$input_to_shortpath"
32017  # Check if we need to convert this using DOS-style short mode. If the path
32018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32019  # take no chances and rewrite it.
32020  # Note: m4 eats our [], so we need to use [ and ] instead.
32021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32022  if test "x$has_forbidden_chars" != x; then
32023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32024    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32025    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32026    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32027      # Going to short mode and back again did indeed matter. Since short mode is
32028      # case insensitive, let's make it lowercase to improve readability.
32029      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32030      # Now convert it back to Unix-stile (cygpath)
32031      input_path=`$CYGPATH -u "$shortmode_path"`
32032      new_path="$input_path"
32033    fi
32034  fi
32035
32036  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32037  if test "x$test_cygdrive_prefix" = x; then
32038    # As a simple fix, exclude /usr/bin since it's not a real path.
32039    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32040      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32041      # a path prefixed by /cygdrive for fixpath to work.
32042      new_path="$CYGWIN_ROOT_PATH$input_path"
32043    fi
32044  fi
32045
32046  # remove trailing .exe if any
32047  new_path="${new_path/%.exe/}"
32048
32049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32050
32051  # First separate the path from the arguments. This will split at the first
32052  # space.
32053  complete="$AS"
32054  path="${complete%% *}"
32055  tmp="$complete EOL"
32056  arguments="${tmp#* }"
32057
32058  # Input might be given as Windows format, start by converting to
32059  # unix format.
32060  new_path="$path"
32061
32062  windows_path="$new_path"
32063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32064    unix_path=`$CYGPATH -u "$windows_path"`
32065    new_path="$unix_path"
32066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32068    new_path="$unix_path"
32069  fi
32070
32071
32072  # Now try to locate executable using which
32073  new_path=`$WHICH "$new_path" 2> /dev/null`
32074
32075  if test "x$new_path" = x; then
32076    # Oops. Which didn't find the executable.
32077    # The splitting of arguments from the executable at a space might have been incorrect,
32078    # since paths with space are more likely in Windows. Give it another try with the whole
32079    # argument.
32080    path="$complete"
32081    arguments="EOL"
32082    new_path="$path"
32083
32084  windows_path="$new_path"
32085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32086    unix_path=`$CYGPATH -u "$windows_path"`
32087    new_path="$unix_path"
32088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32090    new_path="$unix_path"
32091  fi
32092
32093
32094    new_path=`$WHICH "$new_path" 2> /dev/null`
32095
32096    if test "x$new_path" = x; then
32097      # It's still not found. Now this is an unrecoverable error.
32098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32099$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32100      has_space=`$ECHO "$complete" | $GREP " "`
32101      if test "x$has_space" != x; then
32102        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32103$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32104      fi
32105      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32106    fi
32107  fi
32108
32109  # Now new_path has a complete unix path to the binary
32110  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32111    # Keep paths in /bin as-is, but remove trailing .exe if any
32112    new_path="${new_path/%.exe/}"
32113    # Do not save /bin paths to all_fixpath_prefixes!
32114  else
32115    # Not in mixed or Windows style, start by that.
32116    new_path=`cmd //c echo $new_path`
32117
32118  input_path="$new_path"
32119  # Check if we need to convert this using DOS-style short mode. If the path
32120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32121  # take no chances and rewrite it.
32122  # Note: m4 eats our [], so we need to use [ and ] instead.
32123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32124  if test "x$has_forbidden_chars" != x; then
32125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32126    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32127  fi
32128
32129    # Output is in $new_path
32130
32131  windows_path="$new_path"
32132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32133    unix_path=`$CYGPATH -u "$windows_path"`
32134    new_path="$unix_path"
32135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32137    new_path="$unix_path"
32138  fi
32139
32140    # remove trailing .exe if any
32141    new_path="${new_path/%.exe/}"
32142
32143    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32144    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32145  fi
32146
32147  else
32148    # We're on a posix platform. Hooray! :)
32149    # First separate the path from the arguments. This will split at the first
32150    # space.
32151    complete="$AS"
32152    path="${complete%% *}"
32153    tmp="$complete EOL"
32154    arguments="${tmp#* }"
32155
32156    # Cannot rely on the command "which" here since it doesn't always work.
32157    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32158    if test -z "$is_absolute_path"; then
32159      # Path to executable is not absolute. Find it.
32160      IFS_save="$IFS"
32161      IFS=:
32162      for p in $PATH; do
32163        if test -f "$p/$path" && test -x "$p/$path"; then
32164          new_path="$p/$path"
32165          break
32166        fi
32167      done
32168      IFS="$IFS_save"
32169    else
32170      # This is an absolute path, we can use it without further modifications.
32171      new_path="$path"
32172    fi
32173
32174    if test "x$new_path" = x; then
32175      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32176$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32177      has_space=`$ECHO "$complete" | $GREP " "`
32178      if test "x$has_space" != x; then
32179        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32180$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32181      fi
32182      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32183    fi
32184  fi
32185
32186  # Now join together the path and the arguments once again
32187  if test "x$arguments" != xEOL; then
32188    new_complete="$new_path ${arguments% *}"
32189  else
32190    new_complete="$new_path"
32191  fi
32192
32193  if test "x$complete" != "x$new_complete"; then
32194    AS="$new_complete"
32195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32196$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32197  fi
32198
32199  else
32200    # FIXME: is this correct for microsoft?
32201    AS="$CC -c"
32202  fi
32203
32204
32205  #
32206  # Setup the archiver (AR)
32207  #
32208  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32209    # The corresponding ar tool is lib.exe (used to create static libraries)
32210    # Extract the first word of "lib", so it can be a program name with args.
32211set dummy lib; ac_word=$2
32212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32213$as_echo_n "checking for $ac_word... " >&6; }
32214if ${ac_cv_prog_AR+:} false; then :
32215  $as_echo_n "(cached) " >&6
32216else
32217  if test -n "$AR"; then
32218  ac_cv_prog_AR="$AR" # Let the user override the test.
32219else
32220as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32221for as_dir in $PATH
32222do
32223  IFS=$as_save_IFS
32224  test -z "$as_dir" && as_dir=.
32225    for ac_exec_ext in '' $ac_executable_extensions; do
32226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32227    ac_cv_prog_AR="lib"
32228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32229    break 2
32230  fi
32231done
32232  done
32233IFS=$as_save_IFS
32234
32235fi
32236fi
32237AR=$ac_cv_prog_AR
32238if test -n "$AR"; then
32239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32240$as_echo "$AR" >&6; }
32241else
32242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32243$as_echo "no" >&6; }
32244fi
32245
32246
32247  else
32248
32249
32250  # Publish this variable in the help.
32251
32252
32253  if test "x$AR" = x; then
32254    # The variable is not set by user, try to locate tool using the code snippet
32255    if test -n "$ac_tool_prefix"; then
32256  for ac_prog in ar
32257  do
32258    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32259set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32261$as_echo_n "checking for $ac_word... " >&6; }
32262if ${ac_cv_prog_AR+:} false; then :
32263  $as_echo_n "(cached) " >&6
32264else
32265  if test -n "$AR"; then
32266  ac_cv_prog_AR="$AR" # Let the user override the test.
32267else
32268as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32269for as_dir in $PATH
32270do
32271  IFS=$as_save_IFS
32272  test -z "$as_dir" && as_dir=.
32273    for ac_exec_ext in '' $ac_executable_extensions; do
32274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32275    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32277    break 2
32278  fi
32279done
32280  done
32281IFS=$as_save_IFS
32282
32283fi
32284fi
32285AR=$ac_cv_prog_AR
32286if test -n "$AR"; then
32287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32288$as_echo "$AR" >&6; }
32289else
32290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32291$as_echo "no" >&6; }
32292fi
32293
32294
32295    test -n "$AR" && break
32296  done
32297fi
32298if test -z "$AR"; then
32299  ac_ct_AR=$AR
32300  for ac_prog in ar
32301do
32302  # Extract the first word of "$ac_prog", so it can be a program name with args.
32303set dummy $ac_prog; ac_word=$2
32304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32305$as_echo_n "checking for $ac_word... " >&6; }
32306if ${ac_cv_prog_ac_ct_AR+:} false; then :
32307  $as_echo_n "(cached) " >&6
32308else
32309  if test -n "$ac_ct_AR"; then
32310  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32311else
32312as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32313for as_dir in $PATH
32314do
32315  IFS=$as_save_IFS
32316  test -z "$as_dir" && as_dir=.
32317    for ac_exec_ext in '' $ac_executable_extensions; do
32318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32319    ac_cv_prog_ac_ct_AR="$ac_prog"
32320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32321    break 2
32322  fi
32323done
32324  done
32325IFS=$as_save_IFS
32326
32327fi
32328fi
32329ac_ct_AR=$ac_cv_prog_ac_ct_AR
32330if test -n "$ac_ct_AR"; then
32331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32332$as_echo "$ac_ct_AR" >&6; }
32333else
32334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32335$as_echo "no" >&6; }
32336fi
32337
32338
32339  test -n "$ac_ct_AR" && break
32340done
32341
32342  if test "x$ac_ct_AR" = x; then
32343    AR=""
32344  else
32345    case $cross_compiling:$ac_tool_warned in
32346yes:)
32347{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32348$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32349ac_tool_warned=yes ;;
32350esac
32351    AR=$ac_ct_AR
32352  fi
32353fi
32354
32355  else
32356    # The variable is set, but is it from the command line or the environment?
32357
32358    # Try to remove the string !AR! from our list.
32359    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32360    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32361      # If it failed, the variable was not from the command line. Ignore it,
32362      # but warn the user (except for BASH, which is always set by the calling BASH).
32363      if test "xAR" != xBASH; then
32364        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32365$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32366      fi
32367      # Try to locate tool using the code snippet
32368      if test -n "$ac_tool_prefix"; then
32369  for ac_prog in ar
32370  do
32371    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32372set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32374$as_echo_n "checking for $ac_word... " >&6; }
32375if ${ac_cv_prog_AR+:} false; then :
32376  $as_echo_n "(cached) " >&6
32377else
32378  if test -n "$AR"; then
32379  ac_cv_prog_AR="$AR" # Let the user override the test.
32380else
32381as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32382for as_dir in $PATH
32383do
32384  IFS=$as_save_IFS
32385  test -z "$as_dir" && as_dir=.
32386    for ac_exec_ext in '' $ac_executable_extensions; do
32387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32388    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32390    break 2
32391  fi
32392done
32393  done
32394IFS=$as_save_IFS
32395
32396fi
32397fi
32398AR=$ac_cv_prog_AR
32399if test -n "$AR"; then
32400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32401$as_echo "$AR" >&6; }
32402else
32403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32404$as_echo "no" >&6; }
32405fi
32406
32407
32408    test -n "$AR" && break
32409  done
32410fi
32411if test -z "$AR"; then
32412  ac_ct_AR=$AR
32413  for ac_prog in ar
32414do
32415  # Extract the first word of "$ac_prog", so it can be a program name with args.
32416set dummy $ac_prog; ac_word=$2
32417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32418$as_echo_n "checking for $ac_word... " >&6; }
32419if ${ac_cv_prog_ac_ct_AR+:} false; then :
32420  $as_echo_n "(cached) " >&6
32421else
32422  if test -n "$ac_ct_AR"; then
32423  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32424else
32425as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32426for as_dir in $PATH
32427do
32428  IFS=$as_save_IFS
32429  test -z "$as_dir" && as_dir=.
32430    for ac_exec_ext in '' $ac_executable_extensions; do
32431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32432    ac_cv_prog_ac_ct_AR="$ac_prog"
32433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32434    break 2
32435  fi
32436done
32437  done
32438IFS=$as_save_IFS
32439
32440fi
32441fi
32442ac_ct_AR=$ac_cv_prog_ac_ct_AR
32443if test -n "$ac_ct_AR"; then
32444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32445$as_echo "$ac_ct_AR" >&6; }
32446else
32447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32448$as_echo "no" >&6; }
32449fi
32450
32451
32452  test -n "$ac_ct_AR" && break
32453done
32454
32455  if test "x$ac_ct_AR" = x; then
32456    AR=""
32457  else
32458    case $cross_compiling:$ac_tool_warned in
32459yes:)
32460{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32461$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32462ac_tool_warned=yes ;;
32463esac
32464    AR=$ac_ct_AR
32465  fi
32466fi
32467
32468    else
32469      # If it succeeded, then it was overridden by the user. We will use it
32470      # for the tool.
32471
32472      # First remove it from the list of overridden variables, so we can test
32473      # for unknown variables in the end.
32474      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32475
32476      # Check if the provided tool contains a complete path.
32477      tool_specified="$AR"
32478      tool_basename="${tool_specified##*/}"
32479      if test "x$tool_basename" = "x$tool_specified"; then
32480        # A command without a complete path is provided, search $PATH.
32481        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32482$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32483        # Extract the first word of "$tool_basename", so it can be a program name with args.
32484set dummy $tool_basename; ac_word=$2
32485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32486$as_echo_n "checking for $ac_word... " >&6; }
32487if ${ac_cv_path_AR+:} false; then :
32488  $as_echo_n "(cached) " >&6
32489else
32490  case $AR in
32491  [\\/]* | ?:[\\/]*)
32492  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32493  ;;
32494  *)
32495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32496for as_dir in $PATH
32497do
32498  IFS=$as_save_IFS
32499  test -z "$as_dir" && as_dir=.
32500    for ac_exec_ext in '' $ac_executable_extensions; do
32501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32502    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32504    break 2
32505  fi
32506done
32507  done
32508IFS=$as_save_IFS
32509
32510  ;;
32511esac
32512fi
32513AR=$ac_cv_path_AR
32514if test -n "$AR"; then
32515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32516$as_echo "$AR" >&6; }
32517else
32518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32519$as_echo "no" >&6; }
32520fi
32521
32522
32523        if test "x$AR" = x; then
32524          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32525        fi
32526      else
32527        # Otherwise we believe it is a complete path. Use it as it is.
32528        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32529$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32530        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32531$as_echo_n "checking for AR... " >&6; }
32532        if test ! -x "$tool_specified"; then
32533          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32534$as_echo "not found" >&6; }
32535          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32536        fi
32537        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32538$as_echo "$tool_specified" >&6; }
32539      fi
32540    fi
32541  fi
32542
32543
32544  fi
32545
32546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32547
32548  # First separate the path from the arguments. This will split at the first
32549  # space.
32550  complete="$AR"
32551  path="${complete%% *}"
32552  tmp="$complete EOL"
32553  arguments="${tmp#* }"
32554
32555  # Input might be given as Windows format, start by converting to
32556  # unix format.
32557  new_path=`$CYGPATH -u "$path"`
32558
32559  # Now try to locate executable using which
32560  new_path=`$WHICH "$new_path" 2> /dev/null`
32561  # bat and cmd files are not always considered executable in cygwin causing which
32562  # to not find them
32563  if test "x$new_path" = x \
32564      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32565      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32566    new_path=`$CYGPATH -u "$path"`
32567  fi
32568  if test "x$new_path" = x; then
32569    # Oops. Which didn't find the executable.
32570    # The splitting of arguments from the executable at a space might have been incorrect,
32571    # since paths with space are more likely in Windows. Give it another try with the whole
32572    # argument.
32573    path="$complete"
32574    arguments="EOL"
32575    new_path=`$CYGPATH -u "$path"`
32576    new_path=`$WHICH "$new_path" 2> /dev/null`
32577    # bat and cmd files are not always considered executable in cygwin causing which
32578    # to not find them
32579    if test "x$new_path" = x \
32580        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32581        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32582      new_path=`$CYGPATH -u "$path"`
32583    fi
32584    if test "x$new_path" = x; then
32585      # It's still not found. Now this is an unrecoverable error.
32586      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32587$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32588      has_space=`$ECHO "$complete" | $GREP " "`
32589      if test "x$has_space" != x; then
32590        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32591$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32592      fi
32593      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32594    fi
32595  fi
32596
32597  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32598  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32599  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32600  # "foo.exe" is OK but "foo" is an error.
32601  #
32602  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32603  # It is also a way to make sure we got the proper file name for the real test later on.
32604  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32605  if test "x$test_shortpath" = x; then
32606    # Short path failed, file does not exist as specified.
32607    # Try adding .exe or .cmd
32608    if test -f "${new_path}.exe"; then
32609      input_to_shortpath="${new_path}.exe"
32610    elif test -f "${new_path}.cmd"; then
32611      input_to_shortpath="${new_path}.cmd"
32612    else
32613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32614$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32615      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32616$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32617      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32618    fi
32619  else
32620    input_to_shortpath="$new_path"
32621  fi
32622
32623  # Call helper function which possibly converts this using DOS-style short mode.
32624  # If so, the updated path is stored in $new_path.
32625  new_path="$input_to_shortpath"
32626
32627  input_path="$input_to_shortpath"
32628  # Check if we need to convert this using DOS-style short mode. If the path
32629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32630  # take no chances and rewrite it.
32631  # Note: m4 eats our [], so we need to use [ and ] instead.
32632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32633  if test "x$has_forbidden_chars" != x; then
32634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32635    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32636    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32637    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32638      # Going to short mode and back again did indeed matter. Since short mode is
32639      # case insensitive, let's make it lowercase to improve readability.
32640      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32641      # Now convert it back to Unix-stile (cygpath)
32642      input_path=`$CYGPATH -u "$shortmode_path"`
32643      new_path="$input_path"
32644    fi
32645  fi
32646
32647  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32648  if test "x$test_cygdrive_prefix" = x; then
32649    # As a simple fix, exclude /usr/bin since it's not a real path.
32650    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32651      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32652      # a path prefixed by /cygdrive for fixpath to work.
32653      new_path="$CYGWIN_ROOT_PATH$input_path"
32654    fi
32655  fi
32656
32657  # remove trailing .exe if any
32658  new_path="${new_path/%.exe/}"
32659
32660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32661
32662  # First separate the path from the arguments. This will split at the first
32663  # space.
32664  complete="$AR"
32665  path="${complete%% *}"
32666  tmp="$complete EOL"
32667  arguments="${tmp#* }"
32668
32669  # Input might be given as Windows format, start by converting to
32670  # unix format.
32671  new_path="$path"
32672
32673  windows_path="$new_path"
32674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32675    unix_path=`$CYGPATH -u "$windows_path"`
32676    new_path="$unix_path"
32677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32679    new_path="$unix_path"
32680  fi
32681
32682
32683  # Now try to locate executable using which
32684  new_path=`$WHICH "$new_path" 2> /dev/null`
32685
32686  if test "x$new_path" = x; then
32687    # Oops. Which didn't find the executable.
32688    # The splitting of arguments from the executable at a space might have been incorrect,
32689    # since paths with space are more likely in Windows. Give it another try with the whole
32690    # argument.
32691    path="$complete"
32692    arguments="EOL"
32693    new_path="$path"
32694
32695  windows_path="$new_path"
32696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32697    unix_path=`$CYGPATH -u "$windows_path"`
32698    new_path="$unix_path"
32699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32701    new_path="$unix_path"
32702  fi
32703
32704
32705    new_path=`$WHICH "$new_path" 2> /dev/null`
32706
32707    if test "x$new_path" = x; then
32708      # It's still not found. Now this is an unrecoverable error.
32709      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32710$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32711      has_space=`$ECHO "$complete" | $GREP " "`
32712      if test "x$has_space" != x; then
32713        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32714$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32715      fi
32716      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32717    fi
32718  fi
32719
32720  # Now new_path has a complete unix path to the binary
32721  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32722    # Keep paths in /bin as-is, but remove trailing .exe if any
32723    new_path="${new_path/%.exe/}"
32724    # Do not save /bin paths to all_fixpath_prefixes!
32725  else
32726    # Not in mixed or Windows style, start by that.
32727    new_path=`cmd //c echo $new_path`
32728
32729  input_path="$new_path"
32730  # Check if we need to convert this using DOS-style short mode. If the path
32731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32732  # take no chances and rewrite it.
32733  # Note: m4 eats our [], so we need to use [ and ] instead.
32734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32735  if test "x$has_forbidden_chars" != x; then
32736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32737    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32738  fi
32739
32740    # Output is in $new_path
32741
32742  windows_path="$new_path"
32743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32744    unix_path=`$CYGPATH -u "$windows_path"`
32745    new_path="$unix_path"
32746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32748    new_path="$unix_path"
32749  fi
32750
32751    # remove trailing .exe if any
32752    new_path="${new_path/%.exe/}"
32753
32754    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32755    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32756  fi
32757
32758  else
32759    # We're on a posix platform. Hooray! :)
32760    # First separate the path from the arguments. This will split at the first
32761    # space.
32762    complete="$AR"
32763    path="${complete%% *}"
32764    tmp="$complete EOL"
32765    arguments="${tmp#* }"
32766
32767    # Cannot rely on the command "which" here since it doesn't always work.
32768    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32769    if test -z "$is_absolute_path"; then
32770      # Path to executable is not absolute. Find it.
32771      IFS_save="$IFS"
32772      IFS=:
32773      for p in $PATH; do
32774        if test -f "$p/$path" && test -x "$p/$path"; then
32775          new_path="$p/$path"
32776          break
32777        fi
32778      done
32779      IFS="$IFS_save"
32780    else
32781      # This is an absolute path, we can use it without further modifications.
32782      new_path="$path"
32783    fi
32784
32785    if test "x$new_path" = x; then
32786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32787$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32788      has_space=`$ECHO "$complete" | $GREP " "`
32789      if test "x$has_space" != x; then
32790        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32791$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32792      fi
32793      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32794    fi
32795  fi
32796
32797  # Now join together the path and the arguments once again
32798  if test "x$arguments" != xEOL; then
32799    new_complete="$new_path ${arguments% *}"
32800  else
32801    new_complete="$new_path"
32802  fi
32803
32804  if test "x$complete" != "x$new_complete"; then
32805    AR="$new_complete"
32806    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32807$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32808  fi
32809
32810
32811
32812  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
32813    ac_ext=m
32814ac_cpp='$OBJCPP $CPPFLAGS'
32815ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32816ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32817ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32818if test -n "$ac_tool_prefix"; then
32819  for ac_prog in gcc objcc objc cc CC
32820  do
32821    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32822set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32824$as_echo_n "checking for $ac_word... " >&6; }
32825if ${ac_cv_prog_OBJC+:} false; then :
32826  $as_echo_n "(cached) " >&6
32827else
32828  if test -n "$OBJC"; then
32829  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32830else
32831as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32832for as_dir in $PATH
32833do
32834  IFS=$as_save_IFS
32835  test -z "$as_dir" && as_dir=.
32836    for ac_exec_ext in '' $ac_executable_extensions; do
32837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32838    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32840    break 2
32841  fi
32842done
32843  done
32844IFS=$as_save_IFS
32845
32846fi
32847fi
32848OBJC=$ac_cv_prog_OBJC
32849if test -n "$OBJC"; then
32850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
32851$as_echo "$OBJC" >&6; }
32852else
32853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32854$as_echo "no" >&6; }
32855fi
32856
32857
32858    test -n "$OBJC" && break
32859  done
32860fi
32861if test -z "$OBJC"; then
32862  ac_ct_OBJC=$OBJC
32863  for ac_prog in gcc objcc objc cc CC
32864do
32865  # Extract the first word of "$ac_prog", so it can be a program name with args.
32866set dummy $ac_prog; ac_word=$2
32867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32868$as_echo_n "checking for $ac_word... " >&6; }
32869if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
32870  $as_echo_n "(cached) " >&6
32871else
32872  if test -n "$ac_ct_OBJC"; then
32873  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
32874else
32875as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32876for as_dir in $PATH
32877do
32878  IFS=$as_save_IFS
32879  test -z "$as_dir" && as_dir=.
32880    for ac_exec_ext in '' $ac_executable_extensions; do
32881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32882    ac_cv_prog_ac_ct_OBJC="$ac_prog"
32883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32884    break 2
32885  fi
32886done
32887  done
32888IFS=$as_save_IFS
32889
32890fi
32891fi
32892ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
32893if test -n "$ac_ct_OBJC"; then
32894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
32895$as_echo "$ac_ct_OBJC" >&6; }
32896else
32897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32898$as_echo "no" >&6; }
32899fi
32900
32901
32902  test -n "$ac_ct_OBJC" && break
32903done
32904
32905  if test "x$ac_ct_OBJC" = x; then
32906    OBJC="gcc"
32907  else
32908    case $cross_compiling:$ac_tool_warned in
32909yes:)
32910{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32911$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32912ac_tool_warned=yes ;;
32913esac
32914    OBJC=$ac_ct_OBJC
32915  fi
32916fi
32917
32918# Provide some information about the compiler.
32919$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
32920set X $ac_compile
32921ac_compiler=$2
32922for ac_option in --version -v -V -qversion; do
32923  { { ac_try="$ac_compiler $ac_option >&5"
32924case "(($ac_try" in
32925  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32926  *) ac_try_echo=$ac_try;;
32927esac
32928eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32929$as_echo "$ac_try_echo"; } >&5
32930  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32931  ac_status=$?
32932  if test -s conftest.err; then
32933    sed '10a\
32934... rest of stderr output deleted ...
32935         10q' conftest.err >conftest.er1
32936    cat conftest.er1 >&5
32937  fi
32938  rm -f conftest.er1 conftest.err
32939  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32940  test $ac_status = 0; }
32941done
32942
32943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
32944$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
32945if ${ac_cv_objc_compiler_gnu+:} false; then :
32946  $as_echo_n "(cached) " >&6
32947else
32948  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32949/* end confdefs.h.  */
32950
32951int
32952main ()
32953{
32954#ifndef __GNUC__
32955       choke me
32956#endif
32957
32958  ;
32959  return 0;
32960}
32961_ACEOF
32962if ac_fn_objc_try_compile "$LINENO"; then :
32963  ac_compiler_gnu=yes
32964else
32965  ac_compiler_gnu=no
32966fi
32967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32968ac_cv_objc_compiler_gnu=$ac_compiler_gnu
32969
32970fi
32971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
32972$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
32973if test $ac_compiler_gnu = yes; then
32974  GOBJC=yes
32975else
32976  GOBJC=
32977fi
32978ac_test_OBJCFLAGS=${OBJCFLAGS+set}
32979ac_save_OBJCFLAGS=$OBJCFLAGS
32980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
32981$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
32982if ${ac_cv_prog_objc_g+:} false; then :
32983  $as_echo_n "(cached) " >&6
32984else
32985  ac_save_objc_werror_flag=$ac_objc_werror_flag
32986   ac_objc_werror_flag=yes
32987   ac_cv_prog_objc_g=no
32988   OBJCFLAGS="-g"
32989   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32990/* end confdefs.h.  */
32991
32992int
32993main ()
32994{
32995
32996  ;
32997  return 0;
32998}
32999_ACEOF
33000if ac_fn_objc_try_compile "$LINENO"; then :
33001  ac_cv_prog_objc_g=yes
33002else
33003  OBJCFLAGS=""
33004      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33005/* end confdefs.h.  */
33006
33007int
33008main ()
33009{
33010
33011  ;
33012  return 0;
33013}
33014_ACEOF
33015if ac_fn_objc_try_compile "$LINENO"; then :
33016
33017else
33018  ac_objc_werror_flag=$ac_save_objc_werror_flag
33019	 OBJCFLAGS="-g"
33020	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33021/* end confdefs.h.  */
33022
33023int
33024main ()
33025{
33026
33027  ;
33028  return 0;
33029}
33030_ACEOF
33031if ac_fn_objc_try_compile "$LINENO"; then :
33032  ac_cv_prog_objc_g=yes
33033fi
33034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33035fi
33036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33037fi
33038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33039   ac_objc_werror_flag=$ac_save_objc_werror_flag
33040fi
33041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33042$as_echo "$ac_cv_prog_objc_g" >&6; }
33043if test "$ac_test_OBJCFLAGS" = set; then
33044  OBJCFLAGS=$ac_save_OBJCFLAGS
33045elif test $ac_cv_prog_objc_g = yes; then
33046  if test "$GOBJC" = yes; then
33047    OBJCFLAGS="-g -O2"
33048  else
33049    OBJCFLAGS="-g"
33050  fi
33051else
33052  if test "$GOBJC" = yes; then
33053    OBJCFLAGS="-O2"
33054  else
33055    OBJCFLAGS=
33056  fi
33057fi
33058ac_ext=cpp
33059ac_cpp='$CXXCPP $CPPFLAGS'
33060ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33061ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33062ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33063
33064
33065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33066
33067  # First separate the path from the arguments. This will split at the first
33068  # space.
33069  complete="$OBJC"
33070  path="${complete%% *}"
33071  tmp="$complete EOL"
33072  arguments="${tmp#* }"
33073
33074  # Input might be given as Windows format, start by converting to
33075  # unix format.
33076  new_path=`$CYGPATH -u "$path"`
33077
33078  # Now try to locate executable using which
33079  new_path=`$WHICH "$new_path" 2> /dev/null`
33080  # bat and cmd files are not always considered executable in cygwin causing which
33081  # to not find them
33082  if test "x$new_path" = x \
33083      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33084      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33085    new_path=`$CYGPATH -u "$path"`
33086  fi
33087  if test "x$new_path" = x; then
33088    # Oops. Which didn't find the executable.
33089    # The splitting of arguments from the executable at a space might have been incorrect,
33090    # since paths with space are more likely in Windows. Give it another try with the whole
33091    # argument.
33092    path="$complete"
33093    arguments="EOL"
33094    new_path=`$CYGPATH -u "$path"`
33095    new_path=`$WHICH "$new_path" 2> /dev/null`
33096    # bat and cmd files are not always considered executable in cygwin causing which
33097    # to not find them
33098    if test "x$new_path" = x \
33099        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33100        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33101      new_path=`$CYGPATH -u "$path"`
33102    fi
33103    if test "x$new_path" = x; then
33104      # It's still not found. Now this is an unrecoverable error.
33105      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33106$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33107      has_space=`$ECHO "$complete" | $GREP " "`
33108      if test "x$has_space" != x; then
33109        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33110$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33111      fi
33112      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33113    fi
33114  fi
33115
33116  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33117  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33118  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33119  # "foo.exe" is OK but "foo" is an error.
33120  #
33121  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33122  # It is also a way to make sure we got the proper file name for the real test later on.
33123  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33124  if test "x$test_shortpath" = x; then
33125    # Short path failed, file does not exist as specified.
33126    # Try adding .exe or .cmd
33127    if test -f "${new_path}.exe"; then
33128      input_to_shortpath="${new_path}.exe"
33129    elif test -f "${new_path}.cmd"; then
33130      input_to_shortpath="${new_path}.cmd"
33131    else
33132      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33133$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33134      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33135$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33136      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33137    fi
33138  else
33139    input_to_shortpath="$new_path"
33140  fi
33141
33142  # Call helper function which possibly converts this using DOS-style short mode.
33143  # If so, the updated path is stored in $new_path.
33144  new_path="$input_to_shortpath"
33145
33146  input_path="$input_to_shortpath"
33147  # Check if we need to convert this using DOS-style short mode. If the path
33148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33149  # take no chances and rewrite it.
33150  # Note: m4 eats our [], so we need to use [ and ] instead.
33151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33152  if test "x$has_forbidden_chars" != x; then
33153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33154    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33155    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33156    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33157      # Going to short mode and back again did indeed matter. Since short mode is
33158      # case insensitive, let's make it lowercase to improve readability.
33159      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33160      # Now convert it back to Unix-stile (cygpath)
33161      input_path=`$CYGPATH -u "$shortmode_path"`
33162      new_path="$input_path"
33163    fi
33164  fi
33165
33166  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33167  if test "x$test_cygdrive_prefix" = x; then
33168    # As a simple fix, exclude /usr/bin since it's not a real path.
33169    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33170      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33171      # a path prefixed by /cygdrive for fixpath to work.
33172      new_path="$CYGWIN_ROOT_PATH$input_path"
33173    fi
33174  fi
33175
33176  # remove trailing .exe if any
33177  new_path="${new_path/%.exe/}"
33178
33179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33180
33181  # First separate the path from the arguments. This will split at the first
33182  # space.
33183  complete="$OBJC"
33184  path="${complete%% *}"
33185  tmp="$complete EOL"
33186  arguments="${tmp#* }"
33187
33188  # Input might be given as Windows format, start by converting to
33189  # unix format.
33190  new_path="$path"
33191
33192  windows_path="$new_path"
33193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33194    unix_path=`$CYGPATH -u "$windows_path"`
33195    new_path="$unix_path"
33196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33198    new_path="$unix_path"
33199  fi
33200
33201
33202  # Now try to locate executable using which
33203  new_path=`$WHICH "$new_path" 2> /dev/null`
33204
33205  if test "x$new_path" = x; then
33206    # Oops. Which didn't find the executable.
33207    # The splitting of arguments from the executable at a space might have been incorrect,
33208    # since paths with space are more likely in Windows. Give it another try with the whole
33209    # argument.
33210    path="$complete"
33211    arguments="EOL"
33212    new_path="$path"
33213
33214  windows_path="$new_path"
33215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33216    unix_path=`$CYGPATH -u "$windows_path"`
33217    new_path="$unix_path"
33218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33220    new_path="$unix_path"
33221  fi
33222
33223
33224    new_path=`$WHICH "$new_path" 2> /dev/null`
33225
33226    if test "x$new_path" = x; then
33227      # It's still not found. Now this is an unrecoverable error.
33228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33229$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33230      has_space=`$ECHO "$complete" | $GREP " "`
33231      if test "x$has_space" != x; then
33232        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33233$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33234      fi
33235      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33236    fi
33237  fi
33238
33239  # Now new_path has a complete unix path to the binary
33240  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33241    # Keep paths in /bin as-is, but remove trailing .exe if any
33242    new_path="${new_path/%.exe/}"
33243    # Do not save /bin paths to all_fixpath_prefixes!
33244  else
33245    # Not in mixed or Windows style, start by that.
33246    new_path=`cmd //c echo $new_path`
33247
33248  input_path="$new_path"
33249  # Check if we need to convert this using DOS-style short mode. If the path
33250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33251  # take no chances and rewrite it.
33252  # Note: m4 eats our [], so we need to use [ and ] instead.
33253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33254  if test "x$has_forbidden_chars" != x; then
33255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33256    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33257  fi
33258
33259    # Output is in $new_path
33260
33261  windows_path="$new_path"
33262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33263    unix_path=`$CYGPATH -u "$windows_path"`
33264    new_path="$unix_path"
33265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33267    new_path="$unix_path"
33268  fi
33269
33270    # remove trailing .exe if any
33271    new_path="${new_path/%.exe/}"
33272
33273    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33274    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33275  fi
33276
33277  else
33278    # We're on a posix platform. Hooray! :)
33279    # First separate the path from the arguments. This will split at the first
33280    # space.
33281    complete="$OBJC"
33282    path="${complete%% *}"
33283    tmp="$complete EOL"
33284    arguments="${tmp#* }"
33285
33286    # Cannot rely on the command "which" here since it doesn't always work.
33287    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33288    if test -z "$is_absolute_path"; then
33289      # Path to executable is not absolute. Find it.
33290      IFS_save="$IFS"
33291      IFS=:
33292      for p in $PATH; do
33293        if test -f "$p/$path" && test -x "$p/$path"; then
33294          new_path="$p/$path"
33295          break
33296        fi
33297      done
33298      IFS="$IFS_save"
33299    else
33300      # This is an absolute path, we can use it without further modifications.
33301      new_path="$path"
33302    fi
33303
33304    if test "x$new_path" = x; then
33305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33306$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33307      has_space=`$ECHO "$complete" | $GREP " "`
33308      if test "x$has_space" != x; then
33309        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33310$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33311      fi
33312      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33313    fi
33314  fi
33315
33316  # Now join together the path and the arguments once again
33317  if test "x$arguments" != xEOL; then
33318    new_complete="$new_path ${arguments% *}"
33319  else
33320    new_complete="$new_path"
33321  fi
33322
33323  if test "x$complete" != "x$new_complete"; then
33324    OBJC="$new_complete"
33325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33326$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33327  fi
33328
33329
33330
33331  # Publish this variable in the help.
33332
33333
33334  if test "x$LIPO" = x; then
33335    # The variable is not set by user, try to locate tool using the code snippet
33336    for ac_prog in lipo
33337do
33338  # Extract the first word of "$ac_prog", so it can be a program name with args.
33339set dummy $ac_prog; ac_word=$2
33340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33341$as_echo_n "checking for $ac_word... " >&6; }
33342if ${ac_cv_path_LIPO+:} false; then :
33343  $as_echo_n "(cached) " >&6
33344else
33345  case $LIPO in
33346  [\\/]* | ?:[\\/]*)
33347  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33348  ;;
33349  *)
33350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33351for as_dir in $PATH
33352do
33353  IFS=$as_save_IFS
33354  test -z "$as_dir" && as_dir=.
33355    for ac_exec_ext in '' $ac_executable_extensions; do
33356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33357    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33359    break 2
33360  fi
33361done
33362  done
33363IFS=$as_save_IFS
33364
33365  ;;
33366esac
33367fi
33368LIPO=$ac_cv_path_LIPO
33369if test -n "$LIPO"; then
33370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33371$as_echo "$LIPO" >&6; }
33372else
33373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33374$as_echo "no" >&6; }
33375fi
33376
33377
33378  test -n "$LIPO" && break
33379done
33380
33381  else
33382    # The variable is set, but is it from the command line or the environment?
33383
33384    # Try to remove the string !LIPO! from our list.
33385    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33386    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33387      # If it failed, the variable was not from the command line. Ignore it,
33388      # but warn the user (except for BASH, which is always set by the calling BASH).
33389      if test "xLIPO" != xBASH; then
33390        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33391$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33392      fi
33393      # Try to locate tool using the code snippet
33394      for ac_prog in lipo
33395do
33396  # Extract the first word of "$ac_prog", so it can be a program name with args.
33397set dummy $ac_prog; ac_word=$2
33398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33399$as_echo_n "checking for $ac_word... " >&6; }
33400if ${ac_cv_path_LIPO+:} false; then :
33401  $as_echo_n "(cached) " >&6
33402else
33403  case $LIPO in
33404  [\\/]* | ?:[\\/]*)
33405  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33406  ;;
33407  *)
33408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33409for as_dir in $PATH
33410do
33411  IFS=$as_save_IFS
33412  test -z "$as_dir" && as_dir=.
33413    for ac_exec_ext in '' $ac_executable_extensions; do
33414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33415    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33417    break 2
33418  fi
33419done
33420  done
33421IFS=$as_save_IFS
33422
33423  ;;
33424esac
33425fi
33426LIPO=$ac_cv_path_LIPO
33427if test -n "$LIPO"; then
33428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33429$as_echo "$LIPO" >&6; }
33430else
33431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33432$as_echo "no" >&6; }
33433fi
33434
33435
33436  test -n "$LIPO" && break
33437done
33438
33439    else
33440      # If it succeeded, then it was overridden by the user. We will use it
33441      # for the tool.
33442
33443      # First remove it from the list of overridden variables, so we can test
33444      # for unknown variables in the end.
33445      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33446
33447      # Check if the provided tool contains a complete path.
33448      tool_specified="$LIPO"
33449      tool_basename="${tool_specified##*/}"
33450      if test "x$tool_basename" = "x$tool_specified"; then
33451        # A command without a complete path is provided, search $PATH.
33452        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33453$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33454        # Extract the first word of "$tool_basename", so it can be a program name with args.
33455set dummy $tool_basename; ac_word=$2
33456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33457$as_echo_n "checking for $ac_word... " >&6; }
33458if ${ac_cv_path_LIPO+:} false; then :
33459  $as_echo_n "(cached) " >&6
33460else
33461  case $LIPO in
33462  [\\/]* | ?:[\\/]*)
33463  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33464  ;;
33465  *)
33466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33467for as_dir in $PATH
33468do
33469  IFS=$as_save_IFS
33470  test -z "$as_dir" && as_dir=.
33471    for ac_exec_ext in '' $ac_executable_extensions; do
33472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33473    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33475    break 2
33476  fi
33477done
33478  done
33479IFS=$as_save_IFS
33480
33481  ;;
33482esac
33483fi
33484LIPO=$ac_cv_path_LIPO
33485if test -n "$LIPO"; then
33486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33487$as_echo "$LIPO" >&6; }
33488else
33489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33490$as_echo "no" >&6; }
33491fi
33492
33493
33494        if test "x$LIPO" = x; then
33495          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33496        fi
33497      else
33498        # Otherwise we believe it is a complete path. Use it as it is.
33499        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33500$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33501        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33502$as_echo_n "checking for LIPO... " >&6; }
33503        if test ! -x "$tool_specified"; then
33504          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33505$as_echo "not found" >&6; }
33506          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33507        fi
33508        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33509$as_echo "$tool_specified" >&6; }
33510      fi
33511    fi
33512  fi
33513
33514
33515
33516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33517
33518  # First separate the path from the arguments. This will split at the first
33519  # space.
33520  complete="$LIPO"
33521  path="${complete%% *}"
33522  tmp="$complete EOL"
33523  arguments="${tmp#* }"
33524
33525  # Input might be given as Windows format, start by converting to
33526  # unix format.
33527  new_path=`$CYGPATH -u "$path"`
33528
33529  # Now try to locate executable using which
33530  new_path=`$WHICH "$new_path" 2> /dev/null`
33531  # bat and cmd files are not always considered executable in cygwin causing which
33532  # to not find them
33533  if test "x$new_path" = x \
33534      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33535      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33536    new_path=`$CYGPATH -u "$path"`
33537  fi
33538  if test "x$new_path" = x; then
33539    # Oops. Which didn't find the executable.
33540    # The splitting of arguments from the executable at a space might have been incorrect,
33541    # since paths with space are more likely in Windows. Give it another try with the whole
33542    # argument.
33543    path="$complete"
33544    arguments="EOL"
33545    new_path=`$CYGPATH -u "$path"`
33546    new_path=`$WHICH "$new_path" 2> /dev/null`
33547    # bat and cmd files are not always considered executable in cygwin causing which
33548    # to not find them
33549    if test "x$new_path" = x \
33550        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33551        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33552      new_path=`$CYGPATH -u "$path"`
33553    fi
33554    if test "x$new_path" = x; then
33555      # It's still not found. Now this is an unrecoverable error.
33556      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33557$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33558      has_space=`$ECHO "$complete" | $GREP " "`
33559      if test "x$has_space" != x; then
33560        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33561$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33562      fi
33563      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33564    fi
33565  fi
33566
33567  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33568  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33569  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33570  # "foo.exe" is OK but "foo" is an error.
33571  #
33572  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33573  # It is also a way to make sure we got the proper file name for the real test later on.
33574  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33575  if test "x$test_shortpath" = x; then
33576    # Short path failed, file does not exist as specified.
33577    # Try adding .exe or .cmd
33578    if test -f "${new_path}.exe"; then
33579      input_to_shortpath="${new_path}.exe"
33580    elif test -f "${new_path}.cmd"; then
33581      input_to_shortpath="${new_path}.cmd"
33582    else
33583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33584$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33585      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33586$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33587      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33588    fi
33589  else
33590    input_to_shortpath="$new_path"
33591  fi
33592
33593  # Call helper function which possibly converts this using DOS-style short mode.
33594  # If so, the updated path is stored in $new_path.
33595  new_path="$input_to_shortpath"
33596
33597  input_path="$input_to_shortpath"
33598  # Check if we need to convert this using DOS-style short mode. If the path
33599  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33600  # take no chances and rewrite it.
33601  # Note: m4 eats our [], so we need to use [ and ] instead.
33602  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33603  if test "x$has_forbidden_chars" != x; then
33604    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33605    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33606    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33607    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33608      # Going to short mode and back again did indeed matter. Since short mode is
33609      # case insensitive, let's make it lowercase to improve readability.
33610      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33611      # Now convert it back to Unix-stile (cygpath)
33612      input_path=`$CYGPATH -u "$shortmode_path"`
33613      new_path="$input_path"
33614    fi
33615  fi
33616
33617  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33618  if test "x$test_cygdrive_prefix" = x; then
33619    # As a simple fix, exclude /usr/bin since it's not a real path.
33620    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33621      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33622      # a path prefixed by /cygdrive for fixpath to work.
33623      new_path="$CYGWIN_ROOT_PATH$input_path"
33624    fi
33625  fi
33626
33627  # remove trailing .exe if any
33628  new_path="${new_path/%.exe/}"
33629
33630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33631
33632  # First separate the path from the arguments. This will split at the first
33633  # space.
33634  complete="$LIPO"
33635  path="${complete%% *}"
33636  tmp="$complete EOL"
33637  arguments="${tmp#* }"
33638
33639  # Input might be given as Windows format, start by converting to
33640  # unix format.
33641  new_path="$path"
33642
33643  windows_path="$new_path"
33644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33645    unix_path=`$CYGPATH -u "$windows_path"`
33646    new_path="$unix_path"
33647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33649    new_path="$unix_path"
33650  fi
33651
33652
33653  # Now try to locate executable using which
33654  new_path=`$WHICH "$new_path" 2> /dev/null`
33655
33656  if test "x$new_path" = x; then
33657    # Oops. Which didn't find the executable.
33658    # The splitting of arguments from the executable at a space might have been incorrect,
33659    # since paths with space are more likely in Windows. Give it another try with the whole
33660    # argument.
33661    path="$complete"
33662    arguments="EOL"
33663    new_path="$path"
33664
33665  windows_path="$new_path"
33666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33667    unix_path=`$CYGPATH -u "$windows_path"`
33668    new_path="$unix_path"
33669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33671    new_path="$unix_path"
33672  fi
33673
33674
33675    new_path=`$WHICH "$new_path" 2> /dev/null`
33676
33677    if test "x$new_path" = x; then
33678      # It's still not found. Now this is an unrecoverable error.
33679      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33680$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33681      has_space=`$ECHO "$complete" | $GREP " "`
33682      if test "x$has_space" != x; then
33683        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33684$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33685      fi
33686      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33687    fi
33688  fi
33689
33690  # Now new_path has a complete unix path to the binary
33691  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33692    # Keep paths in /bin as-is, but remove trailing .exe if any
33693    new_path="${new_path/%.exe/}"
33694    # Do not save /bin paths to all_fixpath_prefixes!
33695  else
33696    # Not in mixed or Windows style, start by that.
33697    new_path=`cmd //c echo $new_path`
33698
33699  input_path="$new_path"
33700  # Check if we need to convert this using DOS-style short mode. If the path
33701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33702  # take no chances and rewrite it.
33703  # Note: m4 eats our [], so we need to use [ and ] instead.
33704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33705  if test "x$has_forbidden_chars" != x; then
33706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33707    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33708  fi
33709
33710    # Output is in $new_path
33711
33712  windows_path="$new_path"
33713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33714    unix_path=`$CYGPATH -u "$windows_path"`
33715    new_path="$unix_path"
33716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33718    new_path="$unix_path"
33719  fi
33720
33721    # remove trailing .exe if any
33722    new_path="${new_path/%.exe/}"
33723
33724    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33725    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33726  fi
33727
33728  else
33729    # We're on a posix platform. Hooray! :)
33730    # First separate the path from the arguments. This will split at the first
33731    # space.
33732    complete="$LIPO"
33733    path="${complete%% *}"
33734    tmp="$complete EOL"
33735    arguments="${tmp#* }"
33736
33737    # Cannot rely on the command "which" here since it doesn't always work.
33738    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33739    if test -z "$is_absolute_path"; then
33740      # Path to executable is not absolute. Find it.
33741      IFS_save="$IFS"
33742      IFS=:
33743      for p in $PATH; do
33744        if test -f "$p/$path" && test -x "$p/$path"; then
33745          new_path="$p/$path"
33746          break
33747        fi
33748      done
33749      IFS="$IFS_save"
33750    else
33751      # This is an absolute path, we can use it without further modifications.
33752      new_path="$path"
33753    fi
33754
33755    if test "x$new_path" = x; then
33756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33757$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33758      has_space=`$ECHO "$complete" | $GREP " "`
33759      if test "x$has_space" != x; then
33760        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33761$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33762      fi
33763      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33764    fi
33765  fi
33766
33767  # Now join together the path and the arguments once again
33768  if test "x$arguments" != xEOL; then
33769    new_complete="$new_path ${arguments% *}"
33770  else
33771    new_complete="$new_path"
33772  fi
33773
33774  if test "x$complete" != "x$new_complete"; then
33775    LIPO="$new_complete"
33776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33777$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33778  fi
33779
33780  else
33781    OBJC=
33782  fi
33783
33784  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33785    # Extract the first word of "mt", so it can be a program name with args.
33786set dummy mt; ac_word=$2
33787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33788$as_echo_n "checking for $ac_word... " >&6; }
33789if ${ac_cv_prog_MT+:} false; then :
33790  $as_echo_n "(cached) " >&6
33791else
33792  if test -n "$MT"; then
33793  ac_cv_prog_MT="$MT" # Let the user override the test.
33794else
33795  ac_prog_rejected=no
33796as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33797for as_dir in $PATH
33798do
33799  IFS=$as_save_IFS
33800  test -z "$as_dir" && as_dir=.
33801    for ac_exec_ext in '' $ac_executable_extensions; do
33802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33803    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33804       ac_prog_rejected=yes
33805       continue
33806     fi
33807    ac_cv_prog_MT="mt"
33808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33809    break 2
33810  fi
33811done
33812  done
33813IFS=$as_save_IFS
33814
33815if test $ac_prog_rejected = yes; then
33816  # We found a bogon in the path, so make sure we never use it.
33817  set dummy $ac_cv_prog_MT
33818  shift
33819  if test $# != 0; then
33820    # We chose a different compiler from the bogus one.
33821    # However, it has the same basename, so the bogon will be chosen
33822    # first if we set MT to just the basename; use the full file name.
33823    shift
33824    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
33825  fi
33826fi
33827fi
33828fi
33829MT=$ac_cv_prog_MT
33830if test -n "$MT"; then
33831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
33832$as_echo "$MT" >&6; }
33833else
33834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33835$as_echo "no" >&6; }
33836fi
33837
33838
33839
33840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33841
33842  # First separate the path from the arguments. This will split at the first
33843  # space.
33844  complete="$MT"
33845  path="${complete%% *}"
33846  tmp="$complete EOL"
33847  arguments="${tmp#* }"
33848
33849  # Input might be given as Windows format, start by converting to
33850  # unix format.
33851  new_path=`$CYGPATH -u "$path"`
33852
33853  # Now try to locate executable using which
33854  new_path=`$WHICH "$new_path" 2> /dev/null`
33855  # bat and cmd files are not always considered executable in cygwin causing which
33856  # to not find them
33857  if test "x$new_path" = x \
33858      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33859      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33860    new_path=`$CYGPATH -u "$path"`
33861  fi
33862  if test "x$new_path" = x; then
33863    # Oops. Which didn't find the executable.
33864    # The splitting of arguments from the executable at a space might have been incorrect,
33865    # since paths with space are more likely in Windows. Give it another try with the whole
33866    # argument.
33867    path="$complete"
33868    arguments="EOL"
33869    new_path=`$CYGPATH -u "$path"`
33870    new_path=`$WHICH "$new_path" 2> /dev/null`
33871    # bat and cmd files are not always considered executable in cygwin causing which
33872    # to not find them
33873    if test "x$new_path" = x \
33874        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33875        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33876      new_path=`$CYGPATH -u "$path"`
33877    fi
33878    if test "x$new_path" = x; then
33879      # It's still not found. Now this is an unrecoverable error.
33880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33881$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33882      has_space=`$ECHO "$complete" | $GREP " "`
33883      if test "x$has_space" != x; then
33884        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33885$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33886      fi
33887      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33888    fi
33889  fi
33890
33891  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33892  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33893  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33894  # "foo.exe" is OK but "foo" is an error.
33895  #
33896  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33897  # It is also a way to make sure we got the proper file name for the real test later on.
33898  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33899  if test "x$test_shortpath" = x; then
33900    # Short path failed, file does not exist as specified.
33901    # Try adding .exe or .cmd
33902    if test -f "${new_path}.exe"; then
33903      input_to_shortpath="${new_path}.exe"
33904    elif test -f "${new_path}.cmd"; then
33905      input_to_shortpath="${new_path}.cmd"
33906    else
33907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
33908$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
33909      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33910$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33911      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33912    fi
33913  else
33914    input_to_shortpath="$new_path"
33915  fi
33916
33917  # Call helper function which possibly converts this using DOS-style short mode.
33918  # If so, the updated path is stored in $new_path.
33919  new_path="$input_to_shortpath"
33920
33921  input_path="$input_to_shortpath"
33922  # Check if we need to convert this using DOS-style short mode. If the path
33923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33924  # take no chances and rewrite it.
33925  # Note: m4 eats our [], so we need to use [ and ] instead.
33926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33927  if test "x$has_forbidden_chars" != x; then
33928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33929    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33930    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33931    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33932      # Going to short mode and back again did indeed matter. Since short mode is
33933      # case insensitive, let's make it lowercase to improve readability.
33934      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33935      # Now convert it back to Unix-stile (cygpath)
33936      input_path=`$CYGPATH -u "$shortmode_path"`
33937      new_path="$input_path"
33938    fi
33939  fi
33940
33941  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33942  if test "x$test_cygdrive_prefix" = x; then
33943    # As a simple fix, exclude /usr/bin since it's not a real path.
33944    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33945      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33946      # a path prefixed by /cygdrive for fixpath to work.
33947      new_path="$CYGWIN_ROOT_PATH$input_path"
33948    fi
33949  fi
33950
33951  # remove trailing .exe if any
33952  new_path="${new_path/%.exe/}"
33953
33954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33955
33956  # First separate the path from the arguments. This will split at the first
33957  # space.
33958  complete="$MT"
33959  path="${complete%% *}"
33960  tmp="$complete EOL"
33961  arguments="${tmp#* }"
33962
33963  # Input might be given as Windows format, start by converting to
33964  # unix format.
33965  new_path="$path"
33966
33967  windows_path="$new_path"
33968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33969    unix_path=`$CYGPATH -u "$windows_path"`
33970    new_path="$unix_path"
33971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33973    new_path="$unix_path"
33974  fi
33975
33976
33977  # Now try to locate executable using which
33978  new_path=`$WHICH "$new_path" 2> /dev/null`
33979
33980  if test "x$new_path" = x; then
33981    # Oops. Which didn't find the executable.
33982    # The splitting of arguments from the executable at a space might have been incorrect,
33983    # since paths with space are more likely in Windows. Give it another try with the whole
33984    # argument.
33985    path="$complete"
33986    arguments="EOL"
33987    new_path="$path"
33988
33989  windows_path="$new_path"
33990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33991    unix_path=`$CYGPATH -u "$windows_path"`
33992    new_path="$unix_path"
33993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33995    new_path="$unix_path"
33996  fi
33997
33998
33999    new_path=`$WHICH "$new_path" 2> /dev/null`
34000
34001    if test "x$new_path" = x; then
34002      # It's still not found. Now this is an unrecoverable error.
34003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34004$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34005      has_space=`$ECHO "$complete" | $GREP " "`
34006      if test "x$has_space" != x; then
34007        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34008$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34009      fi
34010      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34011    fi
34012  fi
34013
34014  # Now new_path has a complete unix path to the binary
34015  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34016    # Keep paths in /bin as-is, but remove trailing .exe if any
34017    new_path="${new_path/%.exe/}"
34018    # Do not save /bin paths to all_fixpath_prefixes!
34019  else
34020    # Not in mixed or Windows style, start by that.
34021    new_path=`cmd //c echo $new_path`
34022
34023  input_path="$new_path"
34024  # Check if we need to convert this using DOS-style short mode. If the path
34025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34026  # take no chances and rewrite it.
34027  # Note: m4 eats our [], so we need to use [ and ] instead.
34028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34029  if test "x$has_forbidden_chars" != x; then
34030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34031    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34032  fi
34033
34034    # Output is in $new_path
34035
34036  windows_path="$new_path"
34037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34038    unix_path=`$CYGPATH -u "$windows_path"`
34039    new_path="$unix_path"
34040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34042    new_path="$unix_path"
34043  fi
34044
34045    # remove trailing .exe if any
34046    new_path="${new_path/%.exe/}"
34047
34048    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34049    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34050  fi
34051
34052  else
34053    # We're on a posix platform. Hooray! :)
34054    # First separate the path from the arguments. This will split at the first
34055    # space.
34056    complete="$MT"
34057    path="${complete%% *}"
34058    tmp="$complete EOL"
34059    arguments="${tmp#* }"
34060
34061    # Cannot rely on the command "which" here since it doesn't always work.
34062    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34063    if test -z "$is_absolute_path"; then
34064      # Path to executable is not absolute. Find it.
34065      IFS_save="$IFS"
34066      IFS=:
34067      for p in $PATH; do
34068        if test -f "$p/$path" && test -x "$p/$path"; then
34069          new_path="$p/$path"
34070          break
34071        fi
34072      done
34073      IFS="$IFS_save"
34074    else
34075      # This is an absolute path, we can use it without further modifications.
34076      new_path="$path"
34077    fi
34078
34079    if test "x$new_path" = x; then
34080      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34081$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34082      has_space=`$ECHO "$complete" | $GREP " "`
34083      if test "x$has_space" != x; then
34084        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34085$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34086      fi
34087      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34088    fi
34089  fi
34090
34091  # Now join together the path and the arguments once again
34092  if test "x$arguments" != xEOL; then
34093    new_complete="$new_path ${arguments% *}"
34094  else
34095    new_complete="$new_path"
34096  fi
34097
34098  if test "x$complete" != "x$new_complete"; then
34099    MT="$new_complete"
34100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34101$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34102  fi
34103
34104    # Setup the resource compiler (RC)
34105    # Extract the first word of "rc", so it can be a program name with args.
34106set dummy rc; ac_word=$2
34107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34108$as_echo_n "checking for $ac_word... " >&6; }
34109if ${ac_cv_prog_RC+:} false; then :
34110  $as_echo_n "(cached) " >&6
34111else
34112  if test -n "$RC"; then
34113  ac_cv_prog_RC="$RC" # Let the user override the test.
34114else
34115  ac_prog_rejected=no
34116as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34117for as_dir in $PATH
34118do
34119  IFS=$as_save_IFS
34120  test -z "$as_dir" && as_dir=.
34121    for ac_exec_ext in '' $ac_executable_extensions; do
34122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34123    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34124       ac_prog_rejected=yes
34125       continue
34126     fi
34127    ac_cv_prog_RC="rc"
34128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34129    break 2
34130  fi
34131done
34132  done
34133IFS=$as_save_IFS
34134
34135if test $ac_prog_rejected = yes; then
34136  # We found a bogon in the path, so make sure we never use it.
34137  set dummy $ac_cv_prog_RC
34138  shift
34139  if test $# != 0; then
34140    # We chose a different compiler from the bogus one.
34141    # However, it has the same basename, so the bogon will be chosen
34142    # first if we set RC to just the basename; use the full file name.
34143    shift
34144    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34145  fi
34146fi
34147fi
34148fi
34149RC=$ac_cv_prog_RC
34150if test -n "$RC"; then
34151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34152$as_echo "$RC" >&6; }
34153else
34154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34155$as_echo "no" >&6; }
34156fi
34157
34158
34159
34160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34161
34162  # First separate the path from the arguments. This will split at the first
34163  # space.
34164  complete="$RC"
34165  path="${complete%% *}"
34166  tmp="$complete EOL"
34167  arguments="${tmp#* }"
34168
34169  # Input might be given as Windows format, start by converting to
34170  # unix format.
34171  new_path=`$CYGPATH -u "$path"`
34172
34173  # Now try to locate executable using which
34174  new_path=`$WHICH "$new_path" 2> /dev/null`
34175  # bat and cmd files are not always considered executable in cygwin causing which
34176  # to not find them
34177  if test "x$new_path" = x \
34178      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34179      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34180    new_path=`$CYGPATH -u "$path"`
34181  fi
34182  if test "x$new_path" = x; then
34183    # Oops. Which didn't find the executable.
34184    # The splitting of arguments from the executable at a space might have been incorrect,
34185    # since paths with space are more likely in Windows. Give it another try with the whole
34186    # argument.
34187    path="$complete"
34188    arguments="EOL"
34189    new_path=`$CYGPATH -u "$path"`
34190    new_path=`$WHICH "$new_path" 2> /dev/null`
34191    # bat and cmd files are not always considered executable in cygwin causing which
34192    # to not find them
34193    if test "x$new_path" = x \
34194        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34195        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34196      new_path=`$CYGPATH -u "$path"`
34197    fi
34198    if test "x$new_path" = x; then
34199      # It's still not found. Now this is an unrecoverable error.
34200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34201$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34202      has_space=`$ECHO "$complete" | $GREP " "`
34203      if test "x$has_space" != x; then
34204        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34205$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34206      fi
34207      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34208    fi
34209  fi
34210
34211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34214  # "foo.exe" is OK but "foo" is an error.
34215  #
34216  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34217  # It is also a way to make sure we got the proper file name for the real test later on.
34218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34219  if test "x$test_shortpath" = x; then
34220    # Short path failed, file does not exist as specified.
34221    # Try adding .exe or .cmd
34222    if test -f "${new_path}.exe"; then
34223      input_to_shortpath="${new_path}.exe"
34224    elif test -f "${new_path}.cmd"; then
34225      input_to_shortpath="${new_path}.cmd"
34226    else
34227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34228$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34229      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34230$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34231      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34232    fi
34233  else
34234    input_to_shortpath="$new_path"
34235  fi
34236
34237  # Call helper function which possibly converts this using DOS-style short mode.
34238  # If so, the updated path is stored in $new_path.
34239  new_path="$input_to_shortpath"
34240
34241  input_path="$input_to_shortpath"
34242  # Check if we need to convert this using DOS-style short mode. If the path
34243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34244  # take no chances and rewrite it.
34245  # Note: m4 eats our [], so we need to use [ and ] instead.
34246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34247  if test "x$has_forbidden_chars" != x; then
34248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34252      # Going to short mode and back again did indeed matter. Since short mode is
34253      # case insensitive, let's make it lowercase to improve readability.
34254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34255      # Now convert it back to Unix-stile (cygpath)
34256      input_path=`$CYGPATH -u "$shortmode_path"`
34257      new_path="$input_path"
34258    fi
34259  fi
34260
34261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34262  if test "x$test_cygdrive_prefix" = x; then
34263    # As a simple fix, exclude /usr/bin since it's not a real path.
34264    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34266      # a path prefixed by /cygdrive for fixpath to work.
34267      new_path="$CYGWIN_ROOT_PATH$input_path"
34268    fi
34269  fi
34270
34271  # remove trailing .exe if any
34272  new_path="${new_path/%.exe/}"
34273
34274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34275
34276  # First separate the path from the arguments. This will split at the first
34277  # space.
34278  complete="$RC"
34279  path="${complete%% *}"
34280  tmp="$complete EOL"
34281  arguments="${tmp#* }"
34282
34283  # Input might be given as Windows format, start by converting to
34284  # unix format.
34285  new_path="$path"
34286
34287  windows_path="$new_path"
34288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34289    unix_path=`$CYGPATH -u "$windows_path"`
34290    new_path="$unix_path"
34291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34293    new_path="$unix_path"
34294  fi
34295
34296
34297  # Now try to locate executable using which
34298  new_path=`$WHICH "$new_path" 2> /dev/null`
34299
34300  if test "x$new_path" = x; then
34301    # Oops. Which didn't find the executable.
34302    # The splitting of arguments from the executable at a space might have been incorrect,
34303    # since paths with space are more likely in Windows. Give it another try with the whole
34304    # argument.
34305    path="$complete"
34306    arguments="EOL"
34307    new_path="$path"
34308
34309  windows_path="$new_path"
34310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34311    unix_path=`$CYGPATH -u "$windows_path"`
34312    new_path="$unix_path"
34313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34315    new_path="$unix_path"
34316  fi
34317
34318
34319    new_path=`$WHICH "$new_path" 2> /dev/null`
34320
34321    if test "x$new_path" = x; then
34322      # It's still not found. Now this is an unrecoverable error.
34323      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34324$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34325      has_space=`$ECHO "$complete" | $GREP " "`
34326      if test "x$has_space" != x; then
34327        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34328$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34329      fi
34330      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34331    fi
34332  fi
34333
34334  # Now new_path has a complete unix path to the binary
34335  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34336    # Keep paths in /bin as-is, but remove trailing .exe if any
34337    new_path="${new_path/%.exe/}"
34338    # Do not save /bin paths to all_fixpath_prefixes!
34339  else
34340    # Not in mixed or Windows style, start by that.
34341    new_path=`cmd //c echo $new_path`
34342
34343  input_path="$new_path"
34344  # Check if we need to convert this using DOS-style short mode. If the path
34345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34346  # take no chances and rewrite it.
34347  # Note: m4 eats our [], so we need to use [ and ] instead.
34348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34349  if test "x$has_forbidden_chars" != x; then
34350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34351    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34352  fi
34353
34354    # Output is in $new_path
34355
34356  windows_path="$new_path"
34357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34358    unix_path=`$CYGPATH -u "$windows_path"`
34359    new_path="$unix_path"
34360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34362    new_path="$unix_path"
34363  fi
34364
34365    # remove trailing .exe if any
34366    new_path="${new_path/%.exe/}"
34367
34368    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34369    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34370  fi
34371
34372  else
34373    # We're on a posix platform. Hooray! :)
34374    # First separate the path from the arguments. This will split at the first
34375    # space.
34376    complete="$RC"
34377    path="${complete%% *}"
34378    tmp="$complete EOL"
34379    arguments="${tmp#* }"
34380
34381    # Cannot rely on the command "which" here since it doesn't always work.
34382    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34383    if test -z "$is_absolute_path"; then
34384      # Path to executable is not absolute. Find it.
34385      IFS_save="$IFS"
34386      IFS=:
34387      for p in $PATH; do
34388        if test -f "$p/$path" && test -x "$p/$path"; then
34389          new_path="$p/$path"
34390          break
34391        fi
34392      done
34393      IFS="$IFS_save"
34394    else
34395      # This is an absolute path, we can use it without further modifications.
34396      new_path="$path"
34397    fi
34398
34399    if test "x$new_path" = x; then
34400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34401$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34402      has_space=`$ECHO "$complete" | $GREP " "`
34403      if test "x$has_space" != x; then
34404        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34405$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34406      fi
34407      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34408    fi
34409  fi
34410
34411  # Now join together the path and the arguments once again
34412  if test "x$arguments" != xEOL; then
34413    new_complete="$new_path ${arguments% *}"
34414  else
34415    new_complete="$new_path"
34416  fi
34417
34418  if test "x$complete" != "x$new_complete"; then
34419    RC="$new_complete"
34420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34421$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34422  fi
34423
34424    # Extract the first word of "dumpbin", so it can be a program name with args.
34425set dummy dumpbin; ac_word=$2
34426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34427$as_echo_n "checking for $ac_word... " >&6; }
34428if ${ac_cv_prog_DUMPBIN+:} false; then :
34429  $as_echo_n "(cached) " >&6
34430else
34431  if test -n "$DUMPBIN"; then
34432  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34433else
34434as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34435for as_dir in $PATH
34436do
34437  IFS=$as_save_IFS
34438  test -z "$as_dir" && as_dir=.
34439    for ac_exec_ext in '' $ac_executable_extensions; do
34440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34441    ac_cv_prog_DUMPBIN="dumpbin"
34442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34443    break 2
34444  fi
34445done
34446  done
34447IFS=$as_save_IFS
34448
34449fi
34450fi
34451DUMPBIN=$ac_cv_prog_DUMPBIN
34452if test -n "$DUMPBIN"; then
34453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34454$as_echo "$DUMPBIN" >&6; }
34455else
34456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34457$as_echo "no" >&6; }
34458fi
34459
34460
34461
34462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34463
34464  # First separate the path from the arguments. This will split at the first
34465  # space.
34466  complete="$DUMPBIN"
34467  path="${complete%% *}"
34468  tmp="$complete EOL"
34469  arguments="${tmp#* }"
34470
34471  # Input might be given as Windows format, start by converting to
34472  # unix format.
34473  new_path=`$CYGPATH -u "$path"`
34474
34475  # Now try to locate executable using which
34476  new_path=`$WHICH "$new_path" 2> /dev/null`
34477  # bat and cmd files are not always considered executable in cygwin causing which
34478  # to not find them
34479  if test "x$new_path" = x \
34480      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34481      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34482    new_path=`$CYGPATH -u "$path"`
34483  fi
34484  if test "x$new_path" = x; then
34485    # Oops. Which didn't find the executable.
34486    # The splitting of arguments from the executable at a space might have been incorrect,
34487    # since paths with space are more likely in Windows. Give it another try with the whole
34488    # argument.
34489    path="$complete"
34490    arguments="EOL"
34491    new_path=`$CYGPATH -u "$path"`
34492    new_path=`$WHICH "$new_path" 2> /dev/null`
34493    # bat and cmd files are not always considered executable in cygwin causing which
34494    # to not find them
34495    if test "x$new_path" = x \
34496        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34497        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34498      new_path=`$CYGPATH -u "$path"`
34499    fi
34500    if test "x$new_path" = x; then
34501      # It's still not found. Now this is an unrecoverable error.
34502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34503$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34504      has_space=`$ECHO "$complete" | $GREP " "`
34505      if test "x$has_space" != x; then
34506        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34507$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34508      fi
34509      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34510    fi
34511  fi
34512
34513  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34514  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34515  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34516  # "foo.exe" is OK but "foo" is an error.
34517  #
34518  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34519  # It is also a way to make sure we got the proper file name for the real test later on.
34520  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34521  if test "x$test_shortpath" = x; then
34522    # Short path failed, file does not exist as specified.
34523    # Try adding .exe or .cmd
34524    if test -f "${new_path}.exe"; then
34525      input_to_shortpath="${new_path}.exe"
34526    elif test -f "${new_path}.cmd"; then
34527      input_to_shortpath="${new_path}.cmd"
34528    else
34529      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34530$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34531      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34532$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34533      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34534    fi
34535  else
34536    input_to_shortpath="$new_path"
34537  fi
34538
34539  # Call helper function which possibly converts this using DOS-style short mode.
34540  # If so, the updated path is stored in $new_path.
34541  new_path="$input_to_shortpath"
34542
34543  input_path="$input_to_shortpath"
34544  # Check if we need to convert this using DOS-style short mode. If the path
34545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34546  # take no chances and rewrite it.
34547  # Note: m4 eats our [], so we need to use [ and ] instead.
34548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34549  if test "x$has_forbidden_chars" != x; then
34550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34551    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34552    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34553    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34554      # Going to short mode and back again did indeed matter. Since short mode is
34555      # case insensitive, let's make it lowercase to improve readability.
34556      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34557      # Now convert it back to Unix-stile (cygpath)
34558      input_path=`$CYGPATH -u "$shortmode_path"`
34559      new_path="$input_path"
34560    fi
34561  fi
34562
34563  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34564  if test "x$test_cygdrive_prefix" = x; then
34565    # As a simple fix, exclude /usr/bin since it's not a real path.
34566    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34567      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34568      # a path prefixed by /cygdrive for fixpath to work.
34569      new_path="$CYGWIN_ROOT_PATH$input_path"
34570    fi
34571  fi
34572
34573  # remove trailing .exe if any
34574  new_path="${new_path/%.exe/}"
34575
34576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34577
34578  # First separate the path from the arguments. This will split at the first
34579  # space.
34580  complete="$DUMPBIN"
34581  path="${complete%% *}"
34582  tmp="$complete EOL"
34583  arguments="${tmp#* }"
34584
34585  # Input might be given as Windows format, start by converting to
34586  # unix format.
34587  new_path="$path"
34588
34589  windows_path="$new_path"
34590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34591    unix_path=`$CYGPATH -u "$windows_path"`
34592    new_path="$unix_path"
34593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34595    new_path="$unix_path"
34596  fi
34597
34598
34599  # Now try to locate executable using which
34600  new_path=`$WHICH "$new_path" 2> /dev/null`
34601
34602  if test "x$new_path" = x; then
34603    # Oops. Which didn't find the executable.
34604    # The splitting of arguments from the executable at a space might have been incorrect,
34605    # since paths with space are more likely in Windows. Give it another try with the whole
34606    # argument.
34607    path="$complete"
34608    arguments="EOL"
34609    new_path="$path"
34610
34611  windows_path="$new_path"
34612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34613    unix_path=`$CYGPATH -u "$windows_path"`
34614    new_path="$unix_path"
34615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34617    new_path="$unix_path"
34618  fi
34619
34620
34621    new_path=`$WHICH "$new_path" 2> /dev/null`
34622
34623    if test "x$new_path" = x; then
34624      # It's still not found. Now this is an unrecoverable error.
34625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34626$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34627      has_space=`$ECHO "$complete" | $GREP " "`
34628      if test "x$has_space" != x; then
34629        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34630$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34631      fi
34632      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34633    fi
34634  fi
34635
34636  # Now new_path has a complete unix path to the binary
34637  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34638    # Keep paths in /bin as-is, but remove trailing .exe if any
34639    new_path="${new_path/%.exe/}"
34640    # Do not save /bin paths to all_fixpath_prefixes!
34641  else
34642    # Not in mixed or Windows style, start by that.
34643    new_path=`cmd //c echo $new_path`
34644
34645  input_path="$new_path"
34646  # Check if we need to convert this using DOS-style short mode. If the path
34647  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34648  # take no chances and rewrite it.
34649  # Note: m4 eats our [], so we need to use [ and ] instead.
34650  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34651  if test "x$has_forbidden_chars" != x; then
34652    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34653    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34654  fi
34655
34656    # Output is in $new_path
34657
34658  windows_path="$new_path"
34659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34660    unix_path=`$CYGPATH -u "$windows_path"`
34661    new_path="$unix_path"
34662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34664    new_path="$unix_path"
34665  fi
34666
34667    # remove trailing .exe if any
34668    new_path="${new_path/%.exe/}"
34669
34670    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34671    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34672  fi
34673
34674  else
34675    # We're on a posix platform. Hooray! :)
34676    # First separate the path from the arguments. This will split at the first
34677    # space.
34678    complete="$DUMPBIN"
34679    path="${complete%% *}"
34680    tmp="$complete EOL"
34681    arguments="${tmp#* }"
34682
34683    # Cannot rely on the command "which" here since it doesn't always work.
34684    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34685    if test -z "$is_absolute_path"; then
34686      # Path to executable is not absolute. Find it.
34687      IFS_save="$IFS"
34688      IFS=:
34689      for p in $PATH; do
34690        if test -f "$p/$path" && test -x "$p/$path"; then
34691          new_path="$p/$path"
34692          break
34693        fi
34694      done
34695      IFS="$IFS_save"
34696    else
34697      # This is an absolute path, we can use it without further modifications.
34698      new_path="$path"
34699    fi
34700
34701    if test "x$new_path" = x; then
34702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34703$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34704      has_space=`$ECHO "$complete" | $GREP " "`
34705      if test "x$has_space" != x; then
34706        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34707$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34708      fi
34709      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34710    fi
34711  fi
34712
34713  # Now join together the path and the arguments once again
34714  if test "x$arguments" != xEOL; then
34715    new_complete="$new_path ${arguments% *}"
34716  else
34717    new_complete="$new_path"
34718  fi
34719
34720  if test "x$complete" != "x$new_complete"; then
34721    DUMPBIN="$new_complete"
34722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34723$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34724  fi
34725
34726  fi
34727
34728  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34729
34730
34731  # Publish this variable in the help.
34732
34733
34734  if test "x$STRIP" = x; then
34735    # The variable is not set by user, try to locate tool using the code snippet
34736    for ac_prog in strip
34737do
34738  # Extract the first word of "$ac_prog", so it can be a program name with args.
34739set dummy $ac_prog; ac_word=$2
34740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34741$as_echo_n "checking for $ac_word... " >&6; }
34742if ${ac_cv_path_STRIP+:} false; then :
34743  $as_echo_n "(cached) " >&6
34744else
34745  case $STRIP in
34746  [\\/]* | ?:[\\/]*)
34747  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34748  ;;
34749  *)
34750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34751for as_dir in $PATH
34752do
34753  IFS=$as_save_IFS
34754  test -z "$as_dir" && as_dir=.
34755    for ac_exec_ext in '' $ac_executable_extensions; do
34756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34757    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34759    break 2
34760  fi
34761done
34762  done
34763IFS=$as_save_IFS
34764
34765  ;;
34766esac
34767fi
34768STRIP=$ac_cv_path_STRIP
34769if test -n "$STRIP"; then
34770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34771$as_echo "$STRIP" >&6; }
34772else
34773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34774$as_echo "no" >&6; }
34775fi
34776
34777
34778  test -n "$STRIP" && break
34779done
34780
34781  else
34782    # The variable is set, but is it from the command line or the environment?
34783
34784    # Try to remove the string !STRIP! from our list.
34785    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
34786    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34787      # If it failed, the variable was not from the command line. Ignore it,
34788      # but warn the user (except for BASH, which is always set by the calling BASH).
34789      if test "xSTRIP" != xBASH; then
34790        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
34791$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
34792      fi
34793      # Try to locate tool using the code snippet
34794      for ac_prog in strip
34795do
34796  # Extract the first word of "$ac_prog", so it can be a program name with args.
34797set dummy $ac_prog; ac_word=$2
34798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34799$as_echo_n "checking for $ac_word... " >&6; }
34800if ${ac_cv_path_STRIP+:} false; then :
34801  $as_echo_n "(cached) " >&6
34802else
34803  case $STRIP in
34804  [\\/]* | ?:[\\/]*)
34805  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34806  ;;
34807  *)
34808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34809for as_dir in $PATH
34810do
34811  IFS=$as_save_IFS
34812  test -z "$as_dir" && as_dir=.
34813    for ac_exec_ext in '' $ac_executable_extensions; do
34814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34815    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34817    break 2
34818  fi
34819done
34820  done
34821IFS=$as_save_IFS
34822
34823  ;;
34824esac
34825fi
34826STRIP=$ac_cv_path_STRIP
34827if test -n "$STRIP"; then
34828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34829$as_echo "$STRIP" >&6; }
34830else
34831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34832$as_echo "no" >&6; }
34833fi
34834
34835
34836  test -n "$STRIP" && break
34837done
34838
34839    else
34840      # If it succeeded, then it was overridden by the user. We will use it
34841      # for the tool.
34842
34843      # First remove it from the list of overridden variables, so we can test
34844      # for unknown variables in the end.
34845      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34846
34847      # Check if the provided tool contains a complete path.
34848      tool_specified="$STRIP"
34849      tool_basename="${tool_specified##*/}"
34850      if test "x$tool_basename" = "x$tool_specified"; then
34851        # A command without a complete path is provided, search $PATH.
34852        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
34853$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
34854        # Extract the first word of "$tool_basename", so it can be a program name with args.
34855set dummy $tool_basename; ac_word=$2
34856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34857$as_echo_n "checking for $ac_word... " >&6; }
34858if ${ac_cv_path_STRIP+:} false; then :
34859  $as_echo_n "(cached) " >&6
34860else
34861  case $STRIP in
34862  [\\/]* | ?:[\\/]*)
34863  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34864  ;;
34865  *)
34866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34867for as_dir in $PATH
34868do
34869  IFS=$as_save_IFS
34870  test -z "$as_dir" && as_dir=.
34871    for ac_exec_ext in '' $ac_executable_extensions; do
34872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34873    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34875    break 2
34876  fi
34877done
34878  done
34879IFS=$as_save_IFS
34880
34881  ;;
34882esac
34883fi
34884STRIP=$ac_cv_path_STRIP
34885if test -n "$STRIP"; then
34886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34887$as_echo "$STRIP" >&6; }
34888else
34889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34890$as_echo "no" >&6; }
34891fi
34892
34893
34894        if test "x$STRIP" = x; then
34895          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34896        fi
34897      else
34898        # Otherwise we believe it is a complete path. Use it as it is.
34899        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
34900$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
34901        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
34902$as_echo_n "checking for STRIP... " >&6; }
34903        if test ! -x "$tool_specified"; then
34904          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34905$as_echo "not found" >&6; }
34906          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
34907        fi
34908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34909$as_echo "$tool_specified" >&6; }
34910      fi
34911    fi
34912  fi
34913
34914
34915
34916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34917
34918  # First separate the path from the arguments. This will split at the first
34919  # space.
34920  complete="$STRIP"
34921  path="${complete%% *}"
34922  tmp="$complete EOL"
34923  arguments="${tmp#* }"
34924
34925  # Input might be given as Windows format, start by converting to
34926  # unix format.
34927  new_path=`$CYGPATH -u "$path"`
34928
34929  # Now try to locate executable using which
34930  new_path=`$WHICH "$new_path" 2> /dev/null`
34931  # bat and cmd files are not always considered executable in cygwin causing which
34932  # to not find them
34933  if test "x$new_path" = x \
34934      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34935      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34936    new_path=`$CYGPATH -u "$path"`
34937  fi
34938  if test "x$new_path" = x; then
34939    # Oops. Which didn't find the executable.
34940    # The splitting of arguments from the executable at a space might have been incorrect,
34941    # since paths with space are more likely in Windows. Give it another try with the whole
34942    # argument.
34943    path="$complete"
34944    arguments="EOL"
34945    new_path=`$CYGPATH -u "$path"`
34946    new_path=`$WHICH "$new_path" 2> /dev/null`
34947    # bat and cmd files are not always considered executable in cygwin causing which
34948    # to not find them
34949    if test "x$new_path" = x \
34950        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34951        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34952      new_path=`$CYGPATH -u "$path"`
34953    fi
34954    if test "x$new_path" = x; then
34955      # It's still not found. Now this is an unrecoverable error.
34956      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34957$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34958      has_space=`$ECHO "$complete" | $GREP " "`
34959      if test "x$has_space" != x; then
34960        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34961$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34962      fi
34963      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34964    fi
34965  fi
34966
34967  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34968  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34969  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34970  # "foo.exe" is OK but "foo" is an error.
34971  #
34972  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34973  # It is also a way to make sure we got the proper file name for the real test later on.
34974  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34975  if test "x$test_shortpath" = x; then
34976    # Short path failed, file does not exist as specified.
34977    # Try adding .exe or .cmd
34978    if test -f "${new_path}.exe"; then
34979      input_to_shortpath="${new_path}.exe"
34980    elif test -f "${new_path}.cmd"; then
34981      input_to_shortpath="${new_path}.cmd"
34982    else
34983      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
34984$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
34985      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34986$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34987      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34988    fi
34989  else
34990    input_to_shortpath="$new_path"
34991  fi
34992
34993  # Call helper function which possibly converts this using DOS-style short mode.
34994  # If so, the updated path is stored in $new_path.
34995  new_path="$input_to_shortpath"
34996
34997  input_path="$input_to_shortpath"
34998  # Check if we need to convert this using DOS-style short mode. If the path
34999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35000  # take no chances and rewrite it.
35001  # Note: m4 eats our [], so we need to use [ and ] instead.
35002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35003  if test "x$has_forbidden_chars" != x; then
35004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35005    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35006    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35007    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35008      # Going to short mode and back again did indeed matter. Since short mode is
35009      # case insensitive, let's make it lowercase to improve readability.
35010      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35011      # Now convert it back to Unix-stile (cygpath)
35012      input_path=`$CYGPATH -u "$shortmode_path"`
35013      new_path="$input_path"
35014    fi
35015  fi
35016
35017  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35018  if test "x$test_cygdrive_prefix" = x; then
35019    # As a simple fix, exclude /usr/bin since it's not a real path.
35020    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35021      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35022      # a path prefixed by /cygdrive for fixpath to work.
35023      new_path="$CYGWIN_ROOT_PATH$input_path"
35024    fi
35025  fi
35026
35027  # remove trailing .exe if any
35028  new_path="${new_path/%.exe/}"
35029
35030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35031
35032  # First separate the path from the arguments. This will split at the first
35033  # space.
35034  complete="$STRIP"
35035  path="${complete%% *}"
35036  tmp="$complete EOL"
35037  arguments="${tmp#* }"
35038
35039  # Input might be given as Windows format, start by converting to
35040  # unix format.
35041  new_path="$path"
35042
35043  windows_path="$new_path"
35044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35045    unix_path=`$CYGPATH -u "$windows_path"`
35046    new_path="$unix_path"
35047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35049    new_path="$unix_path"
35050  fi
35051
35052
35053  # Now try to locate executable using which
35054  new_path=`$WHICH "$new_path" 2> /dev/null`
35055
35056  if test "x$new_path" = x; then
35057    # Oops. Which didn't find the executable.
35058    # The splitting of arguments from the executable at a space might have been incorrect,
35059    # since paths with space are more likely in Windows. Give it another try with the whole
35060    # argument.
35061    path="$complete"
35062    arguments="EOL"
35063    new_path="$path"
35064
35065  windows_path="$new_path"
35066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35067    unix_path=`$CYGPATH -u "$windows_path"`
35068    new_path="$unix_path"
35069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35071    new_path="$unix_path"
35072  fi
35073
35074
35075    new_path=`$WHICH "$new_path" 2> /dev/null`
35076
35077    if test "x$new_path" = x; then
35078      # It's still not found. Now this is an unrecoverable error.
35079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35080$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35081      has_space=`$ECHO "$complete" | $GREP " "`
35082      if test "x$has_space" != x; then
35083        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35084$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35085      fi
35086      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35087    fi
35088  fi
35089
35090  # Now new_path has a complete unix path to the binary
35091  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35092    # Keep paths in /bin as-is, but remove trailing .exe if any
35093    new_path="${new_path/%.exe/}"
35094    # Do not save /bin paths to all_fixpath_prefixes!
35095  else
35096    # Not in mixed or Windows style, start by that.
35097    new_path=`cmd //c echo $new_path`
35098
35099  input_path="$new_path"
35100  # Check if we need to convert this using DOS-style short mode. If the path
35101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35102  # take no chances and rewrite it.
35103  # Note: m4 eats our [], so we need to use [ and ] instead.
35104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35105  if test "x$has_forbidden_chars" != x; then
35106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35107    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35108  fi
35109
35110    # Output is in $new_path
35111
35112  windows_path="$new_path"
35113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35114    unix_path=`$CYGPATH -u "$windows_path"`
35115    new_path="$unix_path"
35116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35118    new_path="$unix_path"
35119  fi
35120
35121    # remove trailing .exe if any
35122    new_path="${new_path/%.exe/}"
35123
35124    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35125    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35126  fi
35127
35128  else
35129    # We're on a posix platform. Hooray! :)
35130    # First separate the path from the arguments. This will split at the first
35131    # space.
35132    complete="$STRIP"
35133    path="${complete%% *}"
35134    tmp="$complete EOL"
35135    arguments="${tmp#* }"
35136
35137    # Cannot rely on the command "which" here since it doesn't always work.
35138    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35139    if test -z "$is_absolute_path"; then
35140      # Path to executable is not absolute. Find it.
35141      IFS_save="$IFS"
35142      IFS=:
35143      for p in $PATH; do
35144        if test -f "$p/$path" && test -x "$p/$path"; then
35145          new_path="$p/$path"
35146          break
35147        fi
35148      done
35149      IFS="$IFS_save"
35150    else
35151      # This is an absolute path, we can use it without further modifications.
35152      new_path="$path"
35153    fi
35154
35155    if test "x$new_path" = x; then
35156      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35157$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35158      has_space=`$ECHO "$complete" | $GREP " "`
35159      if test "x$has_space" != x; then
35160        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35161$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35162      fi
35163      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35164    fi
35165  fi
35166
35167  # Now join together the path and the arguments once again
35168  if test "x$arguments" != xEOL; then
35169    new_complete="$new_path ${arguments% *}"
35170  else
35171    new_complete="$new_path"
35172  fi
35173
35174  if test "x$complete" != "x$new_complete"; then
35175    STRIP="$new_complete"
35176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35177$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35178  fi
35179
35180
35181
35182  # Publish this variable in the help.
35183
35184
35185  if test "x$NM" = x; then
35186    # The variable is not set by user, try to locate tool using the code snippet
35187    for ac_prog in nm
35188do
35189  # Extract the first word of "$ac_prog", so it can be a program name with args.
35190set dummy $ac_prog; ac_word=$2
35191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35192$as_echo_n "checking for $ac_word... " >&6; }
35193if ${ac_cv_path_NM+:} false; then :
35194  $as_echo_n "(cached) " >&6
35195else
35196  case $NM in
35197  [\\/]* | ?:[\\/]*)
35198  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35199  ;;
35200  *)
35201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35202for as_dir in $PATH
35203do
35204  IFS=$as_save_IFS
35205  test -z "$as_dir" && as_dir=.
35206    for ac_exec_ext in '' $ac_executable_extensions; do
35207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35208    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35210    break 2
35211  fi
35212done
35213  done
35214IFS=$as_save_IFS
35215
35216  ;;
35217esac
35218fi
35219NM=$ac_cv_path_NM
35220if test -n "$NM"; then
35221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35222$as_echo "$NM" >&6; }
35223else
35224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35225$as_echo "no" >&6; }
35226fi
35227
35228
35229  test -n "$NM" && break
35230done
35231
35232  else
35233    # The variable is set, but is it from the command line or the environment?
35234
35235    # Try to remove the string !NM! from our list.
35236    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35237    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35238      # If it failed, the variable was not from the command line. Ignore it,
35239      # but warn the user (except for BASH, which is always set by the calling BASH).
35240      if test "xNM" != xBASH; then
35241        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35242$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35243      fi
35244      # Try to locate tool using the code snippet
35245      for ac_prog in nm
35246do
35247  # Extract the first word of "$ac_prog", so it can be a program name with args.
35248set dummy $ac_prog; ac_word=$2
35249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35250$as_echo_n "checking for $ac_word... " >&6; }
35251if ${ac_cv_path_NM+:} false; then :
35252  $as_echo_n "(cached) " >&6
35253else
35254  case $NM in
35255  [\\/]* | ?:[\\/]*)
35256  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35257  ;;
35258  *)
35259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35260for as_dir in $PATH
35261do
35262  IFS=$as_save_IFS
35263  test -z "$as_dir" && as_dir=.
35264    for ac_exec_ext in '' $ac_executable_extensions; do
35265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35266    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35268    break 2
35269  fi
35270done
35271  done
35272IFS=$as_save_IFS
35273
35274  ;;
35275esac
35276fi
35277NM=$ac_cv_path_NM
35278if test -n "$NM"; then
35279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35280$as_echo "$NM" >&6; }
35281else
35282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35283$as_echo "no" >&6; }
35284fi
35285
35286
35287  test -n "$NM" && break
35288done
35289
35290    else
35291      # If it succeeded, then it was overridden by the user. We will use it
35292      # for the tool.
35293
35294      # First remove it from the list of overridden variables, so we can test
35295      # for unknown variables in the end.
35296      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35297
35298      # Check if the provided tool contains a complete path.
35299      tool_specified="$NM"
35300      tool_basename="${tool_specified##*/}"
35301      if test "x$tool_basename" = "x$tool_specified"; then
35302        # A command without a complete path is provided, search $PATH.
35303        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35304$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35305        # Extract the first word of "$tool_basename", so it can be a program name with args.
35306set dummy $tool_basename; ac_word=$2
35307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35308$as_echo_n "checking for $ac_word... " >&6; }
35309if ${ac_cv_path_NM+:} false; then :
35310  $as_echo_n "(cached) " >&6
35311else
35312  case $NM in
35313  [\\/]* | ?:[\\/]*)
35314  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35315  ;;
35316  *)
35317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35318for as_dir in $PATH
35319do
35320  IFS=$as_save_IFS
35321  test -z "$as_dir" && as_dir=.
35322    for ac_exec_ext in '' $ac_executable_extensions; do
35323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35324    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35326    break 2
35327  fi
35328done
35329  done
35330IFS=$as_save_IFS
35331
35332  ;;
35333esac
35334fi
35335NM=$ac_cv_path_NM
35336if test -n "$NM"; then
35337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35338$as_echo "$NM" >&6; }
35339else
35340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35341$as_echo "no" >&6; }
35342fi
35343
35344
35345        if test "x$NM" = x; then
35346          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35347        fi
35348      else
35349        # Otherwise we believe it is a complete path. Use it as it is.
35350        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35351$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35352        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35353$as_echo_n "checking for NM... " >&6; }
35354        if test ! -x "$tool_specified"; then
35355          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35356$as_echo "not found" >&6; }
35357          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35358        fi
35359        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35360$as_echo "$tool_specified" >&6; }
35361      fi
35362    fi
35363  fi
35364
35365
35366
35367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35368
35369  # First separate the path from the arguments. This will split at the first
35370  # space.
35371  complete="$NM"
35372  path="${complete%% *}"
35373  tmp="$complete EOL"
35374  arguments="${tmp#* }"
35375
35376  # Input might be given as Windows format, start by converting to
35377  # unix format.
35378  new_path=`$CYGPATH -u "$path"`
35379
35380  # Now try to locate executable using which
35381  new_path=`$WHICH "$new_path" 2> /dev/null`
35382  # bat and cmd files are not always considered executable in cygwin causing which
35383  # to not find them
35384  if test "x$new_path" = x \
35385      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35386      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35387    new_path=`$CYGPATH -u "$path"`
35388  fi
35389  if test "x$new_path" = x; then
35390    # Oops. Which didn't find the executable.
35391    # The splitting of arguments from the executable at a space might have been incorrect,
35392    # since paths with space are more likely in Windows. Give it another try with the whole
35393    # argument.
35394    path="$complete"
35395    arguments="EOL"
35396    new_path=`$CYGPATH -u "$path"`
35397    new_path=`$WHICH "$new_path" 2> /dev/null`
35398    # bat and cmd files are not always considered executable in cygwin causing which
35399    # to not find them
35400    if test "x$new_path" = x \
35401        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35402        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35403      new_path=`$CYGPATH -u "$path"`
35404    fi
35405    if test "x$new_path" = x; then
35406      # It's still not found. Now this is an unrecoverable error.
35407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35408$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35409      has_space=`$ECHO "$complete" | $GREP " "`
35410      if test "x$has_space" != x; then
35411        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35412$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35413      fi
35414      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35415    fi
35416  fi
35417
35418  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35419  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35420  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35421  # "foo.exe" is OK but "foo" is an error.
35422  #
35423  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35424  # It is also a way to make sure we got the proper file name for the real test later on.
35425  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35426  if test "x$test_shortpath" = x; then
35427    # Short path failed, file does not exist as specified.
35428    # Try adding .exe or .cmd
35429    if test -f "${new_path}.exe"; then
35430      input_to_shortpath="${new_path}.exe"
35431    elif test -f "${new_path}.cmd"; then
35432      input_to_shortpath="${new_path}.cmd"
35433    else
35434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35435$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35436      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35437$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35438      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35439    fi
35440  else
35441    input_to_shortpath="$new_path"
35442  fi
35443
35444  # Call helper function which possibly converts this using DOS-style short mode.
35445  # If so, the updated path is stored in $new_path.
35446  new_path="$input_to_shortpath"
35447
35448  input_path="$input_to_shortpath"
35449  # Check if we need to convert this using DOS-style short mode. If the path
35450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35451  # take no chances and rewrite it.
35452  # Note: m4 eats our [], so we need to use [ and ] instead.
35453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35454  if test "x$has_forbidden_chars" != x; then
35455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35456    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35457    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35458    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35459      # Going to short mode and back again did indeed matter. Since short mode is
35460      # case insensitive, let's make it lowercase to improve readability.
35461      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35462      # Now convert it back to Unix-stile (cygpath)
35463      input_path=`$CYGPATH -u "$shortmode_path"`
35464      new_path="$input_path"
35465    fi
35466  fi
35467
35468  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35469  if test "x$test_cygdrive_prefix" = x; then
35470    # As a simple fix, exclude /usr/bin since it's not a real path.
35471    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35472      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35473      # a path prefixed by /cygdrive for fixpath to work.
35474      new_path="$CYGWIN_ROOT_PATH$input_path"
35475    fi
35476  fi
35477
35478  # remove trailing .exe if any
35479  new_path="${new_path/%.exe/}"
35480
35481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35482
35483  # First separate the path from the arguments. This will split at the first
35484  # space.
35485  complete="$NM"
35486  path="${complete%% *}"
35487  tmp="$complete EOL"
35488  arguments="${tmp#* }"
35489
35490  # Input might be given as Windows format, start by converting to
35491  # unix format.
35492  new_path="$path"
35493
35494  windows_path="$new_path"
35495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35496    unix_path=`$CYGPATH -u "$windows_path"`
35497    new_path="$unix_path"
35498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35500    new_path="$unix_path"
35501  fi
35502
35503
35504  # Now try to locate executable using which
35505  new_path=`$WHICH "$new_path" 2> /dev/null`
35506
35507  if test "x$new_path" = x; then
35508    # Oops. Which didn't find the executable.
35509    # The splitting of arguments from the executable at a space might have been incorrect,
35510    # since paths with space are more likely in Windows. Give it another try with the whole
35511    # argument.
35512    path="$complete"
35513    arguments="EOL"
35514    new_path="$path"
35515
35516  windows_path="$new_path"
35517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35518    unix_path=`$CYGPATH -u "$windows_path"`
35519    new_path="$unix_path"
35520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35522    new_path="$unix_path"
35523  fi
35524
35525
35526    new_path=`$WHICH "$new_path" 2> /dev/null`
35527
35528    if test "x$new_path" = x; then
35529      # It's still not found. Now this is an unrecoverable error.
35530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35531$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35532      has_space=`$ECHO "$complete" | $GREP " "`
35533      if test "x$has_space" != x; then
35534        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35535$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35536      fi
35537      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35538    fi
35539  fi
35540
35541  # Now new_path has a complete unix path to the binary
35542  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35543    # Keep paths in /bin as-is, but remove trailing .exe if any
35544    new_path="${new_path/%.exe/}"
35545    # Do not save /bin paths to all_fixpath_prefixes!
35546  else
35547    # Not in mixed or Windows style, start by that.
35548    new_path=`cmd //c echo $new_path`
35549
35550  input_path="$new_path"
35551  # Check if we need to convert this using DOS-style short mode. If the path
35552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35553  # take no chances and rewrite it.
35554  # Note: m4 eats our [], so we need to use [ and ] instead.
35555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35556  if test "x$has_forbidden_chars" != x; then
35557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35558    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35559  fi
35560
35561    # Output is in $new_path
35562
35563  windows_path="$new_path"
35564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35565    unix_path=`$CYGPATH -u "$windows_path"`
35566    new_path="$unix_path"
35567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35569    new_path="$unix_path"
35570  fi
35571
35572    # remove trailing .exe if any
35573    new_path="${new_path/%.exe/}"
35574
35575    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35576    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35577  fi
35578
35579  else
35580    # We're on a posix platform. Hooray! :)
35581    # First separate the path from the arguments. This will split at the first
35582    # space.
35583    complete="$NM"
35584    path="${complete%% *}"
35585    tmp="$complete EOL"
35586    arguments="${tmp#* }"
35587
35588    # Cannot rely on the command "which" here since it doesn't always work.
35589    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35590    if test -z "$is_absolute_path"; then
35591      # Path to executable is not absolute. Find it.
35592      IFS_save="$IFS"
35593      IFS=:
35594      for p in $PATH; do
35595        if test -f "$p/$path" && test -x "$p/$path"; then
35596          new_path="$p/$path"
35597          break
35598        fi
35599      done
35600      IFS="$IFS_save"
35601    else
35602      # This is an absolute path, we can use it without further modifications.
35603      new_path="$path"
35604    fi
35605
35606    if test "x$new_path" = x; then
35607      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35608$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35609      has_space=`$ECHO "$complete" | $GREP " "`
35610      if test "x$has_space" != x; then
35611        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35612$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35613      fi
35614      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35615    fi
35616  fi
35617
35618  # Now join together the path and the arguments once again
35619  if test "x$arguments" != xEOL; then
35620    new_complete="$new_path ${arguments% *}"
35621  else
35622    new_complete="$new_path"
35623  fi
35624
35625  if test "x$complete" != "x$new_complete"; then
35626    NM="$new_complete"
35627    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35628$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35629  fi
35630
35631
35632
35633  # Publish this variable in the help.
35634
35635
35636  if test "x$GNM" = x; then
35637    # The variable is not set by user, try to locate tool using the code snippet
35638    for ac_prog in gnm
35639do
35640  # Extract the first word of "$ac_prog", so it can be a program name with args.
35641set dummy $ac_prog; ac_word=$2
35642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35643$as_echo_n "checking for $ac_word... " >&6; }
35644if ${ac_cv_path_GNM+:} false; then :
35645  $as_echo_n "(cached) " >&6
35646else
35647  case $GNM in
35648  [\\/]* | ?:[\\/]*)
35649  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35650  ;;
35651  *)
35652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35653for as_dir in $PATH
35654do
35655  IFS=$as_save_IFS
35656  test -z "$as_dir" && as_dir=.
35657    for ac_exec_ext in '' $ac_executable_extensions; do
35658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35659    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35661    break 2
35662  fi
35663done
35664  done
35665IFS=$as_save_IFS
35666
35667  ;;
35668esac
35669fi
35670GNM=$ac_cv_path_GNM
35671if test -n "$GNM"; then
35672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35673$as_echo "$GNM" >&6; }
35674else
35675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35676$as_echo "no" >&6; }
35677fi
35678
35679
35680  test -n "$GNM" && break
35681done
35682
35683  else
35684    # The variable is set, but is it from the command line or the environment?
35685
35686    # Try to remove the string !GNM! from our list.
35687    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
35688    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35689      # If it failed, the variable was not from the command line. Ignore it,
35690      # but warn the user (except for BASH, which is always set by the calling BASH).
35691      if test "xGNM" != xBASH; then
35692        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
35693$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
35694      fi
35695      # Try to locate tool using the code snippet
35696      for ac_prog in gnm
35697do
35698  # Extract the first word of "$ac_prog", so it can be a program name with args.
35699set dummy $ac_prog; ac_word=$2
35700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35701$as_echo_n "checking for $ac_word... " >&6; }
35702if ${ac_cv_path_GNM+:} false; then :
35703  $as_echo_n "(cached) " >&6
35704else
35705  case $GNM in
35706  [\\/]* | ?:[\\/]*)
35707  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35708  ;;
35709  *)
35710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35711for as_dir in $PATH
35712do
35713  IFS=$as_save_IFS
35714  test -z "$as_dir" && as_dir=.
35715    for ac_exec_ext in '' $ac_executable_extensions; do
35716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35717    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35719    break 2
35720  fi
35721done
35722  done
35723IFS=$as_save_IFS
35724
35725  ;;
35726esac
35727fi
35728GNM=$ac_cv_path_GNM
35729if test -n "$GNM"; then
35730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35731$as_echo "$GNM" >&6; }
35732else
35733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35734$as_echo "no" >&6; }
35735fi
35736
35737
35738  test -n "$GNM" && break
35739done
35740
35741    else
35742      # If it succeeded, then it was overridden by the user. We will use it
35743      # for the tool.
35744
35745      # First remove it from the list of overridden variables, so we can test
35746      # for unknown variables in the end.
35747      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35748
35749      # Check if the provided tool contains a complete path.
35750      tool_specified="$GNM"
35751      tool_basename="${tool_specified##*/}"
35752      if test "x$tool_basename" = "x$tool_specified"; then
35753        # A command without a complete path is provided, search $PATH.
35754        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
35755$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
35756        # Extract the first word of "$tool_basename", so it can be a program name with args.
35757set dummy $tool_basename; ac_word=$2
35758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35759$as_echo_n "checking for $ac_word... " >&6; }
35760if ${ac_cv_path_GNM+:} false; then :
35761  $as_echo_n "(cached) " >&6
35762else
35763  case $GNM in
35764  [\\/]* | ?:[\\/]*)
35765  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35766  ;;
35767  *)
35768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35769for as_dir in $PATH
35770do
35771  IFS=$as_save_IFS
35772  test -z "$as_dir" && as_dir=.
35773    for ac_exec_ext in '' $ac_executable_extensions; do
35774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35775    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35777    break 2
35778  fi
35779done
35780  done
35781IFS=$as_save_IFS
35782
35783  ;;
35784esac
35785fi
35786GNM=$ac_cv_path_GNM
35787if test -n "$GNM"; then
35788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35789$as_echo "$GNM" >&6; }
35790else
35791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35792$as_echo "no" >&6; }
35793fi
35794
35795
35796        if test "x$GNM" = x; then
35797          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35798        fi
35799      else
35800        # Otherwise we believe it is a complete path. Use it as it is.
35801        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
35802$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
35803        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
35804$as_echo_n "checking for GNM... " >&6; }
35805        if test ! -x "$tool_specified"; then
35806          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35807$as_echo "not found" >&6; }
35808          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
35809        fi
35810        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35811$as_echo "$tool_specified" >&6; }
35812      fi
35813    fi
35814  fi
35815
35816
35817
35818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35819
35820  # First separate the path from the arguments. This will split at the first
35821  # space.
35822  complete="$GNM"
35823  path="${complete%% *}"
35824  tmp="$complete EOL"
35825  arguments="${tmp#* }"
35826
35827  # Input might be given as Windows format, start by converting to
35828  # unix format.
35829  new_path=`$CYGPATH -u "$path"`
35830
35831  # Now try to locate executable using which
35832  new_path=`$WHICH "$new_path" 2> /dev/null`
35833  # bat and cmd files are not always considered executable in cygwin causing which
35834  # to not find them
35835  if test "x$new_path" = x \
35836      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35837      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35838    new_path=`$CYGPATH -u "$path"`
35839  fi
35840  if test "x$new_path" = x; then
35841    # Oops. Which didn't find the executable.
35842    # The splitting of arguments from the executable at a space might have been incorrect,
35843    # since paths with space are more likely in Windows. Give it another try with the whole
35844    # argument.
35845    path="$complete"
35846    arguments="EOL"
35847    new_path=`$CYGPATH -u "$path"`
35848    new_path=`$WHICH "$new_path" 2> /dev/null`
35849    # bat and cmd files are not always considered executable in cygwin causing which
35850    # to not find them
35851    if test "x$new_path" = x \
35852        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35853        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35854      new_path=`$CYGPATH -u "$path"`
35855    fi
35856    if test "x$new_path" = x; then
35857      # It's still not found. Now this is an unrecoverable error.
35858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35859$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35860      has_space=`$ECHO "$complete" | $GREP " "`
35861      if test "x$has_space" != x; then
35862        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35863$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35864      fi
35865      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35866    fi
35867  fi
35868
35869  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35870  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35871  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35872  # "foo.exe" is OK but "foo" is an error.
35873  #
35874  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35875  # It is also a way to make sure we got the proper file name for the real test later on.
35876  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35877  if test "x$test_shortpath" = x; then
35878    # Short path failed, file does not exist as specified.
35879    # Try adding .exe or .cmd
35880    if test -f "${new_path}.exe"; then
35881      input_to_shortpath="${new_path}.exe"
35882    elif test -f "${new_path}.cmd"; then
35883      input_to_shortpath="${new_path}.cmd"
35884    else
35885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
35886$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
35887      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35888$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35889      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35890    fi
35891  else
35892    input_to_shortpath="$new_path"
35893  fi
35894
35895  # Call helper function which possibly converts this using DOS-style short mode.
35896  # If so, the updated path is stored in $new_path.
35897  new_path="$input_to_shortpath"
35898
35899  input_path="$input_to_shortpath"
35900  # Check if we need to convert this using DOS-style short mode. If the path
35901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35902  # take no chances and rewrite it.
35903  # Note: m4 eats our [], so we need to use [ and ] instead.
35904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35905  if test "x$has_forbidden_chars" != x; then
35906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35907    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35908    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35909    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35910      # Going to short mode and back again did indeed matter. Since short mode is
35911      # case insensitive, let's make it lowercase to improve readability.
35912      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35913      # Now convert it back to Unix-stile (cygpath)
35914      input_path=`$CYGPATH -u "$shortmode_path"`
35915      new_path="$input_path"
35916    fi
35917  fi
35918
35919  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35920  if test "x$test_cygdrive_prefix" = x; then
35921    # As a simple fix, exclude /usr/bin since it's not a real path.
35922    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35923      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35924      # a path prefixed by /cygdrive for fixpath to work.
35925      new_path="$CYGWIN_ROOT_PATH$input_path"
35926    fi
35927  fi
35928
35929  # remove trailing .exe if any
35930  new_path="${new_path/%.exe/}"
35931
35932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35933
35934  # First separate the path from the arguments. This will split at the first
35935  # space.
35936  complete="$GNM"
35937  path="${complete%% *}"
35938  tmp="$complete EOL"
35939  arguments="${tmp#* }"
35940
35941  # Input might be given as Windows format, start by converting to
35942  # unix format.
35943  new_path="$path"
35944
35945  windows_path="$new_path"
35946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35947    unix_path=`$CYGPATH -u "$windows_path"`
35948    new_path="$unix_path"
35949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35951    new_path="$unix_path"
35952  fi
35953
35954
35955  # Now try to locate executable using which
35956  new_path=`$WHICH "$new_path" 2> /dev/null`
35957
35958  if test "x$new_path" = x; then
35959    # Oops. Which didn't find the executable.
35960    # The splitting of arguments from the executable at a space might have been incorrect,
35961    # since paths with space are more likely in Windows. Give it another try with the whole
35962    # argument.
35963    path="$complete"
35964    arguments="EOL"
35965    new_path="$path"
35966
35967  windows_path="$new_path"
35968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35969    unix_path=`$CYGPATH -u "$windows_path"`
35970    new_path="$unix_path"
35971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35973    new_path="$unix_path"
35974  fi
35975
35976
35977    new_path=`$WHICH "$new_path" 2> /dev/null`
35978
35979    if test "x$new_path" = x; then
35980      # It's still not found. Now this is an unrecoverable error.
35981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35982$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35983      has_space=`$ECHO "$complete" | $GREP " "`
35984      if test "x$has_space" != x; then
35985        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35986$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35987      fi
35988      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35989    fi
35990  fi
35991
35992  # Now new_path has a complete unix path to the binary
35993  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35994    # Keep paths in /bin as-is, but remove trailing .exe if any
35995    new_path="${new_path/%.exe/}"
35996    # Do not save /bin paths to all_fixpath_prefixes!
35997  else
35998    # Not in mixed or Windows style, start by that.
35999    new_path=`cmd //c echo $new_path`
36000
36001  input_path="$new_path"
36002  # Check if we need to convert this using DOS-style short mode. If the path
36003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36004  # take no chances and rewrite it.
36005  # Note: m4 eats our [], so we need to use [ and ] instead.
36006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36007  if test "x$has_forbidden_chars" != x; then
36008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36009    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36010  fi
36011
36012    # Output is in $new_path
36013
36014  windows_path="$new_path"
36015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36016    unix_path=`$CYGPATH -u "$windows_path"`
36017    new_path="$unix_path"
36018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36020    new_path="$unix_path"
36021  fi
36022
36023    # remove trailing .exe if any
36024    new_path="${new_path/%.exe/}"
36025
36026    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36027    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36028  fi
36029
36030  else
36031    # We're on a posix platform. Hooray! :)
36032    # First separate the path from the arguments. This will split at the first
36033    # space.
36034    complete="$GNM"
36035    path="${complete%% *}"
36036    tmp="$complete EOL"
36037    arguments="${tmp#* }"
36038
36039    # Cannot rely on the command "which" here since it doesn't always work.
36040    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36041    if test -z "$is_absolute_path"; then
36042      # Path to executable is not absolute. Find it.
36043      IFS_save="$IFS"
36044      IFS=:
36045      for p in $PATH; do
36046        if test -f "$p/$path" && test -x "$p/$path"; then
36047          new_path="$p/$path"
36048          break
36049        fi
36050      done
36051      IFS="$IFS_save"
36052    else
36053      # This is an absolute path, we can use it without further modifications.
36054      new_path="$path"
36055    fi
36056
36057    if test "x$new_path" = x; then
36058      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36059$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36060      has_space=`$ECHO "$complete" | $GREP " "`
36061      if test "x$has_space" != x; then
36062        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36063$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36064      fi
36065      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36066    fi
36067  fi
36068
36069  # Now join together the path and the arguments once again
36070  if test "x$arguments" != xEOL; then
36071    new_complete="$new_path ${arguments% *}"
36072  else
36073    new_complete="$new_path"
36074  fi
36075
36076  if test "x$complete" != "x$new_complete"; then
36077    GNM="$new_complete"
36078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36079$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36080  fi
36081
36082
36083
36084
36085  # Publish this variable in the help.
36086
36087
36088  if test "x$MCS" = x; then
36089    # The variable is not set by user, try to locate tool using the code snippet
36090    for ac_prog in mcs
36091do
36092  # Extract the first word of "$ac_prog", so it can be a program name with args.
36093set dummy $ac_prog; ac_word=$2
36094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36095$as_echo_n "checking for $ac_word... " >&6; }
36096if ${ac_cv_path_MCS+:} false; then :
36097  $as_echo_n "(cached) " >&6
36098else
36099  case $MCS in
36100  [\\/]* | ?:[\\/]*)
36101  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36102  ;;
36103  *)
36104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36105for as_dir in $PATH
36106do
36107  IFS=$as_save_IFS
36108  test -z "$as_dir" && as_dir=.
36109    for ac_exec_ext in '' $ac_executable_extensions; do
36110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36111    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36113    break 2
36114  fi
36115done
36116  done
36117IFS=$as_save_IFS
36118
36119  ;;
36120esac
36121fi
36122MCS=$ac_cv_path_MCS
36123if test -n "$MCS"; then
36124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36125$as_echo "$MCS" >&6; }
36126else
36127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36128$as_echo "no" >&6; }
36129fi
36130
36131
36132  test -n "$MCS" && break
36133done
36134
36135  else
36136    # The variable is set, but is it from the command line or the environment?
36137
36138    # Try to remove the string !MCS! from our list.
36139    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36140    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36141      # If it failed, the variable was not from the command line. Ignore it,
36142      # but warn the user (except for BASH, which is always set by the calling BASH).
36143      if test "xMCS" != xBASH; then
36144        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36145$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36146      fi
36147      # Try to locate tool using the code snippet
36148      for ac_prog in mcs
36149do
36150  # Extract the first word of "$ac_prog", so it can be a program name with args.
36151set dummy $ac_prog; ac_word=$2
36152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36153$as_echo_n "checking for $ac_word... " >&6; }
36154if ${ac_cv_path_MCS+:} false; then :
36155  $as_echo_n "(cached) " >&6
36156else
36157  case $MCS in
36158  [\\/]* | ?:[\\/]*)
36159  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36160  ;;
36161  *)
36162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36163for as_dir in $PATH
36164do
36165  IFS=$as_save_IFS
36166  test -z "$as_dir" && as_dir=.
36167    for ac_exec_ext in '' $ac_executable_extensions; do
36168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36169    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36171    break 2
36172  fi
36173done
36174  done
36175IFS=$as_save_IFS
36176
36177  ;;
36178esac
36179fi
36180MCS=$ac_cv_path_MCS
36181if test -n "$MCS"; then
36182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36183$as_echo "$MCS" >&6; }
36184else
36185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36186$as_echo "no" >&6; }
36187fi
36188
36189
36190  test -n "$MCS" && break
36191done
36192
36193    else
36194      # If it succeeded, then it was overridden by the user. We will use it
36195      # for the tool.
36196
36197      # First remove it from the list of overridden variables, so we can test
36198      # for unknown variables in the end.
36199      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36200
36201      # Check if the provided tool contains a complete path.
36202      tool_specified="$MCS"
36203      tool_basename="${tool_specified##*/}"
36204      if test "x$tool_basename" = "x$tool_specified"; then
36205        # A command without a complete path is provided, search $PATH.
36206        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36207$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36208        # Extract the first word of "$tool_basename", so it can be a program name with args.
36209set dummy $tool_basename; ac_word=$2
36210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36211$as_echo_n "checking for $ac_word... " >&6; }
36212if ${ac_cv_path_MCS+:} false; then :
36213  $as_echo_n "(cached) " >&6
36214else
36215  case $MCS in
36216  [\\/]* | ?:[\\/]*)
36217  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36218  ;;
36219  *)
36220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36221for as_dir in $PATH
36222do
36223  IFS=$as_save_IFS
36224  test -z "$as_dir" && as_dir=.
36225    for ac_exec_ext in '' $ac_executable_extensions; do
36226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36227    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36229    break 2
36230  fi
36231done
36232  done
36233IFS=$as_save_IFS
36234
36235  ;;
36236esac
36237fi
36238MCS=$ac_cv_path_MCS
36239if test -n "$MCS"; then
36240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36241$as_echo "$MCS" >&6; }
36242else
36243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36244$as_echo "no" >&6; }
36245fi
36246
36247
36248        if test "x$MCS" = x; then
36249          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36250        fi
36251      else
36252        # Otherwise we believe it is a complete path. Use it as it is.
36253        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36254$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36255        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36256$as_echo_n "checking for MCS... " >&6; }
36257        if test ! -x "$tool_specified"; then
36258          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36259$as_echo "not found" >&6; }
36260          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36261        fi
36262        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36263$as_echo "$tool_specified" >&6; }
36264      fi
36265    fi
36266  fi
36267
36268
36269
36270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36271
36272  # First separate the path from the arguments. This will split at the first
36273  # space.
36274  complete="$MCS"
36275  path="${complete%% *}"
36276  tmp="$complete EOL"
36277  arguments="${tmp#* }"
36278
36279  # Input might be given as Windows format, start by converting to
36280  # unix format.
36281  new_path=`$CYGPATH -u "$path"`
36282
36283  # Now try to locate executable using which
36284  new_path=`$WHICH "$new_path" 2> /dev/null`
36285  # bat and cmd files are not always considered executable in cygwin causing which
36286  # to not find them
36287  if test "x$new_path" = x \
36288      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36289      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36290    new_path=`$CYGPATH -u "$path"`
36291  fi
36292  if test "x$new_path" = x; then
36293    # Oops. Which didn't find the executable.
36294    # The splitting of arguments from the executable at a space might have been incorrect,
36295    # since paths with space are more likely in Windows. Give it another try with the whole
36296    # argument.
36297    path="$complete"
36298    arguments="EOL"
36299    new_path=`$CYGPATH -u "$path"`
36300    new_path=`$WHICH "$new_path" 2> /dev/null`
36301    # bat and cmd files are not always considered executable in cygwin causing which
36302    # to not find them
36303    if test "x$new_path" = x \
36304        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36305        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36306      new_path=`$CYGPATH -u "$path"`
36307    fi
36308    if test "x$new_path" = x; then
36309      # It's still not found. Now this is an unrecoverable error.
36310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36311$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36312      has_space=`$ECHO "$complete" | $GREP " "`
36313      if test "x$has_space" != x; then
36314        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36315$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36316      fi
36317      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36318    fi
36319  fi
36320
36321  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36322  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36323  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36324  # "foo.exe" is OK but "foo" is an error.
36325  #
36326  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36327  # It is also a way to make sure we got the proper file name for the real test later on.
36328  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36329  if test "x$test_shortpath" = x; then
36330    # Short path failed, file does not exist as specified.
36331    # Try adding .exe or .cmd
36332    if test -f "${new_path}.exe"; then
36333      input_to_shortpath="${new_path}.exe"
36334    elif test -f "${new_path}.cmd"; then
36335      input_to_shortpath="${new_path}.cmd"
36336    else
36337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36338$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36339      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36340$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36341      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36342    fi
36343  else
36344    input_to_shortpath="$new_path"
36345  fi
36346
36347  # Call helper function which possibly converts this using DOS-style short mode.
36348  # If so, the updated path is stored in $new_path.
36349  new_path="$input_to_shortpath"
36350
36351  input_path="$input_to_shortpath"
36352  # Check if we need to convert this using DOS-style short mode. If the path
36353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36354  # take no chances and rewrite it.
36355  # Note: m4 eats our [], so we need to use [ and ] instead.
36356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36357  if test "x$has_forbidden_chars" != x; then
36358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36359    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36360    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36361    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36362      # Going to short mode and back again did indeed matter. Since short mode is
36363      # case insensitive, let's make it lowercase to improve readability.
36364      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36365      # Now convert it back to Unix-stile (cygpath)
36366      input_path=`$CYGPATH -u "$shortmode_path"`
36367      new_path="$input_path"
36368    fi
36369  fi
36370
36371  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36372  if test "x$test_cygdrive_prefix" = x; then
36373    # As a simple fix, exclude /usr/bin since it's not a real path.
36374    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36375      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36376      # a path prefixed by /cygdrive for fixpath to work.
36377      new_path="$CYGWIN_ROOT_PATH$input_path"
36378    fi
36379  fi
36380
36381  # remove trailing .exe if any
36382  new_path="${new_path/%.exe/}"
36383
36384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36385
36386  # First separate the path from the arguments. This will split at the first
36387  # space.
36388  complete="$MCS"
36389  path="${complete%% *}"
36390  tmp="$complete EOL"
36391  arguments="${tmp#* }"
36392
36393  # Input might be given as Windows format, start by converting to
36394  # unix format.
36395  new_path="$path"
36396
36397  windows_path="$new_path"
36398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36399    unix_path=`$CYGPATH -u "$windows_path"`
36400    new_path="$unix_path"
36401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36403    new_path="$unix_path"
36404  fi
36405
36406
36407  # Now try to locate executable using which
36408  new_path=`$WHICH "$new_path" 2> /dev/null`
36409
36410  if test "x$new_path" = x; then
36411    # Oops. Which didn't find the executable.
36412    # The splitting of arguments from the executable at a space might have been incorrect,
36413    # since paths with space are more likely in Windows. Give it another try with the whole
36414    # argument.
36415    path="$complete"
36416    arguments="EOL"
36417    new_path="$path"
36418
36419  windows_path="$new_path"
36420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36421    unix_path=`$CYGPATH -u "$windows_path"`
36422    new_path="$unix_path"
36423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36425    new_path="$unix_path"
36426  fi
36427
36428
36429    new_path=`$WHICH "$new_path" 2> /dev/null`
36430
36431    if test "x$new_path" = x; then
36432      # It's still not found. Now this is an unrecoverable error.
36433      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36434$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36435      has_space=`$ECHO "$complete" | $GREP " "`
36436      if test "x$has_space" != x; then
36437        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36438$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36439      fi
36440      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36441    fi
36442  fi
36443
36444  # Now new_path has a complete unix path to the binary
36445  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36446    # Keep paths in /bin as-is, but remove trailing .exe if any
36447    new_path="${new_path/%.exe/}"
36448    # Do not save /bin paths to all_fixpath_prefixes!
36449  else
36450    # Not in mixed or Windows style, start by that.
36451    new_path=`cmd //c echo $new_path`
36452
36453  input_path="$new_path"
36454  # Check if we need to convert this using DOS-style short mode. If the path
36455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36456  # take no chances and rewrite it.
36457  # Note: m4 eats our [], so we need to use [ and ] instead.
36458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36459  if test "x$has_forbidden_chars" != x; then
36460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36461    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36462  fi
36463
36464    # Output is in $new_path
36465
36466  windows_path="$new_path"
36467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36468    unix_path=`$CYGPATH -u "$windows_path"`
36469    new_path="$unix_path"
36470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36472    new_path="$unix_path"
36473  fi
36474
36475    # remove trailing .exe if any
36476    new_path="${new_path/%.exe/}"
36477
36478    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36479    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36480  fi
36481
36482  else
36483    # We're on a posix platform. Hooray! :)
36484    # First separate the path from the arguments. This will split at the first
36485    # space.
36486    complete="$MCS"
36487    path="${complete%% *}"
36488    tmp="$complete EOL"
36489    arguments="${tmp#* }"
36490
36491    # Cannot rely on the command "which" here since it doesn't always work.
36492    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36493    if test -z "$is_absolute_path"; then
36494      # Path to executable is not absolute. Find it.
36495      IFS_save="$IFS"
36496      IFS=:
36497      for p in $PATH; do
36498        if test -f "$p/$path" && test -x "$p/$path"; then
36499          new_path="$p/$path"
36500          break
36501        fi
36502      done
36503      IFS="$IFS_save"
36504    else
36505      # This is an absolute path, we can use it without further modifications.
36506      new_path="$path"
36507    fi
36508
36509    if test "x$new_path" = x; then
36510      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36511$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36512      has_space=`$ECHO "$complete" | $GREP " "`
36513      if test "x$has_space" != x; then
36514        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36515$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36516      fi
36517      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36518    fi
36519  fi
36520
36521  # Now join together the path and the arguments once again
36522  if test "x$arguments" != xEOL; then
36523    new_complete="$new_path ${arguments% *}"
36524  else
36525    new_complete="$new_path"
36526  fi
36527
36528  if test "x$complete" != "x$new_complete"; then
36529    MCS="$new_complete"
36530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36531$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36532  fi
36533
36534  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36535    # FIXME: we should unify this with the solaris case above.
36536
36537
36538  # Publish this variable in the help.
36539
36540
36541  if test "x$STRIP" = x; then
36542    # The variable is not set by user, try to locate tool using the code snippet
36543    if test -n "$ac_tool_prefix"; then
36544  for ac_prog in strip
36545  do
36546    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36547set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36549$as_echo_n "checking for $ac_word... " >&6; }
36550if ${ac_cv_prog_STRIP+:} false; then :
36551  $as_echo_n "(cached) " >&6
36552else
36553  if test -n "$STRIP"; then
36554  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36555else
36556as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36557for as_dir in $PATH
36558do
36559  IFS=$as_save_IFS
36560  test -z "$as_dir" && as_dir=.
36561    for ac_exec_ext in '' $ac_executable_extensions; do
36562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36563    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36565    break 2
36566  fi
36567done
36568  done
36569IFS=$as_save_IFS
36570
36571fi
36572fi
36573STRIP=$ac_cv_prog_STRIP
36574if test -n "$STRIP"; then
36575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36576$as_echo "$STRIP" >&6; }
36577else
36578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36579$as_echo "no" >&6; }
36580fi
36581
36582
36583    test -n "$STRIP" && break
36584  done
36585fi
36586if test -z "$STRIP"; then
36587  ac_ct_STRIP=$STRIP
36588  for ac_prog in strip
36589do
36590  # Extract the first word of "$ac_prog", so it can be a program name with args.
36591set dummy $ac_prog; ac_word=$2
36592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36593$as_echo_n "checking for $ac_word... " >&6; }
36594if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36595  $as_echo_n "(cached) " >&6
36596else
36597  if test -n "$ac_ct_STRIP"; then
36598  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36599else
36600as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36601for as_dir in $PATH
36602do
36603  IFS=$as_save_IFS
36604  test -z "$as_dir" && as_dir=.
36605    for ac_exec_ext in '' $ac_executable_extensions; do
36606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36607    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36609    break 2
36610  fi
36611done
36612  done
36613IFS=$as_save_IFS
36614
36615fi
36616fi
36617ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36618if test -n "$ac_ct_STRIP"; then
36619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36620$as_echo "$ac_ct_STRIP" >&6; }
36621else
36622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36623$as_echo "no" >&6; }
36624fi
36625
36626
36627  test -n "$ac_ct_STRIP" && break
36628done
36629
36630  if test "x$ac_ct_STRIP" = x; then
36631    STRIP=""
36632  else
36633    case $cross_compiling:$ac_tool_warned in
36634yes:)
36635{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36636$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36637ac_tool_warned=yes ;;
36638esac
36639    STRIP=$ac_ct_STRIP
36640  fi
36641fi
36642
36643  else
36644    # The variable is set, but is it from the command line or the environment?
36645
36646    # Try to remove the string !STRIP! from our list.
36647    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36648    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36649      # If it failed, the variable was not from the command line. Ignore it,
36650      # but warn the user (except for BASH, which is always set by the calling BASH).
36651      if test "xSTRIP" != xBASH; then
36652        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36653$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36654      fi
36655      # Try to locate tool using the code snippet
36656      if test -n "$ac_tool_prefix"; then
36657  for ac_prog in strip
36658  do
36659    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36660set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36662$as_echo_n "checking for $ac_word... " >&6; }
36663if ${ac_cv_prog_STRIP+:} false; then :
36664  $as_echo_n "(cached) " >&6
36665else
36666  if test -n "$STRIP"; then
36667  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36668else
36669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36670for as_dir in $PATH
36671do
36672  IFS=$as_save_IFS
36673  test -z "$as_dir" && as_dir=.
36674    for ac_exec_ext in '' $ac_executable_extensions; do
36675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36676    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36678    break 2
36679  fi
36680done
36681  done
36682IFS=$as_save_IFS
36683
36684fi
36685fi
36686STRIP=$ac_cv_prog_STRIP
36687if test -n "$STRIP"; then
36688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36689$as_echo "$STRIP" >&6; }
36690else
36691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36692$as_echo "no" >&6; }
36693fi
36694
36695
36696    test -n "$STRIP" && break
36697  done
36698fi
36699if test -z "$STRIP"; then
36700  ac_ct_STRIP=$STRIP
36701  for ac_prog in strip
36702do
36703  # Extract the first word of "$ac_prog", so it can be a program name with args.
36704set dummy $ac_prog; ac_word=$2
36705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36706$as_echo_n "checking for $ac_word... " >&6; }
36707if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36708  $as_echo_n "(cached) " >&6
36709else
36710  if test -n "$ac_ct_STRIP"; then
36711  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36712else
36713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36714for as_dir in $PATH
36715do
36716  IFS=$as_save_IFS
36717  test -z "$as_dir" && as_dir=.
36718    for ac_exec_ext in '' $ac_executable_extensions; do
36719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36720    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36722    break 2
36723  fi
36724done
36725  done
36726IFS=$as_save_IFS
36727
36728fi
36729fi
36730ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36731if test -n "$ac_ct_STRIP"; then
36732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36733$as_echo "$ac_ct_STRIP" >&6; }
36734else
36735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36736$as_echo "no" >&6; }
36737fi
36738
36739
36740  test -n "$ac_ct_STRIP" && break
36741done
36742
36743  if test "x$ac_ct_STRIP" = x; then
36744    STRIP=""
36745  else
36746    case $cross_compiling:$ac_tool_warned in
36747yes:)
36748{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36749$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36750ac_tool_warned=yes ;;
36751esac
36752    STRIP=$ac_ct_STRIP
36753  fi
36754fi
36755
36756    else
36757      # If it succeeded, then it was overridden by the user. We will use it
36758      # for the tool.
36759
36760      # First remove it from the list of overridden variables, so we can test
36761      # for unknown variables in the end.
36762      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36763
36764      # Check if the provided tool contains a complete path.
36765      tool_specified="$STRIP"
36766      tool_basename="${tool_specified##*/}"
36767      if test "x$tool_basename" = "x$tool_specified"; then
36768        # A command without a complete path is provided, search $PATH.
36769        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36770$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36771        # Extract the first word of "$tool_basename", so it can be a program name with args.
36772set dummy $tool_basename; ac_word=$2
36773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36774$as_echo_n "checking for $ac_word... " >&6; }
36775if ${ac_cv_path_STRIP+:} false; then :
36776  $as_echo_n "(cached) " >&6
36777else
36778  case $STRIP in
36779  [\\/]* | ?:[\\/]*)
36780  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36781  ;;
36782  *)
36783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36784for as_dir in $PATH
36785do
36786  IFS=$as_save_IFS
36787  test -z "$as_dir" && as_dir=.
36788    for ac_exec_ext in '' $ac_executable_extensions; do
36789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36790    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36792    break 2
36793  fi
36794done
36795  done
36796IFS=$as_save_IFS
36797
36798  ;;
36799esac
36800fi
36801STRIP=$ac_cv_path_STRIP
36802if test -n "$STRIP"; then
36803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36804$as_echo "$STRIP" >&6; }
36805else
36806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36807$as_echo "no" >&6; }
36808fi
36809
36810
36811        if test "x$STRIP" = x; then
36812          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36813        fi
36814      else
36815        # Otherwise we believe it is a complete path. Use it as it is.
36816        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36817$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36818        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36819$as_echo_n "checking for STRIP... " >&6; }
36820        if test ! -x "$tool_specified"; then
36821          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36822$as_echo "not found" >&6; }
36823          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36824        fi
36825        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36826$as_echo "$tool_specified" >&6; }
36827      fi
36828    fi
36829  fi
36830
36831
36832
36833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36834
36835  # First separate the path from the arguments. This will split at the first
36836  # space.
36837  complete="$STRIP"
36838  path="${complete%% *}"
36839  tmp="$complete EOL"
36840  arguments="${tmp#* }"
36841
36842  # Input might be given as Windows format, start by converting to
36843  # unix format.
36844  new_path=`$CYGPATH -u "$path"`
36845
36846  # Now try to locate executable using which
36847  new_path=`$WHICH "$new_path" 2> /dev/null`
36848  # bat and cmd files are not always considered executable in cygwin causing which
36849  # to not find them
36850  if test "x$new_path" = x \
36851      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36852      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36853    new_path=`$CYGPATH -u "$path"`
36854  fi
36855  if test "x$new_path" = x; then
36856    # Oops. Which didn't find the executable.
36857    # The splitting of arguments from the executable at a space might have been incorrect,
36858    # since paths with space are more likely in Windows. Give it another try with the whole
36859    # argument.
36860    path="$complete"
36861    arguments="EOL"
36862    new_path=`$CYGPATH -u "$path"`
36863    new_path=`$WHICH "$new_path" 2> /dev/null`
36864    # bat and cmd files are not always considered executable in cygwin causing which
36865    # to not find them
36866    if test "x$new_path" = x \
36867        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36868        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36869      new_path=`$CYGPATH -u "$path"`
36870    fi
36871    if test "x$new_path" = x; then
36872      # It's still not found. Now this is an unrecoverable error.
36873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36874$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36875      has_space=`$ECHO "$complete" | $GREP " "`
36876      if test "x$has_space" != x; then
36877        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36878$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36879      fi
36880      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36881    fi
36882  fi
36883
36884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36887  # "foo.exe" is OK but "foo" is an error.
36888  #
36889  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36890  # It is also a way to make sure we got the proper file name for the real test later on.
36891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36892  if test "x$test_shortpath" = x; then
36893    # Short path failed, file does not exist as specified.
36894    # Try adding .exe or .cmd
36895    if test -f "${new_path}.exe"; then
36896      input_to_shortpath="${new_path}.exe"
36897    elif test -f "${new_path}.cmd"; then
36898      input_to_shortpath="${new_path}.cmd"
36899    else
36900      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36901$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36902      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36903$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36904      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36905    fi
36906  else
36907    input_to_shortpath="$new_path"
36908  fi
36909
36910  # Call helper function which possibly converts this using DOS-style short mode.
36911  # If so, the updated path is stored in $new_path.
36912  new_path="$input_to_shortpath"
36913
36914  input_path="$input_to_shortpath"
36915  # Check if we need to convert this using DOS-style short mode. If the path
36916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36917  # take no chances and rewrite it.
36918  # Note: m4 eats our [], so we need to use [ and ] instead.
36919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36920  if test "x$has_forbidden_chars" != x; then
36921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36922    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36923    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36924    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36925      # Going to short mode and back again did indeed matter. Since short mode is
36926      # case insensitive, let's make it lowercase to improve readability.
36927      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36928      # Now convert it back to Unix-stile (cygpath)
36929      input_path=`$CYGPATH -u "$shortmode_path"`
36930      new_path="$input_path"
36931    fi
36932  fi
36933
36934  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36935  if test "x$test_cygdrive_prefix" = x; then
36936    # As a simple fix, exclude /usr/bin since it's not a real path.
36937    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36938      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36939      # a path prefixed by /cygdrive for fixpath to work.
36940      new_path="$CYGWIN_ROOT_PATH$input_path"
36941    fi
36942  fi
36943
36944  # remove trailing .exe if any
36945  new_path="${new_path/%.exe/}"
36946
36947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36948
36949  # First separate the path from the arguments. This will split at the first
36950  # space.
36951  complete="$STRIP"
36952  path="${complete%% *}"
36953  tmp="$complete EOL"
36954  arguments="${tmp#* }"
36955
36956  # Input might be given as Windows format, start by converting to
36957  # unix format.
36958  new_path="$path"
36959
36960  windows_path="$new_path"
36961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36962    unix_path=`$CYGPATH -u "$windows_path"`
36963    new_path="$unix_path"
36964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36966    new_path="$unix_path"
36967  fi
36968
36969
36970  # Now try to locate executable using which
36971  new_path=`$WHICH "$new_path" 2> /dev/null`
36972
36973  if test "x$new_path" = x; then
36974    # Oops. Which didn't find the executable.
36975    # The splitting of arguments from the executable at a space might have been incorrect,
36976    # since paths with space are more likely in Windows. Give it another try with the whole
36977    # argument.
36978    path="$complete"
36979    arguments="EOL"
36980    new_path="$path"
36981
36982  windows_path="$new_path"
36983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36984    unix_path=`$CYGPATH -u "$windows_path"`
36985    new_path="$unix_path"
36986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36988    new_path="$unix_path"
36989  fi
36990
36991
36992    new_path=`$WHICH "$new_path" 2> /dev/null`
36993
36994    if test "x$new_path" = x; then
36995      # It's still not found. Now this is an unrecoverable error.
36996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36997$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36998      has_space=`$ECHO "$complete" | $GREP " "`
36999      if test "x$has_space" != x; then
37000        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37001$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37002      fi
37003      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37004    fi
37005  fi
37006
37007  # Now new_path has a complete unix path to the binary
37008  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37009    # Keep paths in /bin as-is, but remove trailing .exe if any
37010    new_path="${new_path/%.exe/}"
37011    # Do not save /bin paths to all_fixpath_prefixes!
37012  else
37013    # Not in mixed or Windows style, start by that.
37014    new_path=`cmd //c echo $new_path`
37015
37016  input_path="$new_path"
37017  # Check if we need to convert this using DOS-style short mode. If the path
37018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37019  # take no chances and rewrite it.
37020  # Note: m4 eats our [], so we need to use [ and ] instead.
37021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37022  if test "x$has_forbidden_chars" != x; then
37023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37024    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37025  fi
37026
37027    # Output is in $new_path
37028
37029  windows_path="$new_path"
37030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37031    unix_path=`$CYGPATH -u "$windows_path"`
37032    new_path="$unix_path"
37033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37035    new_path="$unix_path"
37036  fi
37037
37038    # remove trailing .exe if any
37039    new_path="${new_path/%.exe/}"
37040
37041    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37042    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37043  fi
37044
37045  else
37046    # We're on a posix platform. Hooray! :)
37047    # First separate the path from the arguments. This will split at the first
37048    # space.
37049    complete="$STRIP"
37050    path="${complete%% *}"
37051    tmp="$complete EOL"
37052    arguments="${tmp#* }"
37053
37054    # Cannot rely on the command "which" here since it doesn't always work.
37055    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37056    if test -z "$is_absolute_path"; then
37057      # Path to executable is not absolute. Find it.
37058      IFS_save="$IFS"
37059      IFS=:
37060      for p in $PATH; do
37061        if test -f "$p/$path" && test -x "$p/$path"; then
37062          new_path="$p/$path"
37063          break
37064        fi
37065      done
37066      IFS="$IFS_save"
37067    else
37068      # This is an absolute path, we can use it without further modifications.
37069      new_path="$path"
37070    fi
37071
37072    if test "x$new_path" = x; then
37073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37074$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37075      has_space=`$ECHO "$complete" | $GREP " "`
37076      if test "x$has_space" != x; then
37077        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37078$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37079      fi
37080      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37081    fi
37082  fi
37083
37084  # Now join together the path and the arguments once again
37085  if test "x$arguments" != xEOL; then
37086    new_complete="$new_path ${arguments% *}"
37087  else
37088    new_complete="$new_path"
37089  fi
37090
37091  if test "x$complete" != "x$new_complete"; then
37092    STRIP="$new_complete"
37093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37094$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37095  fi
37096
37097
37098
37099  # Publish this variable in the help.
37100
37101
37102  if test "x$NM" = x; then
37103    # The variable is not set by user, try to locate tool using the code snippet
37104    if test -n "$ac_tool_prefix"; then
37105  for ac_prog in nm
37106  do
37107    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37108set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37110$as_echo_n "checking for $ac_word... " >&6; }
37111if ${ac_cv_prog_NM+:} false; then :
37112  $as_echo_n "(cached) " >&6
37113else
37114  if test -n "$NM"; then
37115  ac_cv_prog_NM="$NM" # Let the user override the test.
37116else
37117as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37118for as_dir in $PATH
37119do
37120  IFS=$as_save_IFS
37121  test -z "$as_dir" && as_dir=.
37122    for ac_exec_ext in '' $ac_executable_extensions; do
37123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37124    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37126    break 2
37127  fi
37128done
37129  done
37130IFS=$as_save_IFS
37131
37132fi
37133fi
37134NM=$ac_cv_prog_NM
37135if test -n "$NM"; then
37136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37137$as_echo "$NM" >&6; }
37138else
37139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37140$as_echo "no" >&6; }
37141fi
37142
37143
37144    test -n "$NM" && break
37145  done
37146fi
37147if test -z "$NM"; then
37148  ac_ct_NM=$NM
37149  for ac_prog in nm
37150do
37151  # Extract the first word of "$ac_prog", so it can be a program name with args.
37152set dummy $ac_prog; ac_word=$2
37153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37154$as_echo_n "checking for $ac_word... " >&6; }
37155if ${ac_cv_prog_ac_ct_NM+:} false; then :
37156  $as_echo_n "(cached) " >&6
37157else
37158  if test -n "$ac_ct_NM"; then
37159  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37160else
37161as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37162for as_dir in $PATH
37163do
37164  IFS=$as_save_IFS
37165  test -z "$as_dir" && as_dir=.
37166    for ac_exec_ext in '' $ac_executable_extensions; do
37167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37168    ac_cv_prog_ac_ct_NM="$ac_prog"
37169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37170    break 2
37171  fi
37172done
37173  done
37174IFS=$as_save_IFS
37175
37176fi
37177fi
37178ac_ct_NM=$ac_cv_prog_ac_ct_NM
37179if test -n "$ac_ct_NM"; then
37180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37181$as_echo "$ac_ct_NM" >&6; }
37182else
37183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37184$as_echo "no" >&6; }
37185fi
37186
37187
37188  test -n "$ac_ct_NM" && break
37189done
37190
37191  if test "x$ac_ct_NM" = x; then
37192    NM=""
37193  else
37194    case $cross_compiling:$ac_tool_warned in
37195yes:)
37196{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37197$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37198ac_tool_warned=yes ;;
37199esac
37200    NM=$ac_ct_NM
37201  fi
37202fi
37203
37204  else
37205    # The variable is set, but is it from the command line or the environment?
37206
37207    # Try to remove the string !NM! from our list.
37208    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37209    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37210      # If it failed, the variable was not from the command line. Ignore it,
37211      # but warn the user (except for BASH, which is always set by the calling BASH).
37212      if test "xNM" != xBASH; then
37213        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37214$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37215      fi
37216      # Try to locate tool using the code snippet
37217      if test -n "$ac_tool_prefix"; then
37218  for ac_prog in nm
37219  do
37220    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37221set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37223$as_echo_n "checking for $ac_word... " >&6; }
37224if ${ac_cv_prog_NM+:} false; then :
37225  $as_echo_n "(cached) " >&6
37226else
37227  if test -n "$NM"; then
37228  ac_cv_prog_NM="$NM" # Let the user override the test.
37229else
37230as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37231for as_dir in $PATH
37232do
37233  IFS=$as_save_IFS
37234  test -z "$as_dir" && as_dir=.
37235    for ac_exec_ext in '' $ac_executable_extensions; do
37236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37237    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37239    break 2
37240  fi
37241done
37242  done
37243IFS=$as_save_IFS
37244
37245fi
37246fi
37247NM=$ac_cv_prog_NM
37248if test -n "$NM"; then
37249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37250$as_echo "$NM" >&6; }
37251else
37252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37253$as_echo "no" >&6; }
37254fi
37255
37256
37257    test -n "$NM" && break
37258  done
37259fi
37260if test -z "$NM"; then
37261  ac_ct_NM=$NM
37262  for ac_prog in nm
37263do
37264  # Extract the first word of "$ac_prog", so it can be a program name with args.
37265set dummy $ac_prog; ac_word=$2
37266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37267$as_echo_n "checking for $ac_word... " >&6; }
37268if ${ac_cv_prog_ac_ct_NM+:} false; then :
37269  $as_echo_n "(cached) " >&6
37270else
37271  if test -n "$ac_ct_NM"; then
37272  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37273else
37274as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37275for as_dir in $PATH
37276do
37277  IFS=$as_save_IFS
37278  test -z "$as_dir" && as_dir=.
37279    for ac_exec_ext in '' $ac_executable_extensions; do
37280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37281    ac_cv_prog_ac_ct_NM="$ac_prog"
37282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37283    break 2
37284  fi
37285done
37286  done
37287IFS=$as_save_IFS
37288
37289fi
37290fi
37291ac_ct_NM=$ac_cv_prog_ac_ct_NM
37292if test -n "$ac_ct_NM"; then
37293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37294$as_echo "$ac_ct_NM" >&6; }
37295else
37296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37297$as_echo "no" >&6; }
37298fi
37299
37300
37301  test -n "$ac_ct_NM" && break
37302done
37303
37304  if test "x$ac_ct_NM" = x; then
37305    NM=""
37306  else
37307    case $cross_compiling:$ac_tool_warned in
37308yes:)
37309{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37310$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37311ac_tool_warned=yes ;;
37312esac
37313    NM=$ac_ct_NM
37314  fi
37315fi
37316
37317    else
37318      # If it succeeded, then it was overridden by the user. We will use it
37319      # for the tool.
37320
37321      # First remove it from the list of overridden variables, so we can test
37322      # for unknown variables in the end.
37323      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37324
37325      # Check if the provided tool contains a complete path.
37326      tool_specified="$NM"
37327      tool_basename="${tool_specified##*/}"
37328      if test "x$tool_basename" = "x$tool_specified"; then
37329        # A command without a complete path is provided, search $PATH.
37330        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37331$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37332        # Extract the first word of "$tool_basename", so it can be a program name with args.
37333set dummy $tool_basename; ac_word=$2
37334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37335$as_echo_n "checking for $ac_word... " >&6; }
37336if ${ac_cv_path_NM+:} false; then :
37337  $as_echo_n "(cached) " >&6
37338else
37339  case $NM in
37340  [\\/]* | ?:[\\/]*)
37341  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37342  ;;
37343  *)
37344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37345for as_dir in $PATH
37346do
37347  IFS=$as_save_IFS
37348  test -z "$as_dir" && as_dir=.
37349    for ac_exec_ext in '' $ac_executable_extensions; do
37350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37351    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37353    break 2
37354  fi
37355done
37356  done
37357IFS=$as_save_IFS
37358
37359  ;;
37360esac
37361fi
37362NM=$ac_cv_path_NM
37363if test -n "$NM"; then
37364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37365$as_echo "$NM" >&6; }
37366else
37367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37368$as_echo "no" >&6; }
37369fi
37370
37371
37372        if test "x$NM" = x; then
37373          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37374        fi
37375      else
37376        # Otherwise we believe it is a complete path. Use it as it is.
37377        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37378$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37379        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37380$as_echo_n "checking for NM... " >&6; }
37381        if test ! -x "$tool_specified"; then
37382          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37383$as_echo "not found" >&6; }
37384          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37385        fi
37386        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37387$as_echo "$tool_specified" >&6; }
37388      fi
37389    fi
37390  fi
37391
37392
37393
37394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37395
37396  # First separate the path from the arguments. This will split at the first
37397  # space.
37398  complete="$NM"
37399  path="${complete%% *}"
37400  tmp="$complete EOL"
37401  arguments="${tmp#* }"
37402
37403  # Input might be given as Windows format, start by converting to
37404  # unix format.
37405  new_path=`$CYGPATH -u "$path"`
37406
37407  # Now try to locate executable using which
37408  new_path=`$WHICH "$new_path" 2> /dev/null`
37409  # bat and cmd files are not always considered executable in cygwin causing which
37410  # to not find them
37411  if test "x$new_path" = x \
37412      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37413      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37414    new_path=`$CYGPATH -u "$path"`
37415  fi
37416  if test "x$new_path" = x; then
37417    # Oops. Which didn't find the executable.
37418    # The splitting of arguments from the executable at a space might have been incorrect,
37419    # since paths with space are more likely in Windows. Give it another try with the whole
37420    # argument.
37421    path="$complete"
37422    arguments="EOL"
37423    new_path=`$CYGPATH -u "$path"`
37424    new_path=`$WHICH "$new_path" 2> /dev/null`
37425    # bat and cmd files are not always considered executable in cygwin causing which
37426    # to not find them
37427    if test "x$new_path" = x \
37428        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37429        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37430      new_path=`$CYGPATH -u "$path"`
37431    fi
37432    if test "x$new_path" = x; then
37433      # It's still not found. Now this is an unrecoverable error.
37434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37435$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37436      has_space=`$ECHO "$complete" | $GREP " "`
37437      if test "x$has_space" != x; then
37438        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37440      fi
37441      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37442    fi
37443  fi
37444
37445  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37446  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37447  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37448  # "foo.exe" is OK but "foo" is an error.
37449  #
37450  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37451  # It is also a way to make sure we got the proper file name for the real test later on.
37452  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37453  if test "x$test_shortpath" = x; then
37454    # Short path failed, file does not exist as specified.
37455    # Try adding .exe or .cmd
37456    if test -f "${new_path}.exe"; then
37457      input_to_shortpath="${new_path}.exe"
37458    elif test -f "${new_path}.cmd"; then
37459      input_to_shortpath="${new_path}.cmd"
37460    else
37461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37462$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37463      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37464$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37465      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37466    fi
37467  else
37468    input_to_shortpath="$new_path"
37469  fi
37470
37471  # Call helper function which possibly converts this using DOS-style short mode.
37472  # If so, the updated path is stored in $new_path.
37473  new_path="$input_to_shortpath"
37474
37475  input_path="$input_to_shortpath"
37476  # Check if we need to convert this using DOS-style short mode. If the path
37477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37478  # take no chances and rewrite it.
37479  # Note: m4 eats our [], so we need to use [ and ] instead.
37480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37481  if test "x$has_forbidden_chars" != x; then
37482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37483    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37484    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37485    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37486      # Going to short mode and back again did indeed matter. Since short mode is
37487      # case insensitive, let's make it lowercase to improve readability.
37488      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37489      # Now convert it back to Unix-stile (cygpath)
37490      input_path=`$CYGPATH -u "$shortmode_path"`
37491      new_path="$input_path"
37492    fi
37493  fi
37494
37495  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37496  if test "x$test_cygdrive_prefix" = x; then
37497    # As a simple fix, exclude /usr/bin since it's not a real path.
37498    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37499      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37500      # a path prefixed by /cygdrive for fixpath to work.
37501      new_path="$CYGWIN_ROOT_PATH$input_path"
37502    fi
37503  fi
37504
37505  # remove trailing .exe if any
37506  new_path="${new_path/%.exe/}"
37507
37508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37509
37510  # First separate the path from the arguments. This will split at the first
37511  # space.
37512  complete="$NM"
37513  path="${complete%% *}"
37514  tmp="$complete EOL"
37515  arguments="${tmp#* }"
37516
37517  # Input might be given as Windows format, start by converting to
37518  # unix format.
37519  new_path="$path"
37520
37521  windows_path="$new_path"
37522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37523    unix_path=`$CYGPATH -u "$windows_path"`
37524    new_path="$unix_path"
37525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37527    new_path="$unix_path"
37528  fi
37529
37530
37531  # Now try to locate executable using which
37532  new_path=`$WHICH "$new_path" 2> /dev/null`
37533
37534  if test "x$new_path" = x; then
37535    # Oops. Which didn't find the executable.
37536    # The splitting of arguments from the executable at a space might have been incorrect,
37537    # since paths with space are more likely in Windows. Give it another try with the whole
37538    # argument.
37539    path="$complete"
37540    arguments="EOL"
37541    new_path="$path"
37542
37543  windows_path="$new_path"
37544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37545    unix_path=`$CYGPATH -u "$windows_path"`
37546    new_path="$unix_path"
37547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37549    new_path="$unix_path"
37550  fi
37551
37552
37553    new_path=`$WHICH "$new_path" 2> /dev/null`
37554
37555    if test "x$new_path" = x; then
37556      # It's still not found. Now this is an unrecoverable error.
37557      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37558$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37559      has_space=`$ECHO "$complete" | $GREP " "`
37560      if test "x$has_space" != x; then
37561        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37562$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37563      fi
37564      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37565    fi
37566  fi
37567
37568  # Now new_path has a complete unix path to the binary
37569  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37570    # Keep paths in /bin as-is, but remove trailing .exe if any
37571    new_path="${new_path/%.exe/}"
37572    # Do not save /bin paths to all_fixpath_prefixes!
37573  else
37574    # Not in mixed or Windows style, start by that.
37575    new_path=`cmd //c echo $new_path`
37576
37577  input_path="$new_path"
37578  # Check if we need to convert this using DOS-style short mode. If the path
37579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37580  # take no chances and rewrite it.
37581  # Note: m4 eats our [], so we need to use [ and ] instead.
37582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37583  if test "x$has_forbidden_chars" != x; then
37584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37585    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37586  fi
37587
37588    # Output is in $new_path
37589
37590  windows_path="$new_path"
37591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37592    unix_path=`$CYGPATH -u "$windows_path"`
37593    new_path="$unix_path"
37594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37596    new_path="$unix_path"
37597  fi
37598
37599    # remove trailing .exe if any
37600    new_path="${new_path/%.exe/}"
37601
37602    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37603    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37604  fi
37605
37606  else
37607    # We're on a posix platform. Hooray! :)
37608    # First separate the path from the arguments. This will split at the first
37609    # space.
37610    complete="$NM"
37611    path="${complete%% *}"
37612    tmp="$complete EOL"
37613    arguments="${tmp#* }"
37614
37615    # Cannot rely on the command "which" here since it doesn't always work.
37616    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37617    if test -z "$is_absolute_path"; then
37618      # Path to executable is not absolute. Find it.
37619      IFS_save="$IFS"
37620      IFS=:
37621      for p in $PATH; do
37622        if test -f "$p/$path" && test -x "$p/$path"; then
37623          new_path="$p/$path"
37624          break
37625        fi
37626      done
37627      IFS="$IFS_save"
37628    else
37629      # This is an absolute path, we can use it without further modifications.
37630      new_path="$path"
37631    fi
37632
37633    if test "x$new_path" = x; then
37634      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37635$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37636      has_space=`$ECHO "$complete" | $GREP " "`
37637      if test "x$has_space" != x; then
37638        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37639$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37640      fi
37641      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37642    fi
37643  fi
37644
37645  # Now join together the path and the arguments once again
37646  if test "x$arguments" != xEOL; then
37647    new_complete="$new_path ${arguments% *}"
37648  else
37649    new_complete="$new_path"
37650  fi
37651
37652  if test "x$complete" != "x$new_complete"; then
37653    NM="$new_complete"
37654    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37655$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37656  fi
37657
37658    GNM="$NM"
37659
37660  fi
37661
37662  # objcopy is used for moving debug symbols to separate files when
37663  # full debug symbols are enabled.
37664  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37665
37666
37667  # Publish this variable in the help.
37668
37669
37670  if test "x$OBJCOPY" = x; then
37671    # The variable is not set by user, try to locate tool using the code snippet
37672    if test -n "$ac_tool_prefix"; then
37673  for ac_prog in gobjcopy objcopy
37674  do
37675    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37676set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37678$as_echo_n "checking for $ac_word... " >&6; }
37679if ${ac_cv_prog_OBJCOPY+:} false; then :
37680  $as_echo_n "(cached) " >&6
37681else
37682  if test -n "$OBJCOPY"; then
37683  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37684else
37685as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37686for as_dir in $PATH
37687do
37688  IFS=$as_save_IFS
37689  test -z "$as_dir" && as_dir=.
37690    for ac_exec_ext in '' $ac_executable_extensions; do
37691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37692    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37694    break 2
37695  fi
37696done
37697  done
37698IFS=$as_save_IFS
37699
37700fi
37701fi
37702OBJCOPY=$ac_cv_prog_OBJCOPY
37703if test -n "$OBJCOPY"; then
37704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37705$as_echo "$OBJCOPY" >&6; }
37706else
37707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37708$as_echo "no" >&6; }
37709fi
37710
37711
37712    test -n "$OBJCOPY" && break
37713  done
37714fi
37715if test -z "$OBJCOPY"; then
37716  ac_ct_OBJCOPY=$OBJCOPY
37717  for ac_prog in gobjcopy objcopy
37718do
37719  # Extract the first word of "$ac_prog", so it can be a program name with args.
37720set dummy $ac_prog; ac_word=$2
37721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37722$as_echo_n "checking for $ac_word... " >&6; }
37723if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37724  $as_echo_n "(cached) " >&6
37725else
37726  if test -n "$ac_ct_OBJCOPY"; then
37727  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37728else
37729as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37730for as_dir in $PATH
37731do
37732  IFS=$as_save_IFS
37733  test -z "$as_dir" && as_dir=.
37734    for ac_exec_ext in '' $ac_executable_extensions; do
37735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37736    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37738    break 2
37739  fi
37740done
37741  done
37742IFS=$as_save_IFS
37743
37744fi
37745fi
37746ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37747if test -n "$ac_ct_OBJCOPY"; then
37748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37749$as_echo "$ac_ct_OBJCOPY" >&6; }
37750else
37751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37752$as_echo "no" >&6; }
37753fi
37754
37755
37756  test -n "$ac_ct_OBJCOPY" && break
37757done
37758
37759  if test "x$ac_ct_OBJCOPY" = x; then
37760    OBJCOPY=""
37761  else
37762    case $cross_compiling:$ac_tool_warned in
37763yes:)
37764{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37765$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37766ac_tool_warned=yes ;;
37767esac
37768    OBJCOPY=$ac_ct_OBJCOPY
37769  fi
37770fi
37771
37772  else
37773    # The variable is set, but is it from the command line or the environment?
37774
37775    # Try to remove the string !OBJCOPY! from our list.
37776    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37777    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37778      # If it failed, the variable was not from the command line. Ignore it,
37779      # but warn the user (except for BASH, which is always set by the calling BASH).
37780      if test "xOBJCOPY" != xBASH; then
37781        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37782$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37783      fi
37784      # Try to locate tool using the code snippet
37785      if test -n "$ac_tool_prefix"; then
37786  for ac_prog in gobjcopy objcopy
37787  do
37788    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37789set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37791$as_echo_n "checking for $ac_word... " >&6; }
37792if ${ac_cv_prog_OBJCOPY+:} false; then :
37793  $as_echo_n "(cached) " >&6
37794else
37795  if test -n "$OBJCOPY"; then
37796  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37797else
37798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37799for as_dir in $PATH
37800do
37801  IFS=$as_save_IFS
37802  test -z "$as_dir" && as_dir=.
37803    for ac_exec_ext in '' $ac_executable_extensions; do
37804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37805    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37807    break 2
37808  fi
37809done
37810  done
37811IFS=$as_save_IFS
37812
37813fi
37814fi
37815OBJCOPY=$ac_cv_prog_OBJCOPY
37816if test -n "$OBJCOPY"; then
37817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37818$as_echo "$OBJCOPY" >&6; }
37819else
37820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37821$as_echo "no" >&6; }
37822fi
37823
37824
37825    test -n "$OBJCOPY" && break
37826  done
37827fi
37828if test -z "$OBJCOPY"; then
37829  ac_ct_OBJCOPY=$OBJCOPY
37830  for ac_prog in gobjcopy objcopy
37831do
37832  # Extract the first word of "$ac_prog", so it can be a program name with args.
37833set dummy $ac_prog; ac_word=$2
37834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37835$as_echo_n "checking for $ac_word... " >&6; }
37836if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37837  $as_echo_n "(cached) " >&6
37838else
37839  if test -n "$ac_ct_OBJCOPY"; then
37840  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37841else
37842as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37843for as_dir in $PATH
37844do
37845  IFS=$as_save_IFS
37846  test -z "$as_dir" && as_dir=.
37847    for ac_exec_ext in '' $ac_executable_extensions; do
37848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37849    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37851    break 2
37852  fi
37853done
37854  done
37855IFS=$as_save_IFS
37856
37857fi
37858fi
37859ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37860if test -n "$ac_ct_OBJCOPY"; then
37861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37862$as_echo "$ac_ct_OBJCOPY" >&6; }
37863else
37864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37865$as_echo "no" >&6; }
37866fi
37867
37868
37869  test -n "$ac_ct_OBJCOPY" && break
37870done
37871
37872  if test "x$ac_ct_OBJCOPY" = x; then
37873    OBJCOPY=""
37874  else
37875    case $cross_compiling:$ac_tool_warned in
37876yes:)
37877{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37878$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37879ac_tool_warned=yes ;;
37880esac
37881    OBJCOPY=$ac_ct_OBJCOPY
37882  fi
37883fi
37884
37885    else
37886      # If it succeeded, then it was overridden by the user. We will use it
37887      # for the tool.
37888
37889      # First remove it from the list of overridden variables, so we can test
37890      # for unknown variables in the end.
37891      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37892
37893      # Check if the provided tool contains a complete path.
37894      tool_specified="$OBJCOPY"
37895      tool_basename="${tool_specified##*/}"
37896      if test "x$tool_basename" = "x$tool_specified"; then
37897        # A command without a complete path is provided, search $PATH.
37898        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37899$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37900        # Extract the first word of "$tool_basename", so it can be a program name with args.
37901set dummy $tool_basename; ac_word=$2
37902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37903$as_echo_n "checking for $ac_word... " >&6; }
37904if ${ac_cv_path_OBJCOPY+:} false; then :
37905  $as_echo_n "(cached) " >&6
37906else
37907  case $OBJCOPY in
37908  [\\/]* | ?:[\\/]*)
37909  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37910  ;;
37911  *)
37912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37913for as_dir in $PATH
37914do
37915  IFS=$as_save_IFS
37916  test -z "$as_dir" && as_dir=.
37917    for ac_exec_ext in '' $ac_executable_extensions; do
37918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37919    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37921    break 2
37922  fi
37923done
37924  done
37925IFS=$as_save_IFS
37926
37927  ;;
37928esac
37929fi
37930OBJCOPY=$ac_cv_path_OBJCOPY
37931if test -n "$OBJCOPY"; then
37932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37933$as_echo "$OBJCOPY" >&6; }
37934else
37935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37936$as_echo "no" >&6; }
37937fi
37938
37939
37940        if test "x$OBJCOPY" = x; then
37941          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37942        fi
37943      else
37944        # Otherwise we believe it is a complete path. Use it as it is.
37945        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
37946$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
37947        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
37948$as_echo_n "checking for OBJCOPY... " >&6; }
37949        if test ! -x "$tool_specified"; then
37950          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37951$as_echo "not found" >&6; }
37952          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
37953        fi
37954        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37955$as_echo "$tool_specified" >&6; }
37956      fi
37957    fi
37958  fi
37959
37960
37961    # Only call fixup if objcopy was found.
37962    if test -n "$OBJCOPY"; then
37963
37964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37965
37966  # First separate the path from the arguments. This will split at the first
37967  # space.
37968  complete="$OBJCOPY"
37969  path="${complete%% *}"
37970  tmp="$complete EOL"
37971  arguments="${tmp#* }"
37972
37973  # Input might be given as Windows format, start by converting to
37974  # unix format.
37975  new_path=`$CYGPATH -u "$path"`
37976
37977  # Now try to locate executable using which
37978  new_path=`$WHICH "$new_path" 2> /dev/null`
37979  # bat and cmd files are not always considered executable in cygwin causing which
37980  # to not find them
37981  if test "x$new_path" = x \
37982      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37983      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37984    new_path=`$CYGPATH -u "$path"`
37985  fi
37986  if test "x$new_path" = x; then
37987    # Oops. Which didn't find the executable.
37988    # The splitting of arguments from the executable at a space might have been incorrect,
37989    # since paths with space are more likely in Windows. Give it another try with the whole
37990    # argument.
37991    path="$complete"
37992    arguments="EOL"
37993    new_path=`$CYGPATH -u "$path"`
37994    new_path=`$WHICH "$new_path" 2> /dev/null`
37995    # bat and cmd files are not always considered executable in cygwin causing which
37996    # to not find them
37997    if test "x$new_path" = x \
37998        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37999        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38000      new_path=`$CYGPATH -u "$path"`
38001    fi
38002    if test "x$new_path" = x; then
38003      # It's still not found. Now this is an unrecoverable error.
38004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38005$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38006      has_space=`$ECHO "$complete" | $GREP " "`
38007      if test "x$has_space" != x; then
38008        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38009$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38010      fi
38011      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38012    fi
38013  fi
38014
38015  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38016  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38017  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38018  # "foo.exe" is OK but "foo" is an error.
38019  #
38020  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38021  # It is also a way to make sure we got the proper file name for the real test later on.
38022  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38023  if test "x$test_shortpath" = x; then
38024    # Short path failed, file does not exist as specified.
38025    # Try adding .exe or .cmd
38026    if test -f "${new_path}.exe"; then
38027      input_to_shortpath="${new_path}.exe"
38028    elif test -f "${new_path}.cmd"; then
38029      input_to_shortpath="${new_path}.cmd"
38030    else
38031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38032$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38033      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38034$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38035      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38036    fi
38037  else
38038    input_to_shortpath="$new_path"
38039  fi
38040
38041  # Call helper function which possibly converts this using DOS-style short mode.
38042  # If so, the updated path is stored in $new_path.
38043  new_path="$input_to_shortpath"
38044
38045  input_path="$input_to_shortpath"
38046  # Check if we need to convert this using DOS-style short mode. If the path
38047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38048  # take no chances and rewrite it.
38049  # Note: m4 eats our [], so we need to use [ and ] instead.
38050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38051  if test "x$has_forbidden_chars" != x; then
38052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38053    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38054    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38055    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38056      # Going to short mode and back again did indeed matter. Since short mode is
38057      # case insensitive, let's make it lowercase to improve readability.
38058      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38059      # Now convert it back to Unix-stile (cygpath)
38060      input_path=`$CYGPATH -u "$shortmode_path"`
38061      new_path="$input_path"
38062    fi
38063  fi
38064
38065  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38066  if test "x$test_cygdrive_prefix" = x; then
38067    # As a simple fix, exclude /usr/bin since it's not a real path.
38068    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38069      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38070      # a path prefixed by /cygdrive for fixpath to work.
38071      new_path="$CYGWIN_ROOT_PATH$input_path"
38072    fi
38073  fi
38074
38075  # remove trailing .exe if any
38076  new_path="${new_path/%.exe/}"
38077
38078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38079
38080  # First separate the path from the arguments. This will split at the first
38081  # space.
38082  complete="$OBJCOPY"
38083  path="${complete%% *}"
38084  tmp="$complete EOL"
38085  arguments="${tmp#* }"
38086
38087  # Input might be given as Windows format, start by converting to
38088  # unix format.
38089  new_path="$path"
38090
38091  windows_path="$new_path"
38092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38093    unix_path=`$CYGPATH -u "$windows_path"`
38094    new_path="$unix_path"
38095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38097    new_path="$unix_path"
38098  fi
38099
38100
38101  # Now try to locate executable using which
38102  new_path=`$WHICH "$new_path" 2> /dev/null`
38103
38104  if test "x$new_path" = x; then
38105    # Oops. Which didn't find the executable.
38106    # The splitting of arguments from the executable at a space might have been incorrect,
38107    # since paths with space are more likely in Windows. Give it another try with the whole
38108    # argument.
38109    path="$complete"
38110    arguments="EOL"
38111    new_path="$path"
38112
38113  windows_path="$new_path"
38114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38115    unix_path=`$CYGPATH -u "$windows_path"`
38116    new_path="$unix_path"
38117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38119    new_path="$unix_path"
38120  fi
38121
38122
38123    new_path=`$WHICH "$new_path" 2> /dev/null`
38124
38125    if test "x$new_path" = x; then
38126      # It's still not found. Now this is an unrecoverable error.
38127      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38128$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38129      has_space=`$ECHO "$complete" | $GREP " "`
38130      if test "x$has_space" != x; then
38131        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38132$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38133      fi
38134      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38135    fi
38136  fi
38137
38138  # Now new_path has a complete unix path to the binary
38139  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38140    # Keep paths in /bin as-is, but remove trailing .exe if any
38141    new_path="${new_path/%.exe/}"
38142    # Do not save /bin paths to all_fixpath_prefixes!
38143  else
38144    # Not in mixed or Windows style, start by that.
38145    new_path=`cmd //c echo $new_path`
38146
38147  input_path="$new_path"
38148  # Check if we need to convert this using DOS-style short mode. If the path
38149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38150  # take no chances and rewrite it.
38151  # Note: m4 eats our [], so we need to use [ and ] instead.
38152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38153  if test "x$has_forbidden_chars" != x; then
38154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38155    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38156  fi
38157
38158    # Output is in $new_path
38159
38160  windows_path="$new_path"
38161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38162    unix_path=`$CYGPATH -u "$windows_path"`
38163    new_path="$unix_path"
38164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38166    new_path="$unix_path"
38167  fi
38168
38169    # remove trailing .exe if any
38170    new_path="${new_path/%.exe/}"
38171
38172    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38173    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38174  fi
38175
38176  else
38177    # We're on a posix platform. Hooray! :)
38178    # First separate the path from the arguments. This will split at the first
38179    # space.
38180    complete="$OBJCOPY"
38181    path="${complete%% *}"
38182    tmp="$complete EOL"
38183    arguments="${tmp#* }"
38184
38185    # Cannot rely on the command "which" here since it doesn't always work.
38186    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38187    if test -z "$is_absolute_path"; then
38188      # Path to executable is not absolute. Find it.
38189      IFS_save="$IFS"
38190      IFS=:
38191      for p in $PATH; do
38192        if test -f "$p/$path" && test -x "$p/$path"; then
38193          new_path="$p/$path"
38194          break
38195        fi
38196      done
38197      IFS="$IFS_save"
38198    else
38199      # This is an absolute path, we can use it without further modifications.
38200      new_path="$path"
38201    fi
38202
38203    if test "x$new_path" = x; then
38204      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38205$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38206      has_space=`$ECHO "$complete" | $GREP " "`
38207      if test "x$has_space" != x; then
38208        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38209$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38210      fi
38211      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38212    fi
38213  fi
38214
38215  # Now join together the path and the arguments once again
38216  if test "x$arguments" != xEOL; then
38217    new_complete="$new_path ${arguments% *}"
38218  else
38219    new_complete="$new_path"
38220  fi
38221
38222  if test "x$complete" != "x$new_complete"; then
38223    OBJCOPY="$new_complete"
38224    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38225$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38226  fi
38227
38228    fi
38229  fi
38230
38231
38232
38233  # Publish this variable in the help.
38234
38235
38236  if test "x$OBJDUMP" = x; then
38237    # The variable is not set by user, try to locate tool using the code snippet
38238    if test -n "$ac_tool_prefix"; then
38239  for ac_prog in gobjdump objdump
38240  do
38241    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38242set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38244$as_echo_n "checking for $ac_word... " >&6; }
38245if ${ac_cv_prog_OBJDUMP+:} false; then :
38246  $as_echo_n "(cached) " >&6
38247else
38248  if test -n "$OBJDUMP"; then
38249  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38250else
38251as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38252for as_dir in $PATH
38253do
38254  IFS=$as_save_IFS
38255  test -z "$as_dir" && as_dir=.
38256    for ac_exec_ext in '' $ac_executable_extensions; do
38257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38258    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38260    break 2
38261  fi
38262done
38263  done
38264IFS=$as_save_IFS
38265
38266fi
38267fi
38268OBJDUMP=$ac_cv_prog_OBJDUMP
38269if test -n "$OBJDUMP"; then
38270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38271$as_echo "$OBJDUMP" >&6; }
38272else
38273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38274$as_echo "no" >&6; }
38275fi
38276
38277
38278    test -n "$OBJDUMP" && break
38279  done
38280fi
38281if test -z "$OBJDUMP"; then
38282  ac_ct_OBJDUMP=$OBJDUMP
38283  for ac_prog in gobjdump objdump
38284do
38285  # Extract the first word of "$ac_prog", so it can be a program name with args.
38286set dummy $ac_prog; ac_word=$2
38287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38288$as_echo_n "checking for $ac_word... " >&6; }
38289if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38290  $as_echo_n "(cached) " >&6
38291else
38292  if test -n "$ac_ct_OBJDUMP"; then
38293  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38294else
38295as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38296for as_dir in $PATH
38297do
38298  IFS=$as_save_IFS
38299  test -z "$as_dir" && as_dir=.
38300    for ac_exec_ext in '' $ac_executable_extensions; do
38301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38302    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38304    break 2
38305  fi
38306done
38307  done
38308IFS=$as_save_IFS
38309
38310fi
38311fi
38312ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38313if test -n "$ac_ct_OBJDUMP"; then
38314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38315$as_echo "$ac_ct_OBJDUMP" >&6; }
38316else
38317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38318$as_echo "no" >&6; }
38319fi
38320
38321
38322  test -n "$ac_ct_OBJDUMP" && break
38323done
38324
38325  if test "x$ac_ct_OBJDUMP" = x; then
38326    OBJDUMP=""
38327  else
38328    case $cross_compiling:$ac_tool_warned in
38329yes:)
38330{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38331$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38332ac_tool_warned=yes ;;
38333esac
38334    OBJDUMP=$ac_ct_OBJDUMP
38335  fi
38336fi
38337
38338  else
38339    # The variable is set, but is it from the command line or the environment?
38340
38341    # Try to remove the string !OBJDUMP! from our list.
38342    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38343    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38344      # If it failed, the variable was not from the command line. Ignore it,
38345      # but warn the user (except for BASH, which is always set by the calling BASH).
38346      if test "xOBJDUMP" != xBASH; then
38347        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38348$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38349      fi
38350      # Try to locate tool using the code snippet
38351      if test -n "$ac_tool_prefix"; then
38352  for ac_prog in gobjdump objdump
38353  do
38354    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38355set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38357$as_echo_n "checking for $ac_word... " >&6; }
38358if ${ac_cv_prog_OBJDUMP+:} false; then :
38359  $as_echo_n "(cached) " >&6
38360else
38361  if test -n "$OBJDUMP"; then
38362  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38363else
38364as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38365for as_dir in $PATH
38366do
38367  IFS=$as_save_IFS
38368  test -z "$as_dir" && as_dir=.
38369    for ac_exec_ext in '' $ac_executable_extensions; do
38370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38371    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38373    break 2
38374  fi
38375done
38376  done
38377IFS=$as_save_IFS
38378
38379fi
38380fi
38381OBJDUMP=$ac_cv_prog_OBJDUMP
38382if test -n "$OBJDUMP"; then
38383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38384$as_echo "$OBJDUMP" >&6; }
38385else
38386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38387$as_echo "no" >&6; }
38388fi
38389
38390
38391    test -n "$OBJDUMP" && break
38392  done
38393fi
38394if test -z "$OBJDUMP"; then
38395  ac_ct_OBJDUMP=$OBJDUMP
38396  for ac_prog in gobjdump objdump
38397do
38398  # Extract the first word of "$ac_prog", so it can be a program name with args.
38399set dummy $ac_prog; ac_word=$2
38400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38401$as_echo_n "checking for $ac_word... " >&6; }
38402if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38403  $as_echo_n "(cached) " >&6
38404else
38405  if test -n "$ac_ct_OBJDUMP"; then
38406  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38407else
38408as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38409for as_dir in $PATH
38410do
38411  IFS=$as_save_IFS
38412  test -z "$as_dir" && as_dir=.
38413    for ac_exec_ext in '' $ac_executable_extensions; do
38414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38415    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38417    break 2
38418  fi
38419done
38420  done
38421IFS=$as_save_IFS
38422
38423fi
38424fi
38425ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38426if test -n "$ac_ct_OBJDUMP"; then
38427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38428$as_echo "$ac_ct_OBJDUMP" >&6; }
38429else
38430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38431$as_echo "no" >&6; }
38432fi
38433
38434
38435  test -n "$ac_ct_OBJDUMP" && break
38436done
38437
38438  if test "x$ac_ct_OBJDUMP" = x; then
38439    OBJDUMP=""
38440  else
38441    case $cross_compiling:$ac_tool_warned in
38442yes:)
38443{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38444$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38445ac_tool_warned=yes ;;
38446esac
38447    OBJDUMP=$ac_ct_OBJDUMP
38448  fi
38449fi
38450
38451    else
38452      # If it succeeded, then it was overridden by the user. We will use it
38453      # for the tool.
38454
38455      # First remove it from the list of overridden variables, so we can test
38456      # for unknown variables in the end.
38457      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38458
38459      # Check if the provided tool contains a complete path.
38460      tool_specified="$OBJDUMP"
38461      tool_basename="${tool_specified##*/}"
38462      if test "x$tool_basename" = "x$tool_specified"; then
38463        # A command without a complete path is provided, search $PATH.
38464        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38465$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38466        # Extract the first word of "$tool_basename", so it can be a program name with args.
38467set dummy $tool_basename; ac_word=$2
38468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38469$as_echo_n "checking for $ac_word... " >&6; }
38470if ${ac_cv_path_OBJDUMP+:} false; then :
38471  $as_echo_n "(cached) " >&6
38472else
38473  case $OBJDUMP in
38474  [\\/]* | ?:[\\/]*)
38475  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38476  ;;
38477  *)
38478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38479for as_dir in $PATH
38480do
38481  IFS=$as_save_IFS
38482  test -z "$as_dir" && as_dir=.
38483    for ac_exec_ext in '' $ac_executable_extensions; do
38484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38485    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38487    break 2
38488  fi
38489done
38490  done
38491IFS=$as_save_IFS
38492
38493  ;;
38494esac
38495fi
38496OBJDUMP=$ac_cv_path_OBJDUMP
38497if test -n "$OBJDUMP"; then
38498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38499$as_echo "$OBJDUMP" >&6; }
38500else
38501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38502$as_echo "no" >&6; }
38503fi
38504
38505
38506        if test "x$OBJDUMP" = x; then
38507          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38508        fi
38509      else
38510        # Otherwise we believe it is a complete path. Use it as it is.
38511        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38512$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38513        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38514$as_echo_n "checking for OBJDUMP... " >&6; }
38515        if test ! -x "$tool_specified"; then
38516          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38517$as_echo "not found" >&6; }
38518          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38519        fi
38520        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38521$as_echo "$tool_specified" >&6; }
38522      fi
38523    fi
38524  fi
38525
38526
38527  if test "x$OBJDUMP" != x; then
38528    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38529    # bails if argument is missing.
38530
38531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38532
38533  # First separate the path from the arguments. This will split at the first
38534  # space.
38535  complete="$OBJDUMP"
38536  path="${complete%% *}"
38537  tmp="$complete EOL"
38538  arguments="${tmp#* }"
38539
38540  # Input might be given as Windows format, start by converting to
38541  # unix format.
38542  new_path=`$CYGPATH -u "$path"`
38543
38544  # Now try to locate executable using which
38545  new_path=`$WHICH "$new_path" 2> /dev/null`
38546  # bat and cmd files are not always considered executable in cygwin causing which
38547  # to not find them
38548  if test "x$new_path" = x \
38549      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38550      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38551    new_path=`$CYGPATH -u "$path"`
38552  fi
38553  if test "x$new_path" = x; then
38554    # Oops. Which didn't find the executable.
38555    # The splitting of arguments from the executable at a space might have been incorrect,
38556    # since paths with space are more likely in Windows. Give it another try with the whole
38557    # argument.
38558    path="$complete"
38559    arguments="EOL"
38560    new_path=`$CYGPATH -u "$path"`
38561    new_path=`$WHICH "$new_path" 2> /dev/null`
38562    # bat and cmd files are not always considered executable in cygwin causing which
38563    # to not find them
38564    if test "x$new_path" = x \
38565        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38566        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38567      new_path=`$CYGPATH -u "$path"`
38568    fi
38569    if test "x$new_path" = x; then
38570      # It's still not found. Now this is an unrecoverable error.
38571      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38572$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38573      has_space=`$ECHO "$complete" | $GREP " "`
38574      if test "x$has_space" != x; then
38575        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38576$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38577      fi
38578      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38579    fi
38580  fi
38581
38582  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38583  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38584  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38585  # "foo.exe" is OK but "foo" is an error.
38586  #
38587  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38588  # It is also a way to make sure we got the proper file name for the real test later on.
38589  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38590  if test "x$test_shortpath" = x; then
38591    # Short path failed, file does not exist as specified.
38592    # Try adding .exe or .cmd
38593    if test -f "${new_path}.exe"; then
38594      input_to_shortpath="${new_path}.exe"
38595    elif test -f "${new_path}.cmd"; then
38596      input_to_shortpath="${new_path}.cmd"
38597    else
38598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38599$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38600      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38601$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38602      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38603    fi
38604  else
38605    input_to_shortpath="$new_path"
38606  fi
38607
38608  # Call helper function which possibly converts this using DOS-style short mode.
38609  # If so, the updated path is stored in $new_path.
38610  new_path="$input_to_shortpath"
38611
38612  input_path="$input_to_shortpath"
38613  # Check if we need to convert this using DOS-style short mode. If the path
38614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38615  # take no chances and rewrite it.
38616  # Note: m4 eats our [], so we need to use [ and ] instead.
38617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38618  if test "x$has_forbidden_chars" != x; then
38619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38620    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38621    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38622    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38623      # Going to short mode and back again did indeed matter. Since short mode is
38624      # case insensitive, let's make it lowercase to improve readability.
38625      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38626      # Now convert it back to Unix-stile (cygpath)
38627      input_path=`$CYGPATH -u "$shortmode_path"`
38628      new_path="$input_path"
38629    fi
38630  fi
38631
38632  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38633  if test "x$test_cygdrive_prefix" = x; then
38634    # As a simple fix, exclude /usr/bin since it's not a real path.
38635    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38636      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38637      # a path prefixed by /cygdrive for fixpath to work.
38638      new_path="$CYGWIN_ROOT_PATH$input_path"
38639    fi
38640  fi
38641
38642  # remove trailing .exe if any
38643  new_path="${new_path/%.exe/}"
38644
38645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38646
38647  # First separate the path from the arguments. This will split at the first
38648  # space.
38649  complete="$OBJDUMP"
38650  path="${complete%% *}"
38651  tmp="$complete EOL"
38652  arguments="${tmp#* }"
38653
38654  # Input might be given as Windows format, start by converting to
38655  # unix format.
38656  new_path="$path"
38657
38658  windows_path="$new_path"
38659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38660    unix_path=`$CYGPATH -u "$windows_path"`
38661    new_path="$unix_path"
38662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38664    new_path="$unix_path"
38665  fi
38666
38667
38668  # Now try to locate executable using which
38669  new_path=`$WHICH "$new_path" 2> /dev/null`
38670
38671  if test "x$new_path" = x; then
38672    # Oops. Which didn't find the executable.
38673    # The splitting of arguments from the executable at a space might have been incorrect,
38674    # since paths with space are more likely in Windows. Give it another try with the whole
38675    # argument.
38676    path="$complete"
38677    arguments="EOL"
38678    new_path="$path"
38679
38680  windows_path="$new_path"
38681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38682    unix_path=`$CYGPATH -u "$windows_path"`
38683    new_path="$unix_path"
38684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38686    new_path="$unix_path"
38687  fi
38688
38689
38690    new_path=`$WHICH "$new_path" 2> /dev/null`
38691
38692    if test "x$new_path" = x; then
38693      # It's still not found. Now this is an unrecoverable error.
38694      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38695$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38696      has_space=`$ECHO "$complete" | $GREP " "`
38697      if test "x$has_space" != x; then
38698        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38699$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38700      fi
38701      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38702    fi
38703  fi
38704
38705  # Now new_path has a complete unix path to the binary
38706  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38707    # Keep paths in /bin as-is, but remove trailing .exe if any
38708    new_path="${new_path/%.exe/}"
38709    # Do not save /bin paths to all_fixpath_prefixes!
38710  else
38711    # Not in mixed or Windows style, start by that.
38712    new_path=`cmd //c echo $new_path`
38713
38714  input_path="$new_path"
38715  # Check if we need to convert this using DOS-style short mode. If the path
38716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38717  # take no chances and rewrite it.
38718  # Note: m4 eats our [], so we need to use [ and ] instead.
38719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38720  if test "x$has_forbidden_chars" != x; then
38721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38722    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38723  fi
38724
38725    # Output is in $new_path
38726
38727  windows_path="$new_path"
38728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38729    unix_path=`$CYGPATH -u "$windows_path"`
38730    new_path="$unix_path"
38731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38733    new_path="$unix_path"
38734  fi
38735
38736    # remove trailing .exe if any
38737    new_path="${new_path/%.exe/}"
38738
38739    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38740    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38741  fi
38742
38743  else
38744    # We're on a posix platform. Hooray! :)
38745    # First separate the path from the arguments. This will split at the first
38746    # space.
38747    complete="$OBJDUMP"
38748    path="${complete%% *}"
38749    tmp="$complete EOL"
38750    arguments="${tmp#* }"
38751
38752    # Cannot rely on the command "which" here since it doesn't always work.
38753    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38754    if test -z "$is_absolute_path"; then
38755      # Path to executable is not absolute. Find it.
38756      IFS_save="$IFS"
38757      IFS=:
38758      for p in $PATH; do
38759        if test -f "$p/$path" && test -x "$p/$path"; then
38760          new_path="$p/$path"
38761          break
38762        fi
38763      done
38764      IFS="$IFS_save"
38765    else
38766      # This is an absolute path, we can use it without further modifications.
38767      new_path="$path"
38768    fi
38769
38770    if test "x$new_path" = x; then
38771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38772$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38773      has_space=`$ECHO "$complete" | $GREP " "`
38774      if test "x$has_space" != x; then
38775        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38776$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38777      fi
38778      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38779    fi
38780  fi
38781
38782  # Now join together the path and the arguments once again
38783  if test "x$arguments" != xEOL; then
38784    new_complete="$new_path ${arguments% *}"
38785  else
38786    new_complete="$new_path"
38787  fi
38788
38789  if test "x$complete" != "x$new_complete"; then
38790    OBJDUMP="$new_complete"
38791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38792$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38793  fi
38794
38795  fi
38796
38797
38798  # Restore old path.
38799  PATH="$OLD_PATH"
38800
38801  # Restore the flags to the user specified values.
38802  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38803  CFLAGS="$ORG_CFLAGS"
38804  CXXFLAGS="$ORG_CXXFLAGS"
38805  OBJCFLAGS="$ORG_OBJCFLAGS"
38806
38807
38808# Finally do some processing after the detection phase
38809
38810  if test "x$COMPILE_TYPE" = "xcross"; then
38811    # Now we need to find a C/C++ compiler that can build executables for the
38812    # build platform. We can't use the AC_PROG_CC macro, since it can only be
38813    # used once. Also, we need to do this without adding a tools dir to the
38814    # path, otherwise we might pick up cross-compilers which don't use standard
38815    # naming.
38816
38817    # FIXME: we should list the discovered compilers as an exclude pattern!
38818    # If we do that, we can do this detection before POST_DETECTION, and still
38819    # find the build compilers in the tools dir, if needed.
38820
38821
38822  # Publish this variable in the help.
38823
38824
38825  if test "x$BUILD_CC" = x; then
38826    # The variable is not set by user, try to locate tool using the code snippet
38827    for ac_prog in cl cc gcc
38828do
38829  # Extract the first word of "$ac_prog", so it can be a program name with args.
38830set dummy $ac_prog; ac_word=$2
38831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38832$as_echo_n "checking for $ac_word... " >&6; }
38833if ${ac_cv_path_BUILD_CC+:} false; then :
38834  $as_echo_n "(cached) " >&6
38835else
38836  case $BUILD_CC in
38837  [\\/]* | ?:[\\/]*)
38838  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38839  ;;
38840  *)
38841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38842for as_dir in $PATH
38843do
38844  IFS=$as_save_IFS
38845  test -z "$as_dir" && as_dir=.
38846    for ac_exec_ext in '' $ac_executable_extensions; do
38847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38848    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38850    break 2
38851  fi
38852done
38853  done
38854IFS=$as_save_IFS
38855
38856  ;;
38857esac
38858fi
38859BUILD_CC=$ac_cv_path_BUILD_CC
38860if test -n "$BUILD_CC"; then
38861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38862$as_echo "$BUILD_CC" >&6; }
38863else
38864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38865$as_echo "no" >&6; }
38866fi
38867
38868
38869  test -n "$BUILD_CC" && break
38870done
38871
38872  else
38873    # The variable is set, but is it from the command line or the environment?
38874
38875    # Try to remove the string !BUILD_CC! from our list.
38876    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
38877    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38878      # If it failed, the variable was not from the command line. Ignore it,
38879      # but warn the user (except for BASH, which is always set by the calling BASH).
38880      if test "xBUILD_CC" != xBASH; then
38881        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
38882$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
38883      fi
38884      # Try to locate tool using the code snippet
38885      for ac_prog in cl cc gcc
38886do
38887  # Extract the first word of "$ac_prog", so it can be a program name with args.
38888set dummy $ac_prog; ac_word=$2
38889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38890$as_echo_n "checking for $ac_word... " >&6; }
38891if ${ac_cv_path_BUILD_CC+:} false; then :
38892  $as_echo_n "(cached) " >&6
38893else
38894  case $BUILD_CC in
38895  [\\/]* | ?:[\\/]*)
38896  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38897  ;;
38898  *)
38899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38900for as_dir in $PATH
38901do
38902  IFS=$as_save_IFS
38903  test -z "$as_dir" && as_dir=.
38904    for ac_exec_ext in '' $ac_executable_extensions; do
38905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38906    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38908    break 2
38909  fi
38910done
38911  done
38912IFS=$as_save_IFS
38913
38914  ;;
38915esac
38916fi
38917BUILD_CC=$ac_cv_path_BUILD_CC
38918if test -n "$BUILD_CC"; then
38919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38920$as_echo "$BUILD_CC" >&6; }
38921else
38922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38923$as_echo "no" >&6; }
38924fi
38925
38926
38927  test -n "$BUILD_CC" && break
38928done
38929
38930    else
38931      # If it succeeded, then it was overridden by the user. We will use it
38932      # for the tool.
38933
38934      # First remove it from the list of overridden variables, so we can test
38935      # for unknown variables in the end.
38936      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38937
38938      # Check if the provided tool contains a complete path.
38939      tool_specified="$BUILD_CC"
38940      tool_basename="${tool_specified##*/}"
38941      if test "x$tool_basename" = "x$tool_specified"; then
38942        # A command without a complete path is provided, search $PATH.
38943        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
38944$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
38945        # Extract the first word of "$tool_basename", so it can be a program name with args.
38946set dummy $tool_basename; ac_word=$2
38947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38948$as_echo_n "checking for $ac_word... " >&6; }
38949if ${ac_cv_path_BUILD_CC+:} false; then :
38950  $as_echo_n "(cached) " >&6
38951else
38952  case $BUILD_CC in
38953  [\\/]* | ?:[\\/]*)
38954  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38955  ;;
38956  *)
38957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38958for as_dir in $PATH
38959do
38960  IFS=$as_save_IFS
38961  test -z "$as_dir" && as_dir=.
38962    for ac_exec_ext in '' $ac_executable_extensions; do
38963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38964    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38966    break 2
38967  fi
38968done
38969  done
38970IFS=$as_save_IFS
38971
38972  ;;
38973esac
38974fi
38975BUILD_CC=$ac_cv_path_BUILD_CC
38976if test -n "$BUILD_CC"; then
38977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38978$as_echo "$BUILD_CC" >&6; }
38979else
38980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38981$as_echo "no" >&6; }
38982fi
38983
38984
38985        if test "x$BUILD_CC" = x; then
38986          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38987        fi
38988      else
38989        # Otherwise we believe it is a complete path. Use it as it is.
38990        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
38991$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
38992        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
38993$as_echo_n "checking for BUILD_CC... " >&6; }
38994        if test ! -x "$tool_specified"; then
38995          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38996$as_echo "not found" >&6; }
38997          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
38998        fi
38999        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39000$as_echo "$tool_specified" >&6; }
39001      fi
39002    fi
39003  fi
39004
39005
39006
39007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39008
39009  # First separate the path from the arguments. This will split at the first
39010  # space.
39011  complete="$BUILD_CC"
39012  path="${complete%% *}"
39013  tmp="$complete EOL"
39014  arguments="${tmp#* }"
39015
39016  # Input might be given as Windows format, start by converting to
39017  # unix format.
39018  new_path=`$CYGPATH -u "$path"`
39019
39020  # Now try to locate executable using which
39021  new_path=`$WHICH "$new_path" 2> /dev/null`
39022  # bat and cmd files are not always considered executable in cygwin causing which
39023  # to not find them
39024  if test "x$new_path" = x \
39025      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39026      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39027    new_path=`$CYGPATH -u "$path"`
39028  fi
39029  if test "x$new_path" = x; then
39030    # Oops. Which didn't find the executable.
39031    # The splitting of arguments from the executable at a space might have been incorrect,
39032    # since paths with space are more likely in Windows. Give it another try with the whole
39033    # argument.
39034    path="$complete"
39035    arguments="EOL"
39036    new_path=`$CYGPATH -u "$path"`
39037    new_path=`$WHICH "$new_path" 2> /dev/null`
39038    # bat and cmd files are not always considered executable in cygwin causing which
39039    # to not find them
39040    if test "x$new_path" = x \
39041        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39042        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39043      new_path=`$CYGPATH -u "$path"`
39044    fi
39045    if test "x$new_path" = x; then
39046      # It's still not found. Now this is an unrecoverable error.
39047      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39048$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39049      has_space=`$ECHO "$complete" | $GREP " "`
39050      if test "x$has_space" != x; then
39051        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39052$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39053      fi
39054      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39055    fi
39056  fi
39057
39058  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39059  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39060  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39061  # "foo.exe" is OK but "foo" is an error.
39062  #
39063  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39064  # It is also a way to make sure we got the proper file name for the real test later on.
39065  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39066  if test "x$test_shortpath" = x; then
39067    # Short path failed, file does not exist as specified.
39068    # Try adding .exe or .cmd
39069    if test -f "${new_path}.exe"; then
39070      input_to_shortpath="${new_path}.exe"
39071    elif test -f "${new_path}.cmd"; then
39072      input_to_shortpath="${new_path}.cmd"
39073    else
39074      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39075$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39076      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39077$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39078      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39079    fi
39080  else
39081    input_to_shortpath="$new_path"
39082  fi
39083
39084  # Call helper function which possibly converts this using DOS-style short mode.
39085  # If so, the updated path is stored in $new_path.
39086  new_path="$input_to_shortpath"
39087
39088  input_path="$input_to_shortpath"
39089  # Check if we need to convert this using DOS-style short mode. If the path
39090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39091  # take no chances and rewrite it.
39092  # Note: m4 eats our [], so we need to use [ and ] instead.
39093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39094  if test "x$has_forbidden_chars" != x; then
39095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39096    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39097    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39098    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39099      # Going to short mode and back again did indeed matter. Since short mode is
39100      # case insensitive, let's make it lowercase to improve readability.
39101      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39102      # Now convert it back to Unix-stile (cygpath)
39103      input_path=`$CYGPATH -u "$shortmode_path"`
39104      new_path="$input_path"
39105    fi
39106  fi
39107
39108  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39109  if test "x$test_cygdrive_prefix" = x; then
39110    # As a simple fix, exclude /usr/bin since it's not a real path.
39111    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39112      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39113      # a path prefixed by /cygdrive for fixpath to work.
39114      new_path="$CYGWIN_ROOT_PATH$input_path"
39115    fi
39116  fi
39117
39118  # remove trailing .exe if any
39119  new_path="${new_path/%.exe/}"
39120
39121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39122
39123  # First separate the path from the arguments. This will split at the first
39124  # space.
39125  complete="$BUILD_CC"
39126  path="${complete%% *}"
39127  tmp="$complete EOL"
39128  arguments="${tmp#* }"
39129
39130  # Input might be given as Windows format, start by converting to
39131  # unix format.
39132  new_path="$path"
39133
39134  windows_path="$new_path"
39135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39136    unix_path=`$CYGPATH -u "$windows_path"`
39137    new_path="$unix_path"
39138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39140    new_path="$unix_path"
39141  fi
39142
39143
39144  # Now try to locate executable using which
39145  new_path=`$WHICH "$new_path" 2> /dev/null`
39146
39147  if test "x$new_path" = x; then
39148    # Oops. Which didn't find the executable.
39149    # The splitting of arguments from the executable at a space might have been incorrect,
39150    # since paths with space are more likely in Windows. Give it another try with the whole
39151    # argument.
39152    path="$complete"
39153    arguments="EOL"
39154    new_path="$path"
39155
39156  windows_path="$new_path"
39157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39158    unix_path=`$CYGPATH -u "$windows_path"`
39159    new_path="$unix_path"
39160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39162    new_path="$unix_path"
39163  fi
39164
39165
39166    new_path=`$WHICH "$new_path" 2> /dev/null`
39167
39168    if test "x$new_path" = x; then
39169      # It's still not found. Now this is an unrecoverable error.
39170      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39171$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39172      has_space=`$ECHO "$complete" | $GREP " "`
39173      if test "x$has_space" != x; then
39174        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39175$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39176      fi
39177      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39178    fi
39179  fi
39180
39181  # Now new_path has a complete unix path to the binary
39182  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39183    # Keep paths in /bin as-is, but remove trailing .exe if any
39184    new_path="${new_path/%.exe/}"
39185    # Do not save /bin paths to all_fixpath_prefixes!
39186  else
39187    # Not in mixed or Windows style, start by that.
39188    new_path=`cmd //c echo $new_path`
39189
39190  input_path="$new_path"
39191  # Check if we need to convert this using DOS-style short mode. If the path
39192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39193  # take no chances and rewrite it.
39194  # Note: m4 eats our [], so we need to use [ and ] instead.
39195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39196  if test "x$has_forbidden_chars" != x; then
39197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39198    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39199  fi
39200
39201    # Output is in $new_path
39202
39203  windows_path="$new_path"
39204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39205    unix_path=`$CYGPATH -u "$windows_path"`
39206    new_path="$unix_path"
39207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39209    new_path="$unix_path"
39210  fi
39211
39212    # remove trailing .exe if any
39213    new_path="${new_path/%.exe/}"
39214
39215    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39216    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39217  fi
39218
39219  else
39220    # We're on a posix platform. Hooray! :)
39221    # First separate the path from the arguments. This will split at the first
39222    # space.
39223    complete="$BUILD_CC"
39224    path="${complete%% *}"
39225    tmp="$complete EOL"
39226    arguments="${tmp#* }"
39227
39228    # Cannot rely on the command "which" here since it doesn't always work.
39229    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39230    if test -z "$is_absolute_path"; then
39231      # Path to executable is not absolute. Find it.
39232      IFS_save="$IFS"
39233      IFS=:
39234      for p in $PATH; do
39235        if test -f "$p/$path" && test -x "$p/$path"; then
39236          new_path="$p/$path"
39237          break
39238        fi
39239      done
39240      IFS="$IFS_save"
39241    else
39242      # This is an absolute path, we can use it without further modifications.
39243      new_path="$path"
39244    fi
39245
39246    if test "x$new_path" = x; then
39247      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39248$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39249      has_space=`$ECHO "$complete" | $GREP " "`
39250      if test "x$has_space" != x; then
39251        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39252$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39253      fi
39254      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39255    fi
39256  fi
39257
39258  # Now join together the path and the arguments once again
39259  if test "x$arguments" != xEOL; then
39260    new_complete="$new_path ${arguments% *}"
39261  else
39262    new_complete="$new_path"
39263  fi
39264
39265  if test "x$complete" != "x$new_complete"; then
39266    BUILD_CC="$new_complete"
39267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39268$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39269  fi
39270
39271
39272
39273  # Publish this variable in the help.
39274
39275
39276  if test "x$BUILD_CXX" = x; then
39277    # The variable is not set by user, try to locate tool using the code snippet
39278    for ac_prog in cl CC g++
39279do
39280  # Extract the first word of "$ac_prog", so it can be a program name with args.
39281set dummy $ac_prog; ac_word=$2
39282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39283$as_echo_n "checking for $ac_word... " >&6; }
39284if ${ac_cv_path_BUILD_CXX+:} false; then :
39285  $as_echo_n "(cached) " >&6
39286else
39287  case $BUILD_CXX in
39288  [\\/]* | ?:[\\/]*)
39289  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39290  ;;
39291  *)
39292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39293for as_dir in $PATH
39294do
39295  IFS=$as_save_IFS
39296  test -z "$as_dir" && as_dir=.
39297    for ac_exec_ext in '' $ac_executable_extensions; do
39298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39299    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39301    break 2
39302  fi
39303done
39304  done
39305IFS=$as_save_IFS
39306
39307  ;;
39308esac
39309fi
39310BUILD_CXX=$ac_cv_path_BUILD_CXX
39311if test -n "$BUILD_CXX"; then
39312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39313$as_echo "$BUILD_CXX" >&6; }
39314else
39315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39316$as_echo "no" >&6; }
39317fi
39318
39319
39320  test -n "$BUILD_CXX" && break
39321done
39322
39323  else
39324    # The variable is set, but is it from the command line or the environment?
39325
39326    # Try to remove the string !BUILD_CXX! from our list.
39327    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39328    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39329      # If it failed, the variable was not from the command line. Ignore it,
39330      # but warn the user (except for BASH, which is always set by the calling BASH).
39331      if test "xBUILD_CXX" != xBASH; then
39332        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39333$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39334      fi
39335      # Try to locate tool using the code snippet
39336      for ac_prog in cl CC g++
39337do
39338  # Extract the first word of "$ac_prog", so it can be a program name with args.
39339set dummy $ac_prog; ac_word=$2
39340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39341$as_echo_n "checking for $ac_word... " >&6; }
39342if ${ac_cv_path_BUILD_CXX+:} false; then :
39343  $as_echo_n "(cached) " >&6
39344else
39345  case $BUILD_CXX in
39346  [\\/]* | ?:[\\/]*)
39347  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39348  ;;
39349  *)
39350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39351for as_dir in $PATH
39352do
39353  IFS=$as_save_IFS
39354  test -z "$as_dir" && as_dir=.
39355    for ac_exec_ext in '' $ac_executable_extensions; do
39356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39357    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39359    break 2
39360  fi
39361done
39362  done
39363IFS=$as_save_IFS
39364
39365  ;;
39366esac
39367fi
39368BUILD_CXX=$ac_cv_path_BUILD_CXX
39369if test -n "$BUILD_CXX"; then
39370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39371$as_echo "$BUILD_CXX" >&6; }
39372else
39373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39374$as_echo "no" >&6; }
39375fi
39376
39377
39378  test -n "$BUILD_CXX" && break
39379done
39380
39381    else
39382      # If it succeeded, then it was overridden by the user. We will use it
39383      # for the tool.
39384
39385      # First remove it from the list of overridden variables, so we can test
39386      # for unknown variables in the end.
39387      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39388
39389      # Check if the provided tool contains a complete path.
39390      tool_specified="$BUILD_CXX"
39391      tool_basename="${tool_specified##*/}"
39392      if test "x$tool_basename" = "x$tool_specified"; then
39393        # A command without a complete path is provided, search $PATH.
39394        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39395$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39396        # Extract the first word of "$tool_basename", so it can be a program name with args.
39397set dummy $tool_basename; ac_word=$2
39398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39399$as_echo_n "checking for $ac_word... " >&6; }
39400if ${ac_cv_path_BUILD_CXX+:} false; then :
39401  $as_echo_n "(cached) " >&6
39402else
39403  case $BUILD_CXX in
39404  [\\/]* | ?:[\\/]*)
39405  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39406  ;;
39407  *)
39408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39409for as_dir in $PATH
39410do
39411  IFS=$as_save_IFS
39412  test -z "$as_dir" && as_dir=.
39413    for ac_exec_ext in '' $ac_executable_extensions; do
39414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39415    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39417    break 2
39418  fi
39419done
39420  done
39421IFS=$as_save_IFS
39422
39423  ;;
39424esac
39425fi
39426BUILD_CXX=$ac_cv_path_BUILD_CXX
39427if test -n "$BUILD_CXX"; then
39428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39429$as_echo "$BUILD_CXX" >&6; }
39430else
39431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39432$as_echo "no" >&6; }
39433fi
39434
39435
39436        if test "x$BUILD_CXX" = x; then
39437          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39438        fi
39439      else
39440        # Otherwise we believe it is a complete path. Use it as it is.
39441        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39442$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39443        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39444$as_echo_n "checking for BUILD_CXX... " >&6; }
39445        if test ! -x "$tool_specified"; then
39446          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39447$as_echo "not found" >&6; }
39448          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39449        fi
39450        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39451$as_echo "$tool_specified" >&6; }
39452      fi
39453    fi
39454  fi
39455
39456
39457
39458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39459
39460  # First separate the path from the arguments. This will split at the first
39461  # space.
39462  complete="$BUILD_CXX"
39463  path="${complete%% *}"
39464  tmp="$complete EOL"
39465  arguments="${tmp#* }"
39466
39467  # Input might be given as Windows format, start by converting to
39468  # unix format.
39469  new_path=`$CYGPATH -u "$path"`
39470
39471  # Now try to locate executable using which
39472  new_path=`$WHICH "$new_path" 2> /dev/null`
39473  # bat and cmd files are not always considered executable in cygwin causing which
39474  # to not find them
39475  if test "x$new_path" = x \
39476      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39477      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39478    new_path=`$CYGPATH -u "$path"`
39479  fi
39480  if test "x$new_path" = x; then
39481    # Oops. Which didn't find the executable.
39482    # The splitting of arguments from the executable at a space might have been incorrect,
39483    # since paths with space are more likely in Windows. Give it another try with the whole
39484    # argument.
39485    path="$complete"
39486    arguments="EOL"
39487    new_path=`$CYGPATH -u "$path"`
39488    new_path=`$WHICH "$new_path" 2> /dev/null`
39489    # bat and cmd files are not always considered executable in cygwin causing which
39490    # to not find them
39491    if test "x$new_path" = x \
39492        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39493        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39494      new_path=`$CYGPATH -u "$path"`
39495    fi
39496    if test "x$new_path" = x; then
39497      # It's still not found. Now this is an unrecoverable error.
39498      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39499$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39500      has_space=`$ECHO "$complete" | $GREP " "`
39501      if test "x$has_space" != x; then
39502        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39503$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39504      fi
39505      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39506    fi
39507  fi
39508
39509  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39510  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39511  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39512  # "foo.exe" is OK but "foo" is an error.
39513  #
39514  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39515  # It is also a way to make sure we got the proper file name for the real test later on.
39516  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39517  if test "x$test_shortpath" = x; then
39518    # Short path failed, file does not exist as specified.
39519    # Try adding .exe or .cmd
39520    if test -f "${new_path}.exe"; then
39521      input_to_shortpath="${new_path}.exe"
39522    elif test -f "${new_path}.cmd"; then
39523      input_to_shortpath="${new_path}.cmd"
39524    else
39525      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39526$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39527      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39528$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39529      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39530    fi
39531  else
39532    input_to_shortpath="$new_path"
39533  fi
39534
39535  # Call helper function which possibly converts this using DOS-style short mode.
39536  # If so, the updated path is stored in $new_path.
39537  new_path="$input_to_shortpath"
39538
39539  input_path="$input_to_shortpath"
39540  # Check if we need to convert this using DOS-style short mode. If the path
39541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39542  # take no chances and rewrite it.
39543  # Note: m4 eats our [], so we need to use [ and ] instead.
39544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39545  if test "x$has_forbidden_chars" != x; then
39546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39547    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39548    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39549    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39550      # Going to short mode and back again did indeed matter. Since short mode is
39551      # case insensitive, let's make it lowercase to improve readability.
39552      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39553      # Now convert it back to Unix-stile (cygpath)
39554      input_path=`$CYGPATH -u "$shortmode_path"`
39555      new_path="$input_path"
39556    fi
39557  fi
39558
39559  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39560  if test "x$test_cygdrive_prefix" = x; then
39561    # As a simple fix, exclude /usr/bin since it's not a real path.
39562    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39563      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39564      # a path prefixed by /cygdrive for fixpath to work.
39565      new_path="$CYGWIN_ROOT_PATH$input_path"
39566    fi
39567  fi
39568
39569  # remove trailing .exe if any
39570  new_path="${new_path/%.exe/}"
39571
39572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39573
39574  # First separate the path from the arguments. This will split at the first
39575  # space.
39576  complete="$BUILD_CXX"
39577  path="${complete%% *}"
39578  tmp="$complete EOL"
39579  arguments="${tmp#* }"
39580
39581  # Input might be given as Windows format, start by converting to
39582  # unix format.
39583  new_path="$path"
39584
39585  windows_path="$new_path"
39586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39587    unix_path=`$CYGPATH -u "$windows_path"`
39588    new_path="$unix_path"
39589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39591    new_path="$unix_path"
39592  fi
39593
39594
39595  # Now try to locate executable using which
39596  new_path=`$WHICH "$new_path" 2> /dev/null`
39597
39598  if test "x$new_path" = x; then
39599    # Oops. Which didn't find the executable.
39600    # The splitting of arguments from the executable at a space might have been incorrect,
39601    # since paths with space are more likely in Windows. Give it another try with the whole
39602    # argument.
39603    path="$complete"
39604    arguments="EOL"
39605    new_path="$path"
39606
39607  windows_path="$new_path"
39608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39609    unix_path=`$CYGPATH -u "$windows_path"`
39610    new_path="$unix_path"
39611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39613    new_path="$unix_path"
39614  fi
39615
39616
39617    new_path=`$WHICH "$new_path" 2> /dev/null`
39618
39619    if test "x$new_path" = x; then
39620      # It's still not found. Now this is an unrecoverable error.
39621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39622$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39623      has_space=`$ECHO "$complete" | $GREP " "`
39624      if test "x$has_space" != x; then
39625        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39626$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39627      fi
39628      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39629    fi
39630  fi
39631
39632  # Now new_path has a complete unix path to the binary
39633  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39634    # Keep paths in /bin as-is, but remove trailing .exe if any
39635    new_path="${new_path/%.exe/}"
39636    # Do not save /bin paths to all_fixpath_prefixes!
39637  else
39638    # Not in mixed or Windows style, start by that.
39639    new_path=`cmd //c echo $new_path`
39640
39641  input_path="$new_path"
39642  # Check if we need to convert this using DOS-style short mode. If the path
39643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39644  # take no chances and rewrite it.
39645  # Note: m4 eats our [], so we need to use [ and ] instead.
39646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39647  if test "x$has_forbidden_chars" != x; then
39648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39649    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39650  fi
39651
39652    # Output is in $new_path
39653
39654  windows_path="$new_path"
39655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39656    unix_path=`$CYGPATH -u "$windows_path"`
39657    new_path="$unix_path"
39658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39660    new_path="$unix_path"
39661  fi
39662
39663    # remove trailing .exe if any
39664    new_path="${new_path/%.exe/}"
39665
39666    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39667    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39668  fi
39669
39670  else
39671    # We're on a posix platform. Hooray! :)
39672    # First separate the path from the arguments. This will split at the first
39673    # space.
39674    complete="$BUILD_CXX"
39675    path="${complete%% *}"
39676    tmp="$complete EOL"
39677    arguments="${tmp#* }"
39678
39679    # Cannot rely on the command "which" here since it doesn't always work.
39680    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39681    if test -z "$is_absolute_path"; then
39682      # Path to executable is not absolute. Find it.
39683      IFS_save="$IFS"
39684      IFS=:
39685      for p in $PATH; do
39686        if test -f "$p/$path" && test -x "$p/$path"; then
39687          new_path="$p/$path"
39688          break
39689        fi
39690      done
39691      IFS="$IFS_save"
39692    else
39693      # This is an absolute path, we can use it without further modifications.
39694      new_path="$path"
39695    fi
39696
39697    if test "x$new_path" = x; then
39698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39699$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39700      has_space=`$ECHO "$complete" | $GREP " "`
39701      if test "x$has_space" != x; then
39702        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39703$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39704      fi
39705      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39706    fi
39707  fi
39708
39709  # Now join together the path and the arguments once again
39710  if test "x$arguments" != xEOL; then
39711    new_complete="$new_path ${arguments% *}"
39712  else
39713    new_complete="$new_path"
39714  fi
39715
39716  if test "x$complete" != "x$new_complete"; then
39717    BUILD_CXX="$new_complete"
39718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39719$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39720  fi
39721
39722
39723
39724  # Publish this variable in the help.
39725
39726
39727  if test "x$BUILD_LD" = x; then
39728    # The variable is not set by user, try to locate tool using the code snippet
39729    for ac_prog in ld
39730do
39731  # Extract the first word of "$ac_prog", so it can be a program name with args.
39732set dummy $ac_prog; ac_word=$2
39733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39734$as_echo_n "checking for $ac_word... " >&6; }
39735if ${ac_cv_path_BUILD_LD+:} false; then :
39736  $as_echo_n "(cached) " >&6
39737else
39738  case $BUILD_LD in
39739  [\\/]* | ?:[\\/]*)
39740  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39741  ;;
39742  *)
39743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39744for as_dir in $PATH
39745do
39746  IFS=$as_save_IFS
39747  test -z "$as_dir" && as_dir=.
39748    for ac_exec_ext in '' $ac_executable_extensions; do
39749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39750    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39752    break 2
39753  fi
39754done
39755  done
39756IFS=$as_save_IFS
39757
39758  ;;
39759esac
39760fi
39761BUILD_LD=$ac_cv_path_BUILD_LD
39762if test -n "$BUILD_LD"; then
39763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39764$as_echo "$BUILD_LD" >&6; }
39765else
39766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39767$as_echo "no" >&6; }
39768fi
39769
39770
39771  test -n "$BUILD_LD" && break
39772done
39773
39774  else
39775    # The variable is set, but is it from the command line or the environment?
39776
39777    # Try to remove the string !BUILD_LD! from our list.
39778    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39779    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39780      # If it failed, the variable was not from the command line. Ignore it,
39781      # but warn the user (except for BASH, which is always set by the calling BASH).
39782      if test "xBUILD_LD" != xBASH; then
39783        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39784$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39785      fi
39786      # Try to locate tool using the code snippet
39787      for ac_prog in ld
39788do
39789  # Extract the first word of "$ac_prog", so it can be a program name with args.
39790set dummy $ac_prog; ac_word=$2
39791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39792$as_echo_n "checking for $ac_word... " >&6; }
39793if ${ac_cv_path_BUILD_LD+:} false; then :
39794  $as_echo_n "(cached) " >&6
39795else
39796  case $BUILD_LD in
39797  [\\/]* | ?:[\\/]*)
39798  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39799  ;;
39800  *)
39801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39802for as_dir in $PATH
39803do
39804  IFS=$as_save_IFS
39805  test -z "$as_dir" && as_dir=.
39806    for ac_exec_ext in '' $ac_executable_extensions; do
39807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39808    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39810    break 2
39811  fi
39812done
39813  done
39814IFS=$as_save_IFS
39815
39816  ;;
39817esac
39818fi
39819BUILD_LD=$ac_cv_path_BUILD_LD
39820if test -n "$BUILD_LD"; then
39821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39822$as_echo "$BUILD_LD" >&6; }
39823else
39824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39825$as_echo "no" >&6; }
39826fi
39827
39828
39829  test -n "$BUILD_LD" && break
39830done
39831
39832    else
39833      # If it succeeded, then it was overridden by the user. We will use it
39834      # for the tool.
39835
39836      # First remove it from the list of overridden variables, so we can test
39837      # for unknown variables in the end.
39838      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39839
39840      # Check if the provided tool contains a complete path.
39841      tool_specified="$BUILD_LD"
39842      tool_basename="${tool_specified##*/}"
39843      if test "x$tool_basename" = "x$tool_specified"; then
39844        # A command without a complete path is provided, search $PATH.
39845        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
39846$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
39847        # Extract the first word of "$tool_basename", so it can be a program name with args.
39848set dummy $tool_basename; ac_word=$2
39849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39850$as_echo_n "checking for $ac_word... " >&6; }
39851if ${ac_cv_path_BUILD_LD+:} false; then :
39852  $as_echo_n "(cached) " >&6
39853else
39854  case $BUILD_LD in
39855  [\\/]* | ?:[\\/]*)
39856  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39857  ;;
39858  *)
39859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39860for as_dir in $PATH
39861do
39862  IFS=$as_save_IFS
39863  test -z "$as_dir" && as_dir=.
39864    for ac_exec_ext in '' $ac_executable_extensions; do
39865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39866    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39868    break 2
39869  fi
39870done
39871  done
39872IFS=$as_save_IFS
39873
39874  ;;
39875esac
39876fi
39877BUILD_LD=$ac_cv_path_BUILD_LD
39878if test -n "$BUILD_LD"; then
39879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39880$as_echo "$BUILD_LD" >&6; }
39881else
39882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39883$as_echo "no" >&6; }
39884fi
39885
39886
39887        if test "x$BUILD_LD" = x; then
39888          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39889        fi
39890      else
39891        # Otherwise we believe it is a complete path. Use it as it is.
39892        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
39893$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
39894        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
39895$as_echo_n "checking for BUILD_LD... " >&6; }
39896        if test ! -x "$tool_specified"; then
39897          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39898$as_echo "not found" >&6; }
39899          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
39900        fi
39901        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39902$as_echo "$tool_specified" >&6; }
39903      fi
39904    fi
39905  fi
39906
39907
39908
39909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39910
39911  # First separate the path from the arguments. This will split at the first
39912  # space.
39913  complete="$BUILD_LD"
39914  path="${complete%% *}"
39915  tmp="$complete EOL"
39916  arguments="${tmp#* }"
39917
39918  # Input might be given as Windows format, start by converting to
39919  # unix format.
39920  new_path=`$CYGPATH -u "$path"`
39921
39922  # Now try to locate executable using which
39923  new_path=`$WHICH "$new_path" 2> /dev/null`
39924  # bat and cmd files are not always considered executable in cygwin causing which
39925  # to not find them
39926  if test "x$new_path" = x \
39927      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39928      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39929    new_path=`$CYGPATH -u "$path"`
39930  fi
39931  if test "x$new_path" = x; then
39932    # Oops. Which didn't find the executable.
39933    # The splitting of arguments from the executable at a space might have been incorrect,
39934    # since paths with space are more likely in Windows. Give it another try with the whole
39935    # argument.
39936    path="$complete"
39937    arguments="EOL"
39938    new_path=`$CYGPATH -u "$path"`
39939    new_path=`$WHICH "$new_path" 2> /dev/null`
39940    # bat and cmd files are not always considered executable in cygwin causing which
39941    # to not find them
39942    if test "x$new_path" = x \
39943        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39944        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39945      new_path=`$CYGPATH -u "$path"`
39946    fi
39947    if test "x$new_path" = x; then
39948      # It's still not found. Now this is an unrecoverable error.
39949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39950$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39951      has_space=`$ECHO "$complete" | $GREP " "`
39952      if test "x$has_space" != x; then
39953        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39954$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39955      fi
39956      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39957    fi
39958  fi
39959
39960  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39961  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39962  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39963  # "foo.exe" is OK but "foo" is an error.
39964  #
39965  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39966  # It is also a way to make sure we got the proper file name for the real test later on.
39967  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39968  if test "x$test_shortpath" = x; then
39969    # Short path failed, file does not exist as specified.
39970    # Try adding .exe or .cmd
39971    if test -f "${new_path}.exe"; then
39972      input_to_shortpath="${new_path}.exe"
39973    elif test -f "${new_path}.cmd"; then
39974      input_to_shortpath="${new_path}.cmd"
39975    else
39976      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
39977$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
39978      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39979$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39980      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39981    fi
39982  else
39983    input_to_shortpath="$new_path"
39984  fi
39985
39986  # Call helper function which possibly converts this using DOS-style short mode.
39987  # If so, the updated path is stored in $new_path.
39988  new_path="$input_to_shortpath"
39989
39990  input_path="$input_to_shortpath"
39991  # Check if we need to convert this using DOS-style short mode. If the path
39992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39993  # take no chances and rewrite it.
39994  # Note: m4 eats our [], so we need to use [ and ] instead.
39995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39996  if test "x$has_forbidden_chars" != x; then
39997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39998    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39999    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40000    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40001      # Going to short mode and back again did indeed matter. Since short mode is
40002      # case insensitive, let's make it lowercase to improve readability.
40003      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40004      # Now convert it back to Unix-stile (cygpath)
40005      input_path=`$CYGPATH -u "$shortmode_path"`
40006      new_path="$input_path"
40007    fi
40008  fi
40009
40010  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40011  if test "x$test_cygdrive_prefix" = x; then
40012    # As a simple fix, exclude /usr/bin since it's not a real path.
40013    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40014      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40015      # a path prefixed by /cygdrive for fixpath to work.
40016      new_path="$CYGWIN_ROOT_PATH$input_path"
40017    fi
40018  fi
40019
40020  # remove trailing .exe if any
40021  new_path="${new_path/%.exe/}"
40022
40023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40024
40025  # First separate the path from the arguments. This will split at the first
40026  # space.
40027  complete="$BUILD_LD"
40028  path="${complete%% *}"
40029  tmp="$complete EOL"
40030  arguments="${tmp#* }"
40031
40032  # Input might be given as Windows format, start by converting to
40033  # unix format.
40034  new_path="$path"
40035
40036  windows_path="$new_path"
40037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40038    unix_path=`$CYGPATH -u "$windows_path"`
40039    new_path="$unix_path"
40040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40042    new_path="$unix_path"
40043  fi
40044
40045
40046  # Now try to locate executable using which
40047  new_path=`$WHICH "$new_path" 2> /dev/null`
40048
40049  if test "x$new_path" = x; then
40050    # Oops. Which didn't find the executable.
40051    # The splitting of arguments from the executable at a space might have been incorrect,
40052    # since paths with space are more likely in Windows. Give it another try with the whole
40053    # argument.
40054    path="$complete"
40055    arguments="EOL"
40056    new_path="$path"
40057
40058  windows_path="$new_path"
40059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40060    unix_path=`$CYGPATH -u "$windows_path"`
40061    new_path="$unix_path"
40062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40064    new_path="$unix_path"
40065  fi
40066
40067
40068    new_path=`$WHICH "$new_path" 2> /dev/null`
40069
40070    if test "x$new_path" = x; then
40071      # It's still not found. Now this is an unrecoverable error.
40072      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40073$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40074      has_space=`$ECHO "$complete" | $GREP " "`
40075      if test "x$has_space" != x; then
40076        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40077$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40078      fi
40079      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40080    fi
40081  fi
40082
40083  # Now new_path has a complete unix path to the binary
40084  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40085    # Keep paths in /bin as-is, but remove trailing .exe if any
40086    new_path="${new_path/%.exe/}"
40087    # Do not save /bin paths to all_fixpath_prefixes!
40088  else
40089    # Not in mixed or Windows style, start by that.
40090    new_path=`cmd //c echo $new_path`
40091
40092  input_path="$new_path"
40093  # Check if we need to convert this using DOS-style short mode. If the path
40094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40095  # take no chances and rewrite it.
40096  # Note: m4 eats our [], so we need to use [ and ] instead.
40097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40098  if test "x$has_forbidden_chars" != x; then
40099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40100    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40101  fi
40102
40103    # Output is in $new_path
40104
40105  windows_path="$new_path"
40106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40107    unix_path=`$CYGPATH -u "$windows_path"`
40108    new_path="$unix_path"
40109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40111    new_path="$unix_path"
40112  fi
40113
40114    # remove trailing .exe if any
40115    new_path="${new_path/%.exe/}"
40116
40117    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40118    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40119  fi
40120
40121  else
40122    # We're on a posix platform. Hooray! :)
40123    # First separate the path from the arguments. This will split at the first
40124    # space.
40125    complete="$BUILD_LD"
40126    path="${complete%% *}"
40127    tmp="$complete EOL"
40128    arguments="${tmp#* }"
40129
40130    # Cannot rely on the command "which" here since it doesn't always work.
40131    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40132    if test -z "$is_absolute_path"; then
40133      # Path to executable is not absolute. Find it.
40134      IFS_save="$IFS"
40135      IFS=:
40136      for p in $PATH; do
40137        if test -f "$p/$path" && test -x "$p/$path"; then
40138          new_path="$p/$path"
40139          break
40140        fi
40141      done
40142      IFS="$IFS_save"
40143    else
40144      # This is an absolute path, we can use it without further modifications.
40145      new_path="$path"
40146    fi
40147
40148    if test "x$new_path" = x; then
40149      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40150$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40151      has_space=`$ECHO "$complete" | $GREP " "`
40152      if test "x$has_space" != x; then
40153        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40154$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40155      fi
40156      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40157    fi
40158  fi
40159
40160  # Now join together the path and the arguments once again
40161  if test "x$arguments" != xEOL; then
40162    new_complete="$new_path ${arguments% *}"
40163  else
40164    new_complete="$new_path"
40165  fi
40166
40167  if test "x$complete" != "x$new_complete"; then
40168    BUILD_LD="$new_complete"
40169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40170$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40171  fi
40172
40173  else
40174    # If we are not cross compiling, use the normal target compilers for
40175    # building the build platform executables.
40176    BUILD_CC="$CC"
40177    BUILD_CXX="$CXX"
40178    BUILD_LD="$LD"
40179  fi
40180
40181
40182
40183
40184
40185
40186  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40187    # For hotspot, we need these in Windows mixed path,
40188    # so rewrite them all. Need added .exe suffix.
40189    HOTSPOT_CXX="$CXX.exe"
40190    HOTSPOT_LD="$LD.exe"
40191    HOTSPOT_MT="$MT.exe"
40192    HOTSPOT_RC="$RC.exe"
40193
40194  unix_path="$HOTSPOT_CXX"
40195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40196    windows_path=`$CYGPATH -m "$unix_path"`
40197    HOTSPOT_CXX="$windows_path"
40198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40199    windows_path=`cmd //c echo $unix_path`
40200    HOTSPOT_CXX="$windows_path"
40201  fi
40202
40203
40204  unix_path="$HOTSPOT_LD"
40205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40206    windows_path=`$CYGPATH -m "$unix_path"`
40207    HOTSPOT_LD="$windows_path"
40208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40209    windows_path=`cmd //c echo $unix_path`
40210    HOTSPOT_LD="$windows_path"
40211  fi
40212
40213
40214  unix_path="$HOTSPOT_MT"
40215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40216    windows_path=`$CYGPATH -m "$unix_path"`
40217    HOTSPOT_MT="$windows_path"
40218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40219    windows_path=`cmd //c echo $unix_path`
40220    HOTSPOT_MT="$windows_path"
40221  fi
40222
40223
40224  unix_path="$HOTSPOT_RC"
40225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40226    windows_path=`$CYGPATH -m "$unix_path"`
40227    HOTSPOT_RC="$windows_path"
40228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40229    windows_path=`cmd //c echo $unix_path`
40230    HOTSPOT_RC="$windows_path"
40231  fi
40232
40233
40234
40235  else
40236    HOTSPOT_CXX="$CXX"
40237    HOTSPOT_LD="$LD"
40238  fi
40239
40240
40241
40242  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40243    USE_CLANG=true
40244  fi
40245
40246
40247  # LDEXE is the linker to use, when creating executables. Not really used.
40248  # FIXME: These should just be removed!
40249  LDEXE="$LD"
40250  LDEXECXX="$LDCXX"
40251
40252
40253
40254
40255  # The package path is used only on macosx?
40256  # FIXME: clean this up, and/or move it elsewhere.
40257  PACKAGE_PATH=/opt/local
40258
40259
40260  # Check for extra potential brokenness.
40261  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40262    # On Windows, double-check that we got the right compiler.
40263    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40264    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40265    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40266      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40267        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40268      fi
40269    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40270      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40271        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40272      fi
40273    fi
40274  fi
40275
40276  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40277    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40278    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40279    # This is later checked when setting flags.
40280  fi
40281
40282  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40283  # in executable.'
40284  USING_BROKEN_SUSE_LD=no
40285  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40286    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40287$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40288    echo "SUNWprivate_1.1 { local: *; };" > version-script.map
40289    echo "int main() { }" > main.c
40290    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40291      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40292$as_echo "no" >&6; }
40293      USING_BROKEN_SUSE_LD=no
40294    else
40295      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40296$as_echo "yes" >&6; }
40297      USING_BROKEN_SUSE_LD=yes
40298    fi
40299    rm -rf version-script.map main.c a.out
40300  fi
40301
40302
40303
40304# Setup the JTReg Regression Test Harness.
40305
40306
40307# Check whether --with-jtreg was given.
40308if test "${with_jtreg+set}" = set; then :
40309  withval=$with_jtreg;
40310else
40311  with_jtreg=no
40312fi
40313
40314
40315  if test "x$with_jtreg" = xno; then
40316    # jtreg disabled
40317    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40318$as_echo_n "checking for jtreg... " >&6; }
40319    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40320$as_echo "no" >&6; }
40321  else
40322    if test "x$with_jtreg" != xyes; then
40323      # with path specified.
40324      JT_HOME="$with_jtreg"
40325    fi
40326
40327    if test "x$JT_HOME" != x; then
40328      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40329$as_echo_n "checking for jtreg... " >&6; }
40330
40331      # use JT_HOME enviroment var.
40332
40333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40334
40335  # Input might be given as Windows format, start by converting to
40336  # unix format.
40337  path="$JT_HOME"
40338  new_path=`$CYGPATH -u "$path"`
40339
40340  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40341  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40342  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40343  # "foo.exe" is OK but "foo" is an error.
40344  #
40345  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40346  # It is also a way to make sure we got the proper file name for the real test later on.
40347  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40348  if test "x$test_shortpath" = x; then
40349    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40350$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40351    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40352  fi
40353
40354  # Call helper function which possibly converts this using DOS-style short mode.
40355  # If so, the updated path is stored in $new_path.
40356
40357  input_path="$new_path"
40358  # Check if we need to convert this using DOS-style short mode. If the path
40359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40360  # take no chances and rewrite it.
40361  # Note: m4 eats our [], so we need to use [ and ] instead.
40362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40363  if test "x$has_forbidden_chars" != x; then
40364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40365    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40366    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40367    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40368      # Going to short mode and back again did indeed matter. Since short mode is
40369      # case insensitive, let's make it lowercase to improve readability.
40370      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40371      # Now convert it back to Unix-stile (cygpath)
40372      input_path=`$CYGPATH -u "$shortmode_path"`
40373      new_path="$input_path"
40374    fi
40375  fi
40376
40377  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40378  if test "x$test_cygdrive_prefix" = x; then
40379    # As a simple fix, exclude /usr/bin since it's not a real path.
40380    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40381      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40382      # a path prefixed by /cygdrive for fixpath to work.
40383      new_path="$CYGWIN_ROOT_PATH$input_path"
40384    fi
40385  fi
40386
40387
40388  if test "x$path" != "x$new_path"; then
40389    JT_HOME="$new_path"
40390    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40391$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40392  fi
40393
40394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40395
40396  path="$JT_HOME"
40397  has_colon=`$ECHO $path | $GREP ^.:`
40398  new_path="$path"
40399  if test "x$has_colon" = x; then
40400    # Not in mixed or Windows style, start by that.
40401    new_path=`cmd //c echo $path`
40402  fi
40403
40404
40405  input_path="$new_path"
40406  # Check if we need to convert this using DOS-style short mode. If the path
40407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40408  # take no chances and rewrite it.
40409  # Note: m4 eats our [], so we need to use [ and ] instead.
40410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40411  if test "x$has_forbidden_chars" != x; then
40412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40413    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40414  fi
40415
40416
40417  windows_path="$new_path"
40418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40419    unix_path=`$CYGPATH -u "$windows_path"`
40420    new_path="$unix_path"
40421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40423    new_path="$unix_path"
40424  fi
40425
40426  if test "x$path" != "x$new_path"; then
40427    JT_HOME="$new_path"
40428    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40429$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40430  fi
40431
40432  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40433  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40434
40435  else
40436    # We're on a posix platform. Hooray! :)
40437    path="$JT_HOME"
40438    has_space=`$ECHO "$path" | $GREP " "`
40439    if test "x$has_space" != x; then
40440      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40441$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40442      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40443    fi
40444
40445    # Use eval to expand a potential ~
40446    eval path="$path"
40447    if test ! -f "$path" && test ! -d "$path"; then
40448      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40449    fi
40450
40451    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40452  fi
40453
40454
40455      # jtreg win32 script works for everybody
40456      JTREGEXE="$JT_HOME/win32/bin/jtreg"
40457
40458      if test ! -f "$JTREGEXE"; then
40459        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40460      fi
40461
40462      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40463$as_echo "$JTREGEXE" >&6; }
40464    else
40465      # try to find jtreg on path
40466
40467
40468
40469  # Publish this variable in the help.
40470
40471
40472  if test "x$JTREGEXE" = x; then
40473    # The variable is not set by user, try to locate tool using the code snippet
40474    for ac_prog in jtreg
40475do
40476  # Extract the first word of "$ac_prog", so it can be a program name with args.
40477set dummy $ac_prog; ac_word=$2
40478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40479$as_echo_n "checking for $ac_word... " >&6; }
40480if ${ac_cv_path_JTREGEXE+:} false; then :
40481  $as_echo_n "(cached) " >&6
40482else
40483  case $JTREGEXE in
40484  [\\/]* | ?:[\\/]*)
40485  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40486  ;;
40487  *)
40488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40489for as_dir in $PATH
40490do
40491  IFS=$as_save_IFS
40492  test -z "$as_dir" && as_dir=.
40493    for ac_exec_ext in '' $ac_executable_extensions; do
40494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40495    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40497    break 2
40498  fi
40499done
40500  done
40501IFS=$as_save_IFS
40502
40503  ;;
40504esac
40505fi
40506JTREGEXE=$ac_cv_path_JTREGEXE
40507if test -n "$JTREGEXE"; then
40508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40509$as_echo "$JTREGEXE" >&6; }
40510else
40511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40512$as_echo "no" >&6; }
40513fi
40514
40515
40516  test -n "$JTREGEXE" && break
40517done
40518
40519  else
40520    # The variable is set, but is it from the command line or the environment?
40521
40522    # Try to remove the string !JTREGEXE! from our list.
40523    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40524    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40525      # If it failed, the variable was not from the command line. Ignore it,
40526      # but warn the user (except for BASH, which is always set by the calling BASH).
40527      if test "xJTREGEXE" != xBASH; then
40528        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40529$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40530      fi
40531      # Try to locate tool using the code snippet
40532      for ac_prog in jtreg
40533do
40534  # Extract the first word of "$ac_prog", so it can be a program name with args.
40535set dummy $ac_prog; ac_word=$2
40536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40537$as_echo_n "checking for $ac_word... " >&6; }
40538if ${ac_cv_path_JTREGEXE+:} false; then :
40539  $as_echo_n "(cached) " >&6
40540else
40541  case $JTREGEXE in
40542  [\\/]* | ?:[\\/]*)
40543  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40544  ;;
40545  *)
40546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40547for as_dir in $PATH
40548do
40549  IFS=$as_save_IFS
40550  test -z "$as_dir" && as_dir=.
40551    for ac_exec_ext in '' $ac_executable_extensions; do
40552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40553    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40555    break 2
40556  fi
40557done
40558  done
40559IFS=$as_save_IFS
40560
40561  ;;
40562esac
40563fi
40564JTREGEXE=$ac_cv_path_JTREGEXE
40565if test -n "$JTREGEXE"; then
40566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40567$as_echo "$JTREGEXE" >&6; }
40568else
40569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40570$as_echo "no" >&6; }
40571fi
40572
40573
40574  test -n "$JTREGEXE" && break
40575done
40576
40577    else
40578      # If it succeeded, then it was overridden by the user. We will use it
40579      # for the tool.
40580
40581      # First remove it from the list of overridden variables, so we can test
40582      # for unknown variables in the end.
40583      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40584
40585      # Check if the provided tool contains a complete path.
40586      tool_specified="$JTREGEXE"
40587      tool_basename="${tool_specified##*/}"
40588      if test "x$tool_basename" = "x$tool_specified"; then
40589        # A command without a complete path is provided, search $PATH.
40590        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
40591$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
40592        # Extract the first word of "$tool_basename", so it can be a program name with args.
40593set dummy $tool_basename; ac_word=$2
40594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40595$as_echo_n "checking for $ac_word... " >&6; }
40596if ${ac_cv_path_JTREGEXE+:} false; then :
40597  $as_echo_n "(cached) " >&6
40598else
40599  case $JTREGEXE in
40600  [\\/]* | ?:[\\/]*)
40601  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40602  ;;
40603  *)
40604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40605for as_dir in $PATH
40606do
40607  IFS=$as_save_IFS
40608  test -z "$as_dir" && as_dir=.
40609    for ac_exec_ext in '' $ac_executable_extensions; do
40610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40611    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40613    break 2
40614  fi
40615done
40616  done
40617IFS=$as_save_IFS
40618
40619  ;;
40620esac
40621fi
40622JTREGEXE=$ac_cv_path_JTREGEXE
40623if test -n "$JTREGEXE"; then
40624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40625$as_echo "$JTREGEXE" >&6; }
40626else
40627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40628$as_echo "no" >&6; }
40629fi
40630
40631
40632        if test "x$JTREGEXE" = x; then
40633          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40634        fi
40635      else
40636        # Otherwise we believe it is a complete path. Use it as it is.
40637        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
40638$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
40639        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
40640$as_echo_n "checking for JTREGEXE... " >&6; }
40641        if test ! -x "$tool_specified"; then
40642          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40643$as_echo "not found" >&6; }
40644          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
40645        fi
40646        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40647$as_echo "$tool_specified" >&6; }
40648      fi
40649    fi
40650  fi
40651
40652
40653
40654  if test "x$JTREGEXE" = x; then
40655    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
40656  fi
40657
40658
40659      JT_HOME="`$DIRNAME $JTREGEXE`"
40660    fi
40661  fi
40662
40663
40664
40665
40666
40667
40668  # Option used to tell the compiler whether to create 32- or 64-bit executables
40669  if test "x$TOOLCHAIN_TYPE" = xxlc; then
40670    COMPILER_TARGET_BITS_FLAG="-q"
40671  else
40672    COMPILER_TARGET_BITS_FLAG="-m"
40673  fi
40674
40675
40676  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
40677  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40678    ARFLAGS="-r"
40679  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40680    ARFLAGS="-X64"
40681  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
40682    # lib.exe is used as AR to create static libraries.
40683    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
40684  else
40685    ARFLAGS=""
40686  fi
40687
40688
40689  ## Setup strip.
40690  # FIXME: should this really be per platform, or should it be per toolchain type?
40691  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
40692  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
40693  if test "x$OPENJDK_TARGET_OS" = xlinux; then
40694    STRIPFLAGS="-g"
40695  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
40696    STRIPFLAGS="-x"
40697  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
40698    STRIPFLAGS="-S"
40699  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40700    STRIPFLAGS="-X32_64"
40701  fi
40702
40703  if test "x$OPENJDK_TARGET_OS" != xwindows; then
40704    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
40705  fi
40706
40707
40708  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40709    # FIXME: break out into MCSFLAGS
40710    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
40711  fi
40712
40713
40714  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40715    CC_OUT_OPTION=-Fo
40716    EXE_OUT_OPTION=-out:
40717    LD_OUT_OPTION=-out:
40718    AR_OUT_OPTION=-out:
40719  else
40720    # The option used to specify the target .o,.a or .so file.
40721    # When compiling, how to specify the to be created object file.
40722    CC_OUT_OPTION='-o$(SPACE)'
40723    # When linking, how to specify the to be created executable.
40724    EXE_OUT_OPTION='-o$(SPACE)'
40725    # When linking, how to specify the to be created dynamically linkable library.
40726    LD_OUT_OPTION='-o$(SPACE)'
40727    # When archiving, how to specify the to be create static archive for object files.
40728    AR_OUT_OPTION='rcs$(SPACE)'
40729  fi
40730
40731
40732
40733
40734
40735  # On Windows, we need to set RC flags.
40736  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40737    RC_FLAGS="-nologo -l 0x409 -r"
40738    if test "x$VARIANT" = xOPT; then
40739      RC_FLAGS="$RC_FLAGS -d NDEBUG"
40740    fi
40741
40742    # The version variables used to create RC_FLAGS may be overridden
40743    # in a custom configure script, or possibly the command line.
40744    # Let those variables be expanded at make time in spec.gmk.
40745    # The \$ are escaped to the shell, and the $(...) variables
40746    # are evaluated by make.
40747    RC_FLAGS="$RC_FLAGS \
40748        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
40749        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
40750        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
40751        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
40752        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
40753        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
40754        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
40755  fi
40756
40757
40758  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40759    # FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX.
40760    CCXXFLAGS="$CCXXFLAGS -nologo"
40761  fi
40762
40763
40764# FIXME: Currently we must test this after toolchain but before flags. Fix!
40765
40766# Now we can test some aspects on the target using configure macros.
40767
40768
40769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
40770$as_echo_n "checking for ANSI C header files... " >&6; }
40771if ${ac_cv_header_stdc+:} false; then :
40772  $as_echo_n "(cached) " >&6
40773else
40774  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40775/* end confdefs.h.  */
40776#include <stdlib.h>
40777#include <stdarg.h>
40778#include <string.h>
40779#include <float.h>
40780
40781int
40782main ()
40783{
40784
40785  ;
40786  return 0;
40787}
40788_ACEOF
40789if ac_fn_cxx_try_compile "$LINENO"; then :
40790  ac_cv_header_stdc=yes
40791else
40792  ac_cv_header_stdc=no
40793fi
40794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40795
40796if test $ac_cv_header_stdc = yes; then
40797  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
40798  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40799/* end confdefs.h.  */
40800#include <string.h>
40801
40802_ACEOF
40803if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40804  $EGREP "memchr" >/dev/null 2>&1; then :
40805
40806else
40807  ac_cv_header_stdc=no
40808fi
40809rm -f conftest*
40810
40811fi
40812
40813if test $ac_cv_header_stdc = yes; then
40814  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
40815  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40816/* end confdefs.h.  */
40817#include <stdlib.h>
40818
40819_ACEOF
40820if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40821  $EGREP "free" >/dev/null 2>&1; then :
40822
40823else
40824  ac_cv_header_stdc=no
40825fi
40826rm -f conftest*
40827
40828fi
40829
40830if test $ac_cv_header_stdc = yes; then
40831  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
40832  if test "$cross_compiling" = yes; then :
40833  :
40834else
40835  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40836/* end confdefs.h.  */
40837#include <ctype.h>
40838#include <stdlib.h>
40839#if ((' ' & 0x0FF) == 0x020)
40840# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
40841# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
40842#else
40843# define ISLOWER(c) \
40844		   (('a' <= (c) && (c) <= 'i') \
40845		     || ('j' <= (c) && (c) <= 'r') \
40846		     || ('s' <= (c) && (c) <= 'z'))
40847# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
40848#endif
40849
40850#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
40851int
40852main ()
40853{
40854  int i;
40855  for (i = 0; i < 256; i++)
40856    if (XOR (islower (i), ISLOWER (i))
40857	|| toupper (i) != TOUPPER (i))
40858      return 2;
40859  return 0;
40860}
40861_ACEOF
40862if ac_fn_cxx_try_run "$LINENO"; then :
40863
40864else
40865  ac_cv_header_stdc=no
40866fi
40867rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40868  conftest.$ac_objext conftest.beam conftest.$ac_ext
40869fi
40870
40871fi
40872fi
40873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
40874$as_echo "$ac_cv_header_stdc" >&6; }
40875if test $ac_cv_header_stdc = yes; then
40876
40877$as_echo "#define STDC_HEADERS 1" >>confdefs.h
40878
40879fi
40880
40881# On IRIX 5.3, sys/types and inttypes.h are conflicting.
40882for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
40883		  inttypes.h stdint.h unistd.h
40884do :
40885  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
40886ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
40887"
40888if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
40889  cat >>confdefs.h <<_ACEOF
40890#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
40891_ACEOF
40892
40893fi
40894
40895done
40896
40897
40898
40899  ###############################################################################
40900  #
40901  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
40902  # (The JVM can use 32 or 64 bit Java pointers but that decision
40903  # is made at runtime.)
40904  #
40905
40906  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
40907    # Always specify -m flag on Solaris
40908    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
40909
40910  # When we add flags to the "official" CFLAGS etc, we need to
40911  # keep track of these additions in ADDED_CFLAGS etc. These
40912  # will later be checked to make sure only controlled additions
40913  # have been made to CFLAGS etc.
40914  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40915  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40916  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40917
40918  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40919  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40920  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40921
40922  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40923  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40924  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40925
40926  elif test "x$COMPILE_TYPE" = xreduced; then
40927    if test "x$OPENJDK_TARGET_OS" != xwindows; then
40928      # Specify -m if running reduced on other Posix platforms
40929
40930  # When we add flags to the "official" CFLAGS etc, we need to
40931  # keep track of these additions in ADDED_CFLAGS etc. These
40932  # will later be checked to make sure only controlled additions
40933  # have been made to CFLAGS etc.
40934  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40935  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40936  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40937
40938  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40939  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40940  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40941
40942  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40943  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40944  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40945
40946    fi
40947  fi
40948
40949  # Make compilation sanity check
40950  for ac_header in stdio.h
40951do :
40952  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
40953if test "x$ac_cv_header_stdio_h" = xyes; then :
40954  cat >>confdefs.h <<_ACEOF
40955#define HAVE_STDIO_H 1
40956_ACEOF
40957
40958else
40959
40960    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
40961$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
40962    if test "x$COMPILE_TYPE" = xreduced; then
40963      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
40964$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
40965    elif test "x$COMPILE_TYPE" = xcross; then
40966      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
40967$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
40968    fi
40969    as_fn_error $? "Cannot continue." "$LINENO" 5
40970
40971fi
40972
40973done
40974
40975
40976  # The cast to long int works around a bug in the HP C Compiler
40977# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40978# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40979# This bug is HP SR number 8606223364.
40980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
40981$as_echo_n "checking size of int *... " >&6; }
40982if ${ac_cv_sizeof_int_p+:} false; then :
40983  $as_echo_n "(cached) " >&6
40984else
40985  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
40986
40987else
40988  if test "$ac_cv_type_int_p" = yes; then
40989     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
40990$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
40991as_fn_error 77 "cannot compute sizeof (int *)
40992See \`config.log' for more details" "$LINENO" 5; }
40993   else
40994     ac_cv_sizeof_int_p=0
40995   fi
40996fi
40997
40998fi
40999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41000$as_echo "$ac_cv_sizeof_int_p" >&6; }
41001
41002
41003
41004cat >>confdefs.h <<_ACEOF
41005#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41006_ACEOF
41007
41008
41009
41010  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41011  if test "x$ac_cv_sizeof_int_p" = x; then
41012    # The test failed, lets stick to the assumed value.
41013    { $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
41014$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41015  else
41016    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41017
41018    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41019      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41020      # Let's try to implicitely set the compilers target architecture and retry the test
41021      { $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
41022$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;}
41023      { $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
41024$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;}
41025
41026  # When we add flags to the "official" CFLAGS etc, we need to
41027  # keep track of these additions in ADDED_CFLAGS etc. These
41028  # will later be checked to make sure only controlled additions
41029  # have been made to CFLAGS etc.
41030  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41031  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41032  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41033
41034  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41035  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41036  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41037
41038  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41039  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41040  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41041
41042
41043      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41044      unset ac_cv_sizeof_int_p
41045      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41046      cat >>confdefs.h <<_ACEOF
41047#undef SIZEOF_INT_P
41048_ACEOF
41049
41050      # The cast to long int works around a bug in the HP C Compiler
41051# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41052# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41053# This bug is HP SR number 8606223364.
41054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41055$as_echo_n "checking size of int *... " >&6; }
41056if ${ac_cv_sizeof_int_p+:} false; then :
41057  $as_echo_n "(cached) " >&6
41058else
41059  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41060
41061else
41062  if test "$ac_cv_type_int_p" = yes; then
41063     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41064$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41065as_fn_error 77 "cannot compute sizeof (int *)
41066See \`config.log' for more details" "$LINENO" 5; }
41067   else
41068     ac_cv_sizeof_int_p=0
41069   fi
41070fi
41071
41072fi
41073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41074$as_echo "$ac_cv_sizeof_int_p" >&6; }
41075
41076
41077
41078cat >>confdefs.h <<_ACEOF
41079#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41080_ACEOF
41081
41082
41083
41084      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41085
41086      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41087        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
41088      fi
41089    fi
41090  fi
41091
41092  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41093$as_echo_n "checking for target address size... " >&6; }
41094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41095$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41096
41097
41098  ###############################################################################
41099  #
41100  # Is the target little of big endian?
41101  #
41102   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41103$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41104if ${ac_cv_c_bigendian+:} false; then :
41105  $as_echo_n "(cached) " >&6
41106else
41107  ac_cv_c_bigendian=unknown
41108    # See if we're dealing with a universal compiler.
41109    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41110/* end confdefs.h.  */
41111#ifndef __APPLE_CC__
41112	       not a universal capable compiler
41113	     #endif
41114	     typedef int dummy;
41115
41116_ACEOF
41117if ac_fn_cxx_try_compile "$LINENO"; then :
41118
41119	# Check for potential -arch flags.  It is not universal unless
41120	# there are at least two -arch flags with different values.
41121	ac_arch=
41122	ac_prev=
41123	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41124	 if test -n "$ac_prev"; then
41125	   case $ac_word in
41126	     i?86 | x86_64 | ppc | ppc64)
41127	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41128		 ac_arch=$ac_word
41129	       else
41130		 ac_cv_c_bigendian=universal
41131		 break
41132	       fi
41133	       ;;
41134	   esac
41135	   ac_prev=
41136	 elif test "x$ac_word" = "x-arch"; then
41137	   ac_prev=arch
41138	 fi
41139       done
41140fi
41141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41142    if test $ac_cv_c_bigendian = unknown; then
41143      # See if sys/param.h defines the BYTE_ORDER macro.
41144      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41145/* end confdefs.h.  */
41146#include <sys/types.h>
41147	     #include <sys/param.h>
41148
41149int
41150main ()
41151{
41152#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41153		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41154		     && LITTLE_ENDIAN)
41155	      bogus endian macros
41156	     #endif
41157
41158  ;
41159  return 0;
41160}
41161_ACEOF
41162if ac_fn_cxx_try_compile "$LINENO"; then :
41163  # It does; now see whether it defined to BIG_ENDIAN or not.
41164	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41165/* end confdefs.h.  */
41166#include <sys/types.h>
41167		#include <sys/param.h>
41168
41169int
41170main ()
41171{
41172#if BYTE_ORDER != BIG_ENDIAN
41173		 not big endian
41174		#endif
41175
41176  ;
41177  return 0;
41178}
41179_ACEOF
41180if ac_fn_cxx_try_compile "$LINENO"; then :
41181  ac_cv_c_bigendian=yes
41182else
41183  ac_cv_c_bigendian=no
41184fi
41185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41186fi
41187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41188    fi
41189    if test $ac_cv_c_bigendian = unknown; then
41190      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41191      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41192/* end confdefs.h.  */
41193#include <limits.h>
41194
41195int
41196main ()
41197{
41198#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41199	      bogus endian macros
41200	     #endif
41201
41202  ;
41203  return 0;
41204}
41205_ACEOF
41206if ac_fn_cxx_try_compile "$LINENO"; then :
41207  # It does; now see whether it defined to _BIG_ENDIAN or not.
41208	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41209/* end confdefs.h.  */
41210#include <limits.h>
41211
41212int
41213main ()
41214{
41215#ifndef _BIG_ENDIAN
41216		 not big endian
41217		#endif
41218
41219  ;
41220  return 0;
41221}
41222_ACEOF
41223if ac_fn_cxx_try_compile "$LINENO"; then :
41224  ac_cv_c_bigendian=yes
41225else
41226  ac_cv_c_bigendian=no
41227fi
41228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41229fi
41230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41231    fi
41232    if test $ac_cv_c_bigendian = unknown; then
41233      # Compile a test program.
41234      if test "$cross_compiling" = yes; then :
41235  # Try to guess by grepping values from an object file.
41236	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41237/* end confdefs.h.  */
41238short int ascii_mm[] =
41239		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41240		short int ascii_ii[] =
41241		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41242		int use_ascii (int i) {
41243		  return ascii_mm[i] + ascii_ii[i];
41244		}
41245		short int ebcdic_ii[] =
41246		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41247		short int ebcdic_mm[] =
41248		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41249		int use_ebcdic (int i) {
41250		  return ebcdic_mm[i] + ebcdic_ii[i];
41251		}
41252		extern int foo;
41253
41254int
41255main ()
41256{
41257return use_ascii (foo) == use_ebcdic (foo);
41258  ;
41259  return 0;
41260}
41261_ACEOF
41262if ac_fn_cxx_try_compile "$LINENO"; then :
41263  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41264	      ac_cv_c_bigendian=yes
41265	    fi
41266	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41267	      if test "$ac_cv_c_bigendian" = unknown; then
41268		ac_cv_c_bigendian=no
41269	      else
41270		# finding both strings is unlikely to happen, but who knows?
41271		ac_cv_c_bigendian=unknown
41272	      fi
41273	    fi
41274fi
41275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41276else
41277  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41278/* end confdefs.h.  */
41279$ac_includes_default
41280int
41281main ()
41282{
41283
41284	     /* Are we little or big endian?  From Harbison&Steele.  */
41285	     union
41286	     {
41287	       long int l;
41288	       char c[sizeof (long int)];
41289	     } u;
41290	     u.l = 1;
41291	     return u.c[sizeof (long int) - 1] == 1;
41292
41293  ;
41294  return 0;
41295}
41296_ACEOF
41297if ac_fn_cxx_try_run "$LINENO"; then :
41298  ac_cv_c_bigendian=no
41299else
41300  ac_cv_c_bigendian=yes
41301fi
41302rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41303  conftest.$ac_objext conftest.beam conftest.$ac_ext
41304fi
41305
41306    fi
41307fi
41308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41309$as_echo "$ac_cv_c_bigendian" >&6; }
41310 case $ac_cv_c_bigendian in #(
41311   yes)
41312     ENDIAN="big";; #(
41313   no)
41314     ENDIAN="little" ;; #(
41315   universal)
41316     ENDIAN="universal_endianness"
41317     ;; #(
41318   *)
41319     ENDIAN="unknown" ;;
41320 esac
41321
41322
41323  if test "x$ENDIAN" = xuniversal_endianness; then
41324    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41325  fi
41326  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41327    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
41328  fi
41329
41330
41331# Configure flags for the tools
41332
41333  ###############################################################################
41334  #
41335  # How to compile shared libraries.
41336  #
41337
41338  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41339    PICFLAG="-fPIC"
41340    C_FLAG_REORDER=''
41341    CXX_FLAG_REORDER=''
41342
41343    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41344      # Linking is different on MacOSX
41345      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41346      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41347      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41348      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41349      SET_SHARED_LIBRARY_MAPFILE=''
41350    else
41351      # Default works for linux, might work on other platforms as well.
41352      SHARED_LIBRARY_FLAGS='-shared'
41353      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41354      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41355      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41356      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41357    fi
41358  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41359    PICFLAG=''
41360    C_FLAG_REORDER=''
41361    CXX_FLAG_REORDER=''
41362
41363    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41364      # Linking is different on MacOSX
41365      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41366      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41367      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41368      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41369      SET_SHARED_LIBRARY_MAPFILE=''
41370    else
41371      # Default works for linux, might work on other platforms as well.
41372      SHARED_LIBRARY_FLAGS='-shared'
41373      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41374      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41375      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41376      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41377    fi
41378  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41379    PICFLAG="-KPIC"
41380    C_FLAG_REORDER='-xF'
41381    CXX_FLAG_REORDER='-xF'
41382    SHARED_LIBRARY_FLAGS="-G"
41383    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41384    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41385    SET_SHARED_LIBRARY_NAME=''
41386    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41387  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41388    PICFLAG="-qpic=large"
41389    C_FLAG_REORDER=''
41390    CXX_FLAG_REORDER=''
41391    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41392    SET_EXECUTABLE_ORIGIN=""
41393    SET_SHARED_LIBRARY_ORIGIN=''
41394    SET_SHARED_LIBRARY_NAME=''
41395    SET_SHARED_LIBRARY_MAPFILE=''
41396  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41397    PICFLAG=""
41398    C_FLAG_REORDER=''
41399    CXX_FLAG_REORDER=''
41400    SHARED_LIBRARY_FLAGS="-LD"
41401    SET_EXECUTABLE_ORIGIN=''
41402    SET_SHARED_LIBRARY_ORIGIN=''
41403    SET_SHARED_LIBRARY_NAME=''
41404    SET_SHARED_LIBRARY_MAPFILE=''
41405  fi
41406
41407
41408
41409
41410
41411
41412
41413
41414
41415  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41416    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41417    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41418    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41419  fi
41420  # The (cross) compiler is now configured, we can now test capabilities
41421  # of the target platform.
41422
41423
41424
41425  ###############################################################################
41426  #
41427  # Setup the opt flags for different compilers
41428  # and different operating systems.
41429  #
41430
41431  # FIXME: this was indirectly the old default, but just inherited.
41432  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41433  #   C_FLAG_DEPS="-MMD -MF"
41434  # fi
41435
41436  # Generate make dependency files
41437  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41438    C_FLAG_DEPS="-MMD -MF"
41439  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41440    C_FLAG_DEPS="-MMD -MF"
41441  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41442    C_FLAG_DEPS="-xMMD -xMF"
41443  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41444    C_FLAG_DEPS="-qmakedep=gcc -MF"
41445  fi
41446  CXX_FLAG_DEPS="$C_FLAG_DEPS"
41447
41448
41449
41450  # Debug symbols
41451  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41452    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41453      CFLAGS_DEBUG_SYMBOLS="-g1"
41454      CXXFLAGS_DEBUG_SYMBOLS="-g1"
41455    else
41456      CFLAGS_DEBUG_SYMBOLS="-g"
41457      CXXFLAGS_DEBUG_SYMBOLS="-g"
41458    fi
41459  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41460    CFLAGS_DEBUG_SYMBOLS="-g"
41461    CXXFLAGS_DEBUG_SYMBOLS="-g"
41462  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41463    CFLAGS_DEBUG_SYMBOLS="-g -xs"
41464    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41465  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41466    CFLAGS_DEBUG_SYMBOLS="-g"
41467    CXXFLAGS_DEBUG_SYMBOLS="-g"
41468  fi
41469
41470
41471
41472  # Optimization levels
41473  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41474    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41475
41476    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41477      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41478      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
41479      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41480      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41481      C_O_FLAG_NONE="-xregs=no%frameptr"
41482      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41483      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41484      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41485      CXX_O_FLAG_NONE="-xregs=no%frameptr"
41486      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41487        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41488        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41489      fi
41490    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41491      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
41492      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41493      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41494      C_O_FLAG_NONE=""
41495      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41496      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41497      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41498      CXX_O_FLAG_NONE=""
41499    fi
41500  else
41501    # The remaining toolchains share opt flags between CC and CXX;
41502    # setup for C and duplicate afterwards.
41503    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41504      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41505        # On MacOSX we optimize for size, something
41506        # we should do for all platforms?
41507        C_O_FLAG_HIGHEST="-Os"
41508        C_O_FLAG_HI="-Os"
41509        C_O_FLAG_NORM="-Os"
41510        C_O_FLAG_NONE=""
41511      else
41512        C_O_FLAG_HIGHEST="-O3"
41513        C_O_FLAG_HI="-O3"
41514        C_O_FLAG_NORM="-O2"
41515        C_O_FLAG_NONE="-O0"
41516      fi
41517    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41518      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41519        # On MacOSX we optimize for size, something
41520        # we should do for all platforms?
41521        C_O_FLAG_HIGHEST="-Os"
41522        C_O_FLAG_HI="-Os"
41523        C_O_FLAG_NORM="-Os"
41524        C_O_FLAG_NONE=""
41525      else
41526        C_O_FLAG_HIGHEST="-O3"
41527        C_O_FLAG_HI="-O3"
41528        C_O_FLAG_NORM="-O2"
41529        C_O_FLAG_NONE="-O0"
41530      fi
41531    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41532      C_O_FLAG_HIGHEST="-O3"
41533      C_O_FLAG_HI="-O3 -qstrict"
41534      C_O_FLAG_NORM="-O2"
41535      C_O_FLAG_NONE=""
41536    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41537      C_O_FLAG_HIGHEST="-O2"
41538      C_O_FLAG_HI="-O1"
41539      C_O_FLAG_NORM="-O1"
41540      C_O_FLAG_NONE="-Od"
41541    fi
41542    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41543    CXX_O_FLAG_HI="$C_O_FLAG_HI"
41544    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41545    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41546  fi
41547
41548
41549
41550
41551
41552
41553
41554
41555
41556
41557
41558  # Special extras...
41559  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41560    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41561      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41562      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41563    fi
41564  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41565    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
41566    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41567    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41568  fi
41569
41570  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
41571    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
41572$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
41573  fi
41574
41575  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
41576    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
41577$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
41578  fi
41579
41580  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
41581    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
41582$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
41583  fi
41584
41585
41586# Check whether --with-extra-cflags was given.
41587if test "${with_extra_cflags+set}" = set; then :
41588  withval=$with_extra_cflags;
41589fi
41590
41591
41592
41593# Check whether --with-extra-cxxflags was given.
41594if test "${with_extra_cxxflags+set}" = set; then :
41595  withval=$with_extra_cxxflags;
41596fi
41597
41598
41599
41600# Check whether --with-extra-ldflags was given.
41601if test "${with_extra_ldflags+set}" = set; then :
41602  withval=$with_extra_ldflags;
41603fi
41604
41605
41606  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
41607  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
41608  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
41609
41610  # Hotspot needs these set in their legacy form
41611  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
41612  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
41613  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
41614
41615
41616
41617
41618
41619  ###############################################################################
41620  #
41621  # Now setup the CFLAGS and LDFLAGS for the JDK build.
41622  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
41623  #
41624
41625  # Setup compiler/platform specific flags to CFLAGS_JDK,
41626  # CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?)
41627  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41628    # these options are used for both C and C++ compiles
41629    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
41630        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
41631    case $OPENJDK_TARGET_CPU_ARCH in
41632      arm )
41633        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41634        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41635        ;;
41636      ppc )
41637        # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
41638        ;;
41639      * )
41640        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
41641        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41642        ;;
41643    esac
41644  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41645    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
41646    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
41647      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
41648      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
41649    fi
41650
41651    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
41652    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
41653  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41654    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41655    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41656  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41657    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
41658    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
41659    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
41660    -DWIN32 -DIAL"
41661    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
41662      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
41663    else
41664      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
41665    fi
41666  fi
41667
41668  ###############################################################################
41669
41670  # Adjust flags according to debug level.
41671  case $DEBUG_LEVEL in
41672    fastdebug )
41673      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41674      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41675      C_O_FLAG_HI="$C_O_FLAG_NORM"
41676      C_O_FLAG_NORM="$C_O_FLAG_NORM"
41677      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41678      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
41679      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41680      ;;
41681    slowdebug )
41682      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41683      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41684      C_O_FLAG_HI="$C_O_FLAG_NONE"
41685      C_O_FLAG_NORM="$C_O_FLAG_NONE"
41686      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
41687      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
41688      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41689      ;;
41690  esac
41691
41692  # Setup LP64
41693  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
41694
41695  # Set some common defines. These works for all compilers, but assume
41696  # -D is universally accepted.
41697
41698  # Setup endianness
41699  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
41700    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
41701    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
41702    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
41703    #   Note: -Dmacro         is the same as    #define macro 1
41704    #         -Dmacro=        is the same as    #define macro
41705    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41706      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
41707    else
41708      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
41709    fi
41710  else
41711    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
41712  fi
41713
41714  # Setup target OS define. Use OS target name but in upper case.
41715  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
41716  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
41717
41718  # Setup target CPU
41719  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
41720
41721  # Setup debug/release defines
41722  if test "x$DEBUG_LEVEL" = xrelease; then
41723    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
41724    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41725      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
41726    fi
41727  else
41728    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
41729  fi
41730
41731  # Setup release name
41732  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
41733
41734
41735  # Set some additional per-OS defines.
41736  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41737    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
41738  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41739    # FIXME: PPC64 should not be here.
41740    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DPPC64"
41741  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
41742    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
41743  fi
41744
41745  # Additional macosx handling
41746  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41747    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41748      # FIXME: This needs to be exported in spec.gmk due to closed legacy code.
41749      # FIXME: clean this up, and/or move it elsewhere.
41750
41751      # Setting these parameters makes it an error to link to macosx APIs that are
41752      # newer than the given OS version and makes the linked binaries compatible
41753      # even if built on a newer version of the OS.
41754      # The expected format is X.Y.Z
41755      MACOSX_VERSION_MIN=10.7.0
41756
41757
41758      # The macro takes the version with no dots, ex: 1070
41759      # Let the flags variables get resolved in make for easier override on make
41760      # command line.
41761      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41762      LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41763    fi
41764  fi
41765
41766  # Setup some hard coded includes
41767  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
41768      -I${JDK_OUTPUTDIR}/include \
41769      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
41770      -I${JDK_TOPDIR}/src/share/javavm/export \
41771      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
41772      -I${JDK_TOPDIR}/src/share/native/common \
41773      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
41774
41775  # The shared libraries are compiled using the picflag.
41776  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
41777  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
41778
41779  # Executable flags
41780  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
41781  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
41782
41783
41784
41785
41786
41787
41788  # Setup LDFLAGS et al.
41789  #
41790  # Now this is odd. The JDK native libraries have to link against libjvm.so
41791  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
41792  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
41793  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
41794  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
41795  # libraries will link to whatever is in memory. Yuck.
41796  #
41797  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
41798  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41799    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
41800    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41801      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
41802    fi
41803    # TODO: make -debug optional "--disable-full-debug-symbols"
41804    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
41805    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
41806    LDFLAGS_JDKLIB_SUFFIX=""
41807    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
41808      LDFLAGS_STACK_SIZE=1048576
41809    else
41810      LDFLAGS_STACK_SIZE=327680
41811    fi
41812    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
41813  else
41814    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41815      # If this is a --hash-style=gnu system, use --hash-style=both, why?
41816      # We have previously set HAS_GNU_HASH if this is the case
41817      if test -n "$HAS_GNU_HASH"; then
41818        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
41819      fi
41820      if test "x$OPENJDK_TARGET_OS" = xlinux; then
41821        # And since we now know that the linker is gnu, then add -z defs, to forbid
41822        # undefined symbols in object files.
41823        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
41824        if test "x$DEBUG_LEVEL" = "xrelease"; then
41825          # When building release libraries, tell the linker optimize them.
41826          # Should this be supplied to the OSS linker as well?
41827          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
41828        fi
41829      fi
41830    fi
41831
41832    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41833      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
41834      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
41835    fi
41836
41837    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
41838        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
41839
41840    # On some platforms (mac) the linker warns about non existing -L dirs.
41841    # Add server first if available. Linking aginst client does not always produce the same results.
41842    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
41843    # Default to server for other variants.
41844    if test "x$JVM_VARIANT_SERVER" = xtrue; then
41845      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41846    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
41847      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
41848    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
41849      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
41850    else
41851      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41852    fi
41853
41854    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
41855    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41856      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
41857    fi
41858
41859    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
41860    if test "x$OPENJDK_TARGET_OS" = xlinux; then
41861      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
41862    fi
41863  fi
41864
41865
41866
41867
41868
41869
41870
41871
41872  # Some Zero and Shark settings.
41873  # ZERO_ARCHFLAG tells the compiler which mode to build for
41874  case "${OPENJDK_TARGET_CPU}" in
41875    s390)
41876      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
41877      ;;
41878    *)
41879      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41880  esac
41881
41882  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
41883$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
41884  supports=yes
41885
41886  saved_cflags="$CFLAGS"
41887  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
41888  ac_ext=c
41889ac_cpp='$CPP $CPPFLAGS'
41890ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41891ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41892ac_compiler_gnu=$ac_cv_c_compiler_gnu
41893
41894  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41895/* end confdefs.h.  */
41896int i;
41897_ACEOF
41898if ac_fn_c_try_compile "$LINENO"; then :
41899
41900else
41901  supports=no
41902fi
41903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41904  ac_ext=cpp
41905ac_cpp='$CXXCPP $CPPFLAGS'
41906ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41907ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41908ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41909
41910  CFLAGS="$saved_cflags"
41911
41912  saved_cxxflags="$CXXFLAGS"
41913  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
41914  ac_ext=cpp
41915ac_cpp='$CXXCPP $CPPFLAGS'
41916ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41917ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41918ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41919
41920  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41921/* end confdefs.h.  */
41922int i;
41923_ACEOF
41924if ac_fn_cxx_try_compile "$LINENO"; then :
41925
41926else
41927  supports=no
41928fi
41929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41930  ac_ext=cpp
41931ac_cpp='$CXXCPP $CPPFLAGS'
41932ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41933ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41934ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41935
41936  CXXFLAGS="$saved_cxxflags"
41937
41938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41939$as_echo "$supports" >&6; }
41940  if test "x$supports" = "xyes" ; then
41941    :
41942  else
41943    ZERO_ARCHFLAG=""
41944  fi
41945
41946
41947
41948  # Check that the compiler supports -mX (or -qX on AIX) flags
41949  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
41950
41951  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
41952$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
41953  supports=yes
41954
41955  saved_cflags="$CFLAGS"
41956  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41957  ac_ext=c
41958ac_cpp='$CPP $CPPFLAGS'
41959ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41960ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41961ac_compiler_gnu=$ac_cv_c_compiler_gnu
41962
41963  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41964/* end confdefs.h.  */
41965int i;
41966_ACEOF
41967if ac_fn_c_try_compile "$LINENO"; then :
41968
41969else
41970  supports=no
41971fi
41972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41973  ac_ext=cpp
41974ac_cpp='$CXXCPP $CPPFLAGS'
41975ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41976ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41977ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41978
41979  CFLAGS="$saved_cflags"
41980
41981  saved_cxxflags="$CXXFLAGS"
41982  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41983  ac_ext=cpp
41984ac_cpp='$CXXCPP $CPPFLAGS'
41985ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41986ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41987ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41988
41989  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41990/* end confdefs.h.  */
41991int i;
41992_ACEOF
41993if ac_fn_cxx_try_compile "$LINENO"; then :
41994
41995else
41996  supports=no
41997fi
41998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41999  ac_ext=cpp
42000ac_cpp='$CXXCPP $CPPFLAGS'
42001ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42002ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42003ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42004
42005  CXXFLAGS="$saved_cxxflags"
42006
42007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42008$as_echo "$supports" >&6; }
42009  if test "x$supports" = "xyes" ; then
42010    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42011  else
42012    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42013  fi
42014
42015
42016
42017  case "${TOOLCHAIN_TYPE}" in
42018    microsoft)
42019      CFLAGS_WARNINGS_ARE_ERRORS="/WX"
42020      ;;
42021    solstudio)
42022      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42023      ;;
42024    gcc)
42025      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42026      ;;
42027    clang)
42028      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42029      ;;
42030  esac
42031
42032
42033
42034# Setup debug symbols (need objcopy from the toolchain for that)
42035
42036  #
42037  # ENABLE_DEBUG_SYMBOLS
42038  # This must be done after the toolchain is setup, since we're looking at objcopy.
42039  #
42040  # Check whether --enable-debug-symbols was given.
42041if test "${enable_debug_symbols+set}" = set; then :
42042  enableval=$enable_debug_symbols;
42043fi
42044
42045
42046  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42047$as_echo_n "checking if we should generate debug symbols... " >&6; }
42048
42049  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42050    # explicit enabling of enable-debug-symbols and can't find objcopy
42051    #   this is an error
42052    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42053  fi
42054
42055  if test "x$enable_debug_symbols" = "xyes"; then
42056    ENABLE_DEBUG_SYMBOLS=true
42057  elif test "x$enable_debug_symbols" = "xno"; then
42058    ENABLE_DEBUG_SYMBOLS=false
42059  else
42060    # Default is on if objcopy is found
42061    if test "x$OBJCOPY" != x; then
42062      ENABLE_DEBUG_SYMBOLS=true
42063    # MacOS X and Windows don't use objcopy but default is on for those OSes
42064    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42065      ENABLE_DEBUG_SYMBOLS=true
42066    else
42067      ENABLE_DEBUG_SYMBOLS=false
42068    fi
42069  fi
42070
42071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42072$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42073
42074  #
42075  # ZIP_DEBUGINFO_FILES
42076  #
42077  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42078$as_echo_n "checking if we should zip debug-info files... " >&6; }
42079  # Check whether --enable-zip-debug-info was given.
42080if test "${enable_zip_debug_info+set}" = set; then :
42081  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42082else
42083  enable_zip_debug_info="yes"
42084fi
42085
42086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42087$as_echo "${enable_zip_debug_info}" >&6; }
42088
42089  if test "x${enable_zip_debug_info}" = "xno"; then
42090    ZIP_DEBUGINFO_FILES=false
42091  else
42092    ZIP_DEBUGINFO_FILES=true
42093  fi
42094
42095
42096
42097
42098
42099###############################################################################
42100#
42101# Check dependencies for external and internal libraries.
42102#
42103###############################################################################
42104
42105# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42106
42107  # When using cygwin or msys, we need a wrapper binary that renames
42108  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42109  # @files and rewrites these too! This wrapper binary is
42110  # called fixpath.
42111  FIXPATH=
42112  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42113    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42114$as_echo_n "checking if fixpath can be created... " >&6; }
42115    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42116    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42117    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42118      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42119      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42120      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42121      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42122    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42123      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42124      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42125
42126      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42127      # @ was chosen as separator to minimize risk of other tools messing around with it
42128      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42129      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42130
42131      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42132    fi
42133    rm -f $OUTPUT_ROOT/fixpath*
42134    cd $OUTPUT_ROOT
42135    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42136    cd $CURDIR
42137
42138    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42139      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42140$as_echo "no" >&6; }
42141      cat $OUTPUT_ROOT/fixpath1.log
42142      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42143    fi
42144    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42145$as_echo "yes" >&6; }
42146    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42147$as_echo_n "checking if fixpath.exe works... " >&6; }
42148    cd $OUTPUT_ROOT
42149    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42150    cd $CURDIR
42151    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42152      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42153$as_echo "no" >&6; }
42154      cat $OUTPUT_ROOT/fixpath2.log
42155      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42156    fi
42157    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42158$as_echo "yes" >&6; }
42159    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42160  fi
42161
42162
42163
42164
42165
42166
42167  ###############################################################################
42168  #
42169  # OS specific settings that we never will need to probe.
42170  #
42171  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42172    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42173$as_echo_n "checking what is not needed on Linux?... " >&6; }
42174    PULSE_NOT_NEEDED=yes
42175    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42176$as_echo "pulse" >&6; }
42177  fi
42178
42179  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42180    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42181$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42182    ALSA_NOT_NEEDED=yes
42183    PULSE_NOT_NEEDED=yes
42184    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42185$as_echo "alsa pulse" >&6; }
42186  fi
42187
42188  if test "x$OPENJDK_TARGET_OS" = xaix; then
42189    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42190$as_echo_n "checking what is not needed on AIX?... " >&6; }
42191    ALSA_NOT_NEEDED=yes
42192    PULSE_NOT_NEEDED=yes
42193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42194$as_echo "alsa pulse" >&6; }
42195  fi
42196
42197
42198  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42200$as_echo_n "checking what is not needed on Windows?... " >&6; }
42201    CUPS_NOT_NEEDED=yes
42202    ALSA_NOT_NEEDED=yes
42203    PULSE_NOT_NEEDED=yes
42204    X11_NOT_NEEDED=yes
42205    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42206$as_echo "alsa cups pulse x11" >&6; }
42207  fi
42208
42209  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42210    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42211$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42212    ALSA_NOT_NEEDED=yes
42213    PULSE_NOT_NEEDED=yes
42214    X11_NOT_NEEDED=yes
42215    # If the java runtime framework is disabled, then we need X11.
42216    # This will be adjusted below.
42217    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42218$as_echo "alsa pulse x11" >&6; }
42219  fi
42220
42221  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42222    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42223$as_echo_n "checking what is not needed on bsd?... " >&6; }
42224    ALSA_NOT_NEEDED=yes
42225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42226$as_echo "alsa" >&6; }
42227  fi
42228
42229  if test "x$OPENJDK" = "xfalse"; then
42230    FREETYPE_NOT_NEEDED=yes
42231  fi
42232
42233  if test "x$SUPPORT_HEADFUL" = xno; then
42234    X11_NOT_NEEDED=yes
42235  fi
42236
42237  ###############################################################################
42238  #
42239  # Check for MacOSX support for OpenJDK.
42240  #
42241
42242
42243  # Check whether --enable-macosx-runtime-support was given.
42244if test "${enable_macosx_runtime_support+set}" = set; then :
42245  enableval=$enable_macosx_runtime_support;
42246fi
42247
42248  if test "x$enable_macosx_runtime_support" != x; then
42249    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
42250$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
42251  fi
42252
42253
42254  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
42255$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
42256  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
42257    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
42258$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
42259  else
42260    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42261$as_echo "no" >&6; }
42262  fi
42263
42264
42265
42266  ###############################################################################
42267  #
42268  # Check for X Windows
42269  #
42270
42271  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42272  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42273  # --x-libraries for the sysroot, if that seems to be correct.
42274  if test "x$SYS_ROOT" != "x/"; then
42275    if test "x$x_includes" = xNONE; then
42276      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
42277        x_includes="$SYS_ROOT/usr/X11R6/include"
42278      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
42279        x_includes="$SYS_ROOT/usr/include"
42280      fi
42281    fi
42282    if test "x$x_libraries" = xNONE; then
42283      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
42284        x_libraries="$SYS_ROOT/usr/X11R6/lib"
42285      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42286        x_libraries="$SYS_ROOT/usr/lib64"
42287      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
42288        x_libraries="$SYS_ROOT/usr/lib"
42289      fi
42290    fi
42291  fi
42292
42293  # Now let autoconf do it's magic
42294  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42295$as_echo_n "checking for X... " >&6; }
42296
42297
42298# Check whether --with-x was given.
42299if test "${with_x+set}" = set; then :
42300  withval=$with_x;
42301fi
42302
42303# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42304if test "x$with_x" = xno; then
42305  # The user explicitly disabled X.
42306  have_x=disabled
42307else
42308  case $x_includes,$x_libraries in #(
42309    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42310    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42311  $as_echo_n "(cached) " >&6
42312else
42313  # One or both of the vars are not set, and there is no cached value.
42314ac_x_includes=no ac_x_libraries=no
42315rm -f -r conftest.dir
42316if mkdir conftest.dir; then
42317  cd conftest.dir
42318  cat >Imakefile <<'_ACEOF'
42319incroot:
42320	@echo incroot='${INCROOT}'
42321usrlibdir:
42322	@echo usrlibdir='${USRLIBDIR}'
42323libdir:
42324	@echo libdir='${LIBDIR}'
42325_ACEOF
42326  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42327    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42328    for ac_var in incroot usrlibdir libdir; do
42329      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42330    done
42331    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42332    for ac_extension in a so sl dylib la dll; do
42333      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42334	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
42335	ac_im_usrlibdir=$ac_im_libdir; break
42336      fi
42337    done
42338    # Screen out bogus values from the imake configuration.  They are
42339    # bogus both because they are the default anyway, and because
42340    # using them would break gcc on systems where it needs fixed includes.
42341    case $ac_im_incroot in
42342	/usr/include) ac_x_includes= ;;
42343	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42344    esac
42345    case $ac_im_usrlibdir in
42346	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
42347	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42348    esac
42349  fi
42350  cd ..
42351  rm -f -r conftest.dir
42352fi
42353
42354# Standard set of common directories for X headers.
42355# Check X11 before X11Rn because it is often a symlink to the current release.
42356ac_x_header_dirs='
42357/usr/X11/include
42358/usr/X11R7/include
42359/usr/X11R6/include
42360/usr/X11R5/include
42361/usr/X11R4/include
42362
42363/usr/include/X11
42364/usr/include/X11R7
42365/usr/include/X11R6
42366/usr/include/X11R5
42367/usr/include/X11R4
42368
42369/usr/local/X11/include
42370/usr/local/X11R7/include
42371/usr/local/X11R6/include
42372/usr/local/X11R5/include
42373/usr/local/X11R4/include
42374
42375/usr/local/include/X11
42376/usr/local/include/X11R7
42377/usr/local/include/X11R6
42378/usr/local/include/X11R5
42379/usr/local/include/X11R4
42380
42381/usr/X386/include
42382/usr/x386/include
42383/usr/XFree86/include/X11
42384
42385/usr/include
42386/usr/local/include
42387/usr/unsupported/include
42388/usr/athena/include
42389/usr/local/x11r5/include
42390/usr/lpp/Xamples/include
42391
42392/usr/openwin/include
42393/usr/openwin/share/include'
42394
42395if test "$ac_x_includes" = no; then
42396  # Guess where to find include files, by looking for Xlib.h.
42397  # First, try using that file with no special directory specified.
42398  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42399/* end confdefs.h.  */
42400#include <X11/Xlib.h>
42401_ACEOF
42402if ac_fn_cxx_try_cpp "$LINENO"; then :
42403  # We can compile using X headers with no special include directory.
42404ac_x_includes=
42405else
42406  for ac_dir in $ac_x_header_dirs; do
42407  if test -r "$ac_dir/X11/Xlib.h"; then
42408    ac_x_includes=$ac_dir
42409    break
42410  fi
42411done
42412fi
42413rm -f conftest.err conftest.i conftest.$ac_ext
42414fi # $ac_x_includes = no
42415
42416if test "$ac_x_libraries" = no; then
42417  # Check for the libraries.
42418  # See if we find them without any special options.
42419  # Don't add to $LIBS permanently.
42420  ac_save_LIBS=$LIBS
42421  LIBS="-lX11 $LIBS"
42422  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42423/* end confdefs.h.  */
42424#include <X11/Xlib.h>
42425int
42426main ()
42427{
42428XrmInitialize ()
42429  ;
42430  return 0;
42431}
42432_ACEOF
42433if ac_fn_cxx_try_link "$LINENO"; then :
42434  LIBS=$ac_save_LIBS
42435# We can link X programs with no special library path.
42436ac_x_libraries=
42437else
42438  LIBS=$ac_save_LIBS
42439for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
42440do
42441  # Don't even attempt the hair of trying to link an X program!
42442  for ac_extension in a so sl dylib la dll; do
42443    if test -r "$ac_dir/libX11.$ac_extension"; then
42444      ac_x_libraries=$ac_dir
42445      break 2
42446    fi
42447  done
42448done
42449fi
42450rm -f core conftest.err conftest.$ac_objext \
42451    conftest$ac_exeext conftest.$ac_ext
42452fi # $ac_x_libraries = no
42453
42454case $ac_x_includes,$ac_x_libraries in #(
42455  no,* | *,no | *\'*)
42456    # Didn't find X, or a directory has "'" in its name.
42457    ac_cv_have_x="have_x=no";; #(
42458  *)
42459    # Record where we found X for the cache.
42460    ac_cv_have_x="have_x=yes\
42461	ac_x_includes='$ac_x_includes'\
42462	ac_x_libraries='$ac_x_libraries'"
42463esac
42464fi
42465;; #(
42466    *) have_x=yes;;
42467  esac
42468  eval "$ac_cv_have_x"
42469fi # $with_x != no
42470
42471if test "$have_x" != yes; then
42472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
42473$as_echo "$have_x" >&6; }
42474  no_x=yes
42475else
42476  # If each of the values was on the command line, it overrides each guess.
42477  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
42478  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
42479  # Update the cache value to reflect the command line values.
42480  ac_cv_have_x="have_x=yes\
42481	ac_x_includes='$x_includes'\
42482	ac_x_libraries='$x_libraries'"
42483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
42484$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
42485fi
42486
42487  if test "$no_x" = yes; then
42488  # Not all programs may use this symbol, but it does not hurt to define it.
42489
42490$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
42491
42492  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
42493else
42494  if test -n "$x_includes"; then
42495    X_CFLAGS="$X_CFLAGS -I$x_includes"
42496  fi
42497
42498  # It would also be nice to do this for all -L options, not just this one.
42499  if test -n "$x_libraries"; then
42500    X_LIBS="$X_LIBS -L$x_libraries"
42501    # For Solaris; some versions of Sun CC require a space after -R and
42502    # others require no space.  Words are not sufficient . . . .
42503    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
42504$as_echo_n "checking whether -R must be followed by a space... " >&6; }
42505    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
42506    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
42507    ac_cxx_werror_flag=yes
42508    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42509/* end confdefs.h.  */
42510
42511int
42512main ()
42513{
42514
42515  ;
42516  return 0;
42517}
42518_ACEOF
42519if ac_fn_cxx_try_link "$LINENO"; then :
42520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42521$as_echo "no" >&6; }
42522       X_LIBS="$X_LIBS -R$x_libraries"
42523else
42524  LIBS="$ac_xsave_LIBS -R $x_libraries"
42525       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42526/* end confdefs.h.  */
42527
42528int
42529main ()
42530{
42531
42532  ;
42533  return 0;
42534}
42535_ACEOF
42536if ac_fn_cxx_try_link "$LINENO"; then :
42537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42538$as_echo "yes" >&6; }
42539	  X_LIBS="$X_LIBS -R $x_libraries"
42540else
42541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
42542$as_echo "neither works" >&6; }
42543fi
42544rm -f core conftest.err conftest.$ac_objext \
42545    conftest$ac_exeext conftest.$ac_ext
42546fi
42547rm -f core conftest.err conftest.$ac_objext \
42548    conftest$ac_exeext conftest.$ac_ext
42549    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
42550    LIBS=$ac_xsave_LIBS
42551  fi
42552
42553  # Check for system-dependent libraries X programs must link with.
42554  # Do this before checking for the system-independent R6 libraries
42555  # (-lICE), since we may need -lsocket or whatever for X linking.
42556
42557  if test "$ISC" = yes; then
42558    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
42559  else
42560    # Martyn Johnson says this is needed for Ultrix, if the X
42561    # libraries were built with DECnet support.  And Karl Berry says
42562    # the Alpha needs dnet_stub (dnet does not exist).
42563    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
42564    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42565/* end confdefs.h.  */
42566
42567/* Override any GCC internal prototype to avoid an error.
42568   Use char because int might match the return type of a GCC
42569   builtin and then its argument prototype would still apply.  */
42570#ifdef __cplusplus
42571extern "C"
42572#endif
42573char XOpenDisplay ();
42574int
42575main ()
42576{
42577return XOpenDisplay ();
42578  ;
42579  return 0;
42580}
42581_ACEOF
42582if ac_fn_cxx_try_link "$LINENO"; then :
42583
42584else
42585  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
42586$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
42587if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
42588  $as_echo_n "(cached) " >&6
42589else
42590  ac_check_lib_save_LIBS=$LIBS
42591LIBS="-ldnet  $LIBS"
42592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42593/* end confdefs.h.  */
42594
42595/* Override any GCC internal prototype to avoid an error.
42596   Use char because int might match the return type of a GCC
42597   builtin and then its argument prototype would still apply.  */
42598#ifdef __cplusplus
42599extern "C"
42600#endif
42601char dnet_ntoa ();
42602int
42603main ()
42604{
42605return dnet_ntoa ();
42606  ;
42607  return 0;
42608}
42609_ACEOF
42610if ac_fn_cxx_try_link "$LINENO"; then :
42611  ac_cv_lib_dnet_dnet_ntoa=yes
42612else
42613  ac_cv_lib_dnet_dnet_ntoa=no
42614fi
42615rm -f core conftest.err conftest.$ac_objext \
42616    conftest$ac_exeext conftest.$ac_ext
42617LIBS=$ac_check_lib_save_LIBS
42618fi
42619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
42620$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
42621if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
42622  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
42623fi
42624
42625    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
42626      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
42627$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
42628if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
42629  $as_echo_n "(cached) " >&6
42630else
42631  ac_check_lib_save_LIBS=$LIBS
42632LIBS="-ldnet_stub  $LIBS"
42633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42634/* end confdefs.h.  */
42635
42636/* Override any GCC internal prototype to avoid an error.
42637   Use char because int might match the return type of a GCC
42638   builtin and then its argument prototype would still apply.  */
42639#ifdef __cplusplus
42640extern "C"
42641#endif
42642char dnet_ntoa ();
42643int
42644main ()
42645{
42646return dnet_ntoa ();
42647  ;
42648  return 0;
42649}
42650_ACEOF
42651if ac_fn_cxx_try_link "$LINENO"; then :
42652  ac_cv_lib_dnet_stub_dnet_ntoa=yes
42653else
42654  ac_cv_lib_dnet_stub_dnet_ntoa=no
42655fi
42656rm -f core conftest.err conftest.$ac_objext \
42657    conftest$ac_exeext conftest.$ac_ext
42658LIBS=$ac_check_lib_save_LIBS
42659fi
42660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
42661$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
42662if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
42663  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
42664fi
42665
42666    fi
42667fi
42668rm -f core conftest.err conftest.$ac_objext \
42669    conftest$ac_exeext conftest.$ac_ext
42670    LIBS="$ac_xsave_LIBS"
42671
42672    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
42673    # to get the SysV transport functions.
42674    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
42675    # needs -lnsl.
42676    # The nsl library prevents programs from opening the X display
42677    # on Irix 5.2, according to T.E. Dickey.
42678    # The functions gethostbyname, getservbyname, and inet_addr are
42679    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
42680    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
42681if test "x$ac_cv_func_gethostbyname" = xyes; then :
42682
42683fi
42684
42685    if test $ac_cv_func_gethostbyname = no; then
42686      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
42687$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
42688if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
42689  $as_echo_n "(cached) " >&6
42690else
42691  ac_check_lib_save_LIBS=$LIBS
42692LIBS="-lnsl  $LIBS"
42693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42694/* end confdefs.h.  */
42695
42696/* Override any GCC internal prototype to avoid an error.
42697   Use char because int might match the return type of a GCC
42698   builtin and then its argument prototype would still apply.  */
42699#ifdef __cplusplus
42700extern "C"
42701#endif
42702char gethostbyname ();
42703int
42704main ()
42705{
42706return gethostbyname ();
42707  ;
42708  return 0;
42709}
42710_ACEOF
42711if ac_fn_cxx_try_link "$LINENO"; then :
42712  ac_cv_lib_nsl_gethostbyname=yes
42713else
42714  ac_cv_lib_nsl_gethostbyname=no
42715fi
42716rm -f core conftest.err conftest.$ac_objext \
42717    conftest$ac_exeext conftest.$ac_ext
42718LIBS=$ac_check_lib_save_LIBS
42719fi
42720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
42721$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
42722if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
42723  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
42724fi
42725
42726      if test $ac_cv_lib_nsl_gethostbyname = no; then
42727	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
42728$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
42729if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
42730  $as_echo_n "(cached) " >&6
42731else
42732  ac_check_lib_save_LIBS=$LIBS
42733LIBS="-lbsd  $LIBS"
42734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42735/* end confdefs.h.  */
42736
42737/* Override any GCC internal prototype to avoid an error.
42738   Use char because int might match the return type of a GCC
42739   builtin and then its argument prototype would still apply.  */
42740#ifdef __cplusplus
42741extern "C"
42742#endif
42743char gethostbyname ();
42744int
42745main ()
42746{
42747return gethostbyname ();
42748  ;
42749  return 0;
42750}
42751_ACEOF
42752if ac_fn_cxx_try_link "$LINENO"; then :
42753  ac_cv_lib_bsd_gethostbyname=yes
42754else
42755  ac_cv_lib_bsd_gethostbyname=no
42756fi
42757rm -f core conftest.err conftest.$ac_objext \
42758    conftest$ac_exeext conftest.$ac_ext
42759LIBS=$ac_check_lib_save_LIBS
42760fi
42761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
42762$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
42763if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
42764  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
42765fi
42766
42767      fi
42768    fi
42769
42770    # lieder@skyler.mavd.honeywell.com says without -lsocket,
42771    # socket/setsockopt and other routines are undefined under SCO ODT
42772    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
42773    # on later versions), says Simon Leinen: it contains gethostby*
42774    # variants that don't use the name server (or something).  -lsocket
42775    # must be given before -lnsl if both are needed.  We assume that
42776    # if connect needs -lnsl, so does gethostbyname.
42777    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
42778if test "x$ac_cv_func_connect" = xyes; then :
42779
42780fi
42781
42782    if test $ac_cv_func_connect = no; then
42783      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
42784$as_echo_n "checking for connect in -lsocket... " >&6; }
42785if ${ac_cv_lib_socket_connect+:} false; then :
42786  $as_echo_n "(cached) " >&6
42787else
42788  ac_check_lib_save_LIBS=$LIBS
42789LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
42790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42791/* end confdefs.h.  */
42792
42793/* Override any GCC internal prototype to avoid an error.
42794   Use char because int might match the return type of a GCC
42795   builtin and then its argument prototype would still apply.  */
42796#ifdef __cplusplus
42797extern "C"
42798#endif
42799char connect ();
42800int
42801main ()
42802{
42803return connect ();
42804  ;
42805  return 0;
42806}
42807_ACEOF
42808if ac_fn_cxx_try_link "$LINENO"; then :
42809  ac_cv_lib_socket_connect=yes
42810else
42811  ac_cv_lib_socket_connect=no
42812fi
42813rm -f core conftest.err conftest.$ac_objext \
42814    conftest$ac_exeext conftest.$ac_ext
42815LIBS=$ac_check_lib_save_LIBS
42816fi
42817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
42818$as_echo "$ac_cv_lib_socket_connect" >&6; }
42819if test "x$ac_cv_lib_socket_connect" = xyes; then :
42820  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
42821fi
42822
42823    fi
42824
42825    # Guillermo Gomez says -lposix is necessary on A/UX.
42826    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
42827if test "x$ac_cv_func_remove" = xyes; then :
42828
42829fi
42830
42831    if test $ac_cv_func_remove = no; then
42832      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
42833$as_echo_n "checking for remove in -lposix... " >&6; }
42834if ${ac_cv_lib_posix_remove+:} false; then :
42835  $as_echo_n "(cached) " >&6
42836else
42837  ac_check_lib_save_LIBS=$LIBS
42838LIBS="-lposix  $LIBS"
42839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42840/* end confdefs.h.  */
42841
42842/* Override any GCC internal prototype to avoid an error.
42843   Use char because int might match the return type of a GCC
42844   builtin and then its argument prototype would still apply.  */
42845#ifdef __cplusplus
42846extern "C"
42847#endif
42848char remove ();
42849int
42850main ()
42851{
42852return remove ();
42853  ;
42854  return 0;
42855}
42856_ACEOF
42857if ac_fn_cxx_try_link "$LINENO"; then :
42858  ac_cv_lib_posix_remove=yes
42859else
42860  ac_cv_lib_posix_remove=no
42861fi
42862rm -f core conftest.err conftest.$ac_objext \
42863    conftest$ac_exeext conftest.$ac_ext
42864LIBS=$ac_check_lib_save_LIBS
42865fi
42866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
42867$as_echo "$ac_cv_lib_posix_remove" >&6; }
42868if test "x$ac_cv_lib_posix_remove" = xyes; then :
42869  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
42870fi
42871
42872    fi
42873
42874    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
42875    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
42876if test "x$ac_cv_func_shmat" = xyes; then :
42877
42878fi
42879
42880    if test $ac_cv_func_shmat = no; then
42881      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
42882$as_echo_n "checking for shmat in -lipc... " >&6; }
42883if ${ac_cv_lib_ipc_shmat+:} false; then :
42884  $as_echo_n "(cached) " >&6
42885else
42886  ac_check_lib_save_LIBS=$LIBS
42887LIBS="-lipc  $LIBS"
42888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42889/* end confdefs.h.  */
42890
42891/* Override any GCC internal prototype to avoid an error.
42892   Use char because int might match the return type of a GCC
42893   builtin and then its argument prototype would still apply.  */
42894#ifdef __cplusplus
42895extern "C"
42896#endif
42897char shmat ();
42898int
42899main ()
42900{
42901return shmat ();
42902  ;
42903  return 0;
42904}
42905_ACEOF
42906if ac_fn_cxx_try_link "$LINENO"; then :
42907  ac_cv_lib_ipc_shmat=yes
42908else
42909  ac_cv_lib_ipc_shmat=no
42910fi
42911rm -f core conftest.err conftest.$ac_objext \
42912    conftest$ac_exeext conftest.$ac_ext
42913LIBS=$ac_check_lib_save_LIBS
42914fi
42915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
42916$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
42917if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
42918  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
42919fi
42920
42921    fi
42922  fi
42923
42924  # Check for libraries that X11R6 Xt/Xaw programs need.
42925  ac_save_LDFLAGS=$LDFLAGS
42926  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
42927  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
42928  # check for ICE first), but we must link in the order -lSM -lICE or
42929  # we get undefined symbols.  So assume we have SM if we have ICE.
42930  # These have to be linked with before -lX11, unlike the other
42931  # libraries we check for below, so use a different variable.
42932  # John Interrante, Karl Berry
42933  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
42934$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
42935if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
42936  $as_echo_n "(cached) " >&6
42937else
42938  ac_check_lib_save_LIBS=$LIBS
42939LIBS="-lICE $X_EXTRA_LIBS $LIBS"
42940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42941/* end confdefs.h.  */
42942
42943/* Override any GCC internal prototype to avoid an error.
42944   Use char because int might match the return type of a GCC
42945   builtin and then its argument prototype would still apply.  */
42946#ifdef __cplusplus
42947extern "C"
42948#endif
42949char IceConnectionNumber ();
42950int
42951main ()
42952{
42953return IceConnectionNumber ();
42954  ;
42955  return 0;
42956}
42957_ACEOF
42958if ac_fn_cxx_try_link "$LINENO"; then :
42959  ac_cv_lib_ICE_IceConnectionNumber=yes
42960else
42961  ac_cv_lib_ICE_IceConnectionNumber=no
42962fi
42963rm -f core conftest.err conftest.$ac_objext \
42964    conftest$ac_exeext conftest.$ac_ext
42965LIBS=$ac_check_lib_save_LIBS
42966fi
42967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
42968$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
42969if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
42970  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
42971fi
42972
42973  LDFLAGS=$ac_save_LDFLAGS
42974
42975fi
42976
42977
42978  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
42979  # this doesn't make sense so we remove it.
42980  if test "x$COMPILE_TYPE" = xcross; then
42981    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
42982  fi
42983
42984  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
42985
42986  # Print a helpful message on how to acquire the necessary build dependency.
42987  # x11 is the help tag: freetype, cups, pulse, alsa etc
42988  MISSING_DEPENDENCY=x11
42989
42990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42991    cygwin_help $MISSING_DEPENDENCY
42992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42993    msys_help $MISSING_DEPENDENCY
42994  else
42995    PKGHANDLER_COMMAND=
42996
42997    case $PKGHANDLER in
42998      apt-get)
42999        apt_help     $MISSING_DEPENDENCY ;;
43000      yum)
43001        yum_help     $MISSING_DEPENDENCY ;;
43002      port)
43003        port_help    $MISSING_DEPENDENCY ;;
43004      pkgutil)
43005        pkgutil_help $MISSING_DEPENDENCY ;;
43006      pkgadd)
43007        pkgadd_help  $MISSING_DEPENDENCY ;;
43008    esac
43009
43010    if test "x$PKGHANDLER_COMMAND" != x; then
43011      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43012    fi
43013  fi
43014
43015    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43016  fi
43017
43018  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43019    OPENWIN_HOME="/usr/openwin"
43020  fi
43021
43022
43023
43024  #
43025  # Weird Sol10 something check...TODO change to try compile
43026  #
43027  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
43028    if test "`uname -r`" = "5.10"; then
43029      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
43030        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
43031      fi
43032    fi
43033  fi
43034
43035  ac_ext=c
43036ac_cpp='$CPP $CPPFLAGS'
43037ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43038ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43039ac_compiler_gnu=$ac_cv_c_compiler_gnu
43040
43041  OLD_CFLAGS="$CFLAGS"
43042  CFLAGS="$CFLAGS $X_CFLAGS"
43043
43044  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43045  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43046do :
43047  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43048ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43049        # include <X11/Xlib.h>
43050        # include <X11/Xutil.h>
43051
43052
43053"
43054if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43055  cat >>confdefs.h <<_ACEOF
43056#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43057_ACEOF
43058 X11_A_OK=yes
43059else
43060  X11_A_OK=no; break
43061fi
43062
43063done
43064
43065
43066  CFLAGS="$OLD_CFLAGS"
43067  ac_ext=cpp
43068ac_cpp='$CXXCPP $CPPFLAGS'
43069ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43070ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43071ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43072
43073
43074  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
43075
43076  # Print a helpful message on how to acquire the necessary build dependency.
43077  # x11 is the help tag: freetype, cups, pulse, alsa etc
43078  MISSING_DEPENDENCY=x11
43079
43080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43081    cygwin_help $MISSING_DEPENDENCY
43082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43083    msys_help $MISSING_DEPENDENCY
43084  else
43085    PKGHANDLER_COMMAND=
43086
43087    case $PKGHANDLER in
43088      apt-get)
43089        apt_help     $MISSING_DEPENDENCY ;;
43090      yum)
43091        yum_help     $MISSING_DEPENDENCY ;;
43092      port)
43093        port_help    $MISSING_DEPENDENCY ;;
43094      pkgutil)
43095        pkgutil_help $MISSING_DEPENDENCY ;;
43096      pkgadd)
43097        pkgadd_help  $MISSING_DEPENDENCY ;;
43098    esac
43099
43100    if test "x$PKGHANDLER_COMMAND" != x; then
43101      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43102    fi
43103  fi
43104
43105    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43106  fi
43107
43108
43109
43110
43111
43112
43113  ###############################################################################
43114  #
43115  # The common unix printing system cups is used to print from java.
43116  #
43117
43118# Check whether --with-cups was given.
43119if test "${with_cups+set}" = set; then :
43120  withval=$with_cups;
43121fi
43122
43123
43124# Check whether --with-cups-include was given.
43125if test "${with_cups_include+set}" = set; then :
43126  withval=$with_cups_include;
43127fi
43128
43129
43130  if test "x$CUPS_NOT_NEEDED" = xyes; then
43131    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43132      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43133$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43134    fi
43135    CUPS_CFLAGS=
43136  else
43137    CUPS_FOUND=no
43138
43139    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43140      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43141    fi
43142
43143    if test "x${with_cups}" != x; then
43144      CUPS_CFLAGS="-I${with_cups}/include"
43145      CUPS_FOUND=yes
43146    fi
43147    if test "x${with_cups_include}" != x; then
43148      CUPS_CFLAGS="-I${with_cups_include}"
43149      CUPS_FOUND=yes
43150    fi
43151    if test "x$CUPS_FOUND" = xno; then
43152
43153
43154  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43155    # Source the builddeps file again, to make sure it uses the latest variables!
43156    . $builddepsfile
43157    # Look for a target and build machine specific resource!
43158    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43159    if test "x$resource" = x; then
43160      # Ok, lets instead look for a target specific resource
43161      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43162    fi
43163    if test "x$resource" = x; then
43164      # Ok, lets instead look for a build specific resource
43165      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43166    fi
43167    if test "x$resource" = x; then
43168      # Ok, lets instead look for a generic resource
43169      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43170      resource=${builddep_cups}
43171    fi
43172    if test "x$resource" != x; then
43173      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43174$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43175      # If the resource in the builddeps.conf file is an existing directory,
43176      # for example /java/linux/cups
43177      if test -d ${resource}; then
43178        depdir=${resource}
43179      else
43180
43181  # cups is for example mymodule
43182  # $resource is for example libs/general/libmymod_1_2_3.zip
43183  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43184  # $with_builddeps_dir is for example /localhome/builddeps
43185  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43186  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43187  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43188  filename=`basename $resource`
43189  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43190  filebase=${filename%%.*}
43191  extension=${filename#*.}
43192  installdir=$with_builddeps_dir/$filebase
43193  if test ! -f $installdir/$filename.unpacked; then
43194    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43195$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43196    if test ! -d $installdir; then
43197      mkdir -p $installdir
43198    fi
43199    if test ! -d $installdir; then
43200      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43201    fi
43202    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43203    touch $tmpfile
43204    if test ! -f $tmpfile; then
43205      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43206    fi
43207
43208  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43209  # $tmpfile is the local file name for the downloaded file.
43210  VALID_TOOL=no
43211  if test "x$BDEPS_FTP" = xwget; then
43212    VALID_TOOL=yes
43213    wget -O $tmpfile $with_builddeps_server/$resource
43214  fi
43215  if test "x$BDEPS_FTP" = xlftp; then
43216    VALID_TOOL=yes
43217    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43218  fi
43219  if test "x$BDEPS_FTP" = xftp; then
43220    VALID_TOOL=yes
43221    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43222    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43223    FTPUSERPWD=${FTPSERVER%%@*}
43224    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43225      FTPUSER=${userpwd%%:*}
43226      FTPPWD=${userpwd#*@}
43227      FTPSERVER=${FTPSERVER#*@}
43228    else
43229      FTPUSER=ftp
43230      FTPPWD=ftp
43231    fi
43232    # the "pass" command does not work on some
43233    # ftp clients (read ftp.exe) but if it works,
43234    # passive mode is better!
43235    ( \
43236        echo "user $FTPUSER $FTPPWD"        ; \
43237        echo "pass"                         ; \
43238        echo "bin"                          ; \
43239        echo "get $FTPPATH $tmpfile"              ; \
43240    ) | ftp -in $FTPSERVER
43241  fi
43242  if test "x$VALID_TOOL" != xyes; then
43243    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43244  fi
43245
43246    mv $tmpfile $installdir/$filename
43247    if test ! -s $installdir/$filename; then
43248      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43249    fi
43250    case "$extension" in
43251      zip)  echo "Unzipping $installdir/$filename..."
43252        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43253        ;;
43254      tar.gz) echo "Untaring $installdir/$filename..."
43255        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43256        ;;
43257      tgz) echo "Untaring $installdir/$filename..."
43258        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43259        ;;
43260      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43261        ;;
43262    esac
43263  fi
43264  if test -f $installdir/$filename.unpacked; then
43265    depdir=$installdir
43266  fi
43267
43268      fi
43269      # Source the builddeps file again, because in the previous command, the depdir
43270      # was updated to point at the current build dependency install directory.
43271      . $builddepsfile
43272      # Now extract variables from the builddeps.conf files.
43273      theroot=${builddep_cups_ROOT}
43274      thecflags=${builddep_cups_CFLAGS}
43275      thelibs=${builddep_cups_LIBS}
43276      if test "x$depdir" = x; then
43277        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43278      fi
43279      CUPS=$depdir
43280      if test "x$theroot" != x; then
43281        CUPS="$theroot"
43282      fi
43283      if test "x$thecflags" != x; then
43284        CUPS_CFLAGS="$thecflags"
43285      fi
43286      if test "x$thelibs" != x; then
43287        CUPS_LIBS="$thelibs"
43288      fi
43289      CUPS_FOUND=yes
43290
43291    fi
43292
43293  fi
43294
43295    fi
43296    if test "x$CUPS_FOUND" = xno; then
43297      # Are the cups headers installed in the default /usr/include location?
43298      for ac_header in cups/cups.h cups/ppd.h
43299do :
43300  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43301ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43302if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43303  cat >>confdefs.h <<_ACEOF
43304#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43305_ACEOF
43306
43307            CUPS_FOUND=yes
43308            CUPS_CFLAGS=
43309            DEFAULT_CUPS=yes
43310
43311
43312fi
43313
43314done
43315
43316    fi
43317    if test "x$CUPS_FOUND" = xno; then
43318      # Getting nervous now? Lets poke around for standard Solaris third-party
43319      # package installation locations.
43320      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43321$as_echo_n "checking for cups headers... " >&6; }
43322      if test -s /opt/sfw/cups/include/cups/cups.h; then
43323        # An SFW package seems to be installed!
43324        CUPS_FOUND=yes
43325        CUPS_CFLAGS="-I/opt/sfw/cups/include"
43326      elif test -s /opt/csw/include/cups/cups.h; then
43327        # A CSW package seems to be installed!
43328        CUPS_FOUND=yes
43329        CUPS_CFLAGS="-I/opt/csw/include"
43330      fi
43331      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43332$as_echo "$CUPS_FOUND" >&6; }
43333    fi
43334    if test "x$CUPS_FOUND" = xno; then
43335
43336  # Print a helpful message on how to acquire the necessary build dependency.
43337  # cups is the help tag: freetype, cups, pulse, alsa etc
43338  MISSING_DEPENDENCY=cups
43339
43340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43341    cygwin_help $MISSING_DEPENDENCY
43342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43343    msys_help $MISSING_DEPENDENCY
43344  else
43345    PKGHANDLER_COMMAND=
43346
43347    case $PKGHANDLER in
43348      apt-get)
43349        apt_help     $MISSING_DEPENDENCY ;;
43350      yum)
43351        yum_help     $MISSING_DEPENDENCY ;;
43352      port)
43353        port_help    $MISSING_DEPENDENCY ;;
43354      pkgutil)
43355        pkgutil_help $MISSING_DEPENDENCY ;;
43356      pkgadd)
43357        pkgadd_help  $MISSING_DEPENDENCY ;;
43358    esac
43359
43360    if test "x$PKGHANDLER_COMMAND" != x; then
43361      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43362    fi
43363  fi
43364
43365      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43366    fi
43367  fi
43368
43369
43370
43371
43372
43373
43374  ###############################################################################
43375  #
43376  # The ubiquitous freetype library is used to render fonts.
43377  #
43378
43379# Check whether --with-freetype was given.
43380if test "${with_freetype+set}" = set; then :
43381  withval=$with_freetype;
43382fi
43383
43384
43385# Check whether --with-freetype-include was given.
43386if test "${with_freetype_include+set}" = set; then :
43387  withval=$with_freetype_include;
43388fi
43389
43390
43391# Check whether --with-freetype-lib was given.
43392if test "${with_freetype_lib+set}" = set; then :
43393  withval=$with_freetype_lib;
43394fi
43395
43396  # Check whether --enable-freetype-bundling was given.
43397if test "${enable_freetype_bundling+set}" = set; then :
43398  enableval=$enable_freetype_bundling;
43399fi
43400
43401
43402  FREETYPE_CFLAGS=
43403  FREETYPE_LIBS=
43404  FREETYPE_BUNDLE_LIB_PATH=
43405
43406  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43407    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43408      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43409$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43410    fi
43411    if test "x$enable_freetype_bundling" != x; then
43412      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
43413$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
43414    fi
43415  else
43416    # freetype is needed to build; go get it!
43417
43418    BUNDLE_FREETYPE="$enable_freetype_bundling"
43419
43420    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43421      # User has specified settings
43422
43423      if test "x$BUNDLE_FREETYPE" = x; then
43424        # If not specified, default is to bundle freetype
43425        BUNDLE_FREETYPE=yes
43426      fi
43427
43428      if test "x$with_freetype" != x; then
43429        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
43430        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
43431      fi
43432
43433      # Allow --with-freetype-lib and --with-freetype-include to override
43434      if test "x$with_freetype_include" != x; then
43435        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
43436      fi
43437      if test "x$with_freetype_lib" != x; then
43438        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
43439      fi
43440
43441      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
43442        # Okay, we got it. Check that it works.
43443
43444  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43445  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43446  METHOD="--with-freetype"
43447
43448  # First check if the files exists.
43449  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43450    # We found an arbitrary include file. That's a good sign.
43451    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43452$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43453    FOUND_FREETYPE=yes
43454
43455    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43456    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43457      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43458$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43459      FOUND_FREETYPE=no
43460    else
43461      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43462        # On Windows, we will need both .lib and .dll file.
43463        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43464          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43465$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43466          FOUND_FREETYPE=no
43467        fi
43468      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
43469        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43470        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43471      fi
43472    fi
43473  fi
43474
43475  if test "x$FOUND_FREETYPE" = xyes; then
43476
43477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43478
43479  # Input might be given as Windows format, start by converting to
43480  # unix format.
43481  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43482  new_path=`$CYGPATH -u "$path"`
43483
43484  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43485  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43486  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43487  # "foo.exe" is OK but "foo" is an error.
43488  #
43489  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43490  # It is also a way to make sure we got the proper file name for the real test later on.
43491  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43492  if test "x$test_shortpath" = x; then
43493    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43494$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43495    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43496  fi
43497
43498  # Call helper function which possibly converts this using DOS-style short mode.
43499  # If so, the updated path is stored in $new_path.
43500
43501  input_path="$new_path"
43502  # Check if we need to convert this using DOS-style short mode. If the path
43503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43504  # take no chances and rewrite it.
43505  # Note: m4 eats our [], so we need to use [ and ] instead.
43506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43507  if test "x$has_forbidden_chars" != x; then
43508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43509    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43510    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43511    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43512      # Going to short mode and back again did indeed matter. Since short mode is
43513      # case insensitive, let's make it lowercase to improve readability.
43514      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43515      # Now convert it back to Unix-stile (cygpath)
43516      input_path=`$CYGPATH -u "$shortmode_path"`
43517      new_path="$input_path"
43518    fi
43519  fi
43520
43521  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43522  if test "x$test_cygdrive_prefix" = x; then
43523    # As a simple fix, exclude /usr/bin since it's not a real path.
43524    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43525      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43526      # a path prefixed by /cygdrive for fixpath to work.
43527      new_path="$CYGWIN_ROOT_PATH$input_path"
43528    fi
43529  fi
43530
43531
43532  if test "x$path" != "x$new_path"; then
43533    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43535$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43536  fi
43537
43538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43539
43540  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43541  has_colon=`$ECHO $path | $GREP ^.:`
43542  new_path="$path"
43543  if test "x$has_colon" = x; then
43544    # Not in mixed or Windows style, start by that.
43545    new_path=`cmd //c echo $path`
43546  fi
43547
43548
43549  input_path="$new_path"
43550  # Check if we need to convert this using DOS-style short mode. If the path
43551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43552  # take no chances and rewrite it.
43553  # Note: m4 eats our [], so we need to use [ and ] instead.
43554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43555  if test "x$has_forbidden_chars" != x; then
43556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43557    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43558  fi
43559
43560
43561  windows_path="$new_path"
43562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43563    unix_path=`$CYGPATH -u "$windows_path"`
43564    new_path="$unix_path"
43565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43567    new_path="$unix_path"
43568  fi
43569
43570  if test "x$path" != "x$new_path"; then
43571    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43572    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43573$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43574  fi
43575
43576  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43577  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43578
43579  else
43580    # We're on a posix platform. Hooray! :)
43581    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43582    has_space=`$ECHO "$path" | $GREP " "`
43583    if test "x$has_space" != x; then
43584      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43585$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43586      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43587    fi
43588
43589    # Use eval to expand a potential ~
43590    eval path="$path"
43591    if test ! -f "$path" && test ! -d "$path"; then
43592      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43593    fi
43594
43595    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43596  fi
43597
43598
43599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43600
43601  # Input might be given as Windows format, start by converting to
43602  # unix format.
43603  path="$POTENTIAL_FREETYPE_LIB_PATH"
43604  new_path=`$CYGPATH -u "$path"`
43605
43606  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43607  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43608  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43609  # "foo.exe" is OK but "foo" is an error.
43610  #
43611  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43612  # It is also a way to make sure we got the proper file name for the real test later on.
43613  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43614  if test "x$test_shortpath" = x; then
43615    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43616$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43617    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43618  fi
43619
43620  # Call helper function which possibly converts this using DOS-style short mode.
43621  # If so, the updated path is stored in $new_path.
43622
43623  input_path="$new_path"
43624  # Check if we need to convert this using DOS-style short mode. If the path
43625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43626  # take no chances and rewrite it.
43627  # Note: m4 eats our [], so we need to use [ and ] instead.
43628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43629  if test "x$has_forbidden_chars" != x; then
43630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43631    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43632    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43633    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43634      # Going to short mode and back again did indeed matter. Since short mode is
43635      # case insensitive, let's make it lowercase to improve readability.
43636      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43637      # Now convert it back to Unix-stile (cygpath)
43638      input_path=`$CYGPATH -u "$shortmode_path"`
43639      new_path="$input_path"
43640    fi
43641  fi
43642
43643  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43644  if test "x$test_cygdrive_prefix" = x; then
43645    # As a simple fix, exclude /usr/bin since it's not a real path.
43646    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43647      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43648      # a path prefixed by /cygdrive for fixpath to work.
43649      new_path="$CYGWIN_ROOT_PATH$input_path"
43650    fi
43651  fi
43652
43653
43654  if test "x$path" != "x$new_path"; then
43655    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43657$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43658  fi
43659
43660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43661
43662  path="$POTENTIAL_FREETYPE_LIB_PATH"
43663  has_colon=`$ECHO $path | $GREP ^.:`
43664  new_path="$path"
43665  if test "x$has_colon" = x; then
43666    # Not in mixed or Windows style, start by that.
43667    new_path=`cmd //c echo $path`
43668  fi
43669
43670
43671  input_path="$new_path"
43672  # Check if we need to convert this using DOS-style short mode. If the path
43673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43674  # take no chances and rewrite it.
43675  # Note: m4 eats our [], so we need to use [ and ] instead.
43676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43677  if test "x$has_forbidden_chars" != x; then
43678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43679    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43680  fi
43681
43682
43683  windows_path="$new_path"
43684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43685    unix_path=`$CYGPATH -u "$windows_path"`
43686    new_path="$unix_path"
43687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43689    new_path="$unix_path"
43690  fi
43691
43692  if test "x$path" != "x$new_path"; then
43693    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43694    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43695$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43696  fi
43697
43698  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43699  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43700
43701  else
43702    # We're on a posix platform. Hooray! :)
43703    path="$POTENTIAL_FREETYPE_LIB_PATH"
43704    has_space=`$ECHO "$path" | $GREP " "`
43705    if test "x$has_space" != x; then
43706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43707$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43708      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43709    fi
43710
43711    # Use eval to expand a potential ~
43712    eval path="$path"
43713    if test ! -f "$path" && test ! -d "$path"; then
43714      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43715    fi
43716
43717    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43718  fi
43719
43720
43721    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43722    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43723$as_echo_n "checking for freetype includes... " >&6; }
43724    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43725$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43726    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43727    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43728$as_echo_n "checking for freetype libraries... " >&6; }
43729    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43730$as_echo "$FREETYPE_LIB_PATH" >&6; }
43731  fi
43732
43733        if test "x$FOUND_FREETYPE" != xyes; then
43734          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
43735        fi
43736      else
43737        # User specified only one of lib or include. This is an error.
43738        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
43739          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
43740$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
43741          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43742        else
43743          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
43744$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
43745          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43746        fi
43747      fi
43748    else
43749      # User did not specify settings, but we need freetype. Try to locate it.
43750
43751      if test "x$BUNDLE_FREETYPE" = x; then
43752        # If not specified, default is to bundle freetype only on windows
43753        if test "x$OPENJDK_TARGET_OS" = xwindows; then
43754          BUNDLE_FREETYPE=yes
43755        else
43756          BUNDLE_FREETYPE=no
43757        fi
43758      fi
43759
43760      if test "x$FOUND_FREETYPE" != xyes; then
43761        # Check builddeps
43762
43763
43764  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43765    # Source the builddeps file again, to make sure it uses the latest variables!
43766    . $builddepsfile
43767    # Look for a target and build machine specific resource!
43768    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43769    if test "x$resource" = x; then
43770      # Ok, lets instead look for a target specific resource
43771      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
43772    fi
43773    if test "x$resource" = x; then
43774      # Ok, lets instead look for a build specific resource
43775      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
43776    fi
43777    if test "x$resource" = x; then
43778      # Ok, lets instead look for a generic resource
43779      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
43780      resource=${builddep_freetype2}
43781    fi
43782    if test "x$resource" != x; then
43783      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
43784$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
43785      # If the resource in the builddeps.conf file is an existing directory,
43786      # for example /java/linux/cups
43787      if test -d ${resource}; then
43788        depdir=${resource}
43789      else
43790
43791  # freetype2 is for example mymodule
43792  # $resource is for example libs/general/libmymod_1_2_3.zip
43793  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43794  # $with_builddeps_dir is for example /localhome/builddeps
43795  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43796  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43797  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43798  filename=`basename $resource`
43799  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43800  filebase=${filename%%.*}
43801  extension=${filename#*.}
43802  installdir=$with_builddeps_dir/$filebase
43803  if test ! -f $installdir/$filename.unpacked; then
43804    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
43805$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43806    if test ! -d $installdir; then
43807      mkdir -p $installdir
43808    fi
43809    if test ! -d $installdir; then
43810      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43811    fi
43812    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
43813    touch $tmpfile
43814    if test ! -f $tmpfile; then
43815      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43816    fi
43817
43818  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43819  # $tmpfile is the local file name for the downloaded file.
43820  VALID_TOOL=no
43821  if test "x$BDEPS_FTP" = xwget; then
43822    VALID_TOOL=yes
43823    wget -O $tmpfile $with_builddeps_server/$resource
43824  fi
43825  if test "x$BDEPS_FTP" = xlftp; then
43826    VALID_TOOL=yes
43827    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43828  fi
43829  if test "x$BDEPS_FTP" = xftp; then
43830    VALID_TOOL=yes
43831    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43832    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43833    FTPUSERPWD=${FTPSERVER%%@*}
43834    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43835      FTPUSER=${userpwd%%:*}
43836      FTPPWD=${userpwd#*@}
43837      FTPSERVER=${FTPSERVER#*@}
43838    else
43839      FTPUSER=ftp
43840      FTPPWD=ftp
43841    fi
43842    # the "pass" command does not work on some
43843    # ftp clients (read ftp.exe) but if it works,
43844    # passive mode is better!
43845    ( \
43846        echo "user $FTPUSER $FTPPWD"        ; \
43847        echo "pass"                         ; \
43848        echo "bin"                          ; \
43849        echo "get $FTPPATH $tmpfile"              ; \
43850    ) | ftp -in $FTPSERVER
43851  fi
43852  if test "x$VALID_TOOL" != xyes; then
43853    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43854  fi
43855
43856    mv $tmpfile $installdir/$filename
43857    if test ! -s $installdir/$filename; then
43858      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43859    fi
43860    case "$extension" in
43861      zip)  echo "Unzipping $installdir/$filename..."
43862        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43863        ;;
43864      tar.gz) echo "Untaring $installdir/$filename..."
43865        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43866        ;;
43867      tgz) echo "Untaring $installdir/$filename..."
43868        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43869        ;;
43870      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43871        ;;
43872    esac
43873  fi
43874  if test -f $installdir/$filename.unpacked; then
43875    depdir=$installdir
43876  fi
43877
43878      fi
43879      # Source the builddeps file again, because in the previous command, the depdir
43880      # was updated to point at the current build dependency install directory.
43881      . $builddepsfile
43882      # Now extract variables from the builddeps.conf files.
43883      theroot=${builddep_freetype2_ROOT}
43884      thecflags=${builddep_freetype2_CFLAGS}
43885      thelibs=${builddep_freetype2_LIBS}
43886      if test "x$depdir" = x; then
43887        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
43888      fi
43889      FREETYPE=$depdir
43890      if test "x$theroot" != x; then
43891        FREETYPE="$theroot"
43892      fi
43893      if test "x$thecflags" != x; then
43894        FREETYPE_CFLAGS="$thecflags"
43895      fi
43896      if test "x$thelibs" != x; then
43897        FREETYPE_LIBS="$thelibs"
43898      fi
43899      FOUND_FREETYPE=yes
43900      else FOUND_FREETYPE=no
43901
43902    fi
43903    else FOUND_FREETYPE=no
43904
43905  fi
43906
43907        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
43908        if test "x$FOUND_FREETYPE" = xyes; then
43909          if test "x$BUNDLE_FREETYPE" = xyes; then
43910            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
43911$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
43912            FOUND_FREETYPE=no
43913          else
43914            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
43915$as_echo_n "checking for freetype... " >&6; }
43916            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
43917$as_echo "yes (using builddeps)" >&6; }
43918          fi
43919        fi
43920      fi
43921
43922      if test "x$FOUND_FREETYPE" != xyes; then
43923        # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
43924        if test "x$PKG_CONFIG" != x; then
43925
43926pkg_failed=no
43927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
43928$as_echo_n "checking for FREETYPE... " >&6; }
43929
43930if test -n "$FREETYPE_CFLAGS"; then
43931    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
43932 elif test -n "$PKG_CONFIG"; then
43933    if test -n "$PKG_CONFIG" && \
43934    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43935  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43936  ac_status=$?
43937  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43938  test $ac_status = 0; }; then
43939  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
43940else
43941  pkg_failed=yes
43942fi
43943 else
43944    pkg_failed=untried
43945fi
43946if test -n "$FREETYPE_LIBS"; then
43947    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
43948 elif test -n "$PKG_CONFIG"; then
43949    if test -n "$PKG_CONFIG" && \
43950    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43951  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43952  ac_status=$?
43953  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43954  test $ac_status = 0; }; then
43955  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
43956else
43957  pkg_failed=yes
43958fi
43959 else
43960    pkg_failed=untried
43961fi
43962
43963
43964
43965if test $pkg_failed = yes; then
43966
43967if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
43968        _pkg_short_errors_supported=yes
43969else
43970        _pkg_short_errors_supported=no
43971fi
43972        if test $_pkg_short_errors_supported = yes; then
43973	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
43974        else
43975	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
43976        fi
43977	# Put the nasty error message in config.log where it belongs
43978	echo "$FREETYPE_PKG_ERRORS" >&5
43979
43980	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43981$as_echo "no" >&6; }
43982                FOUND_FREETYPE=no
43983elif test $pkg_failed = untried; then
43984	FOUND_FREETYPE=no
43985else
43986	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
43987	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
43988        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43989$as_echo "yes" >&6; }
43990	FOUND_FREETYPE=yes
43991fi
43992          if test "x$FOUND_FREETYPE" = xyes; then
43993            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
43994            FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
43995            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
43996            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
43997              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
43998            fi
43999            # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44000            if test "x$BUNDLE_FREETYPE" = xyes; then
44001              { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
44002$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
44003              FOUND_FREETYPE=no
44004            else
44005              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44006$as_echo_n "checking for freetype... " >&6; }
44007              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
44008$as_echo "yes (using pkg-config)" >&6; }
44009            fi
44010          fi
44011        fi
44012      fi
44013
44014      if test "x$FOUND_FREETYPE" != xyes; then
44015        # Check in well-known locations
44016        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44017          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
44018
44019  windows_path="$FREETYPE_BASE_DIR"
44020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44021    unix_path=`$CYGPATH -u "$windows_path"`
44022    FREETYPE_BASE_DIR="$unix_path"
44023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44025    FREETYPE_BASE_DIR="$unix_path"
44026  fi
44027
44028
44029  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44030  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44031  METHOD="well-known location"
44032
44033  # First check if the files exists.
44034  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44035    # We found an arbitrary include file. That's a good sign.
44036    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44037$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44038    FOUND_FREETYPE=yes
44039
44040    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44041    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44042      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44043$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44044      FOUND_FREETYPE=no
44045    else
44046      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44047        # On Windows, we will need both .lib and .dll file.
44048        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44049          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44050$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44051          FOUND_FREETYPE=no
44052        fi
44053      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
44054        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44055        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44056      fi
44057    fi
44058  fi
44059
44060  if test "x$FOUND_FREETYPE" = xyes; then
44061
44062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44063
44064  # Input might be given as Windows format, start by converting to
44065  # unix format.
44066  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44067  new_path=`$CYGPATH -u "$path"`
44068
44069  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44070  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44071  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44072  # "foo.exe" is OK but "foo" is an error.
44073  #
44074  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44075  # It is also a way to make sure we got the proper file name for the real test later on.
44076  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44077  if test "x$test_shortpath" = x; then
44078    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44079$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44080    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44081  fi
44082
44083  # Call helper function which possibly converts this using DOS-style short mode.
44084  # If so, the updated path is stored in $new_path.
44085
44086  input_path="$new_path"
44087  # Check if we need to convert this using DOS-style short mode. If the path
44088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44089  # take no chances and rewrite it.
44090  # Note: m4 eats our [], so we need to use [ and ] instead.
44091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44092  if test "x$has_forbidden_chars" != x; then
44093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44094    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44095    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44096    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44097      # Going to short mode and back again did indeed matter. Since short mode is
44098      # case insensitive, let's make it lowercase to improve readability.
44099      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44100      # Now convert it back to Unix-stile (cygpath)
44101      input_path=`$CYGPATH -u "$shortmode_path"`
44102      new_path="$input_path"
44103    fi
44104  fi
44105
44106  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44107  if test "x$test_cygdrive_prefix" = x; then
44108    # As a simple fix, exclude /usr/bin since it's not a real path.
44109    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44110      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44111      # a path prefixed by /cygdrive for fixpath to work.
44112      new_path="$CYGWIN_ROOT_PATH$input_path"
44113    fi
44114  fi
44115
44116
44117  if test "x$path" != "x$new_path"; then
44118    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44119    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44120$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44121  fi
44122
44123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44124
44125  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44126  has_colon=`$ECHO $path | $GREP ^.:`
44127  new_path="$path"
44128  if test "x$has_colon" = x; then
44129    # Not in mixed or Windows style, start by that.
44130    new_path=`cmd //c echo $path`
44131  fi
44132
44133
44134  input_path="$new_path"
44135  # Check if we need to convert this using DOS-style short mode. If the path
44136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44137  # take no chances and rewrite it.
44138  # Note: m4 eats our [], so we need to use [ and ] instead.
44139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44140  if test "x$has_forbidden_chars" != x; then
44141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44142    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44143  fi
44144
44145
44146  windows_path="$new_path"
44147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44148    unix_path=`$CYGPATH -u "$windows_path"`
44149    new_path="$unix_path"
44150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44152    new_path="$unix_path"
44153  fi
44154
44155  if test "x$path" != "x$new_path"; then
44156    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44157    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44158$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44159  fi
44160
44161  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44162  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44163
44164  else
44165    # We're on a posix platform. Hooray! :)
44166    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44167    has_space=`$ECHO "$path" | $GREP " "`
44168    if test "x$has_space" != x; then
44169      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44170$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44171      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44172    fi
44173
44174    # Use eval to expand a potential ~
44175    eval path="$path"
44176    if test ! -f "$path" && test ! -d "$path"; then
44177      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44178    fi
44179
44180    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44181  fi
44182
44183
44184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44185
44186  # Input might be given as Windows format, start by converting to
44187  # unix format.
44188  path="$POTENTIAL_FREETYPE_LIB_PATH"
44189  new_path=`$CYGPATH -u "$path"`
44190
44191  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44192  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44193  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44194  # "foo.exe" is OK but "foo" is an error.
44195  #
44196  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44197  # It is also a way to make sure we got the proper file name for the real test later on.
44198  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44199  if test "x$test_shortpath" = x; then
44200    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44201$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44202    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44203  fi
44204
44205  # Call helper function which possibly converts this using DOS-style short mode.
44206  # If so, the updated path is stored in $new_path.
44207
44208  input_path="$new_path"
44209  # Check if we need to convert this using DOS-style short mode. If the path
44210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44211  # take no chances and rewrite it.
44212  # Note: m4 eats our [], so we need to use [ and ] instead.
44213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44214  if test "x$has_forbidden_chars" != x; then
44215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44216    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44217    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44218    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44219      # Going to short mode and back again did indeed matter. Since short mode is
44220      # case insensitive, let's make it lowercase to improve readability.
44221      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44222      # Now convert it back to Unix-stile (cygpath)
44223      input_path=`$CYGPATH -u "$shortmode_path"`
44224      new_path="$input_path"
44225    fi
44226  fi
44227
44228  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44229  if test "x$test_cygdrive_prefix" = x; then
44230    # As a simple fix, exclude /usr/bin since it's not a real path.
44231    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44232      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44233      # a path prefixed by /cygdrive for fixpath to work.
44234      new_path="$CYGWIN_ROOT_PATH$input_path"
44235    fi
44236  fi
44237
44238
44239  if test "x$path" != "x$new_path"; then
44240    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44242$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44243  fi
44244
44245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44246
44247  path="$POTENTIAL_FREETYPE_LIB_PATH"
44248  has_colon=`$ECHO $path | $GREP ^.:`
44249  new_path="$path"
44250  if test "x$has_colon" = x; then
44251    # Not in mixed or Windows style, start by that.
44252    new_path=`cmd //c echo $path`
44253  fi
44254
44255
44256  input_path="$new_path"
44257  # Check if we need to convert this using DOS-style short mode. If the path
44258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44259  # take no chances and rewrite it.
44260  # Note: m4 eats our [], so we need to use [ and ] instead.
44261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44262  if test "x$has_forbidden_chars" != x; then
44263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44264    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44265  fi
44266
44267
44268  windows_path="$new_path"
44269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44270    unix_path=`$CYGPATH -u "$windows_path"`
44271    new_path="$unix_path"
44272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44274    new_path="$unix_path"
44275  fi
44276
44277  if test "x$path" != "x$new_path"; then
44278    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44280$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44281  fi
44282
44283  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44284  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44285
44286  else
44287    # We're on a posix platform. Hooray! :)
44288    path="$POTENTIAL_FREETYPE_LIB_PATH"
44289    has_space=`$ECHO "$path" | $GREP " "`
44290    if test "x$has_space" != x; then
44291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44292$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44293      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44294    fi
44295
44296    # Use eval to expand a potential ~
44297    eval path="$path"
44298    if test ! -f "$path" && test ! -d "$path"; then
44299      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44300    fi
44301
44302    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44303  fi
44304
44305
44306    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44307    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44308$as_echo_n "checking for freetype includes... " >&6; }
44309    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44310$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44311    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44312    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44313$as_echo_n "checking for freetype libraries... " >&6; }
44314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44315$as_echo "$FREETYPE_LIB_PATH" >&6; }
44316  fi
44317
44318          if test "x$FOUND_FREETYPE" != xyes; then
44319            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
44320
44321  windows_path="$FREETYPE_BASE_DIR"
44322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44323    unix_path=`$CYGPATH -u "$windows_path"`
44324    FREETYPE_BASE_DIR="$unix_path"
44325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44327    FREETYPE_BASE_DIR="$unix_path"
44328  fi
44329
44330
44331  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44332  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44333  METHOD="well-known location"
44334
44335  # First check if the files exists.
44336  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44337    # We found an arbitrary include file. That's a good sign.
44338    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44339$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44340    FOUND_FREETYPE=yes
44341
44342    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44343    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44344      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44345$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44346      FOUND_FREETYPE=no
44347    else
44348      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44349        # On Windows, we will need both .lib and .dll file.
44350        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44351          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44352$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44353          FOUND_FREETYPE=no
44354        fi
44355      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
44356        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44357        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44358      fi
44359    fi
44360  fi
44361
44362  if test "x$FOUND_FREETYPE" = xyes; then
44363
44364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44365
44366  # Input might be given as Windows format, start by converting to
44367  # unix format.
44368  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44369  new_path=`$CYGPATH -u "$path"`
44370
44371  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44372  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44373  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44374  # "foo.exe" is OK but "foo" is an error.
44375  #
44376  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44377  # It is also a way to make sure we got the proper file name for the real test later on.
44378  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44379  if test "x$test_shortpath" = x; then
44380    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44381$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44382    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44383  fi
44384
44385  # Call helper function which possibly converts this using DOS-style short mode.
44386  # If so, the updated path is stored in $new_path.
44387
44388  input_path="$new_path"
44389  # Check if we need to convert this using DOS-style short mode. If the path
44390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44391  # take no chances and rewrite it.
44392  # Note: m4 eats our [], so we need to use [ and ] instead.
44393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44394  if test "x$has_forbidden_chars" != x; then
44395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44396    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44397    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44398    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44399      # Going to short mode and back again did indeed matter. Since short mode is
44400      # case insensitive, let's make it lowercase to improve readability.
44401      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44402      # Now convert it back to Unix-stile (cygpath)
44403      input_path=`$CYGPATH -u "$shortmode_path"`
44404      new_path="$input_path"
44405    fi
44406  fi
44407
44408  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44409  if test "x$test_cygdrive_prefix" = x; then
44410    # As a simple fix, exclude /usr/bin since it's not a real path.
44411    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44412      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44413      # a path prefixed by /cygdrive for fixpath to work.
44414      new_path="$CYGWIN_ROOT_PATH$input_path"
44415    fi
44416  fi
44417
44418
44419  if test "x$path" != "x$new_path"; then
44420    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44422$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44423  fi
44424
44425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44426
44427  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44428  has_colon=`$ECHO $path | $GREP ^.:`
44429  new_path="$path"
44430  if test "x$has_colon" = x; then
44431    # Not in mixed or Windows style, start by that.
44432    new_path=`cmd //c echo $path`
44433  fi
44434
44435
44436  input_path="$new_path"
44437  # Check if we need to convert this using DOS-style short mode. If the path
44438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44439  # take no chances and rewrite it.
44440  # Note: m4 eats our [], so we need to use [ and ] instead.
44441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44442  if test "x$has_forbidden_chars" != x; then
44443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44445  fi
44446
44447
44448  windows_path="$new_path"
44449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44450    unix_path=`$CYGPATH -u "$windows_path"`
44451    new_path="$unix_path"
44452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44454    new_path="$unix_path"
44455  fi
44456
44457  if test "x$path" != "x$new_path"; then
44458    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44460$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44461  fi
44462
44463  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44464  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44465
44466  else
44467    # We're on a posix platform. Hooray! :)
44468    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44469    has_space=`$ECHO "$path" | $GREP " "`
44470    if test "x$has_space" != x; then
44471      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44472$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44473      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44474    fi
44475
44476    # Use eval to expand a potential ~
44477    eval path="$path"
44478    if test ! -f "$path" && test ! -d "$path"; then
44479      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44480    fi
44481
44482    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44483  fi
44484
44485
44486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44487
44488  # Input might be given as Windows format, start by converting to
44489  # unix format.
44490  path="$POTENTIAL_FREETYPE_LIB_PATH"
44491  new_path=`$CYGPATH -u "$path"`
44492
44493  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44494  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44495  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44496  # "foo.exe" is OK but "foo" is an error.
44497  #
44498  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44499  # It is also a way to make sure we got the proper file name for the real test later on.
44500  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44501  if test "x$test_shortpath" = x; then
44502    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44503$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44504    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44505  fi
44506
44507  # Call helper function which possibly converts this using DOS-style short mode.
44508  # If so, the updated path is stored in $new_path.
44509
44510  input_path="$new_path"
44511  # Check if we need to convert this using DOS-style short mode. If the path
44512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44513  # take no chances and rewrite it.
44514  # Note: m4 eats our [], so we need to use [ and ] instead.
44515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44516  if test "x$has_forbidden_chars" != x; then
44517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44518    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44519    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44520    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44521      # Going to short mode and back again did indeed matter. Since short mode is
44522      # case insensitive, let's make it lowercase to improve readability.
44523      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44524      # Now convert it back to Unix-stile (cygpath)
44525      input_path=`$CYGPATH -u "$shortmode_path"`
44526      new_path="$input_path"
44527    fi
44528  fi
44529
44530  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44531  if test "x$test_cygdrive_prefix" = x; then
44532    # As a simple fix, exclude /usr/bin since it's not a real path.
44533    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44534      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44535      # a path prefixed by /cygdrive for fixpath to work.
44536      new_path="$CYGWIN_ROOT_PATH$input_path"
44537    fi
44538  fi
44539
44540
44541  if test "x$path" != "x$new_path"; then
44542    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44543    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44544$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44545  fi
44546
44547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44548
44549  path="$POTENTIAL_FREETYPE_LIB_PATH"
44550  has_colon=`$ECHO $path | $GREP ^.:`
44551  new_path="$path"
44552  if test "x$has_colon" = x; then
44553    # Not in mixed or Windows style, start by that.
44554    new_path=`cmd //c echo $path`
44555  fi
44556
44557
44558  input_path="$new_path"
44559  # Check if we need to convert this using DOS-style short mode. If the path
44560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44561  # take no chances and rewrite it.
44562  # Note: m4 eats our [], so we need to use [ and ] instead.
44563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44564  if test "x$has_forbidden_chars" != x; then
44565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44566    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44567  fi
44568
44569
44570  windows_path="$new_path"
44571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44572    unix_path=`$CYGPATH -u "$windows_path"`
44573    new_path="$unix_path"
44574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44576    new_path="$unix_path"
44577  fi
44578
44579  if test "x$path" != "x$new_path"; then
44580    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44581    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44582$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44583  fi
44584
44585  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44586  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44587
44588  else
44589    # We're on a posix platform. Hooray! :)
44590    path="$POTENTIAL_FREETYPE_LIB_PATH"
44591    has_space=`$ECHO "$path" | $GREP " "`
44592    if test "x$has_space" != x; then
44593      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44594$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44595      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44596    fi
44597
44598    # Use eval to expand a potential ~
44599    eval path="$path"
44600    if test ! -f "$path" && test ! -d "$path"; then
44601      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44602    fi
44603
44604    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44605  fi
44606
44607
44608    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44609    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44610$as_echo_n "checking for freetype includes... " >&6; }
44611    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44612$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44613    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44614    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44615$as_echo_n "checking for freetype libraries... " >&6; }
44616    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44617$as_echo "$FREETYPE_LIB_PATH" >&6; }
44618  fi
44619
44620          fi
44621        else
44622          if test "x$SYS_ROOT" = "x/"; then
44623            FREETYPE_ROOT=
44624          else
44625            FREETYPE_ROOT="$SYS_ROOT"
44626          fi
44627          FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
44628
44629  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44630  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44631  METHOD="well-known location"
44632
44633  # First check if the files exists.
44634  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44635    # We found an arbitrary include file. That's a good sign.
44636    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44637$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44638    FOUND_FREETYPE=yes
44639
44640    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44641    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44642      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44643$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44644      FOUND_FREETYPE=no
44645    else
44646      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44647        # On Windows, we will need both .lib and .dll file.
44648        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44649          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44650$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44651          FOUND_FREETYPE=no
44652        fi
44653      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
44654        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44655        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44656      fi
44657    fi
44658  fi
44659
44660  if test "x$FOUND_FREETYPE" = xyes; then
44661
44662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44663
44664  # Input might be given as Windows format, start by converting to
44665  # unix format.
44666  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44667  new_path=`$CYGPATH -u "$path"`
44668
44669  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44670  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44671  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44672  # "foo.exe" is OK but "foo" is an error.
44673  #
44674  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44675  # It is also a way to make sure we got the proper file name for the real test later on.
44676  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44677  if test "x$test_shortpath" = x; then
44678    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44679$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44680    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44681  fi
44682
44683  # Call helper function which possibly converts this using DOS-style short mode.
44684  # If so, the updated path is stored in $new_path.
44685
44686  input_path="$new_path"
44687  # Check if we need to convert this using DOS-style short mode. If the path
44688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44689  # take no chances and rewrite it.
44690  # Note: m4 eats our [], so we need to use [ and ] instead.
44691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44692  if test "x$has_forbidden_chars" != x; then
44693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44694    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44695    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44696    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44697      # Going to short mode and back again did indeed matter. Since short mode is
44698      # case insensitive, let's make it lowercase to improve readability.
44699      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44700      # Now convert it back to Unix-stile (cygpath)
44701      input_path=`$CYGPATH -u "$shortmode_path"`
44702      new_path="$input_path"
44703    fi
44704  fi
44705
44706  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44707  if test "x$test_cygdrive_prefix" = x; then
44708    # As a simple fix, exclude /usr/bin since it's not a real path.
44709    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44710      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44711      # a path prefixed by /cygdrive for fixpath to work.
44712      new_path="$CYGWIN_ROOT_PATH$input_path"
44713    fi
44714  fi
44715
44716
44717  if test "x$path" != "x$new_path"; then
44718    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44720$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44721  fi
44722
44723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44724
44725  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44726  has_colon=`$ECHO $path | $GREP ^.:`
44727  new_path="$path"
44728  if test "x$has_colon" = x; then
44729    # Not in mixed or Windows style, start by that.
44730    new_path=`cmd //c echo $path`
44731  fi
44732
44733
44734  input_path="$new_path"
44735  # Check if we need to convert this using DOS-style short mode. If the path
44736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44737  # take no chances and rewrite it.
44738  # Note: m4 eats our [], so we need to use [ and ] instead.
44739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44740  if test "x$has_forbidden_chars" != x; then
44741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44742    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44743  fi
44744
44745
44746  windows_path="$new_path"
44747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44748    unix_path=`$CYGPATH -u "$windows_path"`
44749    new_path="$unix_path"
44750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44752    new_path="$unix_path"
44753  fi
44754
44755  if test "x$path" != "x$new_path"; then
44756    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44758$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44759  fi
44760
44761  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44762  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44763
44764  else
44765    # We're on a posix platform. Hooray! :)
44766    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44767    has_space=`$ECHO "$path" | $GREP " "`
44768    if test "x$has_space" != x; then
44769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44770$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44771      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44772    fi
44773
44774    # Use eval to expand a potential ~
44775    eval path="$path"
44776    if test ! -f "$path" && test ! -d "$path"; then
44777      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44778    fi
44779
44780    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44781  fi
44782
44783
44784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44785
44786  # Input might be given as Windows format, start by converting to
44787  # unix format.
44788  path="$POTENTIAL_FREETYPE_LIB_PATH"
44789  new_path=`$CYGPATH -u "$path"`
44790
44791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44794  # "foo.exe" is OK but "foo" is an error.
44795  #
44796  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44797  # It is also a way to make sure we got the proper file name for the real test later on.
44798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44799  if test "x$test_shortpath" = x; then
44800    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44801$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44802    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44803  fi
44804
44805  # Call helper function which possibly converts this using DOS-style short mode.
44806  # If so, the updated path is stored in $new_path.
44807
44808  input_path="$new_path"
44809  # Check if we need to convert this using DOS-style short mode. If the path
44810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44811  # take no chances and rewrite it.
44812  # Note: m4 eats our [], so we need to use [ and ] instead.
44813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44814  if test "x$has_forbidden_chars" != x; then
44815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44819      # Going to short mode and back again did indeed matter. Since short mode is
44820      # case insensitive, let's make it lowercase to improve readability.
44821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44822      # Now convert it back to Unix-stile (cygpath)
44823      input_path=`$CYGPATH -u "$shortmode_path"`
44824      new_path="$input_path"
44825    fi
44826  fi
44827
44828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44829  if test "x$test_cygdrive_prefix" = x; then
44830    # As a simple fix, exclude /usr/bin since it's not a real path.
44831    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44833      # a path prefixed by /cygdrive for fixpath to work.
44834      new_path="$CYGWIN_ROOT_PATH$input_path"
44835    fi
44836  fi
44837
44838
44839  if test "x$path" != "x$new_path"; then
44840    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44842$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44843  fi
44844
44845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44846
44847  path="$POTENTIAL_FREETYPE_LIB_PATH"
44848  has_colon=`$ECHO $path | $GREP ^.:`
44849  new_path="$path"
44850  if test "x$has_colon" = x; then
44851    # Not in mixed or Windows style, start by that.
44852    new_path=`cmd //c echo $path`
44853  fi
44854
44855
44856  input_path="$new_path"
44857  # Check if we need to convert this using DOS-style short mode. If the path
44858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44859  # take no chances and rewrite it.
44860  # Note: m4 eats our [], so we need to use [ and ] instead.
44861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44862  if test "x$has_forbidden_chars" != x; then
44863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44865  fi
44866
44867
44868  windows_path="$new_path"
44869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44870    unix_path=`$CYGPATH -u "$windows_path"`
44871    new_path="$unix_path"
44872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44874    new_path="$unix_path"
44875  fi
44876
44877  if test "x$path" != "x$new_path"; then
44878    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44880$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44881  fi
44882
44883  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44884  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44885
44886  else
44887    # We're on a posix platform. Hooray! :)
44888    path="$POTENTIAL_FREETYPE_LIB_PATH"
44889    has_space=`$ECHO "$path" | $GREP " "`
44890    if test "x$has_space" != x; then
44891      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44892$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44893      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44894    fi
44895
44896    # Use eval to expand a potential ~
44897    eval path="$path"
44898    if test ! -f "$path" && test ! -d "$path"; then
44899      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44900    fi
44901
44902    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44903  fi
44904
44905
44906    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44907    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44908$as_echo_n "checking for freetype includes... " >&6; }
44909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44910$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44911    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44912    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44913$as_echo_n "checking for freetype libraries... " >&6; }
44914    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44915$as_echo "$FREETYPE_LIB_PATH" >&6; }
44916  fi
44917
44918
44919          if test "x$FOUND_FREETYPE" != xyes; then
44920            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
44921
44922  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44923  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44924  METHOD="well-known location"
44925
44926  # First check if the files exists.
44927  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44928    # We found an arbitrary include file. That's a good sign.
44929    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44930$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44931    FOUND_FREETYPE=yes
44932
44933    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44934    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44935      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44936$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44937      FOUND_FREETYPE=no
44938    else
44939      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44940        # On Windows, we will need both .lib and .dll file.
44941        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44942          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44943$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44944          FOUND_FREETYPE=no
44945        fi
44946      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
44947        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44948        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44949      fi
44950    fi
44951  fi
44952
44953  if test "x$FOUND_FREETYPE" = xyes; then
44954
44955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44956
44957  # Input might be given as Windows format, start by converting to
44958  # unix format.
44959  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44960  new_path=`$CYGPATH -u "$path"`
44961
44962  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44963  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44964  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44965  # "foo.exe" is OK but "foo" is an error.
44966  #
44967  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44968  # It is also a way to make sure we got the proper file name for the real test later on.
44969  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44970  if test "x$test_shortpath" = x; then
44971    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44972$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44973    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44974  fi
44975
44976  # Call helper function which possibly converts this using DOS-style short mode.
44977  # If so, the updated path is stored in $new_path.
44978
44979  input_path="$new_path"
44980  # Check if we need to convert this using DOS-style short mode. If the path
44981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44982  # take no chances and rewrite it.
44983  # Note: m4 eats our [], so we need to use [ and ] instead.
44984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44985  if test "x$has_forbidden_chars" != x; then
44986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44987    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44988    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44989    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44990      # Going to short mode and back again did indeed matter. Since short mode is
44991      # case insensitive, let's make it lowercase to improve readability.
44992      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44993      # Now convert it back to Unix-stile (cygpath)
44994      input_path=`$CYGPATH -u "$shortmode_path"`
44995      new_path="$input_path"
44996    fi
44997  fi
44998
44999  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45000  if test "x$test_cygdrive_prefix" = x; then
45001    # As a simple fix, exclude /usr/bin since it's not a real path.
45002    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45003      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45004      # a path prefixed by /cygdrive for fixpath to work.
45005      new_path="$CYGWIN_ROOT_PATH$input_path"
45006    fi
45007  fi
45008
45009
45010  if test "x$path" != "x$new_path"; then
45011    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45013$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45014  fi
45015
45016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45017
45018  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45019  has_colon=`$ECHO $path | $GREP ^.:`
45020  new_path="$path"
45021  if test "x$has_colon" = x; then
45022    # Not in mixed or Windows style, start by that.
45023    new_path=`cmd //c echo $path`
45024  fi
45025
45026
45027  input_path="$new_path"
45028  # Check if we need to convert this using DOS-style short mode. If the path
45029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45030  # take no chances and rewrite it.
45031  # Note: m4 eats our [], so we need to use [ and ] instead.
45032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45033  if test "x$has_forbidden_chars" != x; then
45034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45035    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45036  fi
45037
45038
45039  windows_path="$new_path"
45040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45041    unix_path=`$CYGPATH -u "$windows_path"`
45042    new_path="$unix_path"
45043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45045    new_path="$unix_path"
45046  fi
45047
45048  if test "x$path" != "x$new_path"; then
45049    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45051$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45052  fi
45053
45054  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45055  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45056
45057  else
45058    # We're on a posix platform. Hooray! :)
45059    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45060    has_space=`$ECHO "$path" | $GREP " "`
45061    if test "x$has_space" != x; then
45062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45063$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45064      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45065    fi
45066
45067    # Use eval to expand a potential ~
45068    eval path="$path"
45069    if test ! -f "$path" && test ! -d "$path"; then
45070      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45071    fi
45072
45073    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45074  fi
45075
45076
45077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45078
45079  # Input might be given as Windows format, start by converting to
45080  # unix format.
45081  path="$POTENTIAL_FREETYPE_LIB_PATH"
45082  new_path=`$CYGPATH -u "$path"`
45083
45084  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45085  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45086  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45087  # "foo.exe" is OK but "foo" is an error.
45088  #
45089  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45090  # It is also a way to make sure we got the proper file name for the real test later on.
45091  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45092  if test "x$test_shortpath" = x; then
45093    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45094$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45095    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45096  fi
45097
45098  # Call helper function which possibly converts this using DOS-style short mode.
45099  # If so, the updated path is stored in $new_path.
45100
45101  input_path="$new_path"
45102  # Check if we need to convert this using DOS-style short mode. If the path
45103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45104  # take no chances and rewrite it.
45105  # Note: m4 eats our [], so we need to use [ and ] instead.
45106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45107  if test "x$has_forbidden_chars" != x; then
45108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45109    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45110    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45111    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45112      # Going to short mode and back again did indeed matter. Since short mode is
45113      # case insensitive, let's make it lowercase to improve readability.
45114      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45115      # Now convert it back to Unix-stile (cygpath)
45116      input_path=`$CYGPATH -u "$shortmode_path"`
45117      new_path="$input_path"
45118    fi
45119  fi
45120
45121  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45122  if test "x$test_cygdrive_prefix" = x; then
45123    # As a simple fix, exclude /usr/bin since it's not a real path.
45124    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45125      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45126      # a path prefixed by /cygdrive for fixpath to work.
45127      new_path="$CYGWIN_ROOT_PATH$input_path"
45128    fi
45129  fi
45130
45131
45132  if test "x$path" != "x$new_path"; then
45133    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45135$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45136  fi
45137
45138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45139
45140  path="$POTENTIAL_FREETYPE_LIB_PATH"
45141  has_colon=`$ECHO $path | $GREP ^.:`
45142  new_path="$path"
45143  if test "x$has_colon" = x; then
45144    # Not in mixed or Windows style, start by that.
45145    new_path=`cmd //c echo $path`
45146  fi
45147
45148
45149  input_path="$new_path"
45150  # Check if we need to convert this using DOS-style short mode. If the path
45151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45152  # take no chances and rewrite it.
45153  # Note: m4 eats our [], so we need to use [ and ] instead.
45154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45155  if test "x$has_forbidden_chars" != x; then
45156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45157    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45158  fi
45159
45160
45161  windows_path="$new_path"
45162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45163    unix_path=`$CYGPATH -u "$windows_path"`
45164    new_path="$unix_path"
45165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45167    new_path="$unix_path"
45168  fi
45169
45170  if test "x$path" != "x$new_path"; then
45171    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45172    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45173$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45174  fi
45175
45176  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45177  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45178
45179  else
45180    # We're on a posix platform. Hooray! :)
45181    path="$POTENTIAL_FREETYPE_LIB_PATH"
45182    has_space=`$ECHO "$path" | $GREP " "`
45183    if test "x$has_space" != x; then
45184      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45185$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45186      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45187    fi
45188
45189    # Use eval to expand a potential ~
45190    eval path="$path"
45191    if test ! -f "$path" && test ! -d "$path"; then
45192      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45193    fi
45194
45195    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45196  fi
45197
45198
45199    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45200    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45201$as_echo_n "checking for freetype includes... " >&6; }
45202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45203$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45204    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45205    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45206$as_echo_n "checking for freetype libraries... " >&6; }
45207    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45208$as_echo "$FREETYPE_LIB_PATH" >&6; }
45209  fi
45210
45211          fi
45212
45213          if test "x$FOUND_FREETYPE" != xyes; then
45214            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
45215            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45216
45217  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45218  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
45219  METHOD="well-known location"
45220
45221  # First check if the files exists.
45222  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45223    # We found an arbitrary include file. That's a good sign.
45224    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45225$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45226    FOUND_FREETYPE=yes
45227
45228    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45229    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45230      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45231$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45232      FOUND_FREETYPE=no
45233    else
45234      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45235        # On Windows, we will need both .lib and .dll file.
45236        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45237          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45238$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45239          FOUND_FREETYPE=no
45240        fi
45241      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
45242        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45243        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45244      fi
45245    fi
45246  fi
45247
45248  if test "x$FOUND_FREETYPE" = xyes; then
45249
45250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45251
45252  # Input might be given as Windows format, start by converting to
45253  # unix format.
45254  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45255  new_path=`$CYGPATH -u "$path"`
45256
45257  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45258  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45259  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45260  # "foo.exe" is OK but "foo" is an error.
45261  #
45262  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45263  # It is also a way to make sure we got the proper file name for the real test later on.
45264  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45265  if test "x$test_shortpath" = x; then
45266    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45267$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45268    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45269  fi
45270
45271  # Call helper function which possibly converts this using DOS-style short mode.
45272  # If so, the updated path is stored in $new_path.
45273
45274  input_path="$new_path"
45275  # Check if we need to convert this using DOS-style short mode. If the path
45276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45277  # take no chances and rewrite it.
45278  # Note: m4 eats our [], so we need to use [ and ] instead.
45279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45280  if test "x$has_forbidden_chars" != x; then
45281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45282    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45283    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45284    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45285      # Going to short mode and back again did indeed matter. Since short mode is
45286      # case insensitive, let's make it lowercase to improve readability.
45287      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45288      # Now convert it back to Unix-stile (cygpath)
45289      input_path=`$CYGPATH -u "$shortmode_path"`
45290      new_path="$input_path"
45291    fi
45292  fi
45293
45294  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45295  if test "x$test_cygdrive_prefix" = x; then
45296    # As a simple fix, exclude /usr/bin since it's not a real path.
45297    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45298      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45299      # a path prefixed by /cygdrive for fixpath to work.
45300      new_path="$CYGWIN_ROOT_PATH$input_path"
45301    fi
45302  fi
45303
45304
45305  if test "x$path" != "x$new_path"; then
45306    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45308$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45309  fi
45310
45311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45312
45313  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45314  has_colon=`$ECHO $path | $GREP ^.:`
45315  new_path="$path"
45316  if test "x$has_colon" = x; then
45317    # Not in mixed or Windows style, start by that.
45318    new_path=`cmd //c echo $path`
45319  fi
45320
45321
45322  input_path="$new_path"
45323  # Check if we need to convert this using DOS-style short mode. If the path
45324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45325  # take no chances and rewrite it.
45326  # Note: m4 eats our [], so we need to use [ and ] instead.
45327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45328  if test "x$has_forbidden_chars" != x; then
45329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45330    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45331  fi
45332
45333
45334  windows_path="$new_path"
45335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45336    unix_path=`$CYGPATH -u "$windows_path"`
45337    new_path="$unix_path"
45338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45340    new_path="$unix_path"
45341  fi
45342
45343  if test "x$path" != "x$new_path"; then
45344    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45346$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45347  fi
45348
45349  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45350  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45351
45352  else
45353    # We're on a posix platform. Hooray! :)
45354    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45355    has_space=`$ECHO "$path" | $GREP " "`
45356    if test "x$has_space" != x; then
45357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45358$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45359      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45360    fi
45361
45362    # Use eval to expand a potential ~
45363    eval path="$path"
45364    if test ! -f "$path" && test ! -d "$path"; then
45365      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45366    fi
45367
45368    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45369  fi
45370
45371
45372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45373
45374  # Input might be given as Windows format, start by converting to
45375  # unix format.
45376  path="$POTENTIAL_FREETYPE_LIB_PATH"
45377  new_path=`$CYGPATH -u "$path"`
45378
45379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45382  # "foo.exe" is OK but "foo" is an error.
45383  #
45384  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45385  # It is also a way to make sure we got the proper file name for the real test later on.
45386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45387  if test "x$test_shortpath" = x; then
45388    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45389$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45390    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45391  fi
45392
45393  # Call helper function which possibly converts this using DOS-style short mode.
45394  # If so, the updated path is stored in $new_path.
45395
45396  input_path="$new_path"
45397  # Check if we need to convert this using DOS-style short mode. If the path
45398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45399  # take no chances and rewrite it.
45400  # Note: m4 eats our [], so we need to use [ and ] instead.
45401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45402  if test "x$has_forbidden_chars" != x; then
45403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45404    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45405    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45406    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45407      # Going to short mode and back again did indeed matter. Since short mode is
45408      # case insensitive, let's make it lowercase to improve readability.
45409      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45410      # Now convert it back to Unix-stile (cygpath)
45411      input_path=`$CYGPATH -u "$shortmode_path"`
45412      new_path="$input_path"
45413    fi
45414  fi
45415
45416  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45417  if test "x$test_cygdrive_prefix" = x; then
45418    # As a simple fix, exclude /usr/bin since it's not a real path.
45419    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45420      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45421      # a path prefixed by /cygdrive for fixpath to work.
45422      new_path="$CYGWIN_ROOT_PATH$input_path"
45423    fi
45424  fi
45425
45426
45427  if test "x$path" != "x$new_path"; then
45428    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45430$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45431  fi
45432
45433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45434
45435  path="$POTENTIAL_FREETYPE_LIB_PATH"
45436  has_colon=`$ECHO $path | $GREP ^.:`
45437  new_path="$path"
45438  if test "x$has_colon" = x; then
45439    # Not in mixed or Windows style, start by that.
45440    new_path=`cmd //c echo $path`
45441  fi
45442
45443
45444  input_path="$new_path"
45445  # Check if we need to convert this using DOS-style short mode. If the path
45446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45447  # take no chances and rewrite it.
45448  # Note: m4 eats our [], so we need to use [ and ] instead.
45449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45450  if test "x$has_forbidden_chars" != x; then
45451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45452    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45453  fi
45454
45455
45456  windows_path="$new_path"
45457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45458    unix_path=`$CYGPATH -u "$windows_path"`
45459    new_path="$unix_path"
45460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45462    new_path="$unix_path"
45463  fi
45464
45465  if test "x$path" != "x$new_path"; then
45466    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45468$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45469  fi
45470
45471  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45472  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45473
45474  else
45475    # We're on a posix platform. Hooray! :)
45476    path="$POTENTIAL_FREETYPE_LIB_PATH"
45477    has_space=`$ECHO "$path" | $GREP " "`
45478    if test "x$has_space" != x; then
45479      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45480$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45481      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45482    fi
45483
45484    # Use eval to expand a potential ~
45485    eval path="$path"
45486    if test ! -f "$path" && test ! -d "$path"; then
45487      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45488    fi
45489
45490    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45491  fi
45492
45493
45494    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45495    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45496$as_echo_n "checking for freetype includes... " >&6; }
45497    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45498$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45499    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45500    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45501$as_echo_n "checking for freetype libraries... " >&6; }
45502    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45503$as_echo "$FREETYPE_LIB_PATH" >&6; }
45504  fi
45505
45506            else
45507
45508  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45509  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
45510  METHOD="well-known location"
45511
45512  # First check if the files exists.
45513  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45514    # We found an arbitrary include file. That's a good sign.
45515    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45516$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45517    FOUND_FREETYPE=yes
45518
45519    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45520    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45521      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45522$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45523      FOUND_FREETYPE=no
45524    else
45525      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45526        # On Windows, we will need both .lib and .dll file.
45527        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45528          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45529$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45530          FOUND_FREETYPE=no
45531        fi
45532      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
45533        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45534        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45535      fi
45536    fi
45537  fi
45538
45539  if test "x$FOUND_FREETYPE" = xyes; then
45540
45541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45542
45543  # Input might be given as Windows format, start by converting to
45544  # unix format.
45545  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45546  new_path=`$CYGPATH -u "$path"`
45547
45548  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45549  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45550  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45551  # "foo.exe" is OK but "foo" is an error.
45552  #
45553  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45554  # It is also a way to make sure we got the proper file name for the real test later on.
45555  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45556  if test "x$test_shortpath" = x; then
45557    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45558$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45559    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45560  fi
45561
45562  # Call helper function which possibly converts this using DOS-style short mode.
45563  # If so, the updated path is stored in $new_path.
45564
45565  input_path="$new_path"
45566  # Check if we need to convert this using DOS-style short mode. If the path
45567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45568  # take no chances and rewrite it.
45569  # Note: m4 eats our [], so we need to use [ and ] instead.
45570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45571  if test "x$has_forbidden_chars" != x; then
45572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45573    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45574    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45575    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45576      # Going to short mode and back again did indeed matter. Since short mode is
45577      # case insensitive, let's make it lowercase to improve readability.
45578      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45579      # Now convert it back to Unix-stile (cygpath)
45580      input_path=`$CYGPATH -u "$shortmode_path"`
45581      new_path="$input_path"
45582    fi
45583  fi
45584
45585  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45586  if test "x$test_cygdrive_prefix" = x; then
45587    # As a simple fix, exclude /usr/bin since it's not a real path.
45588    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45589      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45590      # a path prefixed by /cygdrive for fixpath to work.
45591      new_path="$CYGWIN_ROOT_PATH$input_path"
45592    fi
45593  fi
45594
45595
45596  if test "x$path" != "x$new_path"; then
45597    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45599$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45600  fi
45601
45602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45603
45604  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45605  has_colon=`$ECHO $path | $GREP ^.:`
45606  new_path="$path"
45607  if test "x$has_colon" = x; then
45608    # Not in mixed or Windows style, start by that.
45609    new_path=`cmd //c echo $path`
45610  fi
45611
45612
45613  input_path="$new_path"
45614  # Check if we need to convert this using DOS-style short mode. If the path
45615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45616  # take no chances and rewrite it.
45617  # Note: m4 eats our [], so we need to use [ and ] instead.
45618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45619  if test "x$has_forbidden_chars" != x; then
45620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45621    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45622  fi
45623
45624
45625  windows_path="$new_path"
45626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45627    unix_path=`$CYGPATH -u "$windows_path"`
45628    new_path="$unix_path"
45629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45631    new_path="$unix_path"
45632  fi
45633
45634  if test "x$path" != "x$new_path"; then
45635    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45637$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45638  fi
45639
45640  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45641  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45642
45643  else
45644    # We're on a posix platform. Hooray! :)
45645    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45646    has_space=`$ECHO "$path" | $GREP " "`
45647    if test "x$has_space" != x; then
45648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45649$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45650      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45651    fi
45652
45653    # Use eval to expand a potential ~
45654    eval path="$path"
45655    if test ! -f "$path" && test ! -d "$path"; then
45656      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45657    fi
45658
45659    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45660  fi
45661
45662
45663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45664
45665  # Input might be given as Windows format, start by converting to
45666  # unix format.
45667  path="$POTENTIAL_FREETYPE_LIB_PATH"
45668  new_path=`$CYGPATH -u "$path"`
45669
45670  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45671  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45672  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45673  # "foo.exe" is OK but "foo" is an error.
45674  #
45675  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45676  # It is also a way to make sure we got the proper file name for the real test later on.
45677  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45678  if test "x$test_shortpath" = x; then
45679    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45680$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45681    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45682  fi
45683
45684  # Call helper function which possibly converts this using DOS-style short mode.
45685  # If so, the updated path is stored in $new_path.
45686
45687  input_path="$new_path"
45688  # Check if we need to convert this using DOS-style short mode. If the path
45689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45690  # take no chances and rewrite it.
45691  # Note: m4 eats our [], so we need to use [ and ] instead.
45692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45693  if test "x$has_forbidden_chars" != x; then
45694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45695    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45696    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45697    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45698      # Going to short mode and back again did indeed matter. Since short mode is
45699      # case insensitive, let's make it lowercase to improve readability.
45700      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45701      # Now convert it back to Unix-stile (cygpath)
45702      input_path=`$CYGPATH -u "$shortmode_path"`
45703      new_path="$input_path"
45704    fi
45705  fi
45706
45707  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45708  if test "x$test_cygdrive_prefix" = x; then
45709    # As a simple fix, exclude /usr/bin since it's not a real path.
45710    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45711      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45712      # a path prefixed by /cygdrive for fixpath to work.
45713      new_path="$CYGWIN_ROOT_PATH$input_path"
45714    fi
45715  fi
45716
45717
45718  if test "x$path" != "x$new_path"; then
45719    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45721$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45722  fi
45723
45724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45725
45726  path="$POTENTIAL_FREETYPE_LIB_PATH"
45727  has_colon=`$ECHO $path | $GREP ^.:`
45728  new_path="$path"
45729  if test "x$has_colon" = x; then
45730    # Not in mixed or Windows style, start by that.
45731    new_path=`cmd //c echo $path`
45732  fi
45733
45734
45735  input_path="$new_path"
45736  # Check if we need to convert this using DOS-style short mode. If the path
45737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45738  # take no chances and rewrite it.
45739  # Note: m4 eats our [], so we need to use [ and ] instead.
45740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45741  if test "x$has_forbidden_chars" != x; then
45742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45743    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45744  fi
45745
45746
45747  windows_path="$new_path"
45748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45749    unix_path=`$CYGPATH -u "$windows_path"`
45750    new_path="$unix_path"
45751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45753    new_path="$unix_path"
45754  fi
45755
45756  if test "x$path" != "x$new_path"; then
45757    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45758    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45759$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45760  fi
45761
45762  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45763  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45764
45765  else
45766    # We're on a posix platform. Hooray! :)
45767    path="$POTENTIAL_FREETYPE_LIB_PATH"
45768    has_space=`$ECHO "$path" | $GREP " "`
45769    if test "x$has_space" != x; then
45770      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45771$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45772      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45773    fi
45774
45775    # Use eval to expand a potential ~
45776    eval path="$path"
45777    if test ! -f "$path" && test ! -d "$path"; then
45778      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45779    fi
45780
45781    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45782  fi
45783
45784
45785    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45786    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45787$as_echo_n "checking for freetype includes... " >&6; }
45788    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45789$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45790    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45791    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45792$as_echo_n "checking for freetype libraries... " >&6; }
45793    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45794$as_echo "$FREETYPE_LIB_PATH" >&6; }
45795  fi
45796
45797              if test "x$FOUND_FREETYPE" != xyes; then
45798
45799  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45800  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
45801  METHOD="well-known location"
45802
45803  # First check if the files exists.
45804  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45805    # We found an arbitrary include file. That's a good sign.
45806    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45807$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45808    FOUND_FREETYPE=yes
45809
45810    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45811    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45812      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45813$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45814      FOUND_FREETYPE=no
45815    else
45816      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45817        # On Windows, we will need both .lib and .dll file.
45818        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45819          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45820$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45821          FOUND_FREETYPE=no
45822        fi
45823      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
45824        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45825        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45826      fi
45827    fi
45828  fi
45829
45830  if test "x$FOUND_FREETYPE" = xyes; then
45831
45832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45833
45834  # Input might be given as Windows format, start by converting to
45835  # unix format.
45836  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45837  new_path=`$CYGPATH -u "$path"`
45838
45839  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45840  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45841  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45842  # "foo.exe" is OK but "foo" is an error.
45843  #
45844  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45845  # It is also a way to make sure we got the proper file name for the real test later on.
45846  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45847  if test "x$test_shortpath" = x; then
45848    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45849$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45850    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45851  fi
45852
45853  # Call helper function which possibly converts this using DOS-style short mode.
45854  # If so, the updated path is stored in $new_path.
45855
45856  input_path="$new_path"
45857  # Check if we need to convert this using DOS-style short mode. If the path
45858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45859  # take no chances and rewrite it.
45860  # Note: m4 eats our [], so we need to use [ and ] instead.
45861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45862  if test "x$has_forbidden_chars" != x; then
45863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45864    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45865    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45866    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45867      # Going to short mode and back again did indeed matter. Since short mode is
45868      # case insensitive, let's make it lowercase to improve readability.
45869      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45870      # Now convert it back to Unix-stile (cygpath)
45871      input_path=`$CYGPATH -u "$shortmode_path"`
45872      new_path="$input_path"
45873    fi
45874  fi
45875
45876  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45877  if test "x$test_cygdrive_prefix" = x; then
45878    # As a simple fix, exclude /usr/bin since it's not a real path.
45879    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45880      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45881      # a path prefixed by /cygdrive for fixpath to work.
45882      new_path="$CYGWIN_ROOT_PATH$input_path"
45883    fi
45884  fi
45885
45886
45887  if test "x$path" != "x$new_path"; then
45888    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45890$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45891  fi
45892
45893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45894
45895  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45896  has_colon=`$ECHO $path | $GREP ^.:`
45897  new_path="$path"
45898  if test "x$has_colon" = x; then
45899    # Not in mixed or Windows style, start by that.
45900    new_path=`cmd //c echo $path`
45901  fi
45902
45903
45904  input_path="$new_path"
45905  # Check if we need to convert this using DOS-style short mode. If the path
45906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45907  # take no chances and rewrite it.
45908  # Note: m4 eats our [], so we need to use [ and ] instead.
45909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45910  if test "x$has_forbidden_chars" != x; then
45911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45912    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45913  fi
45914
45915
45916  windows_path="$new_path"
45917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45918    unix_path=`$CYGPATH -u "$windows_path"`
45919    new_path="$unix_path"
45920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45922    new_path="$unix_path"
45923  fi
45924
45925  if test "x$path" != "x$new_path"; then
45926    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45928$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45929  fi
45930
45931  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45932  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45933
45934  else
45935    # We're on a posix platform. Hooray! :)
45936    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45937    has_space=`$ECHO "$path" | $GREP " "`
45938    if test "x$has_space" != x; then
45939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45940$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45941      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45942    fi
45943
45944    # Use eval to expand a potential ~
45945    eval path="$path"
45946    if test ! -f "$path" && test ! -d "$path"; then
45947      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45948    fi
45949
45950    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45951  fi
45952
45953
45954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45955
45956  # Input might be given as Windows format, start by converting to
45957  # unix format.
45958  path="$POTENTIAL_FREETYPE_LIB_PATH"
45959  new_path=`$CYGPATH -u "$path"`
45960
45961  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45962  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45963  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45964  # "foo.exe" is OK but "foo" is an error.
45965  #
45966  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45967  # It is also a way to make sure we got the proper file name for the real test later on.
45968  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45969  if test "x$test_shortpath" = x; then
45970    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45971$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45972    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45973  fi
45974
45975  # Call helper function which possibly converts this using DOS-style short mode.
45976  # If so, the updated path is stored in $new_path.
45977
45978  input_path="$new_path"
45979  # Check if we need to convert this using DOS-style short mode. If the path
45980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45981  # take no chances and rewrite it.
45982  # Note: m4 eats our [], so we need to use [ and ] instead.
45983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45984  if test "x$has_forbidden_chars" != x; then
45985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45986    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45987    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45988    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45989      # Going to short mode and back again did indeed matter. Since short mode is
45990      # case insensitive, let's make it lowercase to improve readability.
45991      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45992      # Now convert it back to Unix-stile (cygpath)
45993      input_path=`$CYGPATH -u "$shortmode_path"`
45994      new_path="$input_path"
45995    fi
45996  fi
45997
45998  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45999  if test "x$test_cygdrive_prefix" = x; then
46000    # As a simple fix, exclude /usr/bin since it's not a real path.
46001    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46002      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46003      # a path prefixed by /cygdrive for fixpath to work.
46004      new_path="$CYGWIN_ROOT_PATH$input_path"
46005    fi
46006  fi
46007
46008
46009  if test "x$path" != "x$new_path"; then
46010    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46012$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46013  fi
46014
46015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46016
46017  path="$POTENTIAL_FREETYPE_LIB_PATH"
46018  has_colon=`$ECHO $path | $GREP ^.:`
46019  new_path="$path"
46020  if test "x$has_colon" = x; then
46021    # Not in mixed or Windows style, start by that.
46022    new_path=`cmd //c echo $path`
46023  fi
46024
46025
46026  input_path="$new_path"
46027  # Check if we need to convert this using DOS-style short mode. If the path
46028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46029  # take no chances and rewrite it.
46030  # Note: m4 eats our [], so we need to use [ and ] instead.
46031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46032  if test "x$has_forbidden_chars" != x; then
46033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46034    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46035  fi
46036
46037
46038  windows_path="$new_path"
46039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46040    unix_path=`$CYGPATH -u "$windows_path"`
46041    new_path="$unix_path"
46042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46044    new_path="$unix_path"
46045  fi
46046
46047  if test "x$path" != "x$new_path"; then
46048    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46049    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46050$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46051  fi
46052
46053  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46054  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46055
46056  else
46057    # We're on a posix platform. Hooray! :)
46058    path="$POTENTIAL_FREETYPE_LIB_PATH"
46059    has_space=`$ECHO "$path" | $GREP " "`
46060    if test "x$has_space" != x; then
46061      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46062$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46063      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46064    fi
46065
46066    # Use eval to expand a potential ~
46067    eval path="$path"
46068    if test ! -f "$path" && test ! -d "$path"; then
46069      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46070    fi
46071
46072    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46073  fi
46074
46075
46076    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46077    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46078$as_echo_n "checking for freetype includes... " >&6; }
46079    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46080$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46081    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46082    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46083$as_echo_n "checking for freetype libraries... " >&6; }
46084    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46085$as_echo "$FREETYPE_LIB_PATH" >&6; }
46086  fi
46087
46088              fi
46089            fi
46090          fi
46091        fi
46092      fi # end check in well-known locations
46093
46094      if test "x$FOUND_FREETYPE" != xyes; then
46095
46096  # Print a helpful message on how to acquire the necessary build dependency.
46097  # freetype is the help tag: freetype, cups, pulse, alsa etc
46098  MISSING_DEPENDENCY=freetype
46099
46100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46101    cygwin_help $MISSING_DEPENDENCY
46102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46103    msys_help $MISSING_DEPENDENCY
46104  else
46105    PKGHANDLER_COMMAND=
46106
46107    case $PKGHANDLER in
46108      apt-get)
46109        apt_help     $MISSING_DEPENDENCY ;;
46110      yum)
46111        yum_help     $MISSING_DEPENDENCY ;;
46112      port)
46113        port_help    $MISSING_DEPENDENCY ;;
46114      pkgutil)
46115        pkgutil_help $MISSING_DEPENDENCY ;;
46116      pkgadd)
46117        pkgadd_help  $MISSING_DEPENDENCY ;;
46118    esac
46119
46120    if test "x$PKGHANDLER_COMMAND" != x; then
46121      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46122    fi
46123  fi
46124
46125        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
46126      fi
46127    fi # end user specified settings
46128
46129    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
46130    if test "x$FREETYPE_CFLAGS" = x; then
46131
46132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46133
46134  # Input might be given as Windows format, start by converting to
46135  # unix format.
46136  path="$FREETYPE_INCLUDE_PATH"
46137  new_path=`$CYGPATH -u "$path"`
46138
46139  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46140  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46141  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46142  # "foo.exe" is OK but "foo" is an error.
46143  #
46144  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46145  # It is also a way to make sure we got the proper file name for the real test later on.
46146  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46147  if test "x$test_shortpath" = x; then
46148    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46149$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46150    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
46151  fi
46152
46153  # Call helper function which possibly converts this using DOS-style short mode.
46154  # If so, the updated path is stored in $new_path.
46155
46156  input_path="$new_path"
46157  # Check if we need to convert this using DOS-style short mode. If the path
46158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46159  # take no chances and rewrite it.
46160  # Note: m4 eats our [], so we need to use [ and ] instead.
46161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46162  if test "x$has_forbidden_chars" != x; then
46163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46164    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46165    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46166    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46167      # Going to short mode and back again did indeed matter. Since short mode is
46168      # case insensitive, let's make it lowercase to improve readability.
46169      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46170      # Now convert it back to Unix-stile (cygpath)
46171      input_path=`$CYGPATH -u "$shortmode_path"`
46172      new_path="$input_path"
46173    fi
46174  fi
46175
46176  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46177  if test "x$test_cygdrive_prefix" = x; then
46178    # As a simple fix, exclude /usr/bin since it's not a real path.
46179    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46180      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46181      # a path prefixed by /cygdrive for fixpath to work.
46182      new_path="$CYGWIN_ROOT_PATH$input_path"
46183    fi
46184  fi
46185
46186
46187  if test "x$path" != "x$new_path"; then
46188    FREETYPE_INCLUDE_PATH="$new_path"
46189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46190$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46191  fi
46192
46193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46194
46195  path="$FREETYPE_INCLUDE_PATH"
46196  has_colon=`$ECHO $path | $GREP ^.:`
46197  new_path="$path"
46198  if test "x$has_colon" = x; then
46199    # Not in mixed or Windows style, start by that.
46200    new_path=`cmd //c echo $path`
46201  fi
46202
46203
46204  input_path="$new_path"
46205  # Check if we need to convert this using DOS-style short mode. If the path
46206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46207  # take no chances and rewrite it.
46208  # Note: m4 eats our [], so we need to use [ and ] instead.
46209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46210  if test "x$has_forbidden_chars" != x; then
46211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46212    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46213  fi
46214
46215
46216  windows_path="$new_path"
46217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46218    unix_path=`$CYGPATH -u "$windows_path"`
46219    new_path="$unix_path"
46220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46222    new_path="$unix_path"
46223  fi
46224
46225  if test "x$path" != "x$new_path"; then
46226    FREETYPE_INCLUDE_PATH="$new_path"
46227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46228$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46229  fi
46230
46231  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46232  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46233
46234  else
46235    # We're on a posix platform. Hooray! :)
46236    path="$FREETYPE_INCLUDE_PATH"
46237    has_space=`$ECHO "$path" | $GREP " "`
46238    if test "x$has_space" != x; then
46239      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46240$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46241      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46242    fi
46243
46244    # Use eval to expand a potential ~
46245    eval path="$path"
46246    if test ! -f "$path" && test ! -d "$path"; then
46247      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46248    fi
46249
46250    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46251  fi
46252
46253      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
46254        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
46255      else
46256        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
46257      fi
46258    fi
46259
46260    if test "x$FREETYPE_LIBS" = x; then
46261
46262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46263
46264  # Input might be given as Windows format, start by converting to
46265  # unix format.
46266  path="$FREETYPE_LIB_PATH"
46267  new_path=`$CYGPATH -u "$path"`
46268
46269  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46270  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46271  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46272  # "foo.exe" is OK but "foo" is an error.
46273  #
46274  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46275  # It is also a way to make sure we got the proper file name for the real test later on.
46276  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46277  if test "x$test_shortpath" = x; then
46278    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46279$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46280    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
46281  fi
46282
46283  # Call helper function which possibly converts this using DOS-style short mode.
46284  # If so, the updated path is stored in $new_path.
46285
46286  input_path="$new_path"
46287  # Check if we need to convert this using DOS-style short mode. If the path
46288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46289  # take no chances and rewrite it.
46290  # Note: m4 eats our [], so we need to use [ and ] instead.
46291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46292  if test "x$has_forbidden_chars" != x; then
46293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46294    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46295    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46296    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46297      # Going to short mode and back again did indeed matter. Since short mode is
46298      # case insensitive, let's make it lowercase to improve readability.
46299      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46300      # Now convert it back to Unix-stile (cygpath)
46301      input_path=`$CYGPATH -u "$shortmode_path"`
46302      new_path="$input_path"
46303    fi
46304  fi
46305
46306  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46307  if test "x$test_cygdrive_prefix" = x; then
46308    # As a simple fix, exclude /usr/bin since it's not a real path.
46309    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46310      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46311      # a path prefixed by /cygdrive for fixpath to work.
46312      new_path="$CYGWIN_ROOT_PATH$input_path"
46313    fi
46314  fi
46315
46316
46317  if test "x$path" != "x$new_path"; then
46318    FREETYPE_LIB_PATH="$new_path"
46319    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46320$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46321  fi
46322
46323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46324
46325  path="$FREETYPE_LIB_PATH"
46326  has_colon=`$ECHO $path | $GREP ^.:`
46327  new_path="$path"
46328  if test "x$has_colon" = x; then
46329    # Not in mixed or Windows style, start by that.
46330    new_path=`cmd //c echo $path`
46331  fi
46332
46333
46334  input_path="$new_path"
46335  # Check if we need to convert this using DOS-style short mode. If the path
46336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46337  # take no chances and rewrite it.
46338  # Note: m4 eats our [], so we need to use [ and ] instead.
46339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46340  if test "x$has_forbidden_chars" != x; then
46341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46342    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46343  fi
46344
46345
46346  windows_path="$new_path"
46347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46348    unix_path=`$CYGPATH -u "$windows_path"`
46349    new_path="$unix_path"
46350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46352    new_path="$unix_path"
46353  fi
46354
46355  if test "x$path" != "x$new_path"; then
46356    FREETYPE_LIB_PATH="$new_path"
46357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46358$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46359  fi
46360
46361  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46362  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46363
46364  else
46365    # We're on a posix platform. Hooray! :)
46366    path="$FREETYPE_LIB_PATH"
46367    has_space=`$ECHO "$path" | $GREP " "`
46368    if test "x$has_space" != x; then
46369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46370$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46371      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46372    fi
46373
46374    # Use eval to expand a potential ~
46375    eval path="$path"
46376    if test ! -f "$path" && test ! -d "$path"; then
46377      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46378    fi
46379
46380    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46381  fi
46382
46383      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46384        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
46385      else
46386        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
46387      fi
46388    fi
46389
46390    # Try to compile it
46391    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
46392$as_echo_n "checking if we can compile and link with freetype... " >&6; }
46393    ac_ext=cpp
46394ac_cpp='$CXXCPP $CPPFLAGS'
46395ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46396ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46397ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46398
46399    PREV_CXXCFLAGS="$CXXFLAGS"
46400    PREV_LIBS="$LIBS"
46401    PREV_CXX="$CXX"
46402    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
46403    LIBS="$LIBS $FREETYPE_LIBS"
46404    CXX="$FIXPATH $CXX"
46405    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46406/* end confdefs.h.  */
46407
46408          #include<ft2build.h>
46409          #include FT_FREETYPE_H
46410          int main () {
46411            FT_Init_FreeType(NULL);
46412            return 0;
46413          }
46414
46415_ACEOF
46416if ac_fn_cxx_try_link "$LINENO"; then :
46417
46418          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46419$as_echo "yes" >&6; }
46420
46421else
46422
46423          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46424$as_echo "no" >&6; }
46425          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
46426$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
46427          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
46428$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
46429
46430
46431  # Print a helpful message on how to acquire the necessary build dependency.
46432  # freetype is the help tag: freetype, cups, pulse, alsa etc
46433  MISSING_DEPENDENCY=freetype
46434
46435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46436    cygwin_help $MISSING_DEPENDENCY
46437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46438    msys_help $MISSING_DEPENDENCY
46439  else
46440    PKGHANDLER_COMMAND=
46441
46442    case $PKGHANDLER in
46443      apt-get)
46444        apt_help     $MISSING_DEPENDENCY ;;
46445      yum)
46446        yum_help     $MISSING_DEPENDENCY ;;
46447      port)
46448        port_help    $MISSING_DEPENDENCY ;;
46449      pkgutil)
46450        pkgutil_help $MISSING_DEPENDENCY ;;
46451      pkgadd)
46452        pkgadd_help  $MISSING_DEPENDENCY ;;
46453    esac
46454
46455    if test "x$PKGHANDLER_COMMAND" != x; then
46456      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46457    fi
46458  fi
46459
46460
46461          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
46462
46463
46464fi
46465rm -f core conftest.err conftest.$ac_objext \
46466    conftest$ac_exeext conftest.$ac_ext
46467    CXXCFLAGS="$PREV_CXXFLAGS"
46468    LIBS="$PREV_LIBS"
46469    CXX="$PREV_CXX"
46470    ac_ext=cpp
46471ac_cpp='$CXXCPP $CPPFLAGS'
46472ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46473ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46474ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46475
46476
46477    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
46478$as_echo_n "checking if we should bundle freetype... " >&6; }
46479    if test "x$BUNDLE_FREETYPE" = xyes; then
46480      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
46481    fi
46482    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
46483$as_echo "$BUNDLE_FREETYPE" >&6; }
46484
46485  fi # end freetype needed
46486
46487
46488
46489
46490
46491
46492
46493  ###############################################################################
46494  #
46495  # Check for alsa headers and libraries. Used on Linux/GNU systems.
46496  #
46497
46498# Check whether --with-alsa was given.
46499if test "${with_alsa+set}" = set; then :
46500  withval=$with_alsa;
46501fi
46502
46503
46504# Check whether --with-alsa-include was given.
46505if test "${with_alsa_include+set}" = set; then :
46506  withval=$with_alsa_include;
46507fi
46508
46509
46510# Check whether --with-alsa-lib was given.
46511if test "${with_alsa_lib+set}" = set; then :
46512  withval=$with_alsa_lib;
46513fi
46514
46515
46516  if test "x$ALSA_NOT_NEEDED" = xyes; then
46517    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
46518      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
46519$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
46520    fi
46521    ALSA_CFLAGS=
46522    ALSA_LIBS=
46523  else
46524    ALSA_FOUND=no
46525
46526    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
46527      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
46528    fi
46529
46530    if test "x${with_alsa}" != x; then
46531      ALSA_LIBS="-L${with_alsa}/lib -lasound"
46532      ALSA_CFLAGS="-I${with_alsa}/include"
46533      ALSA_FOUND=yes
46534    fi
46535    if test "x${with_alsa_include}" != x; then
46536      ALSA_CFLAGS="-I${with_alsa_include}"
46537      ALSA_FOUND=yes
46538    fi
46539    if test "x${with_alsa_lib}" != x; then
46540      ALSA_LIBS="-L${with_alsa_lib} -lasound"
46541      ALSA_FOUND=yes
46542    fi
46543    if test "x$ALSA_FOUND" = xno; then
46544
46545
46546  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
46547    # Source the builddeps file again, to make sure it uses the latest variables!
46548    . $builddepsfile
46549    # Look for a target and build machine specific resource!
46550    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
46551    if test "x$resource" = x; then
46552      # Ok, lets instead look for a target specific resource
46553      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
46554    fi
46555    if test "x$resource" = x; then
46556      # Ok, lets instead look for a build specific resource
46557      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
46558    fi
46559    if test "x$resource" = x; then
46560      # Ok, lets instead look for a generic resource
46561      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
46562      resource=${builddep_alsa}
46563    fi
46564    if test "x$resource" != x; then
46565      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
46566$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
46567      # If the resource in the builddeps.conf file is an existing directory,
46568      # for example /java/linux/cups
46569      if test -d ${resource}; then
46570        depdir=${resource}
46571      else
46572
46573  # alsa is for example mymodule
46574  # $resource is for example libs/general/libmymod_1_2_3.zip
46575  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
46576  # $with_builddeps_dir is for example /localhome/builddeps
46577  # depdir is the name of the variable into which we store the depdir, eg MYMOD
46578  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
46579  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
46580  filename=`basename $resource`
46581  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
46582  filebase=${filename%%.*}
46583  extension=${filename#*.}
46584  installdir=$with_builddeps_dir/$filebase
46585  if test ! -f $installdir/$filename.unpacked; then
46586    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
46587$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
46588    if test ! -d $installdir; then
46589      mkdir -p $installdir
46590    fi
46591    if test ! -d $installdir; then
46592      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
46593    fi
46594    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
46595    touch $tmpfile
46596    if test ! -f $tmpfile; then
46597      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
46598    fi
46599
46600  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
46601  # $tmpfile is the local file name for the downloaded file.
46602  VALID_TOOL=no
46603  if test "x$BDEPS_FTP" = xwget; then
46604    VALID_TOOL=yes
46605    wget -O $tmpfile $with_builddeps_server/$resource
46606  fi
46607  if test "x$BDEPS_FTP" = xlftp; then
46608    VALID_TOOL=yes
46609    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
46610  fi
46611  if test "x$BDEPS_FTP" = xftp; then
46612    VALID_TOOL=yes
46613    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
46614    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
46615    FTPUSERPWD=${FTPSERVER%%@*}
46616    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
46617      FTPUSER=${userpwd%%:*}
46618      FTPPWD=${userpwd#*@}
46619      FTPSERVER=${FTPSERVER#*@}
46620    else
46621      FTPUSER=ftp
46622      FTPPWD=ftp
46623    fi
46624    # the "pass" command does not work on some
46625    # ftp clients (read ftp.exe) but if it works,
46626    # passive mode is better!
46627    ( \
46628        echo "user $FTPUSER $FTPPWD"        ; \
46629        echo "pass"                         ; \
46630        echo "bin"                          ; \
46631        echo "get $FTPPATH $tmpfile"              ; \
46632    ) | ftp -in $FTPSERVER
46633  fi
46634  if test "x$VALID_TOOL" != xyes; then
46635    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
46636  fi
46637
46638    mv $tmpfile $installdir/$filename
46639    if test ! -s $installdir/$filename; then
46640      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
46641    fi
46642    case "$extension" in
46643      zip)  echo "Unzipping $installdir/$filename..."
46644        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
46645        ;;
46646      tar.gz) echo "Untaring $installdir/$filename..."
46647        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46648        ;;
46649      tgz) echo "Untaring $installdir/$filename..."
46650        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46651        ;;
46652      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
46653        ;;
46654    esac
46655  fi
46656  if test -f $installdir/$filename.unpacked; then
46657    depdir=$installdir
46658  fi
46659
46660      fi
46661      # Source the builddeps file again, because in the previous command, the depdir
46662      # was updated to point at the current build dependency install directory.
46663      . $builddepsfile
46664      # Now extract variables from the builddeps.conf files.
46665      theroot=${builddep_alsa_ROOT}
46666      thecflags=${builddep_alsa_CFLAGS}
46667      thelibs=${builddep_alsa_LIBS}
46668      if test "x$depdir" = x; then
46669        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
46670      fi
46671      ALSA=$depdir
46672      if test "x$theroot" != x; then
46673        ALSA="$theroot"
46674      fi
46675      if test "x$thecflags" != x; then
46676        ALSA_CFLAGS="$thecflags"
46677      fi
46678      if test "x$thelibs" != x; then
46679        ALSA_LIBS="$thelibs"
46680      fi
46681      ALSA_FOUND=yes
46682      else ALSA_FOUND=no
46683
46684    fi
46685    else ALSA_FOUND=no
46686
46687  fi
46688
46689    fi
46690    if test "x$ALSA_FOUND" = xno; then
46691
46692pkg_failed=no
46693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
46694$as_echo_n "checking for ALSA... " >&6; }
46695
46696if test -n "$ALSA_CFLAGS"; then
46697    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
46698 elif test -n "$PKG_CONFIG"; then
46699    if test -n "$PKG_CONFIG" && \
46700    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46701  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46702  ac_status=$?
46703  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46704  test $ac_status = 0; }; then
46705  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
46706else
46707  pkg_failed=yes
46708fi
46709 else
46710    pkg_failed=untried
46711fi
46712if test -n "$ALSA_LIBS"; then
46713    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
46714 elif test -n "$PKG_CONFIG"; then
46715    if test -n "$PKG_CONFIG" && \
46716    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46717  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46718  ac_status=$?
46719  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46720  test $ac_status = 0; }; then
46721  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
46722else
46723  pkg_failed=yes
46724fi
46725 else
46726    pkg_failed=untried
46727fi
46728
46729
46730
46731if test $pkg_failed = yes; then
46732
46733if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
46734        _pkg_short_errors_supported=yes
46735else
46736        _pkg_short_errors_supported=no
46737fi
46738        if test $_pkg_short_errors_supported = yes; then
46739	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
46740        else
46741	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
46742        fi
46743	# Put the nasty error message in config.log where it belongs
46744	echo "$ALSA_PKG_ERRORS" >&5
46745
46746	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46747$as_echo "no" >&6; }
46748                ALSA_FOUND=no
46749elif test $pkg_failed = untried; then
46750	ALSA_FOUND=no
46751else
46752	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
46753	ALSA_LIBS=$pkg_cv_ALSA_LIBS
46754        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46755$as_echo "yes" >&6; }
46756	ALSA_FOUND=yes
46757fi
46758    fi
46759    if test "x$ALSA_FOUND" = xno; then
46760      for ac_header in alsa/asoundlib.h
46761do :
46762  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
46763if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
46764  cat >>confdefs.h <<_ACEOF
46765#define HAVE_ALSA_ASOUNDLIB_H 1
46766_ACEOF
46767
46768            ALSA_FOUND=yes
46769            ALSA_CFLAGS=-Iignoreme
46770            ALSA_LIBS=-lasound
46771            DEFAULT_ALSA=yes
46772
46773else
46774  ALSA_FOUND=no
46775fi
46776
46777done
46778
46779    fi
46780    if test "x$ALSA_FOUND" = xno; then
46781
46782  # Print a helpful message on how to acquire the necessary build dependency.
46783  # alsa is the help tag: freetype, cups, pulse, alsa etc
46784  MISSING_DEPENDENCY=alsa
46785
46786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46787    cygwin_help $MISSING_DEPENDENCY
46788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46789    msys_help $MISSING_DEPENDENCY
46790  else
46791    PKGHANDLER_COMMAND=
46792
46793    case $PKGHANDLER in
46794      apt-get)
46795        apt_help     $MISSING_DEPENDENCY ;;
46796      yum)
46797        yum_help     $MISSING_DEPENDENCY ;;
46798      port)
46799        port_help    $MISSING_DEPENDENCY ;;
46800      pkgutil)
46801        pkgutil_help $MISSING_DEPENDENCY ;;
46802      pkgadd)
46803        pkgadd_help  $MISSING_DEPENDENCY ;;
46804    esac
46805
46806    if test "x$PKGHANDLER_COMMAND" != x; then
46807      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46808    fi
46809  fi
46810
46811      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
46812    fi
46813  fi
46814
46815
46816
46817
46818
46819
46820  ###############################################################################
46821  #
46822  # Check for the jpeg library
46823  #
46824
46825  USE_EXTERNAL_LIBJPEG=true
46826  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
46827$as_echo_n "checking for main in -ljpeg... " >&6; }
46828if ${ac_cv_lib_jpeg_main+:} false; then :
46829  $as_echo_n "(cached) " >&6
46830else
46831  ac_check_lib_save_LIBS=$LIBS
46832LIBS="-ljpeg  $LIBS"
46833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46834/* end confdefs.h.  */
46835
46836
46837int
46838main ()
46839{
46840return main ();
46841  ;
46842  return 0;
46843}
46844_ACEOF
46845if ac_fn_cxx_try_link "$LINENO"; then :
46846  ac_cv_lib_jpeg_main=yes
46847else
46848  ac_cv_lib_jpeg_main=no
46849fi
46850rm -f core conftest.err conftest.$ac_objext \
46851    conftest$ac_exeext conftest.$ac_ext
46852LIBS=$ac_check_lib_save_LIBS
46853fi
46854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
46855$as_echo "$ac_cv_lib_jpeg_main" >&6; }
46856if test "x$ac_cv_lib_jpeg_main" = xyes; then :
46857  cat >>confdefs.h <<_ACEOF
46858#define HAVE_LIBJPEG 1
46859_ACEOF
46860
46861  LIBS="-ljpeg $LIBS"
46862
46863else
46864   USE_EXTERNAL_LIBJPEG=false
46865      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
46866$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
46867
46868fi
46869
46870
46871
46872  ###############################################################################
46873  #
46874  # Check for the gif library
46875  #
46876
46877
46878# Check whether --with-giflib was given.
46879if test "${with_giflib+set}" = set; then :
46880  withval=$with_giflib;
46881fi
46882
46883
46884
46885  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
46886$as_echo_n "checking for which giflib to use... " >&6; }
46887
46888  # default is bundled
46889  DEFAULT_GIFLIB=bundled
46890
46891  #
46892  # if user didn't specify, use DEFAULT_GIFLIB
46893  #
46894  if test "x${with_giflib}" = "x"; then
46895    with_giflib=${DEFAULT_GIFLIB}
46896  fi
46897
46898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
46899$as_echo "${with_giflib}" >&6; }
46900
46901  if test "x${with_giflib}" = "xbundled"; then
46902    USE_EXTERNAL_LIBGIF=false
46903  elif test "x${with_giflib}" = "xsystem"; then
46904    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
46905if test "x$ac_cv_header_gif_lib_h" = xyes; then :
46906
46907else
46908   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
46909fi
46910
46911
46912    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
46913$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
46914if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
46915  $as_echo_n "(cached) " >&6
46916else
46917  ac_check_lib_save_LIBS=$LIBS
46918LIBS="-lgif  $LIBS"
46919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46920/* end confdefs.h.  */
46921
46922/* Override any GCC internal prototype to avoid an error.
46923   Use char because int might match the return type of a GCC
46924   builtin and then its argument prototype would still apply.  */
46925#ifdef __cplusplus
46926extern "C"
46927#endif
46928char DGifGetCode ();
46929int
46930main ()
46931{
46932return DGifGetCode ();
46933  ;
46934  return 0;
46935}
46936_ACEOF
46937if ac_fn_cxx_try_link "$LINENO"; then :
46938  ac_cv_lib_gif_DGifGetCode=yes
46939else
46940  ac_cv_lib_gif_DGifGetCode=no
46941fi
46942rm -f core conftest.err conftest.$ac_objext \
46943    conftest$ac_exeext conftest.$ac_ext
46944LIBS=$ac_check_lib_save_LIBS
46945fi
46946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
46947$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
46948if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
46949  cat >>confdefs.h <<_ACEOF
46950#define HAVE_LIBGIF 1
46951_ACEOF
46952
46953  LIBS="-lgif $LIBS"
46954
46955else
46956   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
46957fi
46958
46959
46960    USE_EXTERNAL_LIBGIF=true
46961  else
46962    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
46963  fi
46964
46965
46966  ###############################################################################
46967  #
46968  # Check for the png library
46969  #
46970
46971
46972# Check whether --with-libpng was given.
46973if test "${with_libpng+set}" = set; then :
46974  withval=$with_libpng;
46975fi
46976
46977
46978
46979  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
46980$as_echo_n "checking for which libpng to use... " >&6; }
46981
46982  # default is bundled
46983  DEFAULT_LIBPNG=bundled
46984
46985  #
46986  # if user didn't specify, use DEFAULT_LIBPNG
46987  #
46988  if test "x${with_libpng}" = "x"; then
46989      with_libpng=${DEFAULT_LIBPNG}
46990  fi
46991
46992  if test "x${with_libpng}" = "xbundled"; then
46993      USE_EXTERNAL_LIBPNG=false
46994      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
46995$as_echo "bundled" >&6; }
46996  elif test "x${with_libpng}" = "xsystem"; then
46997
46998pkg_failed=no
46999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
47000$as_echo_n "checking for PNG... " >&6; }
47001
47002if test -n "$PNG_CFLAGS"; then
47003    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
47004 elif test -n "$PKG_CONFIG"; then
47005    if test -n "$PKG_CONFIG" && \
47006    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
47007  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
47008  ac_status=$?
47009  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47010  test $ac_status = 0; }; then
47011  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
47012else
47013  pkg_failed=yes
47014fi
47015 else
47016    pkg_failed=untried
47017fi
47018if test -n "$PNG_LIBS"; then
47019    pkg_cv_PNG_LIBS="$PNG_LIBS"
47020 elif test -n "$PKG_CONFIG"; then
47021    if test -n "$PKG_CONFIG" && \
47022    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
47023  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
47024  ac_status=$?
47025  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47026  test $ac_status = 0; }; then
47027  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
47028else
47029  pkg_failed=yes
47030fi
47031 else
47032    pkg_failed=untried
47033fi
47034
47035
47036
47037if test $pkg_failed = yes; then
47038
47039if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47040        _pkg_short_errors_supported=yes
47041else
47042        _pkg_short_errors_supported=no
47043fi
47044        if test $_pkg_short_errors_supported = yes; then
47045	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
47046        else
47047	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
47048        fi
47049	# Put the nasty error message in config.log where it belongs
47050	echo "$PNG_PKG_ERRORS" >&5
47051
47052	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47053$as_echo "no" >&6; }
47054                 LIBPNG_FOUND=no
47055elif test $pkg_failed = untried; then
47056	 LIBPNG_FOUND=no
47057else
47058	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
47059	PNG_LIBS=$pkg_cv_PNG_LIBS
47060        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47061$as_echo "yes" >&6; }
47062	 LIBPNG_FOUND=yes
47063fi
47064      if test "x${LIBPNG_FOUND}" = "xyes"; then
47065          USE_EXTERNAL_LIBPNG=true
47066          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47067$as_echo "system" >&6; }
47068      else
47069          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47070$as_echo "system not found" >&6; }
47071          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
47072      fi
47073  else
47074      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
47075  fi
47076
47077
47078  ###############################################################################
47079  #
47080  # Check for the zlib library
47081  #
47082
47083
47084# Check whether --with-zlib was given.
47085if test "${with_zlib+set}" = set; then :
47086  withval=$with_zlib;
47087fi
47088
47089
47090  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
47091$as_echo_n "checking for compress in -lz... " >&6; }
47092if ${ac_cv_lib_z_compress+:} false; then :
47093  $as_echo_n "(cached) " >&6
47094else
47095  ac_check_lib_save_LIBS=$LIBS
47096LIBS="-lz  $LIBS"
47097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47098/* end confdefs.h.  */
47099
47100/* Override any GCC internal prototype to avoid an error.
47101   Use char because int might match the return type of a GCC
47102   builtin and then its argument prototype would still apply.  */
47103#ifdef __cplusplus
47104extern "C"
47105#endif
47106char compress ();
47107int
47108main ()
47109{
47110return compress ();
47111  ;
47112  return 0;
47113}
47114_ACEOF
47115if ac_fn_cxx_try_link "$LINENO"; then :
47116  ac_cv_lib_z_compress=yes
47117else
47118  ac_cv_lib_z_compress=no
47119fi
47120rm -f core conftest.err conftest.$ac_objext \
47121    conftest$ac_exeext conftest.$ac_ext
47122LIBS=$ac_check_lib_save_LIBS
47123fi
47124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
47125$as_echo "$ac_cv_lib_z_compress" >&6; }
47126if test "x$ac_cv_lib_z_compress" = xyes; then :
47127   ZLIB_FOUND=yes
47128else
47129   ZLIB_FOUND=no
47130fi
47131
47132
47133  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
47134$as_echo_n "checking for which zlib to use... " >&6; }
47135
47136  DEFAULT_ZLIB=bundled
47137  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47138    #
47139    # On macosx default is system...on others default is
47140    #
47141    DEFAULT_ZLIB=system
47142  fi
47143
47144  if test "x${ZLIB_FOUND}" != "xyes"; then
47145    #
47146    # If we don't find any system...set default to bundled
47147    #
47148    DEFAULT_ZLIB=bundled
47149  fi
47150
47151  #
47152  # If user didn't specify, use DEFAULT_ZLIB
47153  #
47154  if test "x${with_zlib}" = "x"; then
47155    with_zlib=${DEFAULT_ZLIB}
47156  fi
47157
47158  if test "x${with_zlib}" = "xbundled"; then
47159    USE_EXTERNAL_LIBZ=false
47160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47161$as_echo "bundled" >&6; }
47162  elif test "x${with_zlib}" = "xsystem"; then
47163    if test "x${ZLIB_FOUND}" = "xyes"; then
47164      USE_EXTERNAL_LIBZ=true
47165      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47166$as_echo "system" >&6; }
47167    else
47168      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47169$as_echo "system not found" >&6; }
47170      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
47171    fi
47172  else
47173    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
47174  fi
47175
47176
47177
47178  ###############################################################################
47179  LIBZIP_CAN_USE_MMAP=true
47180
47181
47182
47183  ###############################################################################
47184  #
47185  # Check if altzone exists in time.h
47186  #
47187
47188  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47189/* end confdefs.h.  */
47190#include <time.h>
47191int
47192main ()
47193{
47194return (int)altzone;
47195  ;
47196  return 0;
47197}
47198_ACEOF
47199if ac_fn_cxx_try_link "$LINENO"; then :
47200  has_altzone=yes
47201else
47202  has_altzone=no
47203fi
47204rm -f core conftest.err conftest.$ac_objext \
47205    conftest$ac_exeext conftest.$ac_ext
47206  if test "x$has_altzone" = xyes; then
47207
47208$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
47209
47210  fi
47211
47212  ###############################################################################
47213  #
47214  # Check the maths library
47215  #
47216
47217  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
47218$as_echo_n "checking for cos in -lm... " >&6; }
47219if ${ac_cv_lib_m_cos+:} false; then :
47220  $as_echo_n "(cached) " >&6
47221else
47222  ac_check_lib_save_LIBS=$LIBS
47223LIBS="-lm  $LIBS"
47224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47225/* end confdefs.h.  */
47226
47227/* Override any GCC internal prototype to avoid an error.
47228   Use char because int might match the return type of a GCC
47229   builtin and then its argument prototype would still apply.  */
47230#ifdef __cplusplus
47231extern "C"
47232#endif
47233char cos ();
47234int
47235main ()
47236{
47237return cos ();
47238  ;
47239  return 0;
47240}
47241_ACEOF
47242if ac_fn_cxx_try_link "$LINENO"; then :
47243  ac_cv_lib_m_cos=yes
47244else
47245  ac_cv_lib_m_cos=no
47246fi
47247rm -f core conftest.err conftest.$ac_objext \
47248    conftest$ac_exeext conftest.$ac_ext
47249LIBS=$ac_check_lib_save_LIBS
47250fi
47251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
47252$as_echo "$ac_cv_lib_m_cos" >&6; }
47253if test "x$ac_cv_lib_m_cos" = xyes; then :
47254  cat >>confdefs.h <<_ACEOF
47255#define HAVE_LIBM 1
47256_ACEOF
47257
47258  LIBS="-lm $LIBS"
47259
47260else
47261
47262        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
47263$as_echo "$as_me: Maths library was not found" >&6;}
47264
47265
47266fi
47267
47268
47269
47270  ###############################################################################
47271  #
47272  # Check for libdl.so
47273
47274  save_LIBS="$LIBS"
47275  LIBS=""
47276  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
47277$as_echo_n "checking for dlopen in -ldl... " >&6; }
47278if ${ac_cv_lib_dl_dlopen+:} false; then :
47279  $as_echo_n "(cached) " >&6
47280else
47281  ac_check_lib_save_LIBS=$LIBS
47282LIBS="-ldl  $LIBS"
47283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47284/* end confdefs.h.  */
47285
47286/* Override any GCC internal prototype to avoid an error.
47287   Use char because int might match the return type of a GCC
47288   builtin and then its argument prototype would still apply.  */
47289#ifdef __cplusplus
47290extern "C"
47291#endif
47292char dlopen ();
47293int
47294main ()
47295{
47296return dlopen ();
47297  ;
47298  return 0;
47299}
47300_ACEOF
47301if ac_fn_cxx_try_link "$LINENO"; then :
47302  ac_cv_lib_dl_dlopen=yes
47303else
47304  ac_cv_lib_dl_dlopen=no
47305fi
47306rm -f core conftest.err conftest.$ac_objext \
47307    conftest$ac_exeext conftest.$ac_ext
47308LIBS=$ac_check_lib_save_LIBS
47309fi
47310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
47311$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
47312if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
47313  cat >>confdefs.h <<_ACEOF
47314#define HAVE_LIBDL 1
47315_ACEOF
47316
47317  LIBS="-ldl $LIBS"
47318
47319fi
47320
47321  LIBDL="$LIBS"
47322
47323  LIBS="$save_LIBS"
47324
47325
47326  ###############################################################################
47327  #
47328  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47329  # dynamic build is configured on command line.
47330  #
47331
47332# Check whether --with-stdc++lib was given.
47333if test "${with_stdc__lib+set}" = set; then :
47334  withval=$with_stdc__lib;
47335        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47336                && test "x$with_stdc__lib" != xdefault; then
47337          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47338        fi
47339
47340else
47341  with_stdc__lib=default
47342
47343fi
47344
47345
47346  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47347    # Test if -lstdc++ works.
47348    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47349$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47350    ac_ext=cpp
47351ac_cpp='$CXXCPP $CPPFLAGS'
47352ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47353ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47354ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47355
47356    OLD_CXXFLAGS="$CXXFLAGS"
47357    CXXFLAGS="$CXXFLAGS -lstdc++"
47358    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47359/* end confdefs.h.  */
47360
47361int
47362main ()
47363{
47364return 0;
47365  ;
47366  return 0;
47367}
47368_ACEOF
47369if ac_fn_cxx_try_link "$LINENO"; then :
47370  has_dynamic_libstdcxx=yes
47371else
47372  has_dynamic_libstdcxx=no
47373fi
47374rm -f core conftest.err conftest.$ac_objext \
47375    conftest$ac_exeext conftest.$ac_ext
47376    CXXFLAGS="$OLD_CXXFLAGS"
47377    ac_ext=cpp
47378ac_cpp='$CXXCPP $CPPFLAGS'
47379ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47380ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47381ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47382
47383    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47384$as_echo "$has_dynamic_libstdcxx" >&6; }
47385
47386    # Test if stdc++ can be linked statically.
47387    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47388$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47389    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47390    ac_ext=cpp
47391ac_cpp='$CXXCPP $CPPFLAGS'
47392ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47393ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47394ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47395
47396    OLD_LIBS="$LIBS"
47397    OLD_CXX="$CXX"
47398    LIBS="$STATIC_STDCXX_FLAGS"
47399    CXX="$CC"
47400    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47401/* end confdefs.h.  */
47402
47403int
47404main ()
47405{
47406return 0;
47407  ;
47408  return 0;
47409}
47410_ACEOF
47411if ac_fn_cxx_try_link "$LINENO"; then :
47412  has_static_libstdcxx=yes
47413else
47414  has_static_libstdcxx=no
47415fi
47416rm -f core conftest.err conftest.$ac_objext \
47417    conftest$ac_exeext conftest.$ac_ext
47418    LIBS="$OLD_LIBS"
47419    CXX="$OLD_CXX"
47420    ac_ext=cpp
47421ac_cpp='$CXXCPP $CPPFLAGS'
47422ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47423ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47424ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47425
47426    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47427$as_echo "$has_static_libstdcxx" >&6; }
47428
47429    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47430      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47431    fi
47432
47433    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47434      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47435    fi
47436
47437    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47438      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47439    fi
47440
47441    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47442$as_echo_n "checking how to link with libstdc++... " >&6; }
47443    # If dynamic was requested, it's available since it would fail above otherwise.
47444    # If dynamic wasn't requested, go with static unless it isn't available.
47445    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47446      LIBCXX="$LIBCXX -lstdc++"
47447      LDCXX="$CXX"
47448      STATIC_CXX_SETTING="STATIC_CXX=false"
47449      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47450$as_echo "dynamic" >&6; }
47451    else
47452      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47453      LDCXX="$CC"
47454      STATIC_CXX_SETTING="STATIC_CXX=true"
47455      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47456$as_echo "static" >&6; }
47457    fi
47458  fi
47459
47460
47461  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47462    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
47463
47464pkg_failed=no
47465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
47466$as_echo_n "checking for LIBFFI... " >&6; }
47467
47468if test -n "$LIBFFI_CFLAGS"; then
47469    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
47470 elif test -n "$PKG_CONFIG"; then
47471    if test -n "$PKG_CONFIG" && \
47472    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47473  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47474  ac_status=$?
47475  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47476  test $ac_status = 0; }; then
47477  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
47478else
47479  pkg_failed=yes
47480fi
47481 else
47482    pkg_failed=untried
47483fi
47484if test -n "$LIBFFI_LIBS"; then
47485    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
47486 elif test -n "$PKG_CONFIG"; then
47487    if test -n "$PKG_CONFIG" && \
47488    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47489  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47490  ac_status=$?
47491  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47492  test $ac_status = 0; }; then
47493  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
47494else
47495  pkg_failed=yes
47496fi
47497 else
47498    pkg_failed=untried
47499fi
47500
47501
47502
47503if test $pkg_failed = yes; then
47504
47505if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47506        _pkg_short_errors_supported=yes
47507else
47508        _pkg_short_errors_supported=no
47509fi
47510        if test $_pkg_short_errors_supported = yes; then
47511	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
47512        else
47513	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
47514        fi
47515	# Put the nasty error message in config.log where it belongs
47516	echo "$LIBFFI_PKG_ERRORS" >&5
47517
47518	as_fn_error $? "Package requirements (libffi) were not met:
47519
47520$LIBFFI_PKG_ERRORS
47521
47522Consider adjusting the PKG_CONFIG_PATH environment variable if you
47523installed software in a non-standard prefix.
47524
47525Alternatively, you may set the environment variables LIBFFI_CFLAGS
47526and LIBFFI_LIBS to avoid the need to call pkg-config.
47527See the pkg-config man page for more details.
47528" "$LINENO" 5
47529elif test $pkg_failed = untried; then
47530	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47531$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47532as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
47533is in your PATH or set the PKG_CONFIG environment variable to the full
47534path to pkg-config.
47535
47536Alternatively, you may set the environment variables LIBFFI_CFLAGS
47537and LIBFFI_LIBS to avoid the need to call pkg-config.
47538See the pkg-config man page for more details.
47539
47540To get pkg-config, see <http://pkg-config.freedesktop.org/>.
47541See \`config.log' for more details" "$LINENO" 5; }
47542else
47543	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
47544	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
47545        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47546$as_echo "yes" >&6; }
47547	:
47548fi
47549
47550  fi
47551
47552  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47553    # Extract the first word of "llvm-config", so it can be a program name with args.
47554set dummy llvm-config; ac_word=$2
47555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47556$as_echo_n "checking for $ac_word... " >&6; }
47557if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
47558  $as_echo_n "(cached) " >&6
47559else
47560  if test -n "$LLVM_CONFIG"; then
47561  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
47562else
47563as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47564for as_dir in $PATH
47565do
47566  IFS=$as_save_IFS
47567  test -z "$as_dir" && as_dir=.
47568    for ac_exec_ext in '' $ac_executable_extensions; do
47569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47570    ac_cv_prog_LLVM_CONFIG="llvm-config"
47571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47572    break 2
47573  fi
47574done
47575  done
47576IFS=$as_save_IFS
47577
47578fi
47579fi
47580LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
47581if test -n "$LLVM_CONFIG"; then
47582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
47583$as_echo "$LLVM_CONFIG" >&6; }
47584else
47585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47586$as_echo "no" >&6; }
47587fi
47588
47589
47590
47591    if test "x$LLVM_CONFIG" != xllvm-config; then
47592      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
47593    fi
47594
47595    llvm_components="jit mcjit engine nativecodegen native"
47596    unset LLVM_CFLAGS
47597    for flag in $("$LLVM_CONFIG" --cxxflags); do
47598      if echo "${flag}" | grep -q '^-[ID]'; then
47599        if test "${flag}" != "-D_DEBUG" ; then
47600          if test "${LLVM_CFLAGS}" != "" ; then
47601            LLVM_CFLAGS="${LLVM_CFLAGS} "
47602          fi
47603          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
47604        fi
47605      fi
47606    done
47607    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
47608    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
47609
47610    unset LLVM_LDFLAGS
47611    for flag in $("${LLVM_CONFIG}" --ldflags); do
47612      if echo "${flag}" | grep -q '^-L'; then
47613        if test "${LLVM_LDFLAGS}" != ""; then
47614          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
47615        fi
47616        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
47617      fi
47618    done
47619
47620    unset LLVM_LIBS
47621    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
47622      if echo "${flag}" | grep -q '^-l'; then
47623        if test "${LLVM_LIBS}" != ""; then
47624          LLVM_LIBS="${LLVM_LIBS} "
47625        fi
47626        LLVM_LIBS="${LLVM_LIBS}${flag}"
47627      fi
47628    done
47629
47630
47631
47632
47633  fi
47634
47635  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47636  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
47637    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47638  fi
47639
47640  # TODO better (platform agnostic) test
47641  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
47642    LIBCXX="-lstdc++"
47643  fi
47644
47645
47646
47647
47648  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47649
47650
47651# Check whether --with-msvcr-dll was given.
47652if test "${with_msvcr_dll+set}" = set; then :
47653  withval=$with_msvcr_dll;
47654fi
47655
47656
47657  if test "x$with_msvcr_dll" != x; then
47658    # If given explicitely by user, do not probe. If not present, fail directly.
47659
47660  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
47661  METHOD="--with-msvcr-dll"
47662  if test -e "$POSSIBLE_MSVCR_DLL"; then
47663    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47664$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47665
47666    # Need to check if the found msvcr is correct architecture
47667    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47668$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47669    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47670    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47671      CORRECT_MSVCR_ARCH=386
47672    else
47673      CORRECT_MSVCR_ARCH=x86-64
47674    fi
47675    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47676      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47677$as_echo "ok" >&6; }
47678      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47679      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47680$as_echo_n "checking for msvcr100.dll... " >&6; }
47681      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47682$as_echo "$MSVCR_DLL" >&6; }
47683    else
47684      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47685$as_echo "incorrect, ignoring" >&6; }
47686      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47687$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47688    fi
47689  fi
47690
47691    if test "x$MSVCR_DLL" = x; then
47692      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
47693    fi
47694  fi
47695
47696  if test "x$MSVCR_DLL" = x; then
47697    # Probe: Using well-known location from Visual Studio 10.0
47698    if test "x$VCINSTALLDIR" != x; then
47699      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
47700
47701  windows_path="$CYGWIN_VC_INSTALL_DIR"
47702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47703    unix_path=`$CYGPATH -u "$windows_path"`
47704    CYGWIN_VC_INSTALL_DIR="$unix_path"
47705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47707    CYGWIN_VC_INSTALL_DIR="$unix_path"
47708  fi
47709
47710      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47711        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
47712      else
47713        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
47714      fi
47715
47716  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47717  METHOD="well-known location in VCINSTALLDIR"
47718  if test -e "$POSSIBLE_MSVCR_DLL"; then
47719    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47720$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47721
47722    # Need to check if the found msvcr is correct architecture
47723    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47724$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47725    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47726    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47727      CORRECT_MSVCR_ARCH=386
47728    else
47729      CORRECT_MSVCR_ARCH=x86-64
47730    fi
47731    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47732      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47733$as_echo "ok" >&6; }
47734      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47735      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47736$as_echo_n "checking for msvcr100.dll... " >&6; }
47737      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47738$as_echo "$MSVCR_DLL" >&6; }
47739    else
47740      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47741$as_echo "incorrect, ignoring" >&6; }
47742      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47743$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47744    fi
47745  fi
47746
47747    fi
47748  fi
47749
47750  if test "x$MSVCR_DLL" = x; then
47751    # Probe: Check in the Boot JDK directory.
47752    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
47753
47754  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47755  METHOD="well-known location in Boot JDK"
47756  if test -e "$POSSIBLE_MSVCR_DLL"; then
47757    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47758$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47759
47760    # Need to check if the found msvcr is correct architecture
47761    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47762$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47763    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47764    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47765      CORRECT_MSVCR_ARCH=386
47766    else
47767      CORRECT_MSVCR_ARCH=x86-64
47768    fi
47769    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47770      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47771$as_echo "ok" >&6; }
47772      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47773      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47774$as_echo_n "checking for msvcr100.dll... " >&6; }
47775      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47776$as_echo "$MSVCR_DLL" >&6; }
47777    else
47778      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47779$as_echo "incorrect, ignoring" >&6; }
47780      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47781$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47782    fi
47783  fi
47784
47785  fi
47786
47787  if test "x$MSVCR_DLL" = x; then
47788    # Probe: Look in the Windows system32 directory
47789    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
47790
47791  windows_path="$CYGWIN_SYSTEMROOT"
47792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47793    unix_path=`$CYGPATH -u "$windows_path"`
47794    CYGWIN_SYSTEMROOT="$unix_path"
47795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47797    CYGWIN_SYSTEMROOT="$unix_path"
47798  fi
47799
47800    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
47801
47802  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47803  METHOD="well-known location in SYSTEMROOT"
47804  if test -e "$POSSIBLE_MSVCR_DLL"; then
47805    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47806$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47807
47808    # Need to check if the found msvcr is correct architecture
47809    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47810$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47811    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47812    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47813      CORRECT_MSVCR_ARCH=386
47814    else
47815      CORRECT_MSVCR_ARCH=x86-64
47816    fi
47817    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47818      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47819$as_echo "ok" >&6; }
47820      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47821      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47822$as_echo_n "checking for msvcr100.dll... " >&6; }
47823      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47824$as_echo "$MSVCR_DLL" >&6; }
47825    else
47826      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47827$as_echo "incorrect, ignoring" >&6; }
47828      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47829$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47830    fi
47831  fi
47832
47833  fi
47834
47835  if test "x$MSVCR_DLL" = x; then
47836    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
47837    if test "x$VS100COMNTOOLS" != x; then
47838      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
47839
47840  windows_path="$CYGWIN_VS_TOOLS_DIR"
47841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47842    unix_path=`$CYGPATH -u "$windows_path"`
47843    CYGWIN_VS_TOOLS_DIR="$unix_path"
47844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47846    CYGWIN_VS_TOOLS_DIR="$unix_path"
47847  fi
47848
47849      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47850        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
47851      else
47852        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
47853      fi
47854
47855  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47856  METHOD="search of VS100COMNTOOLS"
47857  if test -e "$POSSIBLE_MSVCR_DLL"; then
47858    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47859$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47860
47861    # Need to check if the found msvcr is correct architecture
47862    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47863$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47864    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47865    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47866      CORRECT_MSVCR_ARCH=386
47867    else
47868      CORRECT_MSVCR_ARCH=x86-64
47869    fi
47870    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47871      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47872$as_echo "ok" >&6; }
47873      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47874      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47875$as_echo_n "checking for msvcr100.dll... " >&6; }
47876      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47877$as_echo "$MSVCR_DLL" >&6; }
47878    else
47879      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47880$as_echo "incorrect, ignoring" >&6; }
47881      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47882$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47883    fi
47884  fi
47885
47886    fi
47887  fi
47888
47889  if test "x$MSVCR_DLL" = x; then
47890    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
47891    # (This was the original behaviour; kept since it might turn up something)
47892    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
47893      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47894        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
47895      else
47896        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
47897        if test "x$POSSIBLE_MSVCR_DLL" = x; then
47898          # We're grasping at straws now...
47899          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
47900        fi
47901      fi
47902
47903
47904  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47905  METHOD="search of VCINSTALLDIR"
47906  if test -e "$POSSIBLE_MSVCR_DLL"; then
47907    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47908$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47909
47910    # Need to check if the found msvcr is correct architecture
47911    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47912$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47913    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47914    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47915      CORRECT_MSVCR_ARCH=386
47916    else
47917      CORRECT_MSVCR_ARCH=x86-64
47918    fi
47919    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47920      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47921$as_echo "ok" >&6; }
47922      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47923      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47924$as_echo_n "checking for msvcr100.dll... " >&6; }
47925      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47926$as_echo "$MSVCR_DLL" >&6; }
47927    else
47928      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47929$as_echo "incorrect, ignoring" >&6; }
47930      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47931$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47932    fi
47933  fi
47934
47935    fi
47936  fi
47937
47938  if test "x$MSVCR_DLL" = x; then
47939    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47940$as_echo_n "checking for msvcr100.dll... " >&6; }
47941    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47942$as_echo "no" >&6; }
47943    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
47944  fi
47945
47946
47947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47948
47949  # Input might be given as Windows format, start by converting to
47950  # unix format.
47951  path="$MSVCR_DLL"
47952  new_path=`$CYGPATH -u "$path"`
47953
47954  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47955  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47956  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47957  # "foo.exe" is OK but "foo" is an error.
47958  #
47959  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47960  # It is also a way to make sure we got the proper file name for the real test later on.
47961  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47962  if test "x$test_shortpath" = x; then
47963    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
47964$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
47965    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
47966  fi
47967
47968  # Call helper function which possibly converts this using DOS-style short mode.
47969  # If so, the updated path is stored in $new_path.
47970
47971  input_path="$new_path"
47972  # Check if we need to convert this using DOS-style short mode. If the path
47973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47974  # take no chances and rewrite it.
47975  # Note: m4 eats our [], so we need to use [ and ] instead.
47976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47977  if test "x$has_forbidden_chars" != x; then
47978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47979    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47980    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47981    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47982      # Going to short mode and back again did indeed matter. Since short mode is
47983      # case insensitive, let's make it lowercase to improve readability.
47984      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47985      # Now convert it back to Unix-stile (cygpath)
47986      input_path=`$CYGPATH -u "$shortmode_path"`
47987      new_path="$input_path"
47988    fi
47989  fi
47990
47991  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47992  if test "x$test_cygdrive_prefix" = x; then
47993    # As a simple fix, exclude /usr/bin since it's not a real path.
47994    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47995      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47996      # a path prefixed by /cygdrive for fixpath to work.
47997      new_path="$CYGWIN_ROOT_PATH$input_path"
47998    fi
47999  fi
48000
48001
48002  if test "x$path" != "x$new_path"; then
48003    MSVCR_DLL="$new_path"
48004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
48005$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
48006  fi
48007
48008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48009
48010  path="$MSVCR_DLL"
48011  has_colon=`$ECHO $path | $GREP ^.:`
48012  new_path="$path"
48013  if test "x$has_colon" = x; then
48014    # Not in mixed or Windows style, start by that.
48015    new_path=`cmd //c echo $path`
48016  fi
48017
48018
48019  input_path="$new_path"
48020  # Check if we need to convert this using DOS-style short mode. If the path
48021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48022  # take no chances and rewrite it.
48023  # Note: m4 eats our [], so we need to use [ and ] instead.
48024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48025  if test "x$has_forbidden_chars" != x; then
48026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48027    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48028  fi
48029
48030
48031  windows_path="$new_path"
48032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48033    unix_path=`$CYGPATH -u "$windows_path"`
48034    new_path="$unix_path"
48035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48037    new_path="$unix_path"
48038  fi
48039
48040  if test "x$path" != "x$new_path"; then
48041    MSVCR_DLL="$new_path"
48042    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
48043$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
48044  fi
48045
48046  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48047  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48048
48049  else
48050    # We're on a posix platform. Hooray! :)
48051    path="$MSVCR_DLL"
48052    has_space=`$ECHO "$path" | $GREP " "`
48053    if test "x$has_space" != x; then
48054      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
48055$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
48056      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48057    fi
48058
48059    # Use eval to expand a potential ~
48060    eval path="$path"
48061    if test ! -f "$path" && test ! -d "$path"; then
48062      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48063    fi
48064
48065    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
48066  fi
48067
48068
48069
48070
48071# Check whether --with-dxsdk was given.
48072if test "${with_dxsdk+set}" = set; then :
48073  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
48074$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
48075fi
48076
48077
48078
48079
48080# Check whether --with-dxsdk-lib was given.
48081if test "${with_dxsdk_lib+set}" = set; then :
48082  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
48083$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
48084fi
48085
48086
48087
48088
48089# Check whether --with-dxsdk-include was given.
48090if test "${with_dxsdk_include+set}" = set; then :
48091  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
48092$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
48093fi
48094
48095
48096  fi
48097
48098
48099
48100###############################################################################
48101#
48102# We need to do some final tweaking, when everything else is done.
48103#
48104###############################################################################
48105
48106
48107  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
48108
48109
48110  # The name of the Service Agent jar.
48111  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
48112  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48113    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
48114  fi
48115
48116
48117
48118    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
48119$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
48120
48121    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
48122      ENABLE_INTREE_EC=yes
48123      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48124$as_echo "yes" >&6; }
48125    else
48126      ENABLE_INTREE_EC=no
48127      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48128$as_echo "no" >&6; }
48129    fi
48130
48131
48132
48133
48134###############################################################################
48135#
48136# Configure parts of the build that only affect the build performance,
48137# not the result.
48138#
48139###############################################################################
48140
48141
48142  # How many cores do we have on this build system?
48143
48144# Check whether --with-num-cores was given.
48145if test "${with_num_cores+set}" = set; then :
48146  withval=$with_num_cores;
48147fi
48148
48149  if test "x$with_num_cores" = x; then
48150    # The number of cores were not specified, try to probe them.
48151
48152  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
48153$as_echo_n "checking for number of cores... " >&6; }
48154  NUM_CORES=1
48155  FOUND_CORES=no
48156
48157  if test -f /proc/cpuinfo; then
48158    # Looks like a Linux (or cygwin) system
48159    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
48160    FOUND_CORES=yes
48161  elif test -x /usr/sbin/psrinfo; then
48162    # Looks like a Solaris system
48163    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
48164    FOUND_CORES=yes
48165  elif test -x /usr/sbin/system_profiler; then
48166    # Looks like a MacOSX system
48167    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
48168    FOUND_CORES=yes
48169  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
48170    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
48171    FOUND_CORES=yes
48172  elif test -n "$NUMBER_OF_PROCESSORS"; then
48173    # On windows, look in the env
48174    NUM_CORES=$NUMBER_OF_PROCESSORS
48175    FOUND_CORES=yes
48176  fi
48177
48178  if test "x$FOUND_CORES" = xyes; then
48179    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
48180$as_echo "$NUM_CORES" >&6; }
48181  else
48182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
48183$as_echo "could not detect number of cores, defaulting to 1" >&6; }
48184    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
48185$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
48186  fi
48187
48188  else
48189    NUM_CORES=$with_num_cores
48190  fi
48191
48192
48193
48194  # How much memory do we have on this build system?
48195
48196# Check whether --with-memory-size was given.
48197if test "${with_memory_size+set}" = set; then :
48198  withval=$with_memory_size;
48199fi
48200
48201  if test "x$with_memory_size" = x; then
48202    # The memory size was not specified, try to probe it.
48203
48204  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
48205$as_echo_n "checking for memory size... " >&6; }
48206  # Default to 1024 MB
48207  MEMORY_SIZE=1024
48208  FOUND_MEM=no
48209
48210  if test -f /proc/meminfo; then
48211    # Looks like a Linux (or cygwin) system
48212    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
48213    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
48214    FOUND_MEM=yes
48215  elif test -x /usr/sbin/prtconf; then
48216    # Looks like a Solaris or AIX system
48217    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
48218    FOUND_MEM=yes
48219  elif test -x /usr/sbin/system_profiler; then
48220    # Looks like a MacOSX system
48221    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
48222    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
48223    FOUND_MEM=yes
48224  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
48225    # Windows, but without cygwin
48226    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
48227    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
48228    FOUND_MEM=yes
48229  fi
48230
48231  if test "x$FOUND_MEM" = xyes; then
48232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
48233$as_echo "$MEMORY_SIZE MB" >&6; }
48234  else
48235    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
48236$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
48237    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
48238$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
48239  fi
48240
48241  else
48242    MEMORY_SIZE=$with_memory_size
48243  fi
48244
48245
48246
48247  # Provide a decent default number of parallel jobs for make depending on
48248  # number of cores, amount of memory and machine architecture.
48249
48250# Check whether --with-jobs was given.
48251if test "${with_jobs+set}" = set; then :
48252  withval=$with_jobs;
48253fi
48254
48255  if test "x$with_jobs" = x; then
48256    # Number of jobs was not specified, calculate.
48257    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
48258$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
48259    # Approximate memory in GB, rounding up a bit.
48260    memory_gb=`expr $MEMORY_SIZE / 1100`
48261    # Pick the lowest of memory in gb and number of cores.
48262    if test "$memory_gb" -lt "$NUM_CORES"; then
48263      JOBS="$memory_gb"
48264    else
48265      JOBS="$NUM_CORES"
48266      # On bigger machines, leave some room for other processes to run
48267      if test "$JOBS" -gt "4"; then
48268        JOBS=`expr $JOBS '*' 90 / 100`
48269      fi
48270    fi
48271    # Cap number of jobs to 16
48272    if test "$JOBS" -gt "16"; then
48273      JOBS=16
48274    fi
48275    if test "$JOBS" -eq "0"; then
48276      JOBS=1
48277    fi
48278    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
48279$as_echo "$JOBS" >&6; }
48280  else
48281    JOBS=$with_jobs
48282  fi
48283
48284
48285
48286# Setup smart javac (after cores and memory have been setup)
48287
48288
48289# Check whether --with-sjavac-server-java was given.
48290if test "${with_sjavac_server_java+set}" = set; then :
48291  withval=$with_sjavac_server_java;
48292fi
48293
48294
48295  if test "x$with_sjavac_server_java" != x; then
48296    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
48297    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
48298    if test "x$FOUND_VERSION" = x; then
48299      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
48300    fi
48301  else
48302    SJAVAC_SERVER_JAVA=""
48303    # Hotspot specific options.
48304
48305  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
48306  $ECHO "Command: $JAVA -verbosegc -version" >&5
48307  OUTPUT=`$JAVA -verbosegc -version 2>&1`
48308  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48309  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48310  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48311    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
48312    JVM_ARG_OK=true
48313  else
48314    $ECHO "Arg failed:" >&5
48315    $ECHO "$OUTPUT" >&5
48316    JVM_ARG_OK=false
48317  fi
48318
48319    # JRockit specific options.
48320
48321  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
48322  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
48323  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
48324  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48325  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48326  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48327    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
48328    JVM_ARG_OK=true
48329  else
48330    $ECHO "Arg failed:" >&5
48331    $ECHO "$OUTPUT" >&5
48332    JVM_ARG_OK=false
48333  fi
48334
48335    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
48336  fi
48337
48338
48339  if test "$MEMORY_SIZE" -gt "2500"; then
48340
48341  $ECHO "Check if jvm arg is ok: -d64" >&5
48342  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
48343  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
48344  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48345  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48346  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48347    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
48348    JVM_ARG_OK=true
48349  else
48350    $ECHO "Arg failed:" >&5
48351    $ECHO "$OUTPUT" >&5
48352    JVM_ARG_OK=false
48353  fi
48354
48355    if test "$JVM_ARG_OK" = true; then
48356      JVM_64BIT=true
48357      JVM_ARG_OK=false
48358    fi
48359  fi
48360
48361  if test "$JVM_64BIT" = true; then
48362    if test "$MEMORY_SIZE" -gt "17000"; then
48363
48364  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
48365  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
48366  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
48367  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48368  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48369  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48370    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
48371    JVM_ARG_OK=true
48372  else
48373    $ECHO "Arg failed:" >&5
48374    $ECHO "$OUTPUT" >&5
48375    JVM_ARG_OK=false
48376  fi
48377
48378    fi
48379    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
48380
48381  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
48382  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
48383  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
48384  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48385  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48386  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48387    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
48388    JVM_ARG_OK=true
48389  else
48390    $ECHO "Arg failed:" >&5
48391    $ECHO "$OUTPUT" >&5
48392    JVM_ARG_OK=false
48393  fi
48394
48395    fi
48396    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
48397
48398  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
48399  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
48400  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
48401  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48402  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48403  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48404    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
48405    JVM_ARG_OK=true
48406  else
48407    $ECHO "Arg failed:" >&5
48408    $ECHO "$OUTPUT" >&5
48409    JVM_ARG_OK=false
48410  fi
48411
48412    fi
48413    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
48414
48415  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
48416  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
48417  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
48418  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48419  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48420  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48421    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
48422    JVM_ARG_OK=true
48423  else
48424    $ECHO "Arg failed:" >&5
48425    $ECHO "$OUTPUT" >&5
48426    JVM_ARG_OK=false
48427  fi
48428
48429    fi
48430  fi
48431  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
48432
48433  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
48434  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
48435  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
48436  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48437  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48438  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48439    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
48440    JVM_ARG_OK=true
48441  else
48442    $ECHO "Arg failed:" >&5
48443    $ECHO "$OUTPUT" >&5
48444    JVM_ARG_OK=false
48445  fi
48446
48447  fi
48448  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
48449
48450  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
48451  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
48452  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
48453  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48454  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48455  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48456    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
48457    JVM_ARG_OK=true
48458  else
48459    $ECHO "Arg failed:" >&5
48460    $ECHO "$OUTPUT" >&5
48461    JVM_ARG_OK=false
48462  fi
48463
48464  fi
48465  if test "$JVM_ARG_OK" = false; then
48466
48467  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
48468  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
48469  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
48470  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48471  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48472  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48473    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
48474    JVM_ARG_OK=true
48475  else
48476    $ECHO "Arg failed:" >&5
48477    $ECHO "$OUTPUT" >&5
48478    JVM_ARG_OK=false
48479  fi
48480
48481  fi
48482
48483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
48484$as_echo_n "checking whether to use sjavac... " >&6; }
48485  # Check whether --enable-sjavac was given.
48486if test "${enable_sjavac+set}" = set; then :
48487  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
48488else
48489  ENABLE_SJAVAC='no'
48490fi
48491
48492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
48493$as_echo "$ENABLE_SJAVAC" >&6; }
48494
48495
48496  if test "x$ENABLE_SJAVAC" = xyes; then
48497    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
48498  else
48499    SJAVAC_SERVER_DIR=
48500  fi
48501
48502
48503
48504# Can the C/C++ compiler use precompiled headers?
48505
48506
48507  ###############################################################################
48508  #
48509  # Can the C/C++ compiler use precompiled headers?
48510  #
48511  # Check whether --enable-precompiled-headers was given.
48512if test "${enable_precompiled_headers+set}" = set; then :
48513  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
48514else
48515  ENABLE_PRECOMPH=yes
48516fi
48517
48518
48519  USE_PRECOMPILED_HEADER=1
48520  if test "x$ENABLE_PRECOMPH" = xno; then
48521    USE_PRECOMPILED_HEADER=0
48522  fi
48523
48524  if test "x$ENABLE_PRECOMPH" = xyes; then
48525    # Check that the compiler actually supports precomp headers.
48526    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48527      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
48528$as_echo_n "checking that precompiled headers work... " >&6; }
48529      echo "int alfa();" > conftest.h
48530      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
48531      if test ! -f conftest.hpp.gch; then
48532        USE_PRECOMPILED_HEADER=0
48533        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48534$as_echo "no" >&6; }
48535      else
48536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48537$as_echo "yes" >&6; }
48538      fi
48539      rm -f conftest.h conftest.hpp.gch
48540    fi
48541  fi
48542
48543
48544
48545
48546# Setup use of ccache, if available
48547
48548  # Check whether --enable-ccache was given.
48549if test "${enable_ccache+set}" = set; then :
48550  enableval=$enable_ccache;
48551fi
48552
48553
48554  CCACHE=
48555  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
48556$as_echo_n "checking is ccache enabled... " >&6; }
48557  ENABLE_CCACHE=$enable_ccache
48558  if test "x$enable_ccache" = xyes; then
48559    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48560$as_echo "yes" >&6; }
48561    OLD_PATH="$PATH"
48562    if test "x$TOOLS_DIR" != x; then
48563      PATH=$TOOLS_DIR:$PATH
48564    fi
48565
48566
48567
48568  # Publish this variable in the help.
48569
48570
48571  if test "x$CCACHE" = x; then
48572    # The variable is not set by user, try to locate tool using the code snippet
48573    for ac_prog in ccache
48574do
48575  # Extract the first word of "$ac_prog", so it can be a program name with args.
48576set dummy $ac_prog; ac_word=$2
48577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48578$as_echo_n "checking for $ac_word... " >&6; }
48579if ${ac_cv_path_CCACHE+:} false; then :
48580  $as_echo_n "(cached) " >&6
48581else
48582  case $CCACHE in
48583  [\\/]* | ?:[\\/]*)
48584  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48585  ;;
48586  *)
48587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48588for as_dir in $PATH
48589do
48590  IFS=$as_save_IFS
48591  test -z "$as_dir" && as_dir=.
48592    for ac_exec_ext in '' $ac_executable_extensions; do
48593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48594    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48596    break 2
48597  fi
48598done
48599  done
48600IFS=$as_save_IFS
48601
48602  ;;
48603esac
48604fi
48605CCACHE=$ac_cv_path_CCACHE
48606if test -n "$CCACHE"; then
48607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48608$as_echo "$CCACHE" >&6; }
48609else
48610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48611$as_echo "no" >&6; }
48612fi
48613
48614
48615  test -n "$CCACHE" && break
48616done
48617
48618  else
48619    # The variable is set, but is it from the command line or the environment?
48620
48621    # Try to remove the string !CCACHE! from our list.
48622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
48623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48624      # If it failed, the variable was not from the command line. Ignore it,
48625      # but warn the user (except for BASH, which is always set by the calling BASH).
48626      if test "xCCACHE" != xBASH; then
48627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
48628$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
48629      fi
48630      # Try to locate tool using the code snippet
48631      for ac_prog in ccache
48632do
48633  # Extract the first word of "$ac_prog", so it can be a program name with args.
48634set dummy $ac_prog; ac_word=$2
48635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48636$as_echo_n "checking for $ac_word... " >&6; }
48637if ${ac_cv_path_CCACHE+:} false; then :
48638  $as_echo_n "(cached) " >&6
48639else
48640  case $CCACHE in
48641  [\\/]* | ?:[\\/]*)
48642  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48643  ;;
48644  *)
48645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48646for as_dir in $PATH
48647do
48648  IFS=$as_save_IFS
48649  test -z "$as_dir" && as_dir=.
48650    for ac_exec_ext in '' $ac_executable_extensions; do
48651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48652    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48654    break 2
48655  fi
48656done
48657  done
48658IFS=$as_save_IFS
48659
48660  ;;
48661esac
48662fi
48663CCACHE=$ac_cv_path_CCACHE
48664if test -n "$CCACHE"; then
48665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48666$as_echo "$CCACHE" >&6; }
48667else
48668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48669$as_echo "no" >&6; }
48670fi
48671
48672
48673  test -n "$CCACHE" && break
48674done
48675
48676    else
48677      # If it succeeded, then it was overridden by the user. We will use it
48678      # for the tool.
48679
48680      # First remove it from the list of overridden variables, so we can test
48681      # for unknown variables in the end.
48682      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48683
48684      # Check if the provided tool contains a complete path.
48685      tool_specified="$CCACHE"
48686      tool_basename="${tool_specified##*/}"
48687      if test "x$tool_basename" = "x$tool_specified"; then
48688        # A command without a complete path is provided, search $PATH.
48689        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
48690$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
48691        # Extract the first word of "$tool_basename", so it can be a program name with args.
48692set dummy $tool_basename; ac_word=$2
48693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48694$as_echo_n "checking for $ac_word... " >&6; }
48695if ${ac_cv_path_CCACHE+:} false; then :
48696  $as_echo_n "(cached) " >&6
48697else
48698  case $CCACHE in
48699  [\\/]* | ?:[\\/]*)
48700  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48701  ;;
48702  *)
48703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48704for as_dir in $PATH
48705do
48706  IFS=$as_save_IFS
48707  test -z "$as_dir" && as_dir=.
48708    for ac_exec_ext in '' $ac_executable_extensions; do
48709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48710    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48712    break 2
48713  fi
48714done
48715  done
48716IFS=$as_save_IFS
48717
48718  ;;
48719esac
48720fi
48721CCACHE=$ac_cv_path_CCACHE
48722if test -n "$CCACHE"; then
48723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48724$as_echo "$CCACHE" >&6; }
48725else
48726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48727$as_echo "no" >&6; }
48728fi
48729
48730
48731        if test "x$CCACHE" = x; then
48732          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48733        fi
48734      else
48735        # Otherwise we believe it is a complete path. Use it as it is.
48736        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
48737$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
48738        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
48739$as_echo_n "checking for CCACHE... " >&6; }
48740        if test ! -x "$tool_specified"; then
48741          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48742$as_echo "not found" >&6; }
48743          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
48744        fi
48745        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48746$as_echo "$tool_specified" >&6; }
48747      fi
48748    fi
48749  fi
48750
48751
48752
48753  if test "x$CCACHE" = x; then
48754    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
48755  fi
48756
48757
48758    CCACHE_STATUS="enabled"
48759    PATH="$OLD_PATH"
48760  elif test "x$enable_ccache" = xno; then
48761    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
48762$as_echo "no, explicitly disabled" >&6; }
48763  elif test "x$enable_ccache" = x; then
48764    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48765$as_echo "no" >&6; }
48766  else
48767    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
48768$as_echo "unknown" >&6; }
48769    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
48770  fi
48771
48772
48773
48774# Check whether --with-ccache-dir was given.
48775if test "${with_ccache_dir+set}" = set; then :
48776  withval=$with_ccache_dir;
48777fi
48778
48779
48780  if test "x$with_ccache_dir" != x; then
48781    # When using a non home ccache directory, assume the use is to share ccache files
48782    # with other users. Thus change the umask.
48783    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
48784    if test "x$CCACHE" = x; then
48785      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
48786$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
48787    fi
48788  fi
48789
48790  if test "x$CCACHE" != x; then
48791
48792  if test "x$CCACHE" != x; then
48793    # Only use ccache if it is 3.1.4 or later, which supports
48794    # precompiled headers.
48795    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
48796$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
48797    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
48798    if test "x$HAS_GOOD_CCACHE" = x; then
48799      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
48800$as_echo "no, disabling ccache" >&6; }
48801      CCACHE=
48802      CCACHE_STATUS="disabled"
48803    else
48804      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48805$as_echo "yes" >&6; }
48806      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
48807$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
48808      PUSHED_FLAGS="$CXXFLAGS"
48809      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
48810      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48811/* end confdefs.h.  */
48812
48813int
48814main ()
48815{
48816
48817  ;
48818  return 0;
48819}
48820_ACEOF
48821if ac_fn_cxx_try_compile "$LINENO"; then :
48822  CC_KNOWS_CCACHE_TRICK=yes
48823else
48824  CC_KNOWS_CCACHE_TRICK=no
48825fi
48826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48827      CXXFLAGS="$PUSHED_FLAGS"
48828      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
48829        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48830$as_echo "yes" >&6; }
48831      else
48832        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
48833$as_echo "no, disabling ccaching of precompiled headers" >&6; }
48834        CCACHE=
48835        CCACHE_STATUS="disabled"
48836      fi
48837    fi
48838  fi
48839
48840  if test "x$CCACHE" != x; then
48841    CCACHE_SLOPPINESS=time_macros
48842    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
48843    CCACHE_FLAGS=-fpch-preprocess
48844
48845    if test "x$SET_CCACHE_DIR" != x; then
48846      mkdir -p $CCACHE_DIR > /dev/null 2>&1
48847      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
48848    fi
48849  fi
48850
48851  fi
48852
48853
48854###############################################################################
48855#
48856# And now the finish...
48857#
48858###############################################################################
48859
48860# Check for some common pitfalls
48861
48862  if test x"$OPENJDK_BUILD_OS" = xwindows; then
48863    file_to_test="$SRC_ROOT/LICENSE"
48864    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
48865      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
48866    fi
48867  fi
48868
48869
48870  # Did user specify any unknown variables?
48871
48872  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
48873    # Replace the separating ! with spaces before presenting for end user.
48874    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
48875    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
48876$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
48877  fi
48878
48879
48880  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
48881$as_echo_n "checking if build directory is on local disk... " >&6; }
48882
48883  # df -l lists only local disks; if the given directory is not found then
48884  # a non-zero exit code is given
48885  if test "x$DF" = x; then
48886    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48887      # msys does not have df; use Windows "net use" instead.
48888      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
48889      if test "x$IS_NETWORK_DISK" = x; then
48890        OUTPUT_DIR_IS_LOCAL="yes"
48891      else
48892        OUTPUT_DIR_IS_LOCAL="no"
48893      fi
48894    else
48895      # No df here, say it's local
48896      OUTPUT_DIR_IS_LOCAL="yes"
48897    fi
48898  else
48899    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
48900      OUTPUT_DIR_IS_LOCAL="yes"
48901    else
48902      OUTPUT_DIR_IS_LOCAL="no"
48903    fi
48904  fi
48905
48906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
48907$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
48908
48909
48910
48911  # Check if the user has any old-style ALT_ variables set.
48912  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
48913
48914  # Before generating output files, test if they exist. If they do, this is a reconfigure.
48915  # Since we can't properly handle the dependencies for this, warn the user about the situation
48916  if test -e $OUTPUT_ROOT/spec.gmk; then
48917    IS_RECONFIGURE=yes
48918  else
48919    IS_RECONFIGURE=no
48920  fi
48921
48922
48923# At the end, call the custom hook. (Dummy macro if no custom sources available)
48924
48925
48926# We're messing a bit with internal autoconf variables to put the config.status
48927# in the output directory instead of the current directory.
48928CONFIG_STATUS="$OUTPUT_ROOT/config.status"
48929
48930# Create the actual output files. Now the main work of configure is done.
48931cat >confcache <<\_ACEOF
48932# This file is a shell script that caches the results of configure
48933# tests run on this system so they can be shared between configure
48934# scripts and configure runs, see configure's option --config-cache.
48935# It is not useful on other systems.  If it contains results you don't
48936# want to keep, you may remove or edit it.
48937#
48938# config.status only pays attention to the cache file if you give it
48939# the --recheck option to rerun configure.
48940#
48941# `ac_cv_env_foo' variables (set or unset) will be overridden when
48942# loading this file, other *unset* `ac_cv_foo' will be assigned the
48943# following values.
48944
48945_ACEOF
48946
48947# The following way of writing the cache mishandles newlines in values,
48948# but we know of no workaround that is simple, portable, and efficient.
48949# So, we kill variables containing newlines.
48950# Ultrix sh set writes to stderr and can't be redirected directly,
48951# and sets the high bit in the cache file unless we assign to the vars.
48952(
48953  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
48954    eval ac_val=\$$ac_var
48955    case $ac_val in #(
48956    *${as_nl}*)
48957      case $ac_var in #(
48958      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
48959$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
48960      esac
48961      case $ac_var in #(
48962      _ | IFS | as_nl) ;; #(
48963      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
48964      *) { eval $ac_var=; unset $ac_var;} ;;
48965      esac ;;
48966    esac
48967  done
48968
48969  (set) 2>&1 |
48970    case $as_nl`(ac_space=' '; set) 2>&1` in #(
48971    *${as_nl}ac_space=\ *)
48972      # `set' does not quote correctly, so add quotes: double-quote
48973      # substitution turns \\\\ into \\, and sed turns \\ into \.
48974      sed -n \
48975	"s/'/'\\\\''/g;
48976	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
48977      ;; #(
48978    *)
48979      # `set' quotes correctly as required by POSIX, so do not add quotes.
48980      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
48981      ;;
48982    esac |
48983    sort
48984) |
48985  sed '
48986     /^ac_cv_env_/b end
48987     t clear
48988     :clear
48989     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
48990     t end
48991     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
48992     :end' >>confcache
48993if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
48994  if test -w "$cache_file"; then
48995    if test "x$cache_file" != "x/dev/null"; then
48996      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
48997$as_echo "$as_me: updating cache $cache_file" >&6;}
48998      if test ! -f "$cache_file" || test -h "$cache_file"; then
48999	cat confcache >"$cache_file"
49000      else
49001        case $cache_file in #(
49002        */* | ?:*)
49003	  mv -f confcache "$cache_file"$$ &&
49004	  mv -f "$cache_file"$$ "$cache_file" ;; #(
49005        *)
49006	  mv -f confcache "$cache_file" ;;
49007	esac
49008      fi
49009    fi
49010  else
49011    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
49012$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
49013  fi
49014fi
49015rm -f confcache
49016
49017test "x$prefix" = xNONE && prefix=$ac_default_prefix
49018# Let make expand exec_prefix.
49019test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
49020
49021DEFS=-DHAVE_CONFIG_H
49022
49023ac_libobjs=
49024ac_ltlibobjs=
49025U=
49026for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
49027  # 1. Remove the extension, and $U if already installed.
49028  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
49029  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
49030  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
49031  #    will be set to the directory where LIBOBJS objects are built.
49032  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
49033  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
49034done
49035LIBOBJS=$ac_libobjs
49036
49037LTLIBOBJS=$ac_ltlibobjs
49038
49039
49040
49041: "${CONFIG_STATUS=./config.status}"
49042ac_write_fail=0
49043ac_clean_files_save=$ac_clean_files
49044ac_clean_files="$ac_clean_files $CONFIG_STATUS"
49045{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
49046$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
49047as_write_fail=0
49048cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
49049#! $SHELL
49050# Generated by $as_me.
49051# Run this file to recreate the current configuration.
49052# Compiler output produced by configure, useful for debugging
49053# configure, is in config.log if it exists.
49054
49055debug=false
49056ac_cs_recheck=false
49057ac_cs_silent=false
49058
49059SHELL=\${CONFIG_SHELL-$SHELL}
49060export SHELL
49061_ASEOF
49062cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
49063## -------------------- ##
49064## M4sh Initialization. ##
49065## -------------------- ##
49066
49067# Be more Bourne compatible
49068DUALCASE=1; export DUALCASE # for MKS sh
49069if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
49070  emulate sh
49071  NULLCMD=:
49072  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
49073  # is contrary to our usage.  Disable this feature.
49074  alias -g '${1+"$@"}'='"$@"'
49075  setopt NO_GLOB_SUBST
49076else
49077  case `(set -o) 2>/dev/null` in #(
49078  *posix*) :
49079    set -o posix ;; #(
49080  *) :
49081     ;;
49082esac
49083fi
49084
49085
49086as_nl='
49087'
49088export as_nl
49089# Printing a long string crashes Solaris 7 /usr/bin/printf.
49090as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
49091as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
49092as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49093# Prefer a ksh shell builtin over an external printf program on Solaris,
49094# but without wasting forks for bash or zsh.
49095if test -z "$BASH_VERSION$ZSH_VERSION" \
49096    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49097  as_echo='print -r --'
49098  as_echo_n='print -rn --'
49099elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
49100  as_echo='printf %s\n'
49101  as_echo_n='printf %s'
49102else
49103  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
49104    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
49105    as_echo_n='/usr/ucb/echo -n'
49106  else
49107    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
49108    as_echo_n_body='eval
49109      arg=$1;
49110      case $arg in #(
49111      *"$as_nl"*)
49112	expr "X$arg" : "X\\(.*\\)$as_nl";
49113	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
49114      esac;
49115      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
49116    '
49117    export as_echo_n_body
49118    as_echo_n='sh -c $as_echo_n_body as_echo'
49119  fi
49120  export as_echo_body
49121  as_echo='sh -c $as_echo_body as_echo'
49122fi
49123
49124# The user is always right.
49125if test "${PATH_SEPARATOR+set}" != set; then
49126  PATH_SEPARATOR=:
49127  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
49128    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
49129      PATH_SEPARATOR=';'
49130  }
49131fi
49132
49133
49134# IFS
49135# We need space, tab and new line, in precisely that order.  Quoting is
49136# there to prevent editors from complaining about space-tab.
49137# (If _AS_PATH_WALK were called with IFS unset, it would disable word
49138# splitting by setting IFS to empty value.)
49139IFS=" ""	$as_nl"
49140
49141# Find who we are.  Look in the path if we contain no directory separator.
49142as_myself=
49143case $0 in #((
49144  *[\\/]* ) as_myself=$0 ;;
49145  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49146for as_dir in $PATH
49147do
49148  IFS=$as_save_IFS
49149  test -z "$as_dir" && as_dir=.
49150    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
49151  done
49152IFS=$as_save_IFS
49153
49154     ;;
49155esac
49156# We did not find ourselves, most probably we were run as `sh COMMAND'
49157# in which case we are not to be found in the path.
49158if test "x$as_myself" = x; then
49159  as_myself=$0
49160fi
49161if test ! -f "$as_myself"; then
49162  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
49163  exit 1
49164fi
49165
49166# Unset variables that we do not need and which cause bugs (e.g. in
49167# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
49168# suppresses any "Segmentation fault" message there.  '((' could
49169# trigger a bug in pdksh 5.2.14.
49170for as_var in BASH_ENV ENV MAIL MAILPATH
49171do eval test x\${$as_var+set} = xset \
49172  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
49173done
49174PS1='$ '
49175PS2='> '
49176PS4='+ '
49177
49178# NLS nuisances.
49179LC_ALL=C
49180export LC_ALL
49181LANGUAGE=C
49182export LANGUAGE
49183
49184# CDPATH.
49185(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
49186
49187
49188# as_fn_error STATUS ERROR [LINENO LOG_FD]
49189# ----------------------------------------
49190# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
49191# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
49192# script with STATUS, using 1 if that was 0.
49193as_fn_error ()
49194{
49195  as_status=$1; test $as_status -eq 0 && as_status=1
49196  if test "$4"; then
49197    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
49198    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
49199  fi
49200  $as_echo "$as_me: error: $2" >&2
49201  as_fn_exit $as_status
49202} # as_fn_error
49203
49204
49205# as_fn_set_status STATUS
49206# -----------------------
49207# Set $? to STATUS, without forking.
49208as_fn_set_status ()
49209{
49210  return $1
49211} # as_fn_set_status
49212
49213# as_fn_exit STATUS
49214# -----------------
49215# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
49216as_fn_exit ()
49217{
49218  set +e
49219  as_fn_set_status $1
49220  exit $1
49221} # as_fn_exit
49222
49223# as_fn_unset VAR
49224# ---------------
49225# Portably unset VAR.
49226as_fn_unset ()
49227{
49228  { eval $1=; unset $1;}
49229}
49230as_unset=as_fn_unset
49231# as_fn_append VAR VALUE
49232# ----------------------
49233# Append the text in VALUE to the end of the definition contained in VAR. Take
49234# advantage of any shell optimizations that allow amortized linear growth over
49235# repeated appends, instead of the typical quadratic growth present in naive
49236# implementations.
49237if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
49238  eval 'as_fn_append ()
49239  {
49240    eval $1+=\$2
49241  }'
49242else
49243  as_fn_append ()
49244  {
49245    eval $1=\$$1\$2
49246  }
49247fi # as_fn_append
49248
49249# as_fn_arith ARG...
49250# ------------------
49251# Perform arithmetic evaluation on the ARGs, and store the result in the
49252# global $as_val. Take advantage of shells that can avoid forks. The arguments
49253# must be portable across $(()) and expr.
49254if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
49255  eval 'as_fn_arith ()
49256  {
49257    as_val=$(( $* ))
49258  }'
49259else
49260  as_fn_arith ()
49261  {
49262    as_val=`expr "$@" || test $? -eq 1`
49263  }
49264fi # as_fn_arith
49265
49266
49267if expr a : '\(a\)' >/dev/null 2>&1 &&
49268   test "X`expr 00001 : '.*\(...\)'`" = X001; then
49269  as_expr=expr
49270else
49271  as_expr=false
49272fi
49273
49274if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
49275  as_basename=basename
49276else
49277  as_basename=false
49278fi
49279
49280if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
49281  as_dirname=dirname
49282else
49283  as_dirname=false
49284fi
49285
49286as_me=`$as_basename -- "$0" ||
49287$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
49288	 X"$0" : 'X\(//\)$' \| \
49289	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
49290$as_echo X/"$0" |
49291    sed '/^.*\/\([^/][^/]*\)\/*$/{
49292	    s//\1/
49293	    q
49294	  }
49295	  /^X\/\(\/\/\)$/{
49296	    s//\1/
49297	    q
49298	  }
49299	  /^X\/\(\/\).*/{
49300	    s//\1/
49301	    q
49302	  }
49303	  s/.*/./; q'`
49304
49305# Avoid depending upon Character Ranges.
49306as_cr_letters='abcdefghijklmnopqrstuvwxyz'
49307as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
49308as_cr_Letters=$as_cr_letters$as_cr_LETTERS
49309as_cr_digits='0123456789'
49310as_cr_alnum=$as_cr_Letters$as_cr_digits
49311
49312ECHO_C= ECHO_N= ECHO_T=
49313case `echo -n x` in #(((((
49314-n*)
49315  case `echo 'xy\c'` in
49316  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
49317  xy)  ECHO_C='\c';;
49318  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
49319       ECHO_T='	';;
49320  esac;;
49321*)
49322  ECHO_N='-n';;
49323esac
49324
49325rm -f conf$$ conf$$.exe conf$$.file
49326if test -d conf$$.dir; then
49327  rm -f conf$$.dir/conf$$.file
49328else
49329  rm -f conf$$.dir
49330  mkdir conf$$.dir 2>/dev/null
49331fi
49332if (echo >conf$$.file) 2>/dev/null; then
49333  if ln -s conf$$.file conf$$ 2>/dev/null; then
49334    as_ln_s='ln -s'
49335    # ... but there are two gotchas:
49336    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
49337    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
49338    # In both cases, we have to default to `cp -pR'.
49339    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
49340      as_ln_s='cp -pR'
49341  elif ln conf$$.file conf$$ 2>/dev/null; then
49342    as_ln_s=ln
49343  else
49344    as_ln_s='cp -pR'
49345  fi
49346else
49347  as_ln_s='cp -pR'
49348fi
49349rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
49350rmdir conf$$.dir 2>/dev/null
49351
49352
49353# as_fn_mkdir_p
49354# -------------
49355# Create "$as_dir" as a directory, including parents if necessary.
49356as_fn_mkdir_p ()
49357{
49358
49359  case $as_dir in #(
49360  -*) as_dir=./$as_dir;;
49361  esac
49362  test -d "$as_dir" || eval $as_mkdir_p || {
49363    as_dirs=
49364    while :; do
49365      case $as_dir in #(
49366      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
49367      *) as_qdir=$as_dir;;
49368      esac
49369      as_dirs="'$as_qdir' $as_dirs"
49370      as_dir=`$as_dirname -- "$as_dir" ||
49371$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49372	 X"$as_dir" : 'X\(//\)[^/]' \| \
49373	 X"$as_dir" : 'X\(//\)$' \| \
49374	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
49375$as_echo X"$as_dir" |
49376    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49377	    s//\1/
49378	    q
49379	  }
49380	  /^X\(\/\/\)[^/].*/{
49381	    s//\1/
49382	    q
49383	  }
49384	  /^X\(\/\/\)$/{
49385	    s//\1/
49386	    q
49387	  }
49388	  /^X\(\/\).*/{
49389	    s//\1/
49390	    q
49391	  }
49392	  s/.*/./; q'`
49393      test -d "$as_dir" && break
49394    done
49395    test -z "$as_dirs" || eval "mkdir $as_dirs"
49396  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
49397
49398
49399} # as_fn_mkdir_p
49400if mkdir -p . 2>/dev/null; then
49401  as_mkdir_p='mkdir -p "$as_dir"'
49402else
49403  test -d ./-p && rmdir ./-p
49404  as_mkdir_p=false
49405fi
49406
49407
49408# as_fn_executable_p FILE
49409# -----------------------
49410# Test if FILE is an executable regular file.
49411as_fn_executable_p ()
49412{
49413  test -f "$1" && test -x "$1"
49414} # as_fn_executable_p
49415as_test_x='test -x'
49416as_executable_p=as_fn_executable_p
49417
49418# Sed expression to map a string onto a valid CPP name.
49419as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
49420
49421# Sed expression to map a string onto a valid variable name.
49422as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
49423
49424
49425exec 6>&1
49426## ----------------------------------- ##
49427## Main body of $CONFIG_STATUS script. ##
49428## ----------------------------------- ##
49429_ASEOF
49430test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
49431
49432cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49433# Save the log message, to keep $0 and so on meaningful, and to
49434# report actual input values of CONFIG_FILES etc. instead of their
49435# values after options handling.
49436ac_log="
49437This file was extended by OpenJDK $as_me jdk9, which was
49438generated by GNU Autoconf 2.69.  Invocation command line was
49439
49440  CONFIG_FILES    = $CONFIG_FILES
49441  CONFIG_HEADERS  = $CONFIG_HEADERS
49442  CONFIG_LINKS    = $CONFIG_LINKS
49443  CONFIG_COMMANDS = $CONFIG_COMMANDS
49444  $ $0 $@
49445
49446on `(hostname || uname -n) 2>/dev/null | sed 1q`
49447"
49448
49449_ACEOF
49450
49451case $ac_config_files in *"
49452"*) set x $ac_config_files; shift; ac_config_files=$*;;
49453esac
49454
49455case $ac_config_headers in *"
49456"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
49457esac
49458
49459
49460cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49461# Files that config.status was made for.
49462config_files="$ac_config_files"
49463config_headers="$ac_config_headers"
49464
49465_ACEOF
49466
49467cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49468ac_cs_usage="\
49469\`$as_me' instantiates files and other configuration actions
49470from templates according to the current configuration.  Unless the files
49471and actions are specified as TAGs, all are instantiated by default.
49472
49473Usage: $0 [OPTION]... [TAG]...
49474
49475  -h, --help       print this help, then exit
49476  -V, --version    print version number and configuration settings, then exit
49477      --config     print configuration, then exit
49478  -q, --quiet, --silent
49479                   do not print progress messages
49480  -d, --debug      don't remove temporary files
49481      --recheck    update $as_me by reconfiguring in the same conditions
49482      --file=FILE[:TEMPLATE]
49483                   instantiate the configuration file FILE
49484      --header=FILE[:TEMPLATE]
49485                   instantiate the configuration header FILE
49486
49487Configuration files:
49488$config_files
49489
49490Configuration headers:
49491$config_headers
49492
49493Report bugs to <build-dev@openjdk.java.net>.
49494OpenJDK home page: <http://openjdk.java.net>."
49495
49496_ACEOF
49497cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49498ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
49499ac_cs_version="\\
49500OpenJDK config.status jdk9
49501configured by $0, generated by GNU Autoconf 2.69,
49502  with options \\"\$ac_cs_config\\"
49503
49504Copyright (C) 2012 Free Software Foundation, Inc.
49505This config.status script is free software; the Free Software Foundation
49506gives unlimited permission to copy, distribute and modify it."
49507
49508ac_pwd='$ac_pwd'
49509srcdir='$srcdir'
49510AWK='$AWK'
49511test -n "\$AWK" || AWK=awk
49512_ACEOF
49513
49514cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49515# The default lists apply if the user does not specify any file.
49516ac_need_defaults=:
49517while test $# != 0
49518do
49519  case $1 in
49520  --*=?*)
49521    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49522    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
49523    ac_shift=:
49524    ;;
49525  --*=)
49526    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49527    ac_optarg=
49528    ac_shift=:
49529    ;;
49530  *)
49531    ac_option=$1
49532    ac_optarg=$2
49533    ac_shift=shift
49534    ;;
49535  esac
49536
49537  case $ac_option in
49538  # Handling of the options.
49539  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
49540    ac_cs_recheck=: ;;
49541  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
49542    $as_echo "$ac_cs_version"; exit ;;
49543  --config | --confi | --conf | --con | --co | --c )
49544    $as_echo "$ac_cs_config"; exit ;;
49545  --debug | --debu | --deb | --de | --d | -d )
49546    debug=: ;;
49547  --file | --fil | --fi | --f )
49548    $ac_shift
49549    case $ac_optarg in
49550    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49551    '') as_fn_error $? "missing file argument" ;;
49552    esac
49553    as_fn_append CONFIG_FILES " '$ac_optarg'"
49554    ac_need_defaults=false;;
49555  --header | --heade | --head | --hea )
49556    $ac_shift
49557    case $ac_optarg in
49558    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49559    esac
49560    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
49561    ac_need_defaults=false;;
49562  --he | --h)
49563    # Conflict between --help and --header
49564    as_fn_error $? "ambiguous option: \`$1'
49565Try \`$0 --help' for more information.";;
49566  --help | --hel | -h )
49567    $as_echo "$ac_cs_usage"; exit ;;
49568  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
49569  | -silent | --silent | --silen | --sile | --sil | --si | --s)
49570    ac_cs_silent=: ;;
49571
49572  # This is an error.
49573  -*) as_fn_error $? "unrecognized option: \`$1'
49574Try \`$0 --help' for more information." ;;
49575
49576  *) as_fn_append ac_config_targets " $1"
49577     ac_need_defaults=false ;;
49578
49579  esac
49580  shift
49581done
49582
49583ac_configure_extra_args=
49584
49585if $ac_cs_silent; then
49586  exec 6>/dev/null
49587  ac_configure_extra_args="$ac_configure_extra_args --silent"
49588fi
49589
49590_ACEOF
49591cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49592if \$ac_cs_recheck; then
49593  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
49594  shift
49595  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
49596  CONFIG_SHELL='$SHELL'
49597  export CONFIG_SHELL
49598  exec "\$@"
49599fi
49600
49601_ACEOF
49602cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49603exec 5>>config.log
49604{
49605  echo
49606  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
49607## Running $as_me. ##
49608_ASBOX
49609  $as_echo "$ac_log"
49610} >&5
49611
49612_ACEOF
49613cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49614_ACEOF
49615
49616cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49617
49618# Handling of arguments.
49619for ac_config_target in $ac_config_targets
49620do
49621  case $ac_config_target in
49622    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
49623    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
49624    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
49625    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
49626    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
49627    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
49628    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
49629
49630  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
49631  esac
49632done
49633
49634
49635# If the user did not use the arguments to specify the items to instantiate,
49636# then the envvar interface is used.  Set only those that are not.
49637# We use the long form for the default assignment because of an extremely
49638# bizarre bug on SunOS 4.1.3.
49639if $ac_need_defaults; then
49640  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
49641  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
49642fi
49643
49644# Have a temporary directory for convenience.  Make it in the build tree
49645# simply because there is no reason against having it here, and in addition,
49646# creating and moving files from /tmp can sometimes cause problems.
49647# Hook for its removal unless debugging.
49648# Note that there is a small window in which the directory will not be cleaned:
49649# after its creation but before its name has been assigned to `$tmp'.
49650$debug ||
49651{
49652  tmp= ac_tmp=
49653  trap 'exit_status=$?
49654  : "${ac_tmp:=$tmp}"
49655  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
49656' 0
49657  trap 'as_fn_exit 1' 1 2 13 15
49658}
49659# Create a (secure) tmp directory for tmp files.
49660
49661{
49662  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
49663  test -d "$tmp"
49664}  ||
49665{
49666  tmp=./conf$$-$RANDOM
49667  (umask 077 && mkdir "$tmp")
49668} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
49669ac_tmp=$tmp
49670
49671# Set up the scripts for CONFIG_FILES section.
49672# No need to generate them if there are no CONFIG_FILES.
49673# This happens for instance with `./config.status config.h'.
49674if test -n "$CONFIG_FILES"; then
49675
49676
49677ac_cr=`echo X | tr X '\015'`
49678# On cygwin, bash can eat \r inside `` if the user requested igncr.
49679# But we know of no other shell where ac_cr would be empty at this
49680# point, so we can use a bashism as a fallback.
49681if test "x$ac_cr" = x; then
49682  eval ac_cr=\$\'\\r\'
49683fi
49684ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
49685if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
49686  ac_cs_awk_cr='\\r'
49687else
49688  ac_cs_awk_cr=$ac_cr
49689fi
49690
49691echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
49692_ACEOF
49693
49694
49695{
49696  echo "cat >conf$$subs.awk <<_ACEOF" &&
49697  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
49698  echo "_ACEOF"
49699} >conf$$subs.sh ||
49700  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49701ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
49702ac_delim='%!_!# '
49703for ac_last_try in false false false false false :; do
49704  . ./conf$$subs.sh ||
49705    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49706
49707  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
49708  if test $ac_delim_n = $ac_delim_num; then
49709    break
49710  elif $ac_last_try; then
49711    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49712  else
49713    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49714  fi
49715done
49716rm -f conf$$subs.sh
49717
49718cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49719cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
49720_ACEOF
49721sed -n '
49722h
49723s/^/S["/; s/!.*/"]=/
49724p
49725g
49726s/^[^!]*!//
49727:repl
49728t repl
49729s/'"$ac_delim"'$//
49730t delim
49731:nl
49732h
49733s/\(.\{148\}\)..*/\1/
49734t more1
49735s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
49736p
49737n
49738b repl
49739:more1
49740s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49741p
49742g
49743s/.\{148\}//
49744t nl
49745:delim
49746h
49747s/\(.\{148\}\)..*/\1/
49748t more2
49749s/["\\]/\\&/g; s/^/"/; s/$/"/
49750p
49751b
49752:more2
49753s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49754p
49755g
49756s/.\{148\}//
49757t delim
49758' <conf$$subs.awk | sed '
49759/^[^""]/{
49760  N
49761  s/\n//
49762}
49763' >>$CONFIG_STATUS || ac_write_fail=1
49764rm -f conf$$subs.awk
49765cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49766_ACAWK
49767cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
49768  for (key in S) S_is_set[key] = 1
49769  FS = ""
49770
49771}
49772{
49773  line = $ 0
49774  nfields = split(line, field, "@")
49775  substed = 0
49776  len = length(field[1])
49777  for (i = 2; i < nfields; i++) {
49778    key = field[i]
49779    keylen = length(key)
49780    if (S_is_set[key]) {
49781      value = S[key]
49782      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
49783      len += length(value) + length(field[++i])
49784      substed = 1
49785    } else
49786      len += 1 + keylen
49787  }
49788
49789  print line
49790}
49791
49792_ACAWK
49793_ACEOF
49794cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49795if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
49796  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
49797else
49798  cat
49799fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
49800  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
49801_ACEOF
49802
49803# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
49804# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
49805# trailing colons and then remove the whole line if VPATH becomes empty
49806# (actually we leave an empty line to preserve line numbers).
49807if test "x$srcdir" = x.; then
49808  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
49809h
49810s///
49811s/^/:/
49812s/[	 ]*$/:/
49813s/:\$(srcdir):/:/g
49814s/:\${srcdir}:/:/g
49815s/:@srcdir@:/:/g
49816s/^:*//
49817s/:*$//
49818x
49819s/\(=[	 ]*\).*/\1/
49820G
49821s/\n//
49822s/^[^=]*=[	 ]*$//
49823}'
49824fi
49825
49826cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49827fi # test -n "$CONFIG_FILES"
49828
49829# Set up the scripts for CONFIG_HEADERS section.
49830# No need to generate them if there are no CONFIG_HEADERS.
49831# This happens for instance with `./config.status Makefile'.
49832if test -n "$CONFIG_HEADERS"; then
49833cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
49834BEGIN {
49835_ACEOF
49836
49837# Transform confdefs.h into an awk script `defines.awk', embedded as
49838# here-document in config.status, that substitutes the proper values into
49839# config.h.in to produce config.h.
49840
49841# Create a delimiter string that does not exist in confdefs.h, to ease
49842# handling of long lines.
49843ac_delim='%!_!# '
49844for ac_last_try in false false :; do
49845  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
49846  if test -z "$ac_tt"; then
49847    break
49848  elif $ac_last_try; then
49849    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
49850  else
49851    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49852  fi
49853done
49854
49855# For the awk script, D is an array of macro values keyed by name,
49856# likewise P contains macro parameters if any.  Preserve backslash
49857# newline sequences.
49858
49859ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
49860sed -n '
49861s/.\{148\}/&'"$ac_delim"'/g
49862t rset
49863:rset
49864s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
49865t def
49866d
49867:def
49868s/\\$//
49869t bsnl
49870s/["\\]/\\&/g
49871s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
49872D["\1"]=" \3"/p
49873s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
49874d
49875:bsnl
49876s/["\\]/\\&/g
49877s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
49878D["\1"]=" \3\\\\\\n"\\/p
49879t cont
49880s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
49881t cont
49882d
49883:cont
49884n
49885s/.\{148\}/&'"$ac_delim"'/g
49886t clear
49887:clear
49888s/\\$//
49889t bsnlc
49890s/["\\]/\\&/g; s/^/"/; s/$/"/p
49891d
49892:bsnlc
49893s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
49894b cont
49895' <confdefs.h | sed '
49896s/'"$ac_delim"'/"\\\
49897"/g' >>$CONFIG_STATUS || ac_write_fail=1
49898
49899cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49900  for (key in D) D_is_set[key] = 1
49901  FS = ""
49902}
49903/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
49904  line = \$ 0
49905  split(line, arg, " ")
49906  if (arg[1] == "#") {
49907    defundef = arg[2]
49908    mac1 = arg[3]
49909  } else {
49910    defundef = substr(arg[1], 2)
49911    mac1 = arg[2]
49912  }
49913  split(mac1, mac2, "(") #)
49914  macro = mac2[1]
49915  prefix = substr(line, 1, index(line, defundef) - 1)
49916  if (D_is_set[macro]) {
49917    # Preserve the white space surrounding the "#".
49918    print prefix "define", macro P[macro] D[macro]
49919    next
49920  } else {
49921    # Replace #undef with comments.  This is necessary, for example,
49922    # in the case of _POSIX_SOURCE, which is predefined and required
49923    # on some systems where configure will not decide to define it.
49924    if (defundef == "undef") {
49925      print "/*", prefix defundef, macro, "*/"
49926      next
49927    }
49928  }
49929}
49930{ print }
49931_ACAWK
49932_ACEOF
49933cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49934  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
49935fi # test -n "$CONFIG_HEADERS"
49936
49937
49938eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
49939shift
49940for ac_tag
49941do
49942  case $ac_tag in
49943  :[FHLC]) ac_mode=$ac_tag; continue;;
49944  esac
49945  case $ac_mode$ac_tag in
49946  :[FHL]*:*);;
49947  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
49948  :[FH]-) ac_tag=-:-;;
49949  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
49950  esac
49951  ac_save_IFS=$IFS
49952  IFS=:
49953  set x $ac_tag
49954  IFS=$ac_save_IFS
49955  shift
49956  ac_file=$1
49957  shift
49958
49959  case $ac_mode in
49960  :L) ac_source=$1;;
49961  :[FH])
49962    ac_file_inputs=
49963    for ac_f
49964    do
49965      case $ac_f in
49966      -) ac_f="$ac_tmp/stdin";;
49967      *) # Look for the file first in the build tree, then in the source tree
49968	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
49969	 # because $ac_f cannot contain `:'.
49970	 test -f "$ac_f" ||
49971	   case $ac_f in
49972	   [\\/$]*) false;;
49973	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
49974	   esac ||
49975	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
49976      esac
49977      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
49978      as_fn_append ac_file_inputs " '$ac_f'"
49979    done
49980
49981    # Let's still pretend it is `configure' which instantiates (i.e., don't
49982    # use $as_me), people would be surprised to read:
49983    #    /* config.h.  Generated by config.status.  */
49984    configure_input='Generated from '`
49985	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
49986	`' by configure.'
49987    if test x"$ac_file" != x-; then
49988      configure_input="$ac_file.  $configure_input"
49989      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
49990$as_echo "$as_me: creating $ac_file" >&6;}
49991    fi
49992    # Neutralize special characters interpreted by sed in replacement strings.
49993    case $configure_input in #(
49994    *\&* | *\|* | *\\* )
49995       ac_sed_conf_input=`$as_echo "$configure_input" |
49996       sed 's/[\\\\&|]/\\\\&/g'`;; #(
49997    *) ac_sed_conf_input=$configure_input;;
49998    esac
49999
50000    case $ac_tag in
50001    *:-:* | *:-) cat >"$ac_tmp/stdin" \
50002      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
50003    esac
50004    ;;
50005  esac
50006
50007  ac_dir=`$as_dirname -- "$ac_file" ||
50008$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
50009	 X"$ac_file" : 'X\(//\)[^/]' \| \
50010	 X"$ac_file" : 'X\(//\)$' \| \
50011	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
50012$as_echo X"$ac_file" |
50013    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
50014	    s//\1/
50015	    q
50016	  }
50017	  /^X\(\/\/\)[^/].*/{
50018	    s//\1/
50019	    q
50020	  }
50021	  /^X\(\/\/\)$/{
50022	    s//\1/
50023	    q
50024	  }
50025	  /^X\(\/\).*/{
50026	    s//\1/
50027	    q
50028	  }
50029	  s/.*/./; q'`
50030  as_dir="$ac_dir"; as_fn_mkdir_p
50031  ac_builddir=.
50032
50033case "$ac_dir" in
50034.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
50035*)
50036  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
50037  # A ".." for each directory in $ac_dir_suffix.
50038  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
50039  case $ac_top_builddir_sub in
50040  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
50041  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
50042  esac ;;
50043esac
50044ac_abs_top_builddir=$ac_pwd
50045ac_abs_builddir=$ac_pwd$ac_dir_suffix
50046# for backward compatibility:
50047ac_top_builddir=$ac_top_build_prefix
50048
50049case $srcdir in
50050  .)  # We are building in place.
50051    ac_srcdir=.
50052    ac_top_srcdir=$ac_top_builddir_sub
50053    ac_abs_top_srcdir=$ac_pwd ;;
50054  [\\/]* | ?:[\\/]* )  # Absolute name.
50055    ac_srcdir=$srcdir$ac_dir_suffix;
50056    ac_top_srcdir=$srcdir
50057    ac_abs_top_srcdir=$srcdir ;;
50058  *) # Relative name.
50059    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
50060    ac_top_srcdir=$ac_top_build_prefix$srcdir
50061    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
50062esac
50063ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
50064
50065
50066  case $ac_mode in
50067  :F)
50068  #
50069  # CONFIG_FILE
50070  #
50071
50072_ACEOF
50073
50074cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50075# If the template does not know about datarootdir, expand it.
50076# FIXME: This hack should be removed a few years after 2.60.
50077ac_datarootdir_hack=; ac_datarootdir_seen=
50078ac_sed_dataroot='
50079/datarootdir/ {
50080  p
50081  q
50082}
50083/@datadir@/p
50084/@docdir@/p
50085/@infodir@/p
50086/@localedir@/p
50087/@mandir@/p'
50088case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
50089*datarootdir*) ac_datarootdir_seen=yes;;
50090*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
50091  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
50092$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
50093_ACEOF
50094cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50095  ac_datarootdir_hack='
50096  s&@datadir@&$datadir&g
50097  s&@docdir@&$docdir&g
50098  s&@infodir@&$infodir&g
50099  s&@localedir@&$localedir&g
50100  s&@mandir@&$mandir&g
50101  s&\\\${datarootdir}&$datarootdir&g' ;;
50102esac
50103_ACEOF
50104
50105# Neutralize VPATH when `$srcdir' = `.'.
50106# Shell code in configure.ac might set extrasub.
50107# FIXME: do we really want to maintain this feature?
50108cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50109ac_sed_extra="$ac_vpsub
50110$extrasub
50111_ACEOF
50112cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50113:t
50114/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
50115s|@configure_input@|$ac_sed_conf_input|;t t
50116s&@top_builddir@&$ac_top_builddir_sub&;t t
50117s&@top_build_prefix@&$ac_top_build_prefix&;t t
50118s&@srcdir@&$ac_srcdir&;t t
50119s&@abs_srcdir@&$ac_abs_srcdir&;t t
50120s&@top_srcdir@&$ac_top_srcdir&;t t
50121s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
50122s&@builddir@&$ac_builddir&;t t
50123s&@abs_builddir@&$ac_abs_builddir&;t t
50124s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
50125$ac_datarootdir_hack
50126"
50127eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
50128  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50129
50130test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
50131  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
50132  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
50133      "$ac_tmp/out"`; test -z "$ac_out"; } &&
50134  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
50135which seems to be undefined.  Please make sure it is defined" >&5
50136$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
50137which seems to be undefined.  Please make sure it is defined" >&2;}
50138
50139  rm -f "$ac_tmp/stdin"
50140  case $ac_file in
50141  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
50142  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
50143  esac \
50144  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50145 ;;
50146  :H)
50147  #
50148  # CONFIG_HEADER
50149  #
50150  if test x"$ac_file" != x-; then
50151    {
50152      $as_echo "/* $configure_input  */" \
50153      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
50154    } >"$ac_tmp/config.h" \
50155      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50156    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
50157      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
50158$as_echo "$as_me: $ac_file is unchanged" >&6;}
50159    else
50160      rm -f "$ac_file"
50161      mv "$ac_tmp/config.h" "$ac_file" \
50162	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
50163    fi
50164  else
50165    $as_echo "/* $configure_input  */" \
50166      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
50167      || as_fn_error $? "could not create -" "$LINENO" 5
50168  fi
50169 ;;
50170
50171
50172  esac
50173
50174done # for ac_tag
50175
50176
50177as_fn_exit 0
50178_ACEOF
50179ac_clean_files=$ac_clean_files_save
50180
50181test $ac_write_fail = 0 ||
50182  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
50183
50184
50185# configure is writing to config.log, and then calls config.status.
50186# config.status does its own redirection, appending to config.log.
50187# Unfortunately, on DOS this fails, as config.log is still kept open
50188# by configure, so config.status won't be able to write to it; its
50189# output is simply discarded.  So we exec the FD to /dev/null,
50190# effectively closing config.log, so it can be properly (re)opened and
50191# appended to by config.status.  When coming back to configure, we
50192# need to make the FD available again.
50193if test "$no_create" != yes; then
50194  ac_cs_success=:
50195  ac_config_status_args=
50196  test "$silent" = yes &&
50197    ac_config_status_args="$ac_config_status_args --quiet"
50198  exec 5>/dev/null
50199  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
50200  exec 5>>config.log
50201  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
50202  # would make configure fail if this is the last instruction.
50203  $ac_cs_success || as_fn_exit 1
50204fi
50205if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
50206  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
50207$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
50208fi
50209
50210
50211# Try to move the config.log file to the output directory.
50212if test -e ./config.log; then
50213  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
50214fi
50215
50216# Make the compare script executable
50217$CHMOD +x $OUTPUT_ROOT/compare.sh
50218
50219# Finally output some useful information to the user
50220
50221  # Finally output some useful information to the user
50222
50223  printf "\n"
50224  printf "====================================================\n"
50225  if test "x$no_create" != "xyes"; then
50226    if test "x$IS_RECONFIGURE" != "xyes"; then
50227      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
50228    else
50229      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
50230    fi
50231  else
50232    if test "x$IS_RECONFIGURE" != "xyes"; then
50233      printf "A configuration has been successfully checked but not created\n"
50234    else
50235      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
50236    fi
50237  fi
50238  if test "x$CONFIGURE_COMMAND_LINE" != x; then
50239    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
50240  else
50241    printf "using default settings.\n"
50242  fi
50243
50244  printf "\n"
50245  printf "Configuration summary:\n"
50246  printf "* Debug level:    $DEBUG_LEVEL\n"
50247  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
50248  printf "* JDK variant:    $JDK_VARIANT\n"
50249  printf "* JVM variants:   $with_jvm_variants\n"
50250  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
50251
50252  printf "\n"
50253  printf "Tools summary:\n"
50254  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
50255    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
50256  fi
50257  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
50258  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
50259  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
50260  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
50261
50262  printf "\n"
50263  printf "Build performance summary:\n"
50264  printf "* Cores to use:   $JOBS\n"
50265  printf "* Memory limit:   $MEMORY_SIZE MB\n"
50266  if test "x$CCACHE_STATUS" != "x"; then
50267    printf "* ccache status:  $CCACHE_STATUS\n"
50268  fi
50269  printf "\n"
50270
50271  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
50272    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
50273    printf "will result in longer build times.\n"
50274    printf "\n"
50275  fi
50276
50277  if test "x$FOUND_ALT_VARIABLES" != "x"; then
50278    printf "WARNING: You have old-style ALT_ environment variables set.\n"
50279    printf "These are not respected, and will be ignored. It is recommended\n"
50280    printf "that you clean your environment. The following variables are set:\n"
50281    printf "$FOUND_ALT_VARIABLES\n"
50282    printf "\n"
50283  fi
50284
50285  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
50286    printf "WARNING: Your build output directory is not on a local disk.\n"
50287    printf "This will severely degrade build performance!\n"
50288    printf "It is recommended that you create an output directory on a local disk,\n"
50289    printf "and run the configure script again from that directory.\n"
50290    printf "\n"
50291  fi
50292
50293  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
50294    printf "WARNING: The result of this configuration has overridden an older\n"
50295    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
50296    printf "proper build. Failure to do so might result in strange build problems.\n"
50297    printf "\n"
50298  fi
50299
50300  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
50301    printf "WARNING: The result of this configuration was not saved.\n"
50302    printf "You should run without '--no-create | -n' to create the configuration.\n"
50303    printf "\n"
50304  fi
50305
50306